/* ============================================================
   MAESTRO — Auth (sign in / sign up)
   Shares tokens.css. Cinematic dark brand panel + white form.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: var(--accent); } a:hover { color: var(--accent-hover); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--fg); }
:root { --hero-accent: #5CC9B8; }

.auth { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100vh; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } }

/* ---- Brand panel (dark) ---- */
.brand { position: relative; isolation: isolate; overflow: hidden; color: #F4F6F8; padding: 56px 60px; display: flex; flex-direction: column;
  background: radial-gradient(125% 100% at 82% -10%, #17322E 0%, #111620 46%, #0A0C10 100%); }
@media (max-width: 900px) { .brand { padding: 40px 28px; min-height: 300px; } }
@media (max-width: 560px) { .brand { display: none; } }
.brand__glow { position: absolute; z-index: 0; width: 560px; height: 560px; border-radius: 50%; top: -200px; right: -140px; background: radial-gradient(circle, rgba(92,201,184,0.22), transparent 68%); filter: blur(24px); pointer-events: none; }
.brand::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(10,12,16,0.55) 0%, rgba(10,12,16,0.15) 30%, rgba(10,12,16,0.35) 70%, rgba(10,12,16,0.72) 100%); }
.brand__eq { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 30%; display: flex; align-items: flex-end; gap: 5px; padding: 0 18px; opacity: 0.2; pointer-events: none; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.brand__eq span { flex: 1; height: 100%; border-radius: 3px 3px 0 0; transform-origin: bottom; transform: scaleY(0.14); background: linear-gradient(to top, rgba(92,201,184,0.02), var(--hero-accent)); animation: eqPulse 1.6s ease-in-out infinite; }
.brand__eq span.c { background: linear-gradient(to top, rgba(242,118,108,0.02), #F2766C); }
@keyframes eqPulse { 0%,100% { transform: scaleY(0.12); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .brand__eq span { animation: none; transform: scaleY(0.4); } }

.brand__logo { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__logo img { height: 26px; width: auto; }
.brand__logo span { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #F6F8FA; }

.brand__body { position: relative; z-index: 3; margin: auto 0; max-width: 30em; }
.brand__body h1 { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 16px; color: #F8FAFB; }
.brand__body h1 em { color: var(--hero-accent); font-style: normal; }
.brand__body p { font-size: var(--text-md); line-height: var(--lh-normal); color: rgba(244,246,248,0.72); margin: 0 0 32px; }

.movements { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 2px; }
.movement { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.10); }
.movement:last-child { border-bottom: 1px solid rgba(255,255,255,0.10); }
.movement__ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(92,201,184,0.14); display: grid; place-items: center; flex: none; }
.movement__ic .ic { width: 17px; height: 17px; stroke: var(--hero-accent); stroke-width: 1.75; }
.movement.coral .movement__ic { background: rgba(242,118,108,0.14); }
.movement.coral .movement__ic .ic { stroke: #F2766C; }
.movement__meta b { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: #F4F6F8; margin-bottom: 2px; }
.movement__meta span { font-size: var(--text-xs); color: rgba(244,246,248,0.6); line-height: var(--lh-normal); }

.brand__foot { position: relative; z-index: 3; margin-top: 36px; display: inline-flex; align-items: center; gap: 9px; font-size: var(--text-sm); color: rgba(244,246,248,0.66); }
.brand__foot .ic { width: 16px; height: 16px; stroke: var(--hero-accent); stroke-width: 1.75; }

/* ---- Form panel ---- */
.form-pane { display: flex; flex-direction: column; padding: 32px 40px; background: var(--paper); }
@media (max-width: 560px) { .form-pane { padding: 28px 22px; } }
.form-pane__top { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: var(--text-sm); color: var(--fg-secondary); }
.form-pane__top .m-logo { display: none; margin-right: auto; align-items: center; gap: 9px; }
.form-pane__top .m-logo img { height: 24px; }
.form-pane__top .m-logo span { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--fg); }
@media (max-width: 560px) { .form-pane__top .m-logo { display: inline-flex; } }
.form-pane__top a { font-weight: var(--weight-semibold); text-decoration: none; }

.form-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 0; }
.form-card { width: 100%; max-width: 380px; }
.form-card h2 { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; color: var(--fg); }
.form-card__sub { font-size: var(--text-base); color: var(--fg-secondary); margin: 0 0 30px; }

.tabs { display: inline-flex; background: var(--surface-sunk); border-radius: 10px; padding: 3px; margin-bottom: 26px; gap: 3px; }
.tab { border: none; background: none; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--fg-tertiary); padding: 8px 18px; border-radius: 8px; cursor: pointer; text-decoration: none; transition: background 140ms ease, color 140ms ease; }
.tab:hover { text-decoration: none; }
.tab--active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }

.afield { margin-bottom: 18px; }
.afield label { display: block; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--fg-secondary); margin-bottom: 7px; }
.afield input { width: 100%; height: 46px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); padding: 0 14px; font-family: var(--font-sans); font-size: var(--text-base); color: var(--fg); transition: border-color 120ms ease, box-shadow 120ms ease; }
.afield input::placeholder { color: var(--fg-quaternary); }
.afield input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.arow { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 24px; }
.remember { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--fg-secondary); cursor: pointer; }
.remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.arow a { font-size: var(--text-sm); font-weight: var(--weight-medium); text-decoration: none; }

.abtn { width: 100%; height: 48px; border: none; border-radius: 9px; background: var(--accent); color: var(--accent-fg); font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; transition: background 120ms ease, transform 140ms cubic-bezier(0.2,0,0,1), box-shadow 140ms ease; }
.abtn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.abtn:active { transform: translateY(0); box-shadow: none; }

.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--fg-quaternary); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.sso { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--fg); font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: background 120ms ease, border-color 120ms ease; }
.sso:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.sso .ic { width: 17px; height: 17px; stroke-width: 1.75; }

.switch { text-align: center; margin-top: 26px; font-size: var(--text-sm); color: var(--fg-secondary); }
.switch a { font-weight: var(--weight-semibold); text-decoration: none; }

.form-pane__foot { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-xs); color: var(--fg-tertiary); flex-wrap: wrap; gap: 10px; }
.form-pane__foot a { color: var(--fg-tertiary); text-decoration: none; }
.form-pane__foot a:hover { color: var(--accent); }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.hide { display: none !important; }
