/* Sign-in page, V2 design (SignIn mockup). Markup hooks used by access.js are unchanged; this file only styles them. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-opsz.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin-600.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --ink: #0A0E1A; --page: #F3F5F8; --text: #1A2030; --muted: #4B5568; --muted-2: #7F8AA0; --line: #CDD3DE; --line-soft: #E2E6EE;
  --accent: #3EE6C1; --accent-ink: #0B7A66; --accent-ink-hover: #075446; --card: #121829; --card-2: #1E2740; --danger: #B42318;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: "Instrument Sans", system-ui, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); }
body.access { font-family: var(--body); color: var(--text); font-size: 16px; line-height: 1.5; min-height: 100vh; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent-ink-hover); }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.access-skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.access-skip:focus { top: 12px; color: #fff; }
[hidden] { display: none !important; }

.access-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }

/* Brand panel */
.access-story { flex: 1 1 520px; position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; min-height: 640px; }
.access-story :focus-visible { outline-color: var(--accent); }
.access-glow { position: absolute; border-radius: 50%; pointer-events: none; }
.access-glow.a { width: 560px; height: 560px; right: -160px; top: -140px; background: radial-gradient(circle, rgba(62,230,193,.16), rgba(62,230,193,0) 65%); animation: drift 14s ease-in-out infinite; }
.access-glow.b { width: 480px; height: 480px; left: -200px; bottom: -220px; background: radial-gradient(circle, rgba(110,124,255,.14), rgba(110,124,255,0) 65%); animation: drift 18s ease-in-out infinite reverse; }
.site-brand { position: relative; display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; align-self: flex-start; }
.site-brand:hover { color: #fff; }
.site-brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.site-brand b { font-family: var(--display); font-weight: 700; font-size: 20px; }
.access-story-copy { position: relative; margin-top: auto; padding-top: 48px; max-width: 520px; }
.kicker { margin: 0; font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.access-story h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.02em; margin: 12px 0 0; }
.greet-card { margin-top: 32px; background: var(--card); border: 1px solid rgba(255,255,255,.09); border-radius: 20px; padding: 20px; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.greet-head { display: flex; align-items: center; gap: 10px; }
.greet-code { font-family: ui-monospace, monospace; font-size: 12px; background: var(--card-2); border-radius: 6px; padding: 3px 7px; }
.greet-name { color: #A7B0C2; font-size: 13.5px; flex: 1; }
.greet-live { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); }
.greet-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.greet-line { margin: 14px 0 0; font-size: 19px; line-height: 1.4; }
.greet-wave { display: flex; align-items: center; gap: 4px; height: 40px; margin-top: 14px; }
.greet-wave span { display: block; width: 4px; border-radius: 2px; background: var(--accent); transform-origin: center; animation: wave 1.1s ease-in-out infinite; }
.access-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.access-kpis div { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 14px; }
.access-kpis small { display: block; color: #A7B0C2; font-size: 12.5px; }
.access-kpis b { display: block; font-family: var(--display); font-weight: 700; font-size: 26px; margin-top: 2px; }
.access-kpis div:nth-child(2) b { color: var(--accent); }
.access-note-dark { color: #8A94A8; font-size: 12.5px; margin: 10px 0 0; }
.access-trust { position: relative; margin-top: 40px; display: flex; flex-wrap: wrap; gap: 18px; color: #8A94A8; font-size: 13px; }
.access-trust span, .access-trust a { display: inline-flex; align-items: center; gap: 6px; color: #8A94A8; text-decoration: none; }
.access-trust a:hover { color: #fff; }
.dot-ok { width: 7px; height: 7px; border-radius: 50%; background: #25B864; }

/* Form panel */
.access-auth { flex: 1 1 480px; display: flex; flex-direction: column; padding: 32px 24px; min-width: 0; }
.access-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.access-topbar a { font-weight: 600; }
.access-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.access-card { width: 100%; max-width: 420px; }
.access-card h2 { font-family: var(--display); font-size: 34px; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.access-card h3 { font-family: var(--display); font-size: 30px; letter-spacing: -.02em; margin: 8px 0 0; line-height: 1.15; }
.access-intro, .panel-heading p, .access-flow > p, .access-note { color: var(--muted); margin: 8px 0 0; font-size: 16px; }
.access-card-heading .kicker, .access-card .kicker { color: var(--accent-ink); }
.access-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.access-card form.auth-panel, .access-card form.access-flow { margin-top: 0; }
.access-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.access-card label small { font-weight: 400; color: var(--muted); font-size: 13px; }
.access-card input:not([type=checkbox]) { width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 0 14px; font-size: 15.5px; color: var(--text); font-weight: 400; transition: border-color .2s ease, box-shadow .2s ease; }
.access-card input:not([type=checkbox]):focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(11,122,102,.14); }
.access-card input::placeholder { color: #6B7385; }
.workspace-field { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.workspace-field:focus-within { border-color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(11,122,102,.14); }
.workspace-field input:not([type=checkbox]) { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.workspace-field span { display: flex; align-items: center; padding: 0 14px; background: var(--page); color: var(--muted); font-weight: 400; font-size: 14px; border-left: 1px solid var(--line-soft); white-space: nowrap; }
button.primary { height: 52px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s ease; }
button.primary:hover { background: var(--card-2); }
button.primary:disabled { opacity: .7; cursor: progress; }
button.primary i { font-style: normal; }
.form-status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--muted); }
.form-status[data-tone="error"] { color: var(--danger); }
.form-status[data-tone="success"] { color: var(--accent-ink); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #D5DAE3; }
.secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.secondary-actions button, .more-options div button { min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px; transition: background .2s ease, border-color .2s ease; }
.secondary-actions button:hover, .more-options div button:hover { background: var(--page); border-color: #9AA3B5; }
.opt-icon { display: inline-flex; color: var(--text); }
.more-options { margin-top: 16px; }
.more-options summary { list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14.5px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.more-options summary::-webkit-details-marker { display: none; }
.more-options summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s ease; }
.more-options[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.more-options div { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.more-options div button { min-height: 52px; justify-content: flex-start; gap: 12px; padding: 0 16px; border-color: var(--line-soft); text-align: left; font-weight: 400; }
.more-options div button b { display: block; font-weight: 600; }
.more-options div button small { display: block; color: var(--muted); font-size: 13px; }
.more-options div button::after { content: "›"; margin-left: auto; font-size: 18px; color: var(--muted); }
.access-invite { margin: 22px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.access-back { align-self: flex-start; background: none; border: 0; padding: 8px 0; color: var(--muted); font-size: 14px; min-height: 40px; }
.access-back:hover { color: var(--text); }
.field-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field-heading label { font-weight: 600; font-size: 14px; }
.password-group { display: flex; flex-direction: column; gap: 6px; }
.forgot-inline { background: none; border: 0; color: var(--accent-ink); font-weight: 600; font-size: 14px; padding: 4px 0; }
.forgot-inline:hover { color: var(--accent-ink-hover); }
.password-field { position: relative; }
.password-field input:not([type=checkbox]) { padding-right: 52px; }
.password-toggle { position: absolute; right: 4px; top: 4px; width: 42px; height: 42px; border: 0; background: none; color: var(--muted); border-radius: 10px; font-size: 16px; }
.password-toggle[aria-pressed="true"] { color: var(--accent-ink); }
.access-card label.remember-option { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; color: var(--muted); }
.remember-option input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
.verification-mark { width: 56px; height: 56px; border-radius: 50%; background: #D8F8EF; color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; animation: ring 2s ease-out infinite; }
.sso-providers { display: flex; flex-direction: column; gap: 8px; }
.sso-provider { min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--text); }
.sso-provider:hover { background: var(--page); }
.access-help { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.access-help nav { display: flex; gap: 16px; }
.access-help a { color: var(--muted); text-decoration: none; }
.access-help a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 1000px) {
  .access-story { min-height: auto; padding: 28px 24px; }
  .access-story-copy { padding-top: 32px; }
  .greet-card, .access-kpis, .access-note-dark { display: none; }
  .access-story h1 { font-size: 30px; }
  .access-trust { margin-top: 20px; }
}
@media (max-width: 420px) { .secondary-actions { grid-template-columns: minmax(0, 1fr); } .access-card h2 { font-size: 30px; } }

@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -30px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(11,122,102,.35); } 100% { box-shadow: 0 0 0 22px rgba(11,122,102,0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
