/*!
 * Vivitsu: log in and sign up ("by design" redesign)
 * Shared styles for stud_log_in_by_design.php, sign_up_by_design.php, login_page_by_design.php
 * Everything is scoped to .vv-auth, so header.php and footer.php are never affected.
 * Design notes: SKILL.md (Apple design) sections 1, 3, 4, 7, 12, 14, 15.
 */
/* ===================================================================
   MAIN CONTENT: everything below is scoped to .vv-auth
   =================================================================== */
.vv-auth {
  --ink: #141B33; --ink-2: #3F4762; --mist: #5F6680;
  --coral: #F05969; --coral-2: #FF7A6B; --err: #C2303F; --ok: #138A5A;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font: 400 1rem/1.5 var(--font); color: var(--ink-2); -webkit-font-smoothing: antialiased;
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(42% 55% at 88% 12%, rgba(240,89,105,.70), transparent 70%),
    radial-gradient(38% 50% at 62% 92%, rgba(255,140,110,.35), transparent 70%),
    radial-gradient(45% 60% at 6% 96%, rgba(76,110,245,.55), transparent 70%),
    radial-gradient(30% 40% at 30% 20%, rgba(120,90,220,.30), transparent 70%),
    linear-gradient(155deg, #10162C 0%, #1A2148 50%, #251B42 100%);
}
.vv-auth *, .vv-auth *::before, .vv-auth *::after { box-sizing: border-box; }
.vv-auth h1, .vv-auth h2, .vv-auth h3, .vv-auth p { margin: 0; }
.vv-auth [hidden] { display: none !important; }
.vv-auth::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(255,255,255,.045) 39px 40px);
  -webkit-mask-image: linear-gradient(90deg, #000 0 55%, transparent 80%); mask-image: linear-gradient(90deg, #000 0 55%, transparent 80%); }
.vv-auth::after { content: ""; position: absolute; top: 0; bottom: 0; left: max(24px, calc(50% - 640px)); width: 6px; z-index: -1;
  border-left: 1.5px solid rgba(240,89,105,.55); border-right: 1.5px solid rgba(240,89,105,.55); }

.vv-auth .auth { max-width: 1280px; margin: 0 auto; padding: 72px 40px 104px 96px;
  display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 64px; align-items: center; }

/* ---- Pitch ---- */
.vv-auth .pitch h1 { font-size: 4.5rem; line-height: 1.04; letter-spacing: -0.045em; font-weight: 760; color: #fff; max-width: 13ch; text-wrap: balance; }
.vv-auth .pitch .lead { margin-top: 22px; font-size: 1.25rem; line-height: 1.45; color: rgba(255,255,255,.80); max-width: 30ch; letter-spacing: -0.012em; font-weight: 450; }
.vv-auth .pitch .proof { margin-top: 18px; font-size: .9375rem; color: rgba(255,255,255,.64); }
.vv-auth .pitch .proof strong { color: #fff; font-weight: 650; }

.vv-auth .cluster { position: relative; height: 220px; margin-top: 40px; max-width: 560px; }
.vv-auth .glass { position: absolute; color: #fff; border-radius: 22px; transform-origin: left top;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255,255,255,.14); border-top-color: rgba(255,255,255,.34);
  box-shadow: 0 18px 44px rgba(5,8,25,.35); letter-spacing: .005em; will-change: transform; }
.vv-auth .glass .k { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.74); }
.vv-auth .glass .t { font-size: 1rem; font-weight: 650; margin-top: 2px; }
.vv-auth .g-lecture { left: 0; top: 52px; width: 340px; padding: 16px; display: flex; gap: 14px; z-index: 3; box-shadow: 0 30px 70px rgba(5,8,25,.5); }
.vv-auth .thumb { width: 72px; height: 72px; border-radius: 16px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--coral-2), var(--coral) 55%, #B9356F); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.vv-auth .thumb svg { margin-left: 3px; }
.vv-auth .bar { margin-top: 12px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.vv-auth .bar i { display: block; height: 100%; width: 64%; border-radius: inherit; background: linear-gradient(90deg, #FFB4A6, #fff); }
.vv-auth .meta { margin-top: 7px; font-size: .75rem; color: rgba(255,255,255,.72); font-weight: 500; display: flex; justify-content: space-between; }
.vv-auth .g-mentor { left: 250px; top: 0; width: 250px; padding: 14px 16px; z-index: 2; display: flex; gap: 12px; align-items: center; }
.vv-auth .dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(110,231,183,.22); flex: none; }
.vv-auth .live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6EE7B7; box-shadow: 0 0 0 4px rgba(110,231,183,.25); margin-right: 6px; vertical-align: 1px; }
.vv-auth .g-test { left: 328px; top: 112px; width: 190px; padding: 14px 16px; z-index: 1; opacity: .82; filter: blur(.6px); }
.vv-auth .score { font-size: 1.875rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; margin-top: 4px; }
.vv-auth .score small { font-size: .9375rem; font-weight: 600; color: rgba(255,255,255,.66); letter-spacing: 0; }
.vv-auth .spark { display: flex; align-items: flex-end; gap: 4px; height: 26px; margin-top: 8px; }
.vv-auth .spark i { flex: 1; border-radius: 3px; background: rgba(255,255,255,.35); }
.vv-auth .spark i:last-child { background: #fff; }

/* ---- Sheet: the bright, thickest glass surface ---- */
.vv-auth .sheet { position: relative; z-index: 4; border-radius: 32px; padding: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.80));
  -webkit-backdrop-filter: blur(40px) saturate(190%); backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(5,8,25,.12), 0 30px 60px rgba(5,8,25,.28), 0 70px 140px -30px rgba(5,8,25,.55); }
.vv-auth .sheet-body { position: relative; margin: -8px; padding: 8px; overflow: hidden; }  /* room for focus rings while clipping */
.vv-auth .view { width: 100%; }
.vv-auth .view.leaving { position: absolute; top: 8px; left: 8px; right: 8px; pointer-events: none; }

.vv-auth h2 { font-size: 1.875rem; line-height: 1.12; letter-spacing: -0.03em; font-weight: 720; color: var(--ink); }
.vv-auth .sub { margin-top: 8px; color: var(--mist); font-size: .9375rem; font-weight: 500; letter-spacing: -0.004em; }
.vv-auth .steps { display: flex; gap: 6px; margin-bottom: 16px; }
.vv-auth .steps i { width: 26px; height: 5px; border-radius: 99px; background: rgba(20,27,51,.12); transition: background-color .25s; }
.vv-auth .steps i.on { background: var(--coral); }

.vv-auth .field { margin-top: 20px; }
.vv-auth label, .vv-auth .label { display: block; font-size: .875rem; font-weight: 650; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.006em; }
.vv-auth .control { display: flex; align-items: center; height: 54px; border-radius: 16px; background: #fff;
  border: 1px solid rgba(20,27,51,.12); box-shadow: 0 1px 2px rgba(20,27,51,.06); transition: border-color .15s, box-shadow .15s; }
.vv-auth .control:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20,27,51,.10); }
.vv-auth .control.invalid { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(240,89,105,.16); }
.vv-auth .control input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 16px;
  font: 550 1.0625rem var(--font); color: var(--ink); letter-spacing: -0.01em; }
