/*
  © 2026 Sarbjit Singh · sarbjitbhavra@gmail.com
  TheVaultMind · Auth lock screen — split out of styles.css so it can be
  restyled independently of the app shell.
*/

/* ══════════════════════════════════════════════
   AUTH LOCK SCREEN — split layout
══════════════════════════════════════════════ */
#auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: stretch; justify-content: center;
  overflow-y: auto;
  transition: opacity .35s ease;
}
#auth-overlay.auth-fade-out { opacity: 0; pointer-events: none; }

/* ── SPLIT CONTAINER ── */
.auth-split {
  display: flex; width: 100%; max-width: 960px;
  margin: auto; border-radius: 20px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.18);
  min-height: min(680px, 95vh);
}
[data-theme="dark"] .auth-split { box-shadow: 0 32px 80px rgba(0,0,0,.6); }

/* ── LEFT — brand side (stays dark in both themes, it's a decorative panel) ── */
.auth-brand {
  flex: 1; min-width: 0;
  background: linear-gradient(145deg, #1a1040 0%, #0f1a35 50%, #0c2020 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding: 48px 44px;
}
.auth-brand::before {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122,95,196,.25) 0%, transparent 70%);
  top: -100px; left: -100px; pointer-events: none;
}
.auth-brand::after {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(63,149,121,.15) 0%, transparent 70%);
  bottom: -80px; right: -60px; pointer-events: none;
}
.auth-brand-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 28px; }

.auth-brand-logo { display: flex; align-items: center; gap: 12px; }
.auth-brand-name { font-size: 20px; font-weight: 800; color: white; letter-spacing: -0.03em; }

.auth-brand-eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #a78bda;
}
.auth-brand-headline {
  font-size: 32px; font-weight: 800; color: white;
  letter-spacing: -0.03em; line-height: 1.15;
}
.auth-brand-headline em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: #e8956a;
}
.auth-brand-sub { font-size: 13.5px; color: rgba(255,255,255,.55); line-height: 1.65; max-width: 360px; }

/* ── 10-angle carousel — the signature element: what you actually get back.
   One chip flips into view at a time instead of cramming all 10 into a grid. ── */
.auth-angle-grid { position: relative; height: 58px; perspective: 600px; }
.auth-angle-chip {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 10px; border-radius: 9px; box-sizing: border-box;
  background: color-mix(in srgb, var(--ac) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ac) 28%, transparent);
  color: var(--ac);
  opacity: 0;
  animation: auth-chip-carousel 20s ease infinite;
}
.auth-angle-chip:nth-child(1)  { animation-delay: 0s; }
.auth-angle-chip:nth-child(2)  { animation-delay: 2s; }
.auth-angle-chip:nth-child(3)  { animation-delay: 4s; }
.auth-angle-chip:nth-child(4)  { animation-delay: 6s; }
.auth-angle-chip:nth-child(5)  { animation-delay: 8s; }
.auth-angle-chip:nth-child(6)  { animation-delay: 10s; }
.auth-angle-chip:nth-child(7)  { animation-delay: 12s; }
.auth-angle-chip:nth-child(8)  { animation-delay: 14s; }
.auth-angle-chip:nth-child(9)  { animation-delay: 16s; }
.auth-angle-chip:nth-child(10) { animation-delay: 18s; }
.auth-angle-chip svg { flex-shrink: 0; margin-top: 1px; }
.auth-angle-name { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.9); }
.auth-angle-desc { font-size: 10.5px; color: rgba(255,255,255,.45); margin-top: 1px; }
@keyframes auth-chip-carousel {
  0%, 100% { opacity: 0; transform: rotateX(-70deg) translateY(10px); }
  6%       { opacity: 1; transform: rotateX(0) translateY(0); }
  14%      { opacity: 1; transform: rotateX(0) translateY(0); }
  20%      { opacity: 0; transform: rotateX(70deg) translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-angle-grid { height: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .auth-angle-chip { position: static; animation: none; opacity: 1; transform: none; }
}

.auth-brand-footer { font-size: 11px; color: rgba(255,255,255,.25); margin-top: 8px; }

/* ── RIGHT — form side ── */
.auth-form-side {
  width: 380px; flex-shrink: 0;
  background: #ffffff;
  display: flex; align-items: center;
  padding: 48px 40px;
}
[data-theme="dark"] .auth-form-side { background: #13131a; }

.auth-form-inner { width: 100%; display: flex; flex-direction: column; gap: 20px; }

.auth-form-header { }
.auth-form-title { font-family: var(--serif); font-style: italic; font-size: 26px; font-weight: 400; color: var(--tx); letter-spacing: -0.01em; margin-bottom: 6px; }
[data-theme="dark"] .auth-form-title { color: #ebebf5; }
.auth-form-sub  { font-size: 13px; color: var(--tx3); line-height: 1.5; }

.auth-fields { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-label { font-size: 11.5px; font-weight: 600; font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--tx2); }
[data-theme="dark"] .auth-label { color: #7878a0; }

.auth-input {
  width: 100%; padding: 10px 13px;
  background: #f7f7f9; border: 1.5px solid #e6e6ec;
  border-radius: 8px; font-size: 13.5px; color: var(--tx);
  font-family: var(--sans); outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  box-sizing: border-box;
}
[data-theme="dark"] .auth-input { background: #1e1e2a; color: #ebebf5; border-color: transparent; }
.auth-input:focus {
  border-color: var(--kb); background: #ffffff;
  box-shadow: 0 0 0 3px rgba(122,95,196,.14);
}
[data-theme="dark"] .auth-input:focus { background: #252535; }
.auth-input::placeholder { color: var(--tx3); }

.auth-code-wrap { position: relative; }
.auth-code-wrap .auth-input { padding-right: 42px; }
.auth-eye-btn {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  color: #b0b0c8; transition: color 140ms ease;
}
.auth-eye-btn:hover { color: #7a5fc4; }

.auth-error {
  font-size: 12px; color: #c0392b;
  background: rgba(192,57,43,.07); border: 1px solid rgba(192,57,43,.18);
  border-radius: 7px; padding: 8px 11px;
}

.auth-submit {
  width: 100%; padding: 12px 20px;
  background: #7a5fc4;
  color: white; border-radius: 9px;
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 4px 14px rgba(122,95,196,.35);
}
.auth-submit:hover:not(:disabled) { opacity: .93; box-shadow: 0 6px 20px rgba(122,95,196,.45); }
.auth-submit:active:not(:disabled) { transform: scale(.99); }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.auth-form-footer {
  font-size: 11px; color: #b0b0c8;
  display: flex; align-items: center; gap: 5px;
  justify-content: center;
}

/* ── RESPONSIVE — stack on mobile ── */
@media (max-width: 640px) {
  .auth-split { flex-direction: column; border-radius: 0; min-height: 100vh; height: auto; }
  .auth-form-side { width: 100%; padding: 28px; order: -1; }
  .auth-brand { padding: 24px 28px; min-height: auto; }
  .auth-brand-headline { font-size: 22px; }
  .auth-brand-sub { display: none; }
  .auth-brand::before, .auth-brand::after { display: none; }
  .auth-angle-grid { display: none; }
}

@keyframes auth-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}
.auth-shake { animation: auth-shake .45s ease; }

/* ── AUTH DOB field — date input styling ── */
.auth-input[type="date"] { color-scheme: light dark; }
[data-theme="dark"] .auth-input[type="date"] { color-scheme: dark; }
