/* DashNOX — autenticação, conta e segurança. */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 2400;
  min-height: 100vh;
  overflow-y: auto;
  background: #050b17;
}

.auth-layout {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  overflow: hidden;
  border: 1px solid rgba(89, 142, 224, 0.2);
  border-radius: 24px;
  background: #091426;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.auth-intro {
  position: relative;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  padding: 46px 52px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(24, 73, 145, 0.28), transparent 58%),
    #07101f;
}

.auth-intro::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(73, 153, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(36, 112, 218, 0.04),
    0 0 0 140px rgba(36, 112, 218, 0.025);
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.auth-brand div {
  display: grid;
  gap: 3px;
}

.auth-brand span {
  color: #eff6ff;
  font-size: 1.3rem;
  font-weight: 800;
}

.auth-brand small {
  color: #7f95b7;
  font-size: 0.8rem;
}

.auth-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: auto 0;
  padding: 70px 0;
}

.auth-eyebrow {
  color: #72b6ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-intro-copy h1 {
  max-width: 620px;
  margin: 18px 0 22px;
  color: #f1f6ff;
  font-size: clamp(2.25rem, 4vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.auth-intro-copy p {
  max-width: 560px;
  margin: 0;
  color: #93a7c7;
  font-size: 1.02rem;
  line-height: 1.75;
}

.auth-trust-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(106, 158, 235, 0.14);
}

.auth-trust-list > div {
  padding: 20px 18px 0 0;
}

.auth-trust-list span {
  display: block;
  margin-bottom: 10px;
  color: #5797e8;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-trust-list p {
  margin: 0;
  color: #778bab;
  font-size: 0.78rem;
  line-height: 1.55;
}

.auth-trust-list strong {
  color: #b9c9df;
  font-weight: 700;
}

.auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 54px 34px;
  border-left: 1px solid rgba(106, 158, 235, 0.13);
  background: #0b1628;
}

.auth-view {
  width: 100%;
  max-width: 520px;
  margin: auto;
  animation: authViewIn 0.22s ease;
}

@keyframes authViewIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-view-heading {
  margin-bottom: 28px;
}

.auth-view-heading h2 {
  margin: 10px 0 8px;
  color: #f2f6ff;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  letter-spacing: -0.035em;
}

.auth-view-heading p {
  margin: 0;
  color: #879bb9;
  line-height: 1.6;
}

.auth-view-heading-centered {
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label,
.auth-label-row label {
  color: #c9d5e8;
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(104, 151, 220, 0.2);
  border-radius: 10px;
  outline: none;
  background: #07111f;
  color: #ecf3ff;
  font: inherit;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-field input:hover {
  border-color: rgba(104, 151, 220, 0.34);
}

.auth-field input:focus {
  border-color: #428eea;
  box-shadow: 0 0 0 3px rgba(66, 142, 234, 0.12);
}

.auth-field input[aria-invalid="true"] {
  border-color: #e76b80;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-text-button,
.auth-switch-copy button {
  padding: 0;
  border: 0;
  background: none;
  color: #65a9f7;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-button {
  font-size: 0.8rem;
}

.auth-text-button:hover,
.auth-switch-copy button:hover {
  color: #9acbff;
  text-decoration: underline;
}

.auth-password-control {
  position: relative;
}

.auth-password-control input {
  padding-right: 82px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 4px;
  border: 0;
  background: none;
  color: #6f87a9;
  font-size: 0.74rem;
  font-weight: 700;
  transform: translateY(-50%);
  cursor: pointer;
}

.auth-check-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #8498b6;
  font-size: 0.8rem;
  line-height: 1.45;
  cursor: pointer;
}

.auth-check-control input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #3287e7;
}

.auth-primary,
.auth-secondary {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    border-color 0.18s ease;
}

.auth-primary {
  border: 1px solid #318aeb;
  background: #2479d7;
  color: #fff;
  box-shadow: 0 12px 25px rgba(22, 105, 196, 0.2);
}

.auth-secondary {
  border: 1px solid rgba(104, 151, 220, 0.26);
  background: #0b1b31;
  color: #cfe0f7;
}

.auth-primary:hover,
.auth-secondary:hover {
  transform: translateY(-1px);
}

.auth-primary:disabled,
.auth-secondary:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.auth-switch-copy {
  margin: 24px 0 0;
  color: #7f93b1;
  text-align: center;
  font-size: 0.86rem;
}

.auth-status {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 22px;
  padding: 12px 14px;
  border: 1px solid rgba(101, 169, 247, 0.28);
  border-radius: 10px;
  background: rgba(38, 111, 191, 0.11);
  color: #b9d7fa;
  font-size: 0.82rem;
  line-height: 1.5;
}

.auth-status.is-error {
  border-color: rgba(231, 107, 128, 0.32);
  background: rgba(153, 43, 65, 0.12);
  color: #ffb8c5;
}

.auth-status.is-success {
  border-color: rgba(58, 196, 145, 0.3);
  background: rgba(30, 137, 98, 0.12);
  color: #9ce8c9;
}

.auth-invite-field {
  padding: 14px;
  border: 1px solid rgba(97, 186, 255, 0.22);
  border-radius: 12px;
  background: rgba(32, 103, 182, 0.08);
}

.auth-invite-field input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.auth-invite-field small {
  color: #7186a6;
  font-size: 0.72rem;
}

.auth-password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-password-rules span {
  padding: 5px 8px;
  border: 1px solid rgba(104, 151, 220, 0.14);
  border-radius: 6px;
  color: #7185a4;
  font-size: 0.7rem;
}

.auth-password-rules span.is-valid {
  border-color: rgba(65, 196, 145, 0.24);
  color: #6fd6ae;
}

.auth-email-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(66, 175, 135, 0.4);
  border-radius: 50%;
  background: rgba(46, 161, 120, 0.12);
  color: #63d5aa;
  font-size: 1.5rem;
  font-weight: 800;
}

