@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #0b0a12;
  --ink-2: #07060c;
  --panel: #121022;
  --panel-elevated: #191531;
  --panel-border: rgba(255, 255, 255, 0.09);
  --panel-border-2: rgba(255, 255, 255, 0.16);
  --accent: #8257e6;
  --accent-strong: #6d3fd1;
  --accent-hover: #a684f0;
  --accent-soft: rgba(130, 87, 230, 0.16);
  --text-on-dark: #f5f3fb;
  --text-on-dark-muted: #ada7c6;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --radius-lg: 22px;
  --shadow-glow: 0 24px 60px -20px rgba(130, 87, 230, 0.5);
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
html[data-theme='light'] {
  --ink: #f8f7fc;
  --ink-2: #ffffff;
  --panel: #ffffff;
  --panel-elevated: #ffffff;
  --panel-border: #e9e7f2;
  --panel-border-2: #d7d2e8;
  --accent: #7b43f6;
  --accent-strong: #6d3fd1;
  --accent-hover: #6d3fd1;
  --accent-soft: rgba(130, 87, 230, 0.1);
  --text-on-dark: #17162a;
  --text-on-dark-muted: #6b6880;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --shadow-glow: 0 24px 60px -20px rgba(130, 87, 230, 0.25);
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
.auth-body{font-family:'Inter',sans-serif;background:var(--ink);color:var(--text-on-dark);min-height:100vh}
.icon{width:1em;height:1em;display:inline-block;vertical-align:-0.125em;flex-shrink:0}

.auth-theme-btn{position:fixed;top:20px;right:20px;z-index:5}
/* Explicit, unambiguous way back to the landing page — the brand wordmark
   in .auth-brand-panel already links to "/", but a logo isn't a recognizable
   "back" affordance on its own; this is a plain labelled link, always
   visible (fixed, top-left — mirrors the theme toggle's fixed top-right
   placement), including after sign-out redirects here. */
.auth-back-link{position:fixed;top:20px;left:20px;z-index:5;display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;color:var(--text-on-dark-muted);text-decoration:none;padding:8px 14px;border-radius:999px;border:1px solid transparent;transition:border-color .15s ease,color .15s ease}
.auth-back-link:hover{color:var(--accent-hover);border-color:var(--panel-border-2)}
.auth-back-link svg{width:15px;height:15px}
.theme-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:999px;border:1px solid var(--panel-border-2);background:transparent;color:var(--text-on-dark-muted);cursor:pointer;flex:none;transition:border-color .15s ease,color .15s ease}
.theme-toggle-btn:hover{border-color:var(--accent);color:var(--accent-hover)}
html[data-theme='light'] .auth-theme-btn{color:var(--text-on-dark-muted)}

.brand{display:flex;align-items:center;gap:10px;font-family:var(--font-display);font-weight:700;font-size:18px;color:var(--text-on-dark) !important;text-decoration:none}
.brand-mark{display:flex;align-items:flex-end;gap:2px;height:18px}
.brand-mark span{width:3px;border-radius:2px;background:linear-gradient(180deg,var(--accent-hover),var(--accent));display:inline-block;animation:bmove 1.8s ease-in-out infinite}
.brand-mark span:nth-child(1){height:40%;animation-delay:0s}
.brand-mark span:nth-child(2){height:100%;animation-delay:.15s}
.brand-mark span:nth-child(3){height:65%;animation-delay:.3s}
.brand-mark span:nth-child(4){height:85%;animation-delay:.45s}
@keyframes bmove{0%,100%{transform:scaleY(.5)}50%{transform:scaleY(1)}}

/* ===== Split layout: a brand/value panel + the form, side by side — a
   plain centered card (the old design) reads as generic on its own; giving
   the sign-in moment a real second half makes it feel like part of the
   product, not a bolted-on utility screen. ===== */
.auth-shell{min-height:100vh;display:flex}

.auth-brand-panel{
  position:relative;overflow:hidden;flex:0 0 42%;max-width:560px;min-width:0;
  background:var(--ink-2);border-right:1px solid var(--panel-border);
  padding:48px 56px;display:flex;flex-direction:column;justify-content:center;
}
.auth-brand-panel::before{
  content:"";position:absolute;top:-30%;left:-20%;width:90%;height:70%;
  background:radial-gradient(closest-side,rgba(130,87,230,.30),transparent 70%);
  filter:blur(10px);pointer-events:none;
}
.auth-brand-panel::after{
  content:"";position:absolute;bottom:-25%;right:-15%;width:70%;height:60%;
  background:radial-gradient(closest-side,rgba(130,87,230,.16),transparent 70%);
  filter:blur(10px);pointer-events:none;
}
.auth-brand-panel > *{position:relative;z-index:1}

