/* auth.veezol.digital: same look as the main Veezol Digital store (static/store.css). */

:root {
  --grad: linear-gradient(100deg, #8b3dff 0%, #5b6cf6 55%, #2bb8f5 100%);
  --brand: #6c4cf7;
  --brand-dark: #4b2fd1;
  --bg: #f6f6fb;
  --surface: #ffffff;
  --soft: #f2effd;
  --field: #fbfaff;
  --glass: #ffffffe6;
  --ink: #1b1834;
  --text: #3b3858;
  --muted: #6c6987;
  --line: #ebe9f4;
  --line-strong: #d9d5ec;
  --ok-bg: #e2f6ee;
  --danger: #c2334d;
  --danger-bg: #fde8ec;
  --radius-lg: 18px;
  --shadow: 0 1px 2px #1b18340d, 0 8px 24px -12px #3b2a9433;
  --shadow-lg: 0 20px 50px -20px #4b2fd155;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0d18; --surface: #171628; --soft: #221f3b; --field: #12111f; --glass: #171628e6;
  --ink: #f2f0fb; --text: #d3cfe8; --muted: #9a96b8;
  --line: #2a2744; --line-strong: #3b3760;
  --brand: #9b7dff; --brand-dark: #b9a5ff;
  --ok-bg: #12352a; --danger: #ff7b93; --danger-bg: #3d1823;
  --shadow: 0 1px 2px #0006, 0 8px 24px -12px #000a;
  --shadow-lg: 0 20px 50px -20px #000c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2 { font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
h1 em { font-style: normal; padding-right: .06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 3px solid #8b3dff66; outline-offset: 2px; border-radius: 6px; }

/* ---------- Header + footer ---------- */
.site-header { height: 78px; padding: 0 6%; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--glass); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { width: 132px; flex: 0 0 auto; }
.brand img { display: block; width: 100%; height: auto; }
html[data-theme="dark"] .brand img { filter: brightness(1.15); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-link { white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .15s; }
.header-link:hover { color: var(--brand); }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s; }
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon, html[data-theme="dark"] .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: block; }
main { flex: 1; }
.site-footer { padding: 22px 6%; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer a:hover { color: var(--brand); }

/* ---------- Buttons ---------- */
.button { min-height: 46px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.button-dark { background: var(--grad); background-size: 130% 100%; color: #fff; box-shadow: 0 10px 22px -12px #5b3df0; }
.button-dark:hover { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 14px 26px -12px #5b3df0; }
.button-outline { background: var(--surface); border-color: var(--line-strong); color: var(--brand-dark); }
.button-outline:hover { border-color: var(--brand); color: var(--brand); }
.button[disabled] { opacity: .6; cursor: progress; transform: none; }
.link-button { padding: 0; border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.eyebrow { margin: 0; color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .14em; }

/* ---------- Auth layout ---------- */
.auth-page { min-height: 600px; padding: 64px 8%; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.auth-aside h1 { margin: 12px 0 8px; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -.03em; overflow-wrap: anywhere; }
.auth-aside > p:last-of-type { max-width: 400px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.auth-aside strong { color: var(--ink); }
.form-card { width: 100%; max-width: 440px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.form-card h2 { margin: 8px 0 22px; font-size: 28px; }
.card-copy { margin: -8px 0 10px; color: var(--muted); font-size: 15px; }
.card-copy strong { color: var(--ink); }

.google-button { width: 100%; min-height: 48px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; box-shadow: 0 1px 2px #1b18340d; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; }
.google-button:hover { transform: translateY(-1px); border-color: #b9b2e3; box-shadow: var(--shadow); }
.google-button:active { transform: none; background: var(--soft); }
.google-logo { width: 20px; height: 20px; flex: 0 0 auto; }
.auth-divider { margin: 20px 0 6px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.stack-form { display: grid; gap: 8px; }
.stack-form label { margin-top: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.stack-form input { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.stack-form input::placeholder { color: #8f8ba8; }
.stack-form input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px #6c4cf71f; }
.stack-form input[aria-invalid="true"] { border-color: var(--danger); }
.stack-form small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.stack-form small.is-bad { color: var(--danger); }

.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.password-toggle:hover { background: var(--soft); color: var(--brand); }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle .icon-eye-off, .password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }
.password-toggle.is-visible { color: var(--brand); }

.form-submit { margin-top: 14px; }
.auth-legal { margin: 16px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.auth-legal a, .auth-switch a { color: var(--brand); font-weight: 600; }
.auth-legal a:hover, .auth-switch a:hover { text-decoration: underline; }
.auth-switch { margin: 20px 0 0; color: var(--muted); font-size: 14px; }

.account-chip { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.account-chip span:last-child { display: grid; min-width: 0; }
.account-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 18px; }
.stack-actions { margin-top: 18px; display: grid; gap: 10px; }

/* ---------- Messages ---------- */
.flash-stack { margin: 0 0 14px; }
.flash { margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.5; }
.flash-error { border-color: #f4b7c3; background: var(--danger-bg); color: #8c1f35; }
.flash-success { border-color: #a6e3cb; background: var(--ok-bg); color: #0c5e43; }
html[data-theme="dark"] .flash { color: var(--ink); border-color: var(--line); }

@media (max-width: 860px) {
  .site-header { height: 64px; padding: 0 16px; }
  .brand { width: 110px; }
  .auth-page { min-height: 0; padding: 32px 16px 40px; grid-template-columns: 1fr; gap: 24px; }
  .auth-aside h1 { font-size: 34px; }
  .form-card { padding: 24px 20px; justify-self: center; }
  .stack-form input { font-size: 16px; }
  .button { min-height: 48px; }
}
@media (max-width: 420px) {
  .header-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
