html {
  background: #06111d;
  color-scheme: dark;
}

body[data-page-id="app-login"] {
  --auth-bg: #06111d;
  --auth-panel: #0c2033;
  --auth-panel-deep: #071421;
  --auth-field-bg: #f8fbff;
  --auth-field-ink: #04111f;
  --auth-field-muted: #4b5f76;
  --auth-ink: #f8fbff;
  --auth-muted: #f3f8ff;
  --auth-line: rgba(232, 241, 251, 0.82);
  background-color: var(--auth-bg) !important;
  background:
    radial-gradient(circle at 18% 12%, rgba(47, 199, 161, 0.2), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(75, 163, 255, 0.16), transparent 30rem),
    linear-gradient(180deg, var(--auth-bg) 0%, #081827 52%, var(--auth-bg) 100%) !important;
  color: var(--auth-ink) !important;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0 !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body[data-page-id="app-login"] *,
body[data-page-id="app-login"] *::before,
body[data-page-id="app-login"] *::after {
  box-sizing: border-box;
}

body[data-page-id="app-login"] :where(main, section, aside, div, form, label, p, h1, h2, strong, span, li, a) {
  color: var(--auth-ink) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.86fr) minmax(280px, 0.58fr);
  margin: 0 auto;
  max-width: 1080px;
  min-height: 100vh;
  padding: 44px 20px 60px;
  width: 100%;
}

.auth-panel,
.auth-side-panel,
.auth-role-card,
.auth-card {
  background: linear-gradient(180deg, var(--auth-panel) 0%, var(--auth-panel-deep) 100%) !important;
  border: 1px solid var(--auth-line) !important;
  border-radius: 10px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
  color: var(--auth-ink) !important;
  opacity: 1 !important;
}

.auth-panel,
.auth-side-panel,
.auth-role-card {
  min-width: 0;
  padding: 24px;
}

.auth-panel *,
.auth-side-panel *,
.auth-role-card *,
.auth-card * {
  opacity: 1 !important;
  text-shadow: none !important;
}

.auth-brand img {
  background: #071421;
  border: 1px solid rgba(232, 241, 251, 0.35);
  border-radius: 10px;
  display: block;
  height: auto;
  margin-bottom: 18px;
  max-width: 180px;
  padding: 10px;
}

.auth-brand .eyebrow,
.plan-intent-banner span,
.profile-recovery-panel span {
  color: #76f0d4 !important;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-fill-color: #76f0d4 !important;
}

.auth-brand h1 {
  color: #ffffff !important;
  font-size: clamp(2rem, 3vw, 2.85rem);
  line-height: 1.05;
  margin: 0;
  -webkit-text-fill-color: #ffffff !important;
}

.auth-side-panel h2,
.auth-role-card h2,
.auth-card h2 {
  color: #ffffff !important;
  font-size: 1.18rem;
  margin: 0 0 12px;
  -webkit-text-fill-color: #ffffff !important;
}

.auth-copy,
.auth-side-panel p,
.auth-list,
.auth-list li,
.auth-card p {
  color: var(--auth-muted) !important;
  line-height: 1.55;
  -webkit-text-fill-color: var(--auth-muted) !important;
}

.auth-copy {
  margin: 12px 0 18px;
}

.plan-intent-banner,
.profile-recovery-panel,
.auth-status {
  background: #06121e !important;
  border: 1px solid rgba(219, 234, 249, 0.66) !important;
  border-radius: 8px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.plan-intent-banner {
  display: grid;
  gap: 5px;
  margin: 0 0 18px;
  padding: 12px;
}

.plan-intent-banner[hidden],
.profile-recovery-panel[hidden] {
  display: none !important;
}

.plan-intent-banner strong,
.profile-recovery-panel strong {
  color: #fff8dd !important;
  font-size: 1rem;
  overflow-wrap: anywhere;
  -webkit-text-fill-color: #fff8dd !important;
}

.plan-intent-banner p,
.profile-recovery-panel p {
  color: #fff4cf !important;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
  -webkit-text-fill-color: #fff4cf !important;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-form label {
  color: #ffffff !important;
  display: grid;
  font-size: 0.9rem;
  font-weight: 850;
  gap: 7px;
  -webkit-text-fill-color: #ffffff !important;
}

.auth-form input,
body[data-page-id="app-login"] select,
body[data-page-id="app-login"] textarea {
  background: var(--auth-field-bg) !important;
  border: 2px solid rgba(232, 241, 251, 0.95) !important;
  border-radius: 8px;
  caret-color: var(--auth-field-ink) !important;
  color: var(--auth-field-ink) !important;
  color-scheme: light;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
  -webkit-text-fill-color: var(--auth-field-ink) !important;
}

.auth-form input::placeholder,
body[data-page-id="app-login"] textarea::placeholder {
  color: var(--auth-field-muted) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--auth-field-muted) !important;
}

.auth-form input:focus,
body[data-page-id="app-login"] select:focus,
body[data-page-id="app-login"] textarea:focus {
  border-color: #7fc2ff !important;
  box-shadow: 0 0 0 3px rgba(75, 163, 255, 0.28);
  outline: none;
}

.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--auth-field-bg) inset !important;
  caret-color: var(--auth-field-ink) !important;
  -webkit-text-fill-color: var(--auth-field-ink) !important;
}

