/* ── Auth layout: login / forgot / reset / confirm password ──
   Restores the original centered single-card look (purple/blue glow on a
   very dark page, one narrow card, no split layout). Uses dedicated
   purple-tinted colors instead of the global --bg-card/--bg-input tokens
   because those are neutral gray and the old auth design was explicitly
   purple-tinted; kept local to this file so no other page is affected. */
.ds-auth-body {
  /* design-system.css sets a global `body { height: 100vh; overflow: hidden }`
     for the app shell pages, where every page manages its own internal
     scroll containers. Auth pages have no such container — they're a
     plain centered card — so that rule must be undone here, or a tall
     form (long validation errors, a short/landscape viewport, an open
     on-screen keyboard) would get clipped instead of scrolling. */
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px 0;
}

.ds-auth-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-content);
  background:
    radial-gradient(ellipse at 18% 40%, rgba(124, 58, 237, .18) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 60%, rgba(56, 189, 248, .13) 0%, transparent 50%);
}

.ds-auth-wrap {
  position: relative;
  z-index: var(--z-content);
  width: min(430px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0;
}

.ds-auth-card {
  background: #1A1030;
  border: 1px solid #2A1A40;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(124, 58, 237, .1);
}

@media (max-width: 400px) {
  .ds-auth-card { padding: 24px 18px; border-radius: 16px; }
}

body.light-theme .ds-auth-card {
  background: #FBFAFF;
  border-color: #E4DBF7;
  box-shadow: 0 20px 50px rgba(80, 40, 150, .1), 0 0 0 1px rgba(124, 58, 237, .06);
}

.ds-auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.ds-auth-logo img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(124, 58, 237, .35));
}

.ds-auth-title {
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

body.light-theme .ds-auth-title { color: #1A0B33; }

.ds-auth-subtitle {
  text-align: center;
  color: #9080A8;
  font-size: 13.5px;
  margin-bottom: 22px;
}

body.light-theme .ds-auth-subtitle { color: #6B5A88; }

.ds-auth-card .form-label {
  color: #9080A8;
  font-size: 13px;
}

body.light-theme .ds-auth-card .form-label { color: #6B5A88; }

.ds-auth-card .form-control {
  background: #231540;
  border-color: #3A2060;
  color: #E9EDEF;
  border-radius: 10px;
  padding: 10px 14px;
}

.ds-auth-card .form-control:focus {
  background: #2D1A50;
  border-color: #7C3AED;
  color: #E9EDEF;
  box-shadow: 0 0 0 .2rem rgba(124, 58, 237, .25);
}

.ds-auth-card .form-control::placeholder { color: #5A4070; }

body.light-theme .ds-auth-card .form-control {
  background: #F5F1FC;
  border-color: #DACCF0;
  color: #1A0B33;
}

body.light-theme .ds-auth-card .form-control:focus {
  background: #FFFFFF;
  border-color: #7C3AED;
  color: #1A0B33;
}

body.light-theme .ds-auth-card .form-control::placeholder { color: #9A87BB; }

.ds-auth-card a {
  color: var(--accent);
  text-decoration: none;
}

.ds-auth-card a:hover {
  color: var(--accent-secondary);
}

.ds-auth-card .btn-gradient {
  width: 100%;
  height: 49px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
}

/* ── Password show/hide toggle (login/reset/confirm forms) ──
   Same classes as users.css's create-user modal; duplicated here (not
   shared via a common file) because Auth pages never load users.css, and
   this is a handful of lines — not worth a new shared module for. */
.ds-password-field {
  position: relative;
}

.ds-password-field input {
  padding-inline-end: 42px;
}

.ds-password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-secondary);
  padding: 6px 8px;
  cursor: pointer;
}

.ds-password-toggle:hover {
  color: var(--text-primary);
}

.ds-auth-remember-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.ds-auth-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 16px;
  gap: 8px;
}

.ds-auth-footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.ds-auth-footer-links a:hover {
  color: var(--accent-secondary);
}

.ds-auth-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  margin-top: 18px;
  justify-content: center;
}

.ds-demo-credentials {
  background: rgba(124, 58, 237, .12);
  border: 1px solid rgba(124, 58, 237, .28);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #B3A2CC;
  margin-bottom: 20px;
}

.ds-demo-credentials strong { color: var(--text-primary); }

body.light-theme .ds-demo-credentials {
  background: rgba(124, 58, 237, .07);
  border-color: rgba(124, 58, 237, .22);
  color: #6B5A88;
}

.ds-auth-status {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.ds-auth-status-success {
  background: rgba(16, 185, 129, .12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .3);
}

/* ── Below-card language pill (no floating top buttons, no theme
   toggle inside Login — matches the restored old design exactly) ── */
.ds-auth-lang-switch {
  text-align: center;
  margin-top: 18px;
}

.ds-auth-lang-switch a {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 16px;
  border: 1px solid #3A2060;
  border-radius: 20px;
  background: rgba(124, 58, 237, .06);
  transition: border-color .15s, color .15s;
}

.ds-auth-lang-switch a:hover {
  border-color: var(--accent);
  color: var(--accent-secondary);
}

body.light-theme .ds-auth-lang-switch a {
  border-color: #DACCF0;
  background: rgba(124, 58, 237, .05);
}
