/* Cellvert — site styles */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8f7;
  --bg-tint: #ecf7f1;
  --surface: #ffffff;
  --text: #0e1a16;
  --text-2: #42524c;
  --text-3: #6b7a74;
  --line: #e2e8e5;
  --line-2: #d3dcd8;
  --brand: #0d8a55;
  --brand-600: #0b7548;
  --brand-50: #e7f5ee;
  --accent: #1f4fd6;
  --warn: #b45309;
  --danger: #c0362c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 22, .05), 0 8px 24px rgba(14, 26, 22, .06);
  --shadow-lg: 0 2px 4px rgba(14, 26, 22, .04), 0 24px 48px rgba(14, 26, 22, .10);
  --max: 1160px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 680px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--text-3); }
.small { font-size: .875rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s, transform .05s; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #22312c; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-2); font-weight: 550; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.nav-cta .btn { padding: 9px 16px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

.nav-menu { display: flex; align-items: center; gap: 20px; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu { display: none; }
  .site-header.open .nav-menu {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px;
    position: absolute; top: 68px; left: 0; right: 0; background: #fff; padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-header.open .nav-links { flex-direction: column; align-items: stretch; }
  .site-header.open .nav-cta { flex-direction: column; align-items: stretch; }
}

/* Hero */
.hero { padding: 72px 0 80px; background:
  radial-gradient(900px 400px at 85% -10%, var(--bg-tint), transparent 70%),
  radial-gradient(700px 360px at -10% 20%, #eef3ff, transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero .lead { margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: var(--text-2); font-size: .92rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
@media (max-width: 1080px) { .hero-grid { grid-template-columns: 1fr; } .visual { max-width: 640px; } }

/* Hero visual */
.visual { position: relative; display: grid; grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.35fr); align-items: center; gap: 14px; }
.doc, .sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.doc { padding: 18px 16px; aspect-ratio: 3/4; display: flex; flex-direction: column; gap: 8px; }
.doc .bar { height: 7px; border-radius: 4px; background: #e6ebe9; }
.doc .bar.w60 { width: 60%; } .doc .bar.w40 { width: 40%; } .doc .bar.w80 { width: 80%; }
.doc .tbl { margin-top: 10px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; }
.doc .tbl span { height: 7px; border-radius: 3px; background: #d7e1dd; }
.doc .tbl span.h { background: #b9cbc3; }
.arrow { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.arrow svg { width: 22px; height: 22px; }
.sheet { overflow: hidden; font-size: .78rem; }
.sheet-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--brand); color: #fff; font-weight: 600; }
.sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sheet th:first-child { width: 26px; }
.sheet th:nth-child(2) { width: 20%; }
.sheet td:nth-child(4), .sheet th:nth-child(4) { width: 34%; }
.sheet th, .sheet td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet th { background: var(--bg-soft); color: var(--text-3); font-weight: 600; font-size: .7rem; }
.sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet tr.hd td { font-weight: 650; background: var(--brand-50); }
@media (max-width: 520px) { .visual { grid-template-columns: 1fr; } .arrow { justify-self: center; transform: rotate(90deg); } .doc { aspect-ratio: auto; } }

/* Grids & cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p:last-child { margin-bottom: 0; }
.card .ic { width: 44px; height: 44px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin-bottom: 16px; }
.card .ic svg { width: 22px; height: 22px; }
.card p { color: var(--text-2); }
.section-head { margin-bottom: 48px; }

.steps { counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.check-list li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230b7548'%3E%3Cpath d='M8.1 13.3 4.8 10l-1.1 1.1 4.4 4.4 8.5-8.5-1.1-1.1z'/%3E%3C/svg%3E") center/14px no-repeat;
}

.usecase h3 { display: flex; align-items: center; gap: 10px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); }
.tag.blue { background: #e9efff; color: var(--accent); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.plan .badge { position: absolute; top: -12px; left: 26px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.2rem; margin-bottom: 4px; }
.plan .for { color: var(--text-3); font-size: .9rem; margin-bottom: 18px; min-height: 2.8em; }
.plan .price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.plan .price strong { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; }
.plan .price span { color: var(--text-3); font-size: .9rem; }
.plan .pages { font-weight: 650; margin-bottom: 2px; }
.plan .ppp { color: var(--text-3); font-size: .85rem; margin-bottom: 20px; }
.plan .btn { margin-bottom: 22px; }
.plan .check-list { font-size: .93rem; }
.plan.custom { background: linear-gradient(180deg, #0f1c18, #15282199); background: #0f1c18; color: #e6efeb; border-color: #0f1c18; }
.plan.custom .for, .plan.custom .ppp, .plan.custom .price span { color: #9fb3ab; }
.plan.custom .check-list li { color: #cfdcd6; }
.plan.custom .btn-primary { background: #fff; color: var(--text); }
.plan.custom .btn-primary:hover { background: #e9efec; }
.pricing-note { margin-top: 28px; text-align: center; color: var(--text-3); font-size: .9rem; }

.compare { width: 100%; border-collapse: collapse; font-size: .93rem; background: #fff; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font-weight: 700; background: var(--bg-soft); position: sticky; top: 68px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.yes { color: var(--brand-600); font-weight: 700; }
.no { color: var(--text-3); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 620; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--text-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); margin: 12px 0 0; }

/* CTA band */
.cta-band { background: var(--text); color: #fff; border-radius: 20px; padding: 56px 40px; text-align: center; }
.cta-band p { color: #b9c8c2; max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: #3a4c46; }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: .92rem; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text-2); }
.site-footer .legal-line { border-top: 1px solid var(--line); padding-top: 24px; font-size: .84rem; color: var(--text-3); display: grid; gap: 6px; }

/* Page header (inner pages) */
.page-head { padding: 64px 0 40px; background: radial-gradient(800px 300px at 80% -20%, var(--bg-tint), transparent 70%); border-bottom: 1px solid var(--line); }
.page-head .lead { margin-bottom: 0; }

/* Prose (legal & docs) */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: .3em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.6em; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }
.prose code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose pre { background: #0f1c18; color: #d9e7e1; padding: 18px 20px; border-radius: 12px; overflow-x: auto; line-height: 1.55; margin: 0 0 1.4em; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.updated { color: var(--text-3); font-size: .9rem; margin-top: 10px; }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--bg-soft); padding: 14px 18px; border-radius: 10px; margin: 0 0 1.4em; }
.callout p:last-child { margin: 0; }

.doc-layout { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 48px 0 88px; }
.doc-nav { position: sticky; top: 92px; align-self: start; font-size: .92rem; }
.doc-nav h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 18px 0 8px; }
.doc-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-nav a { display: block; color: var(--text-2); padding: 5px 10px; border-radius: 7px; }
.doc-nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--text); }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; gap: 16px; } .doc-nav { position: static; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 14px; } }

.method { display: inline-block; font-family: var(--mono); font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-right: 8px; vertical-align: middle; }
.method.get { background: #e9efff; color: var(--accent); }
.method.post { background: var(--brand-50); color: var(--brand-600); }
.endpoint { font-family: var(--mono); font-size: .95rem; background: var(--bg-soft); border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; margin: 0 0 1em; overflow-x: auto; white-space: nowrap; }

.tabs { display: flex; gap: 4px; margin-bottom: -1px; }
.tabs button { font: inherit; font-size: .85rem; font-weight: 600; padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; background: none; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--text-3); }
.tabs button[aria-selected="true"] { background: #0f1c18; color: #fff; }
.tab-panel[hidden] { display: none; }
.tab-panel pre { border-top-left-radius: 0; }

/* Forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--text); width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.field .hint { font-size: .82rem; color: var(--text-3); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.alert { padding: 12px 14px; border-radius: 10px; font-size: .92rem; border: 1px solid; }
.alert.ok { background: var(--brand-50); border-color: #bfe3d0; color: #0a5c39; }
.alert.err { background: #fdf0ee; border-color: #f3c9c4; color: #8f2a22; }
.alert[hidden] { display: none; }

.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px 20px; background: radial-gradient(800px 400px at 50% -10%, var(--bg-tint), transparent 70%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.6rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .85rem; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 56px 0 88px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.info-list strong { display: block; font-size: .85rem; color: var(--text-3); font-weight: 600; }

/* App */
.app-shell { padding: 36px 0 80px; background: var(--bg-soft); min-height: calc(100vh - 68px); }
.app-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.app-top h1 { font-size: 1.7rem; margin: 0; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 130px; }
.stat b { display: block; font-size: 1.3rem; }
.stat span { font-size: .8rem; color: var(--text-3); }
.app-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; } }
.dropzone { display: block; border: 2px dashed var(--line-2); border-radius: 16px; background: #fff; padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--bg-tint); }
.dropzone svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--brand); }
.files { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.file { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.file .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .meta { font-size: .82rem; color: var(--text-3); }
.file .actions { grid-row: span 2; display: flex; gap: 8px; }
.file .actions .btn { padding: 8px 12px; font-size: .85rem; }
.progress { grid-column: 1 / -1; height: 6px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.status-ok { color: var(--brand-600); } .status-err { color: var(--danger); }
.preview { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 420px; }
.preview table { border-collapse: collapse; font-size: .82rem; }
.preview td { border: 1px solid var(--line); padding: 5px 8px; white-space: nowrap; }
.preview td.num { text-align: right; font-variant-numeric: tabular-nums; }
.switch { display: flex; align-items: center; gap: 10px; font-size: .92rem; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 20px; }
.big-num { font-size: 5rem; font-weight: 800; color: var(--brand); letter-spacing: -.04em; line-height: 1; margin-bottom: 12px; }

/* Hero artwork */
.hero-art { position: relative; aspect-ratio: 1 / .78; max-width: 640px; width: 100%; justify-self: center; }
.hero-art img { position: absolute; height: auto; filter: drop-shadow(0 0 0 transparent); }
.art-doc { width: 66%; left: 0; top: 0; transform: rotate(-3deg); }
.art-sheet { width: 92%; right: -2%; bottom: 0; }
.art-badge {
  position: absolute; left: 4%; bottom: 6%; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px 8px 10px;
  font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); color: var(--text);
}
.art-badge svg { width: 18px; height: 18px; color: #fff; background: var(--brand); border-radius: 50%; padding: 2px; }
@media (max-width: 1080px) { .hero-art { max-width: 620px; } }

/* Browser frame for screenshots */
.browser { margin: 0 auto; max-width: 1080px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.browser img { width: 100%; height: auto; }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d3dcd8; }
.browser-bar span { margin-left: 12px; flex: 1; max-width: 340px; font-size: .8rem; color: var(--text-3); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 3px 12px; }

/* Alternating showcase rows */
.showcase { display: grid; gap: 96px; }
.show-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.show-row.reverse .show-img { order: 2; }
.show-img img { width: 100%; height: auto; border-radius: 12px; }
.show-text .lead { margin-bottom: 22px; }
@media (max-width: 860px) {
  .showcase { gap: 64px; }
  .show-row { grid-template-columns: 1fr; gap: 28px; }
  .show-row.reverse .show-img { order: 0; }
}

/* Photos */
.card-photo { width: calc(100% + 52px); max-width: none; height: 220px; object-fit: cover; margin: -26px -26px 22px; border-radius: var(--radius) var(--radius) 0 0; }
.usecase { overflow: hidden; }
.photo { width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow-lg); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--bg-soft); }
.dash-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; background: #fff; border-right: 1px solid var(--line); }
.dash-side .logo { padding: 0 8px; }
.dash-nav { display: grid; gap: 2px; }
.dash-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 550; font-size: .94rem; }
.dash-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.dash-nav a.active { background: var(--brand-50); color: var(--brand-600); }
.dash-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dash-side-foot { margin-top: auto; display: grid; gap: 6px; font-size: .88rem; }
.dash-side-foot > a { color: var(--text-3); padding: 4px 8px; }
.side-balance { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 8px; }
.side-balance span { font-size: .78rem; color: var(--text-3); }
.side-balance b { display: block; font-size: 1.35rem; margin: 2px 0 8px; }
.side-balance .btn { margin-top: 12px; padding: 9px 12px; }
.meter { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .4s; }

.dash-main { padding: 28px 36px 64px; min-width: 0; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.dash-top h1 { font-size: 1.6rem; margin: 0 0 2px; }
.dash-top p { margin: 0; }
.dash-top-actions { display: flex; align-items: center; gap: 10px; }
.plan-pill { font-size: .8rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); white-space: nowrap; }
.alert.warn { background: #fff8eb; border-color: #f5dcae; color: #7a4a06; margin-bottom: 18px; }
#app-err { margin-bottom: 18px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.kpi span { font-size: .82rem; color: var(--text-3); font-weight: 550; }
.kpi b { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.kpi small { color: var(--text-3); font-size: .8rem; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.dash-grid .panel { margin-bottom: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 1.02rem; }

.chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 10px; border-bottom: 1px solid var(--line); position: relative; }
.chart .bar { flex: 1; background: var(--brand-50); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; transition: background .15s; }
.chart .bar.has { background: var(--brand); }
.chart .bar:hover { background: var(--brand-600); }
.chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; font-size: .72rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.chart-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-3); margin-top: 6px; }

.quick { display: grid; gap: 8px; }
.quick a { display: grid; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.quick a:hover { border-color: var(--brand); background: var(--bg-tint); text-decoration: none; }
.quick span { font-size: .82rem; color: var(--text-3); }

.table-wrap.flat { border: 0; border-radius: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .file-cell { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.src { font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); }
.src.api { background: #e9efff; color: var(--accent); }
.empty { text-align: center; color: var(--text-3); padding: 34px 10px !important; }
.search { font: inherit; padding: 9px 13px; border: 1px solid var(--line-2); border-radius: 10px; min-width: 240px; flex: 1; max-width: 360px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn, .setting-row .btn, .dash-top .btn { padding: 9px 14px; font-size: .88rem; }

.keybox { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; overflow-x: auto; }
.keybox code { font-size: .95rem; word-break: break-all; flex: 1; }
.kv { list-style: none; padding: 0; margin: 0; display: grid; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv li:last-child { border-bottom: 0; }
.kv span { color: var(--text-3); }
pre.code { background: #0f1c18; color: #d9e7e1; padding: 18px 20px; border-radius: 12px; overflow-x: auto; margin: 0; font-size: .85rem; line-height: 1.6; }
.upsell { background: linear-gradient(135deg, #fff, var(--bg-tint)); padding: 30px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row p { margin: 2px 0 0; }
.view .plans { margin-bottom: 20px; }

.modal { position: fixed; inset: 0; background: rgba(14, 26, 22, .45); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: .9rem; z-index: 110; box-shadow: var(--shadow-lg); }
.toast[hidden] { display: none; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .dash-side .logo span, .dash-side-foot { display: none; }
  .dash-nav { display: flex; gap: 4px; }
  .dash-nav a { white-space: nowrap; padding: 8px 10px; font-size: .88rem; }
  .dash-nav svg { display: none; }
  .dash-main { padding: 20px 16px 48px; }
  .dash-top { align-items: flex-start; }
  .dash-top .plan-pill { display: none; }
  .setting-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px; } .kpi b { font-size: 1.35rem; } .search { min-width: 0; max-width: none; } }

.app-grid > section { min-width: 0; }

/* ---------- Admin ---------- */
.admin { min-height: 100vh; background: var(--bg-soft); }
.admin-top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-top .logo small { font-size: .72rem; font-weight: 700; color: #fff; background: var(--text); padding: 2px 8px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.admin-main { padding: 28px; max-width: 1400px; margin: 0 auto; }
.kpis-5 { grid-template-columns: repeat(5, 1fr); }
.admin-table td { vertical-align: middle; }
.cust { display: grid; }
.cust span { font-size: .82rem; color: var(--text-3); }
.mini-meter { height: 4px; background: var(--line); border-radius: 3px; overflow: hidden; width: 90px; margin: 6px 0 0 auto; }
.mini-meter i { display: block; height: 100%; background: var(--brand); }
.key-mini { font-size: .82rem; background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.btn-sm { padding: 6px 11px !important; font-size: .82rem !important; }
.modal-card.wide { max-width: 760px; max-height: calc(100vh - 40px); overflow-y: auto; }
h4.sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 24px 0 10px; }
.adjust { display: flex; gap: 8px; }
.adjust input { font: inherit; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 9px; width: 200px; }
.admin select, .panel-head select { font: inherit; font-size: .9rem; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; }
@media (max-width: 1100px) { .kpis-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) {
  .kpis-5 { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 16px; }
  .admin-top { padding: 12px 16px; }
  .admin-table { min-width: 880px; }
  .table-wrap.flat { overflow-x: auto; }
}

[hidden] { display: none !important; }

/* Admin CSV import */
.small-drop { padding: 26px 20px; display: grid; gap: 4px; margin-top: 6px; }
.import-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 12px; }
.import-summary span { font-size: .85rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.import-summary .ok { background: var(--brand-50); border-color: #bfe3d0; color: var(--brand-600); }
.import-summary .bad { background: #fdf0ee; border-color: #f3c9c4; color: #8f2a22; }
#i-table td.bad { color: var(--danger); font-size: .82rem; }
#i-table td.good { color: var(--brand-600); font-size: .82rem; }
#i-progress { margin: 0 0 14px; height: 8px; }

.side-exp { display: block; margin-top: 8px; font-size: .78rem; color: var(--text-3); }
.side-exp b { display: inline; font-size: .78rem; margin: 0; }

/* Access status badges */
.st { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.st-active { background: var(--brand-50); color: var(--brand-600); }
.st-expiring { background: #fff3e0; color: #b45309; }
.st-expired { background: #fdf0ee; color: #c0362c; }
.adjust { flex-wrap: wrap; }