.vv-auth .control input::placeholder { color: #A3A9BA; font-weight: 450; }
.vv-auth .cc { padding: 0 14px 0 16px; color: var(--ink); font-weight: 650; border-right: 1px solid rgba(20,27,51,.10); height: 60%; display: flex; align-items: center; }
.vv-auth .msg { margin-top: 8px; font-size: .8125rem; font-weight: 550; color: var(--err); display: flex; gap: 6px; align-items: flex-start; min-height: 0; }
.vv-auth .msg:empty { display: none; }
.vv-auth .msg svg { flex: none; margin-top: 2px; }
.vv-auth .msg button { all: unset; cursor: pointer; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 3px; text-decoration-thickness: 2px; margin-left: 4px; }

/* Primary button: press feedback on pointer-down (SKILL §1) */
.vv-auth .vv-btn { position: relative; margin-top: 28px; width: 100%; height: 56px; border: 0; border-radius: 18px; color: #fff; cursor: pointer;
  font: 680 1.0625rem var(--font); letter-spacing: -0.012em; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  background: linear-gradient(180deg, #FF6E7B, var(--coral) 60%, #E84C5D);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px -6px rgba(240,89,105,.6);
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform 100ms ease-out, filter .15s, background-color .2s; }
.vv-auth .vv-btn.pressed { transform: scale(.97); filter: brightness(.95); }
.vv-auth .vv-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.vv-auth .vv-btn[aria-disabled="true"] { background: #F3BDC4; box-shadow: none; }
.vv-auth .vv-btn.busy { pointer-events: none; }
.vv-auth .vv-btn.success { background: linear-gradient(180deg, #23B077, var(--ok)); box-shadow: 0 10px 24px -6px rgba(19,138,90,.55); }
.vv-auth .kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 600 .75rem var(--font); letter-spacing: .01em;
  padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); color: #fff; }
@media (hover: none), (max-width: 760px) { .vv-auth .kbd { display: none; } }
.vv-auth .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; animation: vvspin .7s linear infinite; }
@keyframes vvspin { to { transform: rotate(360deg); } }

.vv-auth .alt { margin-top: 24px; text-align: center; font-size: .9375rem; color: var(--mist); font-weight: 500; }
.vv-auth .link { all: unset; cursor: pointer; color: var(--ink); font-weight: 680; border-bottom: 2px solid var(--coral); padding-bottom: 1px; }
.vv-auth .link:focus-visible, .vv-auth .msg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.vv-auth .sent-to { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(20,27,51,.06); border: 1px solid rgba(20,27,51,.06); }
.vv-auth .who { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: .9375rem; }
.vv-auth .who small { display: block; color: var(--mist); font-weight: 500; font-size: .8125rem; }
.vv-auth .wa { width: 34px; height: 34px; border-radius: 11px; background: #E3F7EC; display: grid; place-items: center; }
.vv-auth .otp { margin-top: 22px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; will-change: transform; }
.vv-auth .otp input { width: 100%; height: 62px; border-radius: 16px; background: #fff; border: 1px solid rgba(20,27,51,.12); box-shadow: 0 1px 2px rgba(20,27,51,.06);
  text-align: center; font: 700 1.625rem var(--font); color: var(--ink); letter-spacing: -0.02em; outline: 0; caret-color: var(--coral); padding: 0;
  transition: border-color .15s, box-shadow .15s; -webkit-text-fill-color: var(--ink); }
.vv-auth .otp input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20,27,51,.10); }
.vv-auth .otp.invalid input { border-color: var(--coral); }
.vv-auth .resend { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: .875rem; color: var(--mist); font-weight: 500; }
.vv-auth .resend b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.vv-auth .resend .link { font-size: .875rem; }

.vv-auth fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.vv-auth legend { padding: 0; font-size: .875rem; font-weight: 650; color: var(--ink); margin-bottom: 10px; }
.vv-auth .goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vv-auth .goal { position: relative; }
.vv-auth .goal input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vv-auth .goal span { display: block; border: 1px solid rgba(20,27,51,.12); border-radius: 16px; padding: 13px 12px; background: #fff; box-shadow: 0 1px 2px rgba(20,27,51,.06);
  font-weight: 650; color: var(--ink); font-size: .9375rem; letter-spacing: -0.012em; transition: border-color .15s, box-shadow .15s, background-color .15s, color .15s, transform 100ms ease-out; }
.vv-auth .goal input:checked + span { border-color: var(--coral); background: linear-gradient(180deg, #FFF3F4, #FFE6E9); color: #B12B3C;
  box-shadow: 0 0 0 3px rgba(240,89,105,.18), 0 8px 18px -8px rgba(240,89,105,.5); }
.vv-auth .goal input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.vv-auth .goal.pressed span { transform: scale(.97); }
.vv-auth fieldset.invalid .goal span { border-color: rgba(240,89,105,.6); }
.vv-auth details { margin-top: 20px; border-top: 1px solid rgba(20,27,51,.08); }
.vv-auth summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 4px; color: var(--ink); font-weight: 650; font-size: .9375rem; }
.vv-auth summary::-webkit-details-marker { display: none; }
.vv-auth summary svg { transition: transform .2s; }
.vv-auth details[open] summary svg { transform: rotate(45deg); }
.vv-auth summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.vv-auth .done { text-align: center; padding: 18px 0 6px; }
.vv-auth .done:focus { outline: none; }   /* focused only so screen readers announce it */
.vv-auth .tick { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #2BC183, var(--ok)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 16px 34px -10px rgba(19,138,90,.7); }
.vv-auth .done .sub { margin-top: 10px; }

/* ---- Mobile ---- */
@media (max-width: 760px) {
  .vv-auth::after { left: 16px; }
  .vv-auth .auth { display: block; padding: 0; }
  .vv-auth .pitch { padding: 30px 22px 0 38px; }
  .vv-auth .pitch h1 { font-size: 2.5rem; letter-spacing: -0.04em; max-width: 12ch; }
  .vv-auth .pitch .lead, .vv-auth .pitch .proof { display: none; }
  .vv-auth .cluster { height: 100px; margin-top: 22px; }
  .vv-auth .g-lecture { top: 0; width: 300px; padding: 12px; }
  .vv-auth .g-lecture .meta { display: none; }
  .vv-auth .thumb { width: 56px; height: 56px; border-radius: 14px; }
  .vv-auth .g-mentor, .vv-auth .g-test { display: none; }
  .vv-auth .sheet { border-radius: 30px 30px 0 0; padding: 30px 22px 36px; margin-top: 4px; min-height: 540px;
    background: linear-gradient(180deg, rgba(255,255,255,.93), rgba(255,255,255,.97)); }
  .vv-auth h2 { font-size: 1.625rem; }
  .vv-auth .otp { gap: 8px; } .vv-auth .otp input { height: 56px; }
  .vv-auth .goals { gap: 8px; } .vv-auth .goal span { padding: 12px 10px; font-size: .875rem; }
}
@media (prefers-reduced-transparency: reduce) {
  .vv-auth .glass, .vv-auth .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .vv-auth .glass { background: #232B52; } .vv-auth .sheet { background: #fff; }
}
@media (prefers-contrast: more) {
  .vv-auth .sheet { background: #fff; border: 2px solid var(--ink); }
  .vv-auth .control, .vv-auth .otp input, .vv-auth .goal span { border: 2px solid var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .vv-auth .spinner { animation-duration: 1.6s; }
  .vv-auth .vv-btn.pressed, .vv-auth .goal.pressed span { transform: none; }
}

/* Pages without header/footer (login_page_by_design) fill the screen */
.vv-auth.vv-auth--full { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; }
.vv-auth.vv-auth--full .auth { width: 100%; }
@media (max-width: 760px) { .vv-auth.vv-auth--full { display: block; } }

/* Offset for a fixed header (set from JS only when header.php is position: fixed) */
.vv-auth { padding-top: var(--vv-header-offset, 0px); }

/* ---- Browser autofill (Chrome/Edge/Safari paint a blue or yellow box; Firefox tints it) ----
   Keep our white field, our text colour and our rounded corners when a value is autofilled. */
.vv-auth .control input { border-radius: 15px; }                 /* field radius 16px minus its 1px border */
.vv-auth .control .cc + input { border-radius: 0 15px 15px 0; }   /* number field: square edge next to +91 */
.vv-auth .control input:-webkit-autofill,
.vv-auth .control input:-webkit-autofill:hover,
.vv-auth .control input:-webkit-autofill:focus,
.vv-auth .control input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--coral);
  font: 550 1.0625rem var(--font) !important;
  letter-spacing: -0.01em;
  transition: background-color 600000s 0s, color 600000s 0s;     /* stops the blue from fading back in */
}
.vv-auth .control input:autofill { box-shadow: 0 0 0 1000px #fff inset; filter: none; }  /* Firefox */
.vv-auth .control:has(input:-webkit-autofill) { background: #fff; }

/* Info (non-error) message variant and inline quick-fix button */
.vv-auth .msg.info { color: var(--ok); }
.vv-auth .msg .fix { all: unset; cursor: pointer; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 3px; text-decoration-thickness: 2px; margin-left: 4px; }
