/* ==========================================================================
   QubitDocs — Auth pages (login + password reset flow)
   Standalone split-screen. Loaded only on pages that extend _auth_base.html,
   which do NOT include DataTables / select2 / topbar — so bare-element input
   styling here is safe and cannot leak into the app shell.
   ========================================================================== */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  background: var(--canvas);
}

/* ---------------------------------------------------------------- HERO ---- */
.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #EAF1FB;
  background:
    radial-gradient(120% 80% at 15% 0%, #14284A 0%, rgba(20,40,74,0) 55%),
    radial-gradient(90% 70% at 100% 100%, #0a2b39 0%, rgba(10,43,57,0) 50%),
    linear-gradient(160deg, #0C1526 0%, #0B1220 55%, #070C17 100%);
}
/* grid overlay */
.auth-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(120,160,220,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,220,.08) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 30% 20%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 30% 20%, #000 30%, transparent 78%);
  animation: rd-drift 26s linear infinite;
}
/* cyan glow bloom */
.auth-hero::after {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  right: -120px; top: 40%;
  background: radial-gradient(circle, rgba(34,211,238,.28) 0%, rgba(34,211,238,0) 68%);
  filter: blur(8px);
  animation: rd-pulse 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rd-drift { to { background-position: 46px 46px, 46px 46px; } }
@keyframes rd-pulse { 0%,100% { opacity:.55; transform: scale(1); } 50% { opacity:1; transform: scale(1.08); } }

/* constellation svg sits above grid, below content */
.auth-hero__nodes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.auth-hero__nodes .edge { stroke: rgba(34,211,238,.28); stroke-width: 1; }
.auth-hero__nodes .dot  { fill: #22D3EE; filter: drop-shadow(0 0 6px rgba(34,211,238,.9)); }
.auth-hero__nodes .dot.pulse { animation: rd-node 4.5s ease-in-out infinite; }
.auth-hero__nodes .dot:nth-of-type(2) { animation-delay: .8s; }
.auth-hero__nodes .dot:nth-of-type(3) { animation-delay: 1.7s; }
.auth-hero__nodes .dot:nth-of-type(4) { animation-delay: 2.6s; }
@keyframes rd-node { 0%,100% { opacity:.5; r:3; } 50% { opacity:1; r:4.4; } }

.auth-hero__inner { position: relative; z-index: 2; max-width: 460px; }
.auth-hero__top   { position: relative; z-index: 2; }
.auth-hero__foot  { position: relative; z-index: 2; font-family: var(--font-mono); font-size: 12px; color: #6E80A0; letter-spacing: .02em; }

.auth-brand { display: inline-flex; align-items: center; gap: 11px; }
.auth-brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #22D3EE, #0891B2);
  box-shadow: 0 8px 22px -8px rgba(34,211,238,.7);
  color: #04222B; font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.auth-brand__word { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; letter-spacing: -.01em; }
.auth-brand__word b { color: var(--cyan-400); font-weight: 700; }

.auth-hero__eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--cyan-400); margin: 54px 0 18px;
}
.auth-hero h1 {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: clamp(30px, 3vw, 42px); line-height: 1.08; letter-spacing: -.03em; margin: 0;
}
.auth-hero h1 .accent {
  background: linear-gradient(90deg, #67E8F9, #22D3EE);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-hero__lead { margin: 20px 0 34px; color: #A9B7D0; font-size: 15.5px; line-height: 1.6; max-width: 400px; }

.auth-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-feats li { display: flex; align-items: center; gap: 13px; color: #C6D2E6; font-size: 14.5px; }
.auth-feats .tick {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.32);
  color: var(--cyan-400); font-size: 13px;
}

/* ---------------------------------------------------------------- FORM ---- */
.auth-main {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
  background:
    radial-gradient(90% 60% at 50% -10%, #FFFFFF 0%, rgba(255,255,255,0) 60%),
    var(--canvas);
}
.auth-card {
  width: 100%; max-width: 428px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 40px 32px;
  animation: rd-up .6s var(--ease) both;
}
.auth-card__logo { height: 46px; width: auto; margin-bottom: 26px; }

.auth-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan-600); }
.auth-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 25px; letter-spacing: -.02em; margin: 10px 0 6px; color: var(--text-strong); }
.auth-card__sub { color: var(--text-muted); font-size: 14px; line-height: 1.55; margin: 0 0 26px; }

/* fields — this is where bare Django inputs get styled */
.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > label,
.auth-field label { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.auth-field__wrap { position: relative; display: flex; align-items: center; }
.auth-field__icon {
  position: absolute; left: 14px; display: grid; place-items: center;
  color: var(--text-subtle); font-size: 15px; pointer-events: none;
}
.auth-field__wrap:focus-within .auth-field__icon { color: var(--cyan-500); }

.auth-card input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
.auth-card select,
.auth-card textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 14.5px; color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.auth-field__wrap input { padding-left: 42px !important; }
.auth-card input::placeholder { color: var(--text-subtle); }
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--cyan-400); box-shadow: var(--glow-cyan);
}
/* Django help text + errorlist */
.auth-card .helptext, .auth-card .helpText { font-size: 12px; color: var(--text-subtle); margin-top: 4px; }
.auth-card ul.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: #C23B40; font-size: 12.5px; }
.auth-card ul.errorlist li { display: flex; gap: 6px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-link { font-size: 13px; font-weight: 500; color: var(--cyan-600); }
.auth-link:hover { color: var(--cyan-500); }
.auth-forgot { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.auth-forgot:hover { color: var(--cyan-600); }

.auth-actions { margin-top: 4px; }

.auth-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; color: var(--text-subtle); font-size: 12px; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

.auth-secondary { text-align: center; font-size: 13.5px; color: var(--text-muted); margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.auth-secondary a { font-weight: 600; }

.auth-card__foot { margin-top: 26px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-subtle); letter-spacing: .04em; }

/* state pages (reset done / complete / invalid) */
.auth-state { text-align: center; }
.auth-icon {
  width: 66px; height: 66px; border-radius: 18px; margin: 0 auto 22px;
  display: grid; place-items: center; font-size: 28px;
  background: linear-gradient(160deg, rgba(34,211,238,.16), rgba(8,145,178,.12));
  border: 1px solid rgba(34,211,238,.34); color: var(--cyan-600);
  box-shadow: 0 14px 34px -16px rgba(34,211,238,.6);
}
.auth-icon.is-success { background: linear-gradient(160deg, rgba(14,168,113,.16), rgba(14,168,113,.08)); border-color: rgba(14,168,113,.34); color: var(--success); box-shadow: 0 14px 34px -16px rgba(14,168,113,.55); }
.auth-icon.is-danger  { background: linear-gradient(160deg, rgba(225,75,82,.16), rgba(225,75,82,.08)); border-color: rgba(225,75,82,.34); color: var(--danger); box-shadow: 0 14px 34px -16px rgba(225,75,82,.5); }
.auth-state h2 { text-align: center; }
.auth-state .auth-card__sub { text-align: center; }
.auth-state .btn { margin-top: 6px; }

@keyframes rd-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* staggered hero entrance */
.auth-hero__inner > * { animation: rd-up .7s var(--ease) both; }
.auth-hero__eyebrow { animation-delay: .05s; }
.auth-hero h1 { animation-delay: .13s; }
.auth-hero__lead { animation-delay: .22s; }
.auth-feats { animation-delay: .3s; }

/* ------------------------------------------------------------ RESPONSIVE -- */
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero {
    padding: 34px 30px; min-height: auto; flex-direction: row; align-items: center; gap: 20px;
  }
  .auth-hero__eyebrow, .auth-hero__lead, .auth-feats, .auth-hero__foot { display: none; }
  .auth-hero h1 { font-size: 22px; }
  .auth-hero__inner { max-width: none; }
}
@media (max-width: 560px) {
  .auth-hero { display: none; }
  .auth-main { padding: 24px 18px; }
  .auth-card { padding: 30px 24px 26px; border-radius: var(--r-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-hero::before, .auth-hero::after, .auth-hero__nodes .dot, .auth-card, .auth-hero__inner > * { animation: none !important; }
}