.auth-email-icon-link {
  border-color: rgba(76, 151, 242, 0.42);
  background: rgba(48, 118, 205, 0.13);
  color: #7dbbff;
}

.auth-code-input {
  text-align: center;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.32em;
  font-variant-numeric: tabular-nums;
}

.auth-code-input::placeholder {
  color: #435675;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #607594;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: rgba(104, 151, 220, 0.14);
  content: "";
}

.auth-resend-actions {
  display: grid;
  gap: 8px;
}

.auth-resend-actions small {
  min-height: 18px;
  color: #7186a6;
  text-align: center;
  font-size: 0.72rem;
}

.auth-resend-actions .auth-secondary:disabled {
  cursor: not-allowed;
}

.auth-switch-copy-compact {
  margin-top: 18px;
}

.auth-wide {
  width: 100%;
}

.auth-footer-note {
  width: 100%;
  max-width: 520px;
  margin: 34px auto 0;
  color: #5f7391;
  text-align: center;
  font-size: 0.72rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.sidebar-account {
  position: relative;
  margin: auto 18px 0;
  padding-top: 18px;
  border-top: 1px solid rgba(92, 144, 220, 0.12);
}

.account-summary {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #cbd9ed;
  text-align: left;
  cursor: pointer;
}

.account-summary:hover,
.account-summary[aria-expanded="true"] {
  border-color: rgba(88, 147, 226, 0.16);
  background: rgba(40, 91, 163, 0.09);
}

.account-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(77, 150, 244, 0.28);
  border-radius: 10px;
  background: #0b203c;
  color: #7fbcff;
  font-size: 0.74rem;
  font-weight: 800;
}

.account-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: 0.82rem;
}

.account-copy small {
  color: #7085a4;
  font-size: 0.69rem;
}

.account-menu {
  position: absolute;
  z-index: 120;
  left: 0;
  right: auto;
  bottom: calc(100% + 10px);
  width: 288px;
  max-width: min(288px, calc(100vw - 36px));
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(var(--user-accent-rgb, 58, 134, 255), 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 15% 0%, rgba(var(--user-accent-rgb, 58, 134, 255), 0.09), transparent 42%),
    rgba(var(--user-menu-bg-rgb, 11, 22, 40), 0.99);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

@media (min-width: 861px) {
  .sidebar-account .account-menu {
    background: var(--user-menu-bg) !important;
    background-color: var(--user-menu-bg) !important;
    border-color: rgba(var(--user-accent-rgb, 58, 134, 255), 0.22) !important;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.52) !important;
  }

  .sidebar-account .account-menu > button {
    display: flex;
    align-items: center;
    min-height: 40px;
    white-space: nowrap;
  }
}

.account-menu-identity {
  display: grid;
  gap: 4px;
  margin: 4px 4px 8px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid rgba(92, 144, 220, 0.12);
}

.account-menu-identity strong {
  color: #dce8f9;
  font-size: 0.84rem;
}

.account-menu-identity small {
  overflow: hidden;
  color: #758aa9;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu > button {
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aebed5;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.account-menu > button:hover {
  background: rgba(61, 119, 197, 0.11);
  color: #e2edfc;
}

.account-menu > .account-logout {
  color: #ef8ca0;
}

.account-security-modal {
  width: min(92vw, 540px);
}

.account-security-copy {
  margin: -4px 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.account-security-form {
  display: grid;
  gap: 16px;
}

.mobile-account {
  position: fixed;
  z-index: 90;
  top: 18px;
  right: 18px;
  display: none;
}

.mobile-account-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73, 147, 238, 0.28);
  border-radius: 11px;
  background: #0a1c35;
  color: #87beff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.mobile-account .account-menu {
  right: 0;
  bottom: auto;
  left: auto;
  top: calc(100% + 8px);
  width: 260px;
  max-width: calc(100vw - 36px);
}

@media (max-width: 860px) {
  .mobile-account {
    display: block;
  }
}

.auth-turnstile {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-turnstile.hidden {
  display: none;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 30px));
    margin: 15px auto;
  }

  .auth-intro {
    min-height: auto;
    padding: 30px 32px;
  }

  .auth-intro-copy {
    margin: 40px 0 26px;
    padding: 0;
  }

  .auth-intro-copy h1 {
    max-width: 570px;
    font-size: clamp(2rem, 7vw, 3.5rem);
  }

  .auth-trust-list {
    display: none;
  }

  .auth-card {
    min-height: 560px;
    padding: 44px 32px 28px;
    border-top: 1px solid rgba(106, 158, 235, 0.13);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .auth-layout {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .auth-intro {
    padding: 24px 22px;
  }

  .auth-intro-copy {
    margin: 34px 0 10px;
  }

  .auth-intro-copy p {
    display: none;
  }

  .auth-card {
    min-height: 640px;
    padding: 36px 22px 26px;
  }

  .auth-form-row {
    grid-template-columns: 1fr;
  }

  .auth-status {
    margin-bottom: 16px;
  }

  .account-menu {
    width: calc(100vw - 36px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-view {
    animation: none;
  }
}