.auth-pitch{margin-top:64px}
.auth-pitch h2{font-family:var(--font-display);font-weight:700;font-size:clamp(24px,2.6vw,32px);line-height:1.18;letter-spacing:-0.01em;margin:0 0 14px;max-width:22ch}
.auth-pitch h2 em{font-style:normal;color:var(--accent-hover)}
.auth-pitch-list{list-style:none;margin:28px 0 0;padding:0;display:flex;flex-direction:column;gap:14px}
.auth-pitch-list li{display:flex;align-items:flex-start;gap:11px;font-size:14px;line-height:1.5;color:var(--text-on-dark-muted)}
.auth-pitch-list .check{flex:none;width:22px;height:22px;border-radius:50%;background:var(--accent-soft);color:var(--accent-hover);display:flex;align-items:center;justify-content:center;margin-top:1px}
.auth-pitch-list .check svg{width:12px;height:12px}

.auth-content{flex:1;display:flex;align-items:center;justify-content:center;padding:48px 32px}
.auth-form-wrap{width:100%;max-width:380px}
.auth-form-wrap h1{font-family:var(--font-display);font-size:28px;font-weight:700;margin:0 0 8px;letter-spacing:-0.01em}
.auth-sub{margin:0 0 28px;font-size:14.5px;color:var(--text-on-dark-muted)}

@media (max-width:900px){
  .auth-shell{flex-direction:column}
  .auth-brand-panel{flex:none;max-width:none;min-height:auto;padding:36px 28px 32px;border-right:none;border-bottom:1px solid var(--panel-border)}
  .auth-pitch{margin-top:22px;padding-top:0}
  .auth-pitch-list{display:none}
  .auth-content{padding:36px 24px 56px}
}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 18px;border-radius:999px;font-weight:600;font-size:14.5px;border:1px solid transparent;cursor:pointer;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.btn:active{transform:scale(.98)}
.btn-primary{background:linear-gradient(135deg,var(--accent) 0%,var(--accent-strong) 100%);color:#fff !important;box-shadow:0 8px 24px rgba(124,92,252,.35)}
.btn-primary:hover{box-shadow:0 10px 28px rgba(124,92,252,.45)}
.btn-primary:disabled{opacity:.65;cursor:not-allowed;transform:none}
.btn-ms{background:var(--panel-elevated);color:var(--text-on-dark) !important;border-color:var(--panel-border-2)}
.btn-ms:hover{border-color:var(--accent-hover)}
.btn-ms + .btn-ms{margin-top:10px}

.auth-divider{display:flex;align-items:center;gap:12px;margin:22px 0;font-size:12px;color:var(--text-on-dark-muted)}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--panel-border-2)}

.auth-form{display:flex;flex-direction:column;gap:16px}
.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500;color:var(--text-on-dark-muted)}
.auth-form input{font:inherit;font-size:14.5px;color:var(--text-on-dark);background:var(--panel);border:1px solid var(--panel-border-2);border-radius:10px;padding:11px 13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease}
.auth-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}

/* Show/hide password toggle — the eye button sits inside the input's own
   box (absolute, right-aligned) rather than beside it, so the field keeps
   its full width and the label/input structure above needs no change. */
.auth-password-wrap{position:relative;display:flex}
.auth-password-wrap input{flex:1;padding-right:42px}
.auth-password-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;background:transparent;color:var(--text-on-dark-muted);display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:8px;padding:0}
.auth-password-toggle:hover{color:var(--accent-hover)}
.auth-password-toggle svg{width:18px;height:18px}
.auth-submit{margin-top:4px}
/* Pulled up against the password field above it (negative margin cancels
   most of .auth-form's own 16px gap) rather than reading as a fully
   separate row — the conventional placement right under the password input. */
.auth-forgot-link{align-self:flex-end;margin-top:-10px;font-size:12.5px;font-weight:600;color:var(--text-on-dark-muted);text-decoration:none}
.auth-forgot-link:hover{color:var(--accent-hover);text-decoration:underline}

.auth-error{background:var(--danger-soft);border:1px solid rgba(220,38,38,.3);color:var(--danger);font-size:13.5px;padding:11px 14px;border-radius:10px;margin-bottom:18px}
.auth-notice{background:var(--accent-soft);border:1px solid var(--panel-border-2);color:var(--text-on-dark);font-size:13.5px;padding:11px 14px;border-radius:10px;margin-bottom:18px}

.auth-switch{margin:26px 0 0;text-align:center;font-size:13.5px;color:var(--text-on-dark-muted)}
.auth-switch a{color:var(--accent-hover);font-weight:600;text-decoration:none}
.auth-switch a:hover{text-decoration:underline}

@media (prefers-reduced-motion: reduce){.brand-mark span{animation:none !important}}