.auth-form button,
.role-button,
.profile-recovery-actions button,
.auth-card .btn,
.auth-card a {
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 850;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  text-decoration: none;
}

#loginBtn,
.role-button,
.profile-recovery-actions button:first-child,
.auth-card .btn,
.auth-card a {
  background: #43d6af !important;
  border: 0 !important;
  color: #02101b !important;
  -webkit-text-fill-color: #02101b !important;
}

#showRoleModalBtn,
.auth-form button.secondary-btn,
.profile-recovery-actions button:last-child {
  background: #12324f !important;
  border: 1px solid rgba(219, 234, 249, 0.68) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

#resetPasswordBtn,
.auth-form button.text-btn {
  background: #0d2c54 !important;
  border: 1px solid rgba(127, 194, 255, 0.68) !important;
  color: #eef8ff !important;
  min-height: 38px;
  -webkit-text-fill-color: #eef8ff !important;
}

.auth-form button:disabled,
.role-button:disabled {
  background: rgba(159, 178, 200, 0.18) !important;
  color: #cbd5e1 !important;
  cursor: not-allowed;
  -webkit-text-fill-color: #cbd5e1 !important;
}

.auth-status {
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
  margin: 18px 0 0;
  padding: 11px 12px;
}

.auth-status[data-tone="success"] {
  background: #073225 !important;
  border-color: rgba(47, 199, 161, 0.7) !important;
  color: #d9fff2 !important;
  -webkit-text-fill-color: #d9fff2 !important;
}

.auth-status[data-tone="warning"] {
  background: #2c2107 !important;
  border-color: rgba(244, 201, 93, 0.72) !important;
  color: #fff2c2 !important;
  -webkit-text-fill-color: #fff2c2 !important;
}

.auth-status[data-tone="danger"] {
  background: #32110f !important;
  border-color: rgba(255, 122, 110, 0.72) !important;
  color: #ffd3cf !important;
  -webkit-text-fill-color: #ffd3cf !important;
}

.profile-recovery-panel {
  border-left: 4px solid #ffd978 !important;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 13px;
}

.profile-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.auth-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.auth-list li {
  background: #06121e !important;
  border: 1px solid rgba(219, 234, 249, 0.54);
  border-radius: 8px;
  padding: 11px 12px;
}

.auth-card {
  margin: 12vh auto 0;
  max-width: 460px;
  padding: 24px;
}

.auth-role-modal {
  align-items: center;
  background: rgba(1, 8, 15, 0.76);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1000;
}

.auth-role-modal.is-open {
  display: flex;
}

.auth-role-card {
  max-width: 460px;
  position: relative;
  width: min(100%, 460px);
}

.auth-modal-close {
  align-items: center;
  background: #12324f !important;
  border: 1px solid rgba(219, 234, 249, 0.62) !important;
  border-radius: 8px;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  -webkit-text-fill-color: #ffffff !important;
}

.role-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 820px) {
  .auth-shell {
    align-items: start;
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 26px 14px 44px;
  }

  .auth-panel,
  .auth-side-panel,
  .auth-role-card {
    padding: 17px;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .profile-recovery-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
