/* SEOSID Growth OS — built on the seosid.com design tokens (assets/css/style.css). */
:root {
  --bg-dark: #0D1117; --bg-light: #F8FAFC; --white: #FFFFFF;
  --dark: #111827; --dark-2: #1F2937; --dark-3: #374151;
  --blue-bright: #2563EB; --blue-light: #3B82F6; --blue-mid: #1E40AF; --blue-deep: #1A3A8F; --blue-pale: #EFF6FF; --blue-soft: #DBEAFE;
  --gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB; --gray-400: #9CA3AF; --gray-500: #6B7280; --gray-600: #4B5563;
  --text-primary: #111827; --text-secondary: #374151; --text-muted: #6B7280; --border-color: #E5E7EB;
  --good: #15803D; --good-bg: #F0FDF4; --amber: #B45309; --amber-bg: #FFFBEB; --bad: #B91C1C; --bad-bg: #FEF2F2;
  --gradient-blue: linear-gradient(135deg, #1A3A8F 0%, #2563EB 100%);
  --gradient-hero: linear-gradient(135deg, #0D1117 0%, #111827 40%, #1A3A8F 100%);
  --gradient-glow: radial-gradient(ellipse 60% 40% at 70% 30%, rgba(37,99,235,0.18) 0%, transparent 70%);
  --radius-sm: 6px; --radius: 12px; --radius-card: 16px; --radius-lg: 20px; --pill: 100px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-blue: 0 8px 32px rgba(37,99,235,0.22);
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-display: 'DM Sans', 'Inter', sans-serif;
  --transition: 0.22s ease;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-light); color: var(--text-primary); font: 15px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-bright); text-decoration: none; }
a:hover { color: var(--blue-mid); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
h1 { font-size: 1.75rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1rem; max-width: 70ch; }
ul { padding-left: 1.2rem; }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; border-radius: 4px; }

/* ---------- App shell: dark rail like the seosid.com footer ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-dark); background-image: var(--gradient-glow); color: var(--gray-400); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; padding: 0 .6rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand small { display: block; margin-top: .55rem; font-size: .8rem; color: var(--gray-400); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { display: inline-block; margin-top: .55rem; padding: .1rem .55rem; border-radius: var(--pill); background: rgba(37,99,235,.18); color: #93C5FD; font-size: .72rem; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: #D1D5DB; padding: .55rem .75rem; border-radius: 10px; font-size: .92rem; font-weight: 500; transition: background var(--transition), color var(--transition); }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: var(--gradient-blue); color: #fff; box-shadow: var(--shadow-blue); }
.nav .nav-soon { display: flex; justify-content: space-between; align-items: center; color: #6B7280; padding: .45rem .75rem; font-size: .9rem; cursor: default; }
.nav .nav-soon::after { content: "Soon"; font-size: .68rem; font-weight: 600; color: #93C5FD; background: rgba(37,99,235,.14); padding: .05rem .45rem; border-radius: var(--pill); }
.nav-group { font-size: .72rem; font-weight: 600; color: #6B7280; padding: 1rem .75rem .3rem; letter-spacing: .02em; }
.sidebar-foot { margin-top: auto; font-size: .82rem; padding: .9rem .75rem 0; border-top: 1px solid rgba(255,255,255,.08); color: var(--gray-400); word-break: break-all; }
.sidebar-foot form { margin: 0; }
.sidebar-foot select { background: var(--dark-2); color: #fff; border-color: var(--dark-3); margin: .3rem 0; }
.sidebar-foot button { background: none; border: 0; color: #93C5FD; padding: 0; font: inherit; cursor: pointer; }
.sidebar-foot button:hover { color: #fff; }

.main { padding: 2.25rem clamp(1rem, 3vw, 2.75rem) 4rem; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.page-head p { color: var(--text-muted); margin: .15rem 0 0; }

/* ---------- Surfaces ---------- */
.panel { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-card); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }

