/* zoiwise — brand tokens from the brand sheet */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(/fonts/manrope-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 500; font-display: swap; src: url(/fonts/manrope-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(/fonts/manrope-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(/fonts/manrope-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(/fonts/manrope-latin-800-normal.woff2) format('woff2'); }

:root {
  --navy: #0B2545;
  --blue: #2563FF;
  --sky: #8EC5FF;
  --mist: #E8F2FF;
  --cloud: #F6F9FF;
  --ink: #0B2545;
  --muted: #5B6B82;
  --line: #E3EAF4;
  --white: #fff;
  --red: #E5484D;
  --red-bg: #FDECEC;
  --amber-bg: #FFF4E5;
  --green: #2F9E6B;
  --green-bg: #E7F6EE;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 8px 24px rgba(11, 37, 69, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Manrope, system-ui, sans-serif; color: var(--ink); background: var(--cloud); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: baseline; font-weight: 800; letter-spacing: -.035em; color: var(--navy); line-height: 1; }
.logo-o { width: .6em; height: .6em; margin: 0 .02em; transform: translateY(.02em); color: var(--navy); }
.logo-inverse, .logo-inverse .logo-o { color: #fff; }
.logo-sm { font-size: 1.6rem; }
.logo-md { font-size: 2.4rem; }
.logo-lg { font-size: 4rem; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.1rem; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1550E8; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--mist); }
.btn-google { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-google:hover { background: var(--cloud); }
.btn-danger { background: var(--red); color: #fff; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--blue); font: inherit; cursor: pointer; padding: 0; }

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.form input { font: inherit; font-weight: 500; padding: .7rem .85rem; border: 1px solid #CBD6E5; border-radius: 10px; background: #fff; color: var(--ink); }
.form input:focus { outline: 3px solid rgba(37, 99, 255, .2); border-color: var(--blue); }
.form-inline { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.hint { font-weight: 500; font-size: .8rem; color: var(--muted); }
.code-input { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.form-inline .code-input { max-width: 12rem; }
.auth-card .code-input { width: 100%; text-align: center; font-size: 1.25rem; font-weight: 700; }

.alert { padding: .7rem .9rem; border-radius: 10px; font-size: .92rem; font-weight: 600; }
.alert-error { background: var(--red-bg); color: #A1262B; }
.alert-ok { background: var(--green-bg); color: #1D6B47; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 1rem; }
.chip { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.chip-urgent { background: var(--red-bg); color: #C2272D; }
.chip-soon { background: var(--amber-bg); color: #A15C07; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 800; margin-right: .4rem; }
.pill-on { background: var(--green-bg); color: #1D6B47; }

/* ---------- Public site ---------- */
.public { background: linear-gradient(180deg, #fff 0%, var(--cloud) 60%); }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem clamp(1rem, 5vw, 4rem); max-width: 1200px; margin: 0 auto; }
.site-header nav { display: flex; gap: .5rem; }
.brand:hover { text-decoration: none; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; padding: 3rem clamp(1rem, 5vw, 4rem) 4rem; max-width: 1200px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); color: var(--navy); }
.hero-sub { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: #4A6A8F; margin-bottom: 1.25rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 34rem; }
.hero-cta { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; box-shadow: 0 20px 60px rgba(11, 37, 69, .12); }
.hc-title { font-weight: 800; margin-bottom: 1rem; }
.hc-row { display: flex; align-items: center; gap: .75rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.hc-row:first-of-type { border-top: 0; }
.hc-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--mist); color: var(--blue); }
.hc-name { flex: 1; font-weight: 600; font-size: .95rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding: 0 clamp(1rem, 5vw, 4rem) 4rem; max-width: 1200px; margin: 0 auto; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature h3 { font-size: 1.05rem; font-weight: 800; margin-top: .9rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mist); color: var(--navy); }

.pricing { padding: 0 clamp(1rem, 5vw, 4rem) 5rem; max-width: 900px; margin: 0 auto; text-align: center; }
.pricing h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1.5rem; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; text-align: left; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; }
.plan-featured { border: 2px solid var(--blue); }
.plan h3 { font-weight: 800; }
.price { font-size: 2.2rem; font-weight: 800; margin: .25rem 0; }
.price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.plan ul { padding-left: 1.1rem; color: var(--muted); flex: 1; }
.plan li { margin: .35rem 0; }
.site-footer { display: flex; justify-content: space-between; align-items: center; padding: 2rem clamp(1rem, 5vw, 4rem); max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--line); }

/* ---------- Auth ---------- */
.auth { background: radial-gradient(1200px 600px at 80% -10%, var(--mist), transparent 60%), var(--cloud); }
.auth-wrap { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 1.5rem; padding: 2rem 1rem; }
.auth-logo:hover { text-decoration: none; }
.auth-card { width: min(420px, calc(100vw - 2rem)); padding: 2rem; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .alert { margin: 1rem 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-weight: 600; }
.auth-actions { display: flex; justify-content: center; gap: .5rem; }
.auth-actions form { margin: 0; }
.auth-switch { text-align: center; margin: 1.25rem 0 0; font-size: .92rem; color: var(--muted); }
.divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-card .btn-google { margin-top: 1rem; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--navy); color: #C9D6EA; display: flex; flex-direction: column; padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { padding: 0 .6rem 1.75rem; }
.sidebar-brand:hover { text-decoration: none; }
.sidebar-nav { display: grid; gap: .2rem; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; color: #C9D6EA; font-weight: 600; font-size: .93rem; }
.nav-link:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-link.active { background: rgba(37, 99, 255, .25); color: #fff; }
.nav-link.disabled { opacity: .5; cursor: default; }
.nav-link.disabled:hover { background: none; }
.soon { margin-left: auto; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: rgba(255, 255, 255, .1); padding: .1rem .4rem; border-radius: 6px; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.account-menu { position: relative; }
.account { display: flex; align-items: center; gap: .7rem; padding: .5rem .75rem; min-width: 0; border-radius: 10px; cursor: pointer; list-style: none; }
.account::-webkit-details-marker { display: none; }
.account:hover, .account-menu[open] .account { background: rgba(255, 255, 255, .06); }
.account:focus-visible { outline: 2px solid var(--sky); }
.account-caret { margin-left: auto; flex-shrink: 0; color: #C9D6EA; }
.menu { position: absolute; left: 0; right: 0; bottom: calc(100% + .5rem); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(11, 37, 69, .25); padding: .4rem; z-index: 20; }
.menu-head { display: grid; padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.menu-head strong { font-size: .9rem; }
.menu-head span { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu form { margin: 0; }
.menu-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .6rem; border-radius: 8px; border: 0; background: none; font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink); cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--cloud); text-decoration: none; }
.account-text { display: grid; min-width: 0; }
.account-name { color: #fff; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-plan { color: var(--sky); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.account-meta { color: #C9D6EA; font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; min-width: 0; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--mist); color: var(--navy); font-weight: 800; }
.content { padding: 2.5rem 2rem 3rem; max-width: 1000px; display: grid; gap: 1.25rem; align-content: start; }
.content > h1, .content > p { margin-bottom: 0; }
.greeting { font-size: 1.9rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .75rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: var(--radius); }
.stat .icon { grid-row: span 2; }
.stat strong { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat span { font-size: .85rem; font-weight: 600; }
.stat-red { background: var(--red-bg); color: #A1262B; }
.stat-blue { background: var(--mist); color: #1446C7; }
.stat-green { background: var(--green-bg); color: #1D6B47; }

.empty { text-align: center; padding: 2rem 1rem; }
.card-callout { display: flex; align-items: center; gap: 1rem; }
.card-callout > div { flex: 1; }
.card-callout p { margin: 0; }
.card-callout .icon { color: var(--blue); }

.twofa-setup { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; align-items: start; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { word-break: break-all; background: var(--cloud); padding: .1rem .35rem; border-radius: 6px; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .5rem 1rem; margin: 1rem 0 1.5rem; }
.codes code { background: var(--cloud); padding: .3rem .6rem; border-radius: 8px; font-size: 1rem; }
details summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-top: .5rem; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.5rem; }
  .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: .75rem 1rem; overflow-x: auto; }
  .sidebar-brand { padding: 0 1rem 0 0; }
  .sidebar-nav { display: flex; }
  .nav-link .soon, .nav-link.disabled, .account-text, .account-caret, .nav-label { display: none; }
  .account { padding: .25rem; }
  .menu { left: auto; right: 0; bottom: auto; top: calc(100% + .5rem); width: 240px; }
  .sidebar { overflow: visible; }
  .nav-link { padding: .55rem; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; }
  .content { padding: 1.5rem 1rem 2rem; }
  .stats { grid-template-columns: 1fr; }
  .twofa-setup { grid-template-columns: 1fr; }
  .twofa-setup .qr { max-width: 200px; }
  .codes { grid-template-columns: repeat(2, auto); }
}