/* KPI band */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-card); margin: 0 0 1.25rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.kpi { padding: 1.15rem 1.35rem; border-right: 1px solid var(--border-color); }
.kpi:last-child { border-right: 0; }
.kpi dt { color: var(--text-muted); font-size: .82rem; font-weight: 500; }
.kpi dd { margin: .3rem 0 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); line-height: 1.1; }
.kpi dd small { display: block; font-family: var(--font-body); font-size: .78rem; font-weight: 400; color: var(--text-muted); letter-spacing: 0; margin-top: .3rem; }
.kpi--pending dd { font-family: var(--font-body); color: var(--text-muted); font-size: .92rem; font-weight: 400; letter-spacing: 0; padding-top: .4rem; line-height: 1.45; }
.kpi--hero { background: var(--gradient-hero); color: #fff; }
.kpi--hero dt { color: #93C5FD; }
.kpi--hero dd { color: #fff; }
.kpi--hero dd small { color: #BFDBFE; }

/* Allowance meters */
.meters { display: grid; gap: 1rem; }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; align-items: baseline; }
.meter-row .label { font-size: .9rem; font-weight: 500; color: var(--text-secondary); }
.meter-row .count { font-size: .85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.meter-row progress { grid-column: 1 / -1; width: 100%; height: 8px; appearance: none; border: 0; border-radius: var(--pill); background: var(--blue-pale); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--blue-pale); border-radius: var(--pill); }
progress::-webkit-progress-value { background: var(--gradient-blue); border-radius: var(--pill); }
progress::-moz-progress-bar { background: var(--blue-bright); border-radius: var(--pill); }
progress.is-high::-webkit-progress-value { background: #F59E0B; }
progress.is-high::-moz-progress-bar { background: #F59E0B; }
progress.is-full::-webkit-progress-value { background: #EF4444; }
progress.is-full::-moz-progress-bar { background: #EF4444; }

/* Onboarding steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: .9rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--gray-100); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; background: var(--blue-pale); color: var(--blue-bright); }
.steps li.done::before { content: "✓"; background: var(--gradient-blue); color: #fff; }
.steps li.done span { color: var(--text-muted); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -.25rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 600; font-size: .78rem; color: var(--text-muted); padding: .6rem .75rem; border-bottom: 1px solid var(--border-color); white-space: nowrap; background: var(--gray-50); }
th:first-child { border-top-left-radius: 10px; } th:last-child { border-top-right-radius: 10px; }
td { padding: .8rem .75rem; border-bottom: 1px solid var(--gray-100); vertical-align: top; color: var(--text-secondary); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FBFCFE; }
td.num, th.num { text-align: right; }
.sub { color: var(--text-muted); font-size: .82rem; display: block; margin-top: .1rem; }

/* Badges */
.badge { display: inline-block; padding: .15rem .65rem; border-radius: var(--pill); font-size: .75rem; font-weight: 600; background: var(--gray-100); color: var(--gray-600); white-space: nowrap; }
.badge--good { background: var(--good-bg); color: var(--good); }
.badge--warn { background: var(--amber-bg); color: var(--amber); }
.badge--bad { background: var(--bad-bg); color: var(--bad); }
.badge--blue { background: var(--blue-pale); color: var(--blue-bright); }

.flash { padding: .8rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; border: 1px solid; font-size: .92rem; }
.flash--ok { background: var(--good-bg); border-color: #BBF7D0; color: #14532D; }
.flash--warn { background: var(--amber-bg); border-color: #FDE68A; color: #78350F; }
.flash--err { background: var(--bad-bg); border-color: #FECACA; color: #7F1D1D; }
.empty { padding: 2.5rem 1.5rem; text-align: center; }
.empty p { color: var(--text-muted); margin-left: auto; margin-right: auto; }

/* Forms */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .88rem; color: var(--text-secondary); }
.field .hint { color: var(--text-muted); font-size: .82rem; margin-top: .3rem; }
.field .error { color: var(--bad); font-size: .82rem; margin-top: .3rem; }
.fieldset-plain { border: 0; padding: 0; margin: 0 0 1.1rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid #D1D5DB; border-radius: 10px; font: inherit; background: #fff; color: var(--text-primary); transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue-bright); outline: none; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--text-secondary); }
.check input { margin-top: .25rem; accent-color: var(--blue-bright); width: 16px; height: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.choice { display: flex; gap: .7rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius); cursor: pointer; background: #fff; transition: border-color var(--transition), box-shadow var(--transition); }
.choice:has(input:checked) { border-color: var(--blue-bright); background: var(--blue-pale); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.choice input { accent-color: var(--blue-bright); }

/* Buttons: pill, as on seosid.com */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.4rem; border-radius: var(--pill); border: 0; background: var(--gradient-blue); color: #fff; font: 600 .92rem var(--font-display); text-decoration: none; cursor: pointer; box-shadow: var(--shadow-blue); transition: transform var(--transition), box-shadow var(--transition); }
.btn:hover { color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 12px 36px rgba(37,99,235,.3); }
.btn--quiet { background: #fff; color: var(--text-primary); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.btn--quiet:hover { color: var(--blue-bright); border-color: var(--blue-soft); box-shadow: var(--shadow-sm); }
.btn--danger { background: #fff; color: var(--bad); border: 1px solid #FECACA; box-shadow: none; }
.btn--danger:hover { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.btn--block { width: 100%; }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; flex: 1; min-width: 170px; }
form.inline { display: inline; }

/* Auth: seosid.com hero */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.auth-side { position: relative; overflow: hidden; background: var(--gradient-hero); color: #D1D5DB; padding: 2.75rem clamp(1.5rem, 4vw, 4.5rem); display: flex; flex-direction: column; justify-content: space-between; }
.auth-side::after { content: ""; position: absolute; inset: 0; background: var(--gradient-glow); pointer-events: none; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side img { height: 34px; width: auto; }
.auth-pill { display: inline-block; margin-top: 3.5rem; padding: .35rem .9rem; border-radius: var(--pill); border: 1px solid rgba(147,197,253,.35); background: rgba(37,99,235,.15); color: #BFDBFE; font-size: .8rem; font-weight: 500; }
.auth-side h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 700; line-height: 1.12; max-width: 15ch; margin: 1.1rem 0 1rem; letter-spacing: -0.03em; }
.auth-side h1 span { background: linear-gradient(90deg, #60A5FA, #93C5FD); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side p { color: #9CA3AF; font-size: 1.02rem; max-width: 44ch; }
.auth-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.auth-points li { display: flex; gap: .6rem; align-items: center; color: #D1D5DB; font-size: .92rem; }
.auth-points li::before { content: "✓"; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: rgba(37,99,235,.25); color: #93C5FD; font-size: .7rem; flex: none; }
.auth-foot { font-size: .8rem; color: #6B7280; }
.auth-main { display: grid; place-items: center; padding: 2.5rem 1.25rem; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-card .alt { margin-top: 1.4rem; color: var(--text-muted); font-size: .9rem; text-align: center; }

/* Utilities */
.muted { color: var(--text-muted); }
.mt { margin-top: 1rem; }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; font-size: .9rem; }
dl.facts dt { color: var(--text-muted); }
dl.facts dd { margin: 0; color: var(--text-primary); font-weight: 500; }
.qr svg { width: 180px; height: 180px; background: #fff; padding: 10px; border: 1px solid var(--border-color); border-radius: var(--radius); }
ul.pagination { list-style: none; display: flex; gap: .3rem; padding: 0; margin: 1.25rem 0 0; flex-wrap: wrap; }
ul.pagination li > * { display: block; padding: .35rem .75rem; border: 1px solid var(--border-color); border-radius: var(--pill); text-decoration: none; font-size: .85rem; }
ul.pagination li.active > * { background: var(--gradient-blue); color: #fff; border-color: transparent; }
ul.pagination li.disabled > * { color: var(--gray-400); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; gap: 1rem; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group, .nav .nav-soon { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 1.75rem 1.5rem; }
  .auth-pill { margin-top: 1.5rem; }
  .auth-points, .auth-foot { display: none; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--border-color); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:hover { transform: none; } }
