/* ==========================================================================
   SMS.link design system
   Tokens → base → components → layouts → marketing → utilities
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-cyrillic-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/jetbrains-mono-cyrillic-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
    --brand-50: #eef3ff;
    --brand-100: #dce5ff;
    --brand-200: #bfd0ff;
    --brand-300: #93b0ff;
    --brand-400: #6286ff;
    --brand-500: #3b5bfd;
    --brand-600: #2a43ea;
    --brand-700: #2235c7;
    --brand-800: #212fa0;
    --brand-900: #1b2668;

    --ink: #0b1b3f;
    --ink-2: #13254f;

    --gray-0: #ffffff;
    --gray-25: #fcfcfd;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --green-50: #ecfdf3;
    --green-100: #d1fadf;
    --green-500: #12b76a;
    --green-600: #039855;
    --green-700: #027a48;
    --amber-50: #fffaeb;
    --amber-100: #fef0c7;
    --amber-500: #f79009;
    --amber-700: #b54708;
    --red-50: #fef3f2;
    --red-100: #fee4e2;
    --red-500: #f04438;
    --red-600: #d92d20;
    --red-700: #b42318;
    --violet-50: #f4f3ff;
    --violet-700: #5925dc;

    --bg: var(--gray-50);
    --surface: var(--gray-0);
    --surface-2: var(--gray-50);
    --border: var(--gray-200);
    --border-strong: var(--gray-300);
    --text: var(--gray-700);
    --text-strong: var(--ink);
    --text-muted: var(--gray-500);
    --text-subtle: var(--gray-400);
    --primary: var(--brand-500);
    --primary-hover: var(--brand-600);
    --focus: 0 0 0 4px rgb(59 91 253 / 0.18);

    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-xs: 0 1px 2px rgb(16 24 40 / 0.05);
    --shadow-sm: 0 1px 3px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.04);
    --shadow-md: 0 4px 8px -2px rgb(16 24 40 / 0.08), 0 2px 4px -2px rgb(16 24 40 / 0.04);
    --shadow-lg: 0 12px 24px -6px rgb(16 24 40 / 0.12), 0 4px 8px -4px rgb(16 24 40 / 0.05);
    --shadow-xl: 0 24px 48px -12px rgb(16 24 40 / 0.18);

    --sidebar-w: 248px;
    --topbar-h: 60px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5 { color: var(--text-strong); margin: 0; line-height: 1.25; letter-spacing: -0.015em; font-weight: 650; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
img, svg { vertical-align: middle; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
::selection { background: var(--brand-100); color: var(--ink); }

.icon { flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface);
    --btn-fg: var(--gray-700);
    --btn-border: var(--border-strong);
    --btn-hover-bg: var(--gray-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    color: var(--btn-fg);
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .05s;
    text-decoration: none;
    user-select: none;
}
.btn:hover { background: var(--btn-hover-bg); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: #fff; --btn-border: var(--primary); --btn-hover-bg: var(--primary-hover); box-shadow: 0 1px 2px rgb(42 67 234 / .3), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primary:hover { border-color: var(--primary-hover); }
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-border: var(--ink); --btn-hover-bg: var(--ink-2); }
.btn-danger { --btn-bg: var(--red-600); --btn-fg: #fff; --btn-border: var(--red-600); --btn-hover-bg: var(--red-700); }
.btn-success { --btn-bg: var(--green-600); --btn-fg: #fff; --btn-border: var(--green-600); --btn-hover-bg: var(--green-700); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-hover-bg: var(--gray-100); box-shadow: none; }
.btn-danger-ghost { --btn-bg: transparent; --btn-fg: var(--red-700); --btn-border: transparent; --btn-hover-bg: var(--red-50); box-shadow: none; }
.btn-link { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--primary); --btn-hover-bg: transparent; box-shadow: none; padding: 0; height: auto; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; border-radius: var(--radius-sm); }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; gap: 4px; border-radius: var(--radius-sm); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: var(--radius-md); }
.btn-xl { height: 54px; padding: 0 26px; font-size: 16px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-xs { width: 26px; }
.btn .spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.label .opt { font-weight: 400; color: var(--text-muted); }
.help { font-size: 12.5px; color: var(--text-muted); }
.input, .select, .textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    color: var(--text-strong);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select {
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--gray-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--focus); }
.input:disabled, .select:disabled { background: var(--gray-50); color: var(--text-muted); }
.input.invalid, .input.modified.invalid, .select.invalid, .textarea.invalid { border-color: var(--red-500); }
.input-sm, .select-sm { height: 34px; font-size: 13px; }
.input-mono { font-family: var(--font-mono); font-size: 13px; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; height: auto; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.validation-message, .field-error { font-size: 12.5px; color: var(--red-700); }
.validation-errors { margin: 0 0 16px; padding: 10px 14px 10px 30px; background: var(--red-50); border: 1px solid var(--red-100); border-radius: var(--radius); color: var(--red-700); font-size: 13px; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--gray-700); }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: var(--gray-300); position: relative; transition: background .2s var(--ease); flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { font-size: 15px; }
.card-header .sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--gray-25); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.card-flush .card-body { padding: 0; }
.card + .card { margin-top: 20px; }
.grid-2 > .card + .card, .grid-halves > .card + .card, .grid-cards > .card + .card, .stats > * + * { margin-top: 0; }
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 8px;
    font-size: 12px; font-weight: 600; line-height: 1;
    border-radius: 999px; white-space: nowrap;
    background: var(--gray-100); color: var(--gray-700);
    border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.badge-warning { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-100); }
.badge-danger { background: var(--red-50); color: var(--red-700); border-color: var(--red-100); }
.badge-info { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.badge-violet { background: var(--violet-50); color: var(--violet-700); }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }
.badge-outline { background: transparent; border-color: var(--border-strong); color: var(--gray-600); }
.badge-mono { font-family: var(--font-mono); font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-weight: 600; font-size: 12px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .04em;
    padding: 10px 16px; background: var(--gray-50); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--gray-700); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--gray-25); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.selected { background: var(--brand-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
.table .strong { color: var(--text-strong); font-weight: 600; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table-compact td { padding: 9px 16px; }
.cell-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Toolbar & filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar .input, .toolbar .select { height: 34px; font-size: 13px; }
.toolbar .select { width: auto; min-width: 140px; }
.segmented { display: inline-flex; padding: 3px; background: var(--gray-100); border-radius: var(--radius); gap: 2px; }
.segmented button, .segmented a {
    border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600;
    color: var(--text-muted); padding: 5px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.segmented .active { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.pager .btns { display: flex; gap: 8px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs a, .tabs button {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 12px; margin-bottom: -1px;
    font: inherit; font-weight: 600; font-size: 14px; color: var(--text-muted);
    background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--text-strong); }
.tabs .active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid; font-size: 14px; line-height: 1.5; }
.alert .icon { margin-top: 1px; }
.alert-title { font-weight: 600; margin-bottom: 2px; color: inherit; }
.alert-info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-800); }
.alert-success { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.alert-warning { background: var(--amber-50); border-color: var(--amber-100); color: var(--amber-700); }
.alert-danger { background: var(--red-50); border-color: var(--red-100); color: var(--red-700); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert .grow { flex: 1; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); }
.stat-value { margin-top: 8px; font-size: 28px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-foot { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.stat-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.stat-icon.green { background: var(--green-50); color: var(--green-600); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber-700); }
.stat-icon.red { background: var(--red-50); color: var(--red-600); }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: var(--gray-200); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--gray-300); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text { fill: var(--gray-500); font-size: 11px; font-family: var(--font-sans); }
.chart .bar-rest { fill: var(--gray-300); }
.chart .bar-verified { fill: var(--brand-500); }
.chart .bar-hit { fill: transparent; }
.chart .bar-group:hover .bar-hit { fill: rgb(59 91 253 / .06); }
.chart .bar-group:hover .bar-rest { fill: var(--gray-400); }
.chart .bar-group:hover .bar-verified { fill: var(--brand-600); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.meter { height: 8px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.breakdown { display: flex; flex-direction: column; gap: 14px; }
.breakdown-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13.5px; }
.breakdown-row .meter { grid-column: 1 / -1; }

/* ---------- Code ---------- */
.code {
    position: relative;
    margin: 0;
    padding: 16px 18px;
    background: #0d1530;
    color: #d6e0ff;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    tab-size: 2;
}
.code .c { color: #7083b7; }
.code .k { color: #9fb2ff; }
.code .s { color: #8ee6b4; }
.code .n { color: #ffcf8a; }
.code-block { position: relative; }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; background: rgb(255 255 255 / .08); color: #c7d2fe; border: 1px solid rgb(255 255 255 / .12); box-shadow: none; }
.code-block .copy-btn:hover { background: rgb(255 255 255 / .16); color: #fff; }
.code-tabs { display: flex; gap: 2px; padding: 6px 6px 0; background: #0a1128; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.code-tabs button { background: none; border: 0; color: #8b9bd1; font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 12px; border-radius: 6px 6px 0 0; cursor: pointer; }
.code-tabs button.active { background: #0d1530; color: #fff; }
.code-tabs + .code-block .code { border-top-left-radius: 0; border-top-right-radius: 0; }
:not(pre) > code { padding: 2px 6px; background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 5px; color: var(--ink); font-size: 0.86em; }

/* Secret / key display */
.secret { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-mono); font-size: 13px; color: var(--ink); word-break: break-all; }
.secret .value { flex: 1; }

/* ---------- Dialog ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgb(11 27 63 / .45); backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s var(--ease); }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); animation: pop .18s var(--ease); }
.modal-lg { max-width: 760px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.modal-header h2 { font-size: 17px; }
.modal-header .sub { margin-top: 4px; font-size: 13.5px; color: var(--text-muted); }
.modal-body { padding: 20px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--gray-25); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Drawer (detail panel) */
.drawer-backdrop { position: fixed; inset: 0; background: rgb(11 27 63 / .25); z-index: 90; animation: fade .15s var(--ease); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--shadow-xl); z-index: 91; display: flex; flex-direction: column; animation: slide .2s var(--ease); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

/* Description list */
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 0; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--text-muted); padding: 10px 0; border-bottom: 1px solid var(--border); }
.dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-strong); word-break: break-word; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--gray-200); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gray-300); }
.timeline li.ok::after { border-color: var(--green-500); background: var(--green-500); }
.timeline li.warn::after { border-color: var(--amber-500); }
.timeline li.bad::after { border-color: var(--red-500); }
.timeline .when { display: block; font-size: 12px; color: var(--text-muted); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--ink); color: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .2s var(--ease); }
.toast.success .icon { color: #6ee7a8; }
.toast.error .icon { color: #fda29b; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { color: var(--text-muted); max-width: 420px; margin: 0 auto 18px; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 30px; height: 30px; flex-shrink: 0; }
.logo .tld { color: var(--primary); }
.logo-light { color: #fff; }
.logo-light:hover { color: #fff; }
.logo-light .tld { color: var(--brand-300); }

/* ==========================================================================
   App shell (developer dashboard & admin)
   ========================================================================== */
.shell {
    display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh;
    /* Paint the sidebar column full height; the sticky sidebar itself is only one viewport tall. */
    background: linear-gradient(90deg, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px), var(--border) var(--sidebar-w), transparent var(--sidebar-w));
}
.qr-box { width: 148px; height: 148px; padding: 6px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar-head { height: var(--topbar-h); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); }
.nav-label:first-child { padding-top: 0; }
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius);
    color: var(--gray-600); font-weight: 550; font-size: 14px;
    transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--gray-100); color: var(--text-strong); }
.nav-link.active { background: var(--brand-50); color: var(--brand-700); }
.nav-link.active .icon { color: var(--brand-600); }
.nav-link .icon { color: var(--gray-400); }
.nav-link .count { margin-left: auto; font-size: 11.5px; font-weight: 700; background: var(--red-500); color: #fff; border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .name { font-size: 13.5px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .email { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--topbar-h); display: flex; align-items: center; gap: 16px;
    padding: 0 32px; background: rgb(255 255 255 / .85); backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.topbar .crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-muted); min-width: 0; }
.topbar .crumbs a { color: var(--text-muted); }
.topbar .crumbs a:hover { color: var(--text-strong); }
.topbar .crumbs .current { color: var(--text-strong); font-weight: 600; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; }
.content { padding: 28px 32px 48px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head .sub { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.admin-bar { height: 4px; background: linear-gradient(90deg, var(--amber-500), #f97316); }
.shell-admin .sidebar-head .badge { margin-left: auto; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.grid-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.site-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.site-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); color: inherit; transform: translateY(-1px); }
.site-card .head { display: flex; align-items: center; gap: 12px; }
.site-avatar { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); flex-shrink: 0; }
.site-card .title { font-weight: 650; color: var(--text-strong); font-size: 15px; }
.site-card .url { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-card .meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
.site-card .meta strong { color: var(--text-strong); font-weight: 600; }

.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; }
.step-num { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--brand-50); color: var(--brand-700); }
.steps-list li.done .step-num { background: var(--green-500); color: #fff; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; }
.auth-main .logo { align-self: flex-start; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .lead { color: var(--text-muted); margin-bottom: 28px; }
.auth-foot { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 24px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-subtle); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google { --btn-bg: #fff; --btn-fg: var(--gray-700); --btn-border: var(--border-strong); width: 100%; height: 44px; font-size: 14.5px; }
.auth-aside {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; gap: 28px;
    padding: 56px; color: #c7d2fe;
    background: radial-gradient(1200px 600px at 100% 0%, #2a43ea 0%, transparent 55%), radial-gradient(800px 500px at 0% 100%, #1b2668 0%, transparent 60%), var(--ink);
}
.auth-aside h2 { color: #fff; font-size: 30px; line-height: 1.2; letter-spacing: -0.025em; max-width: 440px; }
.auth-aside p { font-size: 15.5px; max-width: 440px; color: #b4c2f5; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-aside li { display: flex; gap: 10px; align-items: center; color: #dfe6ff; }
.auth-aside li .icon { color: #6ee7a8; }

/* ==========================================================================
   Marketing site
   ========================================================================== */
.mk { background: var(--surface); font-size: 16px; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mk-nav { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .8); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.mk-nav.scrolled, .mk-nav.bordered { border-bottom-color: var(--border); }
.mk-nav .container { height: 68px; display: flex; align-items: center; gap: 32px; }
.mk-nav nav { display: flex; gap: 28px; font-size: 14.5px; font-weight: 550; }
.mk-nav nav a { color: var(--gray-600); }
.mk-nav nav a:hover, .mk-nav nav a.active { color: var(--ink); }
.mk-nav .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.hero { position: relative; overflow: hidden; padding: 72px 0 96px; background: radial-gradient(900px 480px at 85% 10%, rgb(59 91 253 / .14), transparent 60%), radial-gradient(700px 400px at 0% 0%, rgb(18 183 106 / .08), transparent 60%); }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; font-size: 13px; font-weight: 600; color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 999px; }
.eyebrow .pill { background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; }
.hero h1 { margin: 20px 0 18px; font-size: clamp(36px, 5.2vw, 58px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 750; }
.hero h1 .accent { background: linear-gradient(90deg, var(--brand-500), #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 19px; line-height: 1.6; color: var(--gray-600); max-width: 560px; margin-bottom: 32px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .trust { margin-top: 36px; display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--gray-500); }
.hero .trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero .trust .icon { color: var(--green-500); }

/* Phone mockup */
.phone-stage { position: relative; display: flex; justify-content: center; }
.phone {
    position: relative; width: 300px; height: 600px; padding: 12px;
    background: #0b1222; border-radius: 48px;
    box-shadow: 0 0 0 2px #26324f, 0 40px 80px -20px rgb(11 27 63 / .45), 0 18px 36px -18px rgb(11 27 63 / .4);
}
.phone-screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #f2f2f7; display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 28px; background: #0b1222; border-radius: 20px; z-index: 3; }
.phone-status { height: 46px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 26px 6px; font-size: 13px; font-weight: 600; color: #111; }
.sms-head { text-align: center; padding: 10px 0 12px; border-bottom: 1px solid #dcdce2; background: #f7f7f9; }
.sms-avatar { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%; background: linear-gradient(180deg, #a5adbb, #858c99); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.sms-to { font-size: 12px; color: #6b7280; }
.sms-to strong { display: block; color: #111; font-size: 15px; letter-spacing: .02em; }
.sms-thread { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.bubble { max-width: 78%; padding: 8px 13px; border-radius: 18px; font-size: 15px; line-height: 1.35; }
.bubble.out { align-self: flex-end; background: #0a84ff; color: #fff; border-bottom-right-radius: 5px; }
.bubble.in { align-self: flex-start; background: #e5e5ea; color: #111; border-bottom-left-radius: 5px; }
.bubble-meta { align-self: flex-end; font-size: 11px; color: #8e8e93; margin-top: -4px; }
.sms-compose { display: flex; align-items: center; gap: 8px; padding: 10px 12px 26px; background: #f7f7f9; border-top: 1px solid #dcdce2; }
.sms-input { flex: 1; min-height: 36px; padding: 7px 14px; border: 1px solid #c7c7cc; border-radius: 18px; background: #fff; font-size: 15px; color: #111; display: flex; align-items: center; }
.sms-input .caret { width: 2px; height: 18px; background: #0a84ff; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.sms-send { width: 32px; height: 32px; border-radius: 50%; background: #0a84ff; display: grid; place-items: center; color: #fff; }
@keyframes blink { 50% { opacity: 0; } }
.float-card {
    position: absolute; z-index: 4;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow-lg); font-size: 13.5px;
}
.float-card .t { font-weight: 650; color: var(--ink); }
.float-card .s { font-size: 12px; color: var(--text-muted); }
.float-card .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.float-a { top: 70px; left: -40px; }
.float-b { bottom: 90px; right: -30px; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--gray-50); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--ink); color: #b4c2f5; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head .kicker { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 14px; }
.section-head p { font-size: 17px; color: var(--gray-500); }
.section-dark .section-head p { color: #9fb0e8; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step-card { position: relative; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
.step-card .num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 750; color: #fff; background: var(--primary); margin-bottom: 18px; box-shadow: 0 6px 14px -4px rgb(59 91 253 / .5); }
.step-card h3 { font-size: 18px; margin-bottom: 8px; }
.step-card p { color: var(--gray-500); font-size: 15px; }
.step-visual { margin-top: 20px; padding: 14px; border-radius: 12px; background: var(--gray-50); border: 1px solid var(--border); font-size: 13.5px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--gray-500); font-size: 15px; }
.section-dark .feature { background: rgb(255 255 255 / .03); border-color: rgb(255 255 255 / .08); }
.section-dark .feature p { color: #9fb0e8; }
.section-dark .feature .ic { background: rgb(98 134 255 / .15); color: #93b0ff; }

.dev-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.check-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.check-list .icon { color: var(--green-500); margin-top: 3px; }

.operators { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.operator { height: 72px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); font-weight: 750; font-size: 17px; color: var(--gray-700); letter-spacing: -0.01em; }
.operator.soon { color: var(--gray-400); border-style: dashed; font-weight: 600; font-size: 14px; }

.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 0 22px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 650; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--gray-400); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding-bottom: 18px; color: var(--gray-600); font-size: 15px; }

.cta-band { position: relative; overflow: hidden; padding: 64px; border-radius: 28px; text-align: center; color: #c7d2fe; background: radial-gradient(800px 400px at 100% 0%, #3b5bfd 0%, transparent 60%), radial-gradient(600px 400px at 0% 100%, #2235c7 0%, transparent 60%), var(--ink); }
.cta-band h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; margin-bottom: 12px; }
.cta-band p { font-size: 17px; margin-bottom: 28px; }

.mk-footer { padding: 56px 0 40px; border-top: 1px solid var(--border); background: var(--surface); }
.mk-footer .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.mk-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); margin-bottom: 14px; }
.mk-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.mk-footer ul a { color: var(--gray-600); }
.mk-footer ul a:hover { color: var(--ink); }
.mk-footer .bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--gray-500); }

/* Docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding: 40px 0 80px; }
.docs-nav { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; max-height: calc(100vh - 120px); overflow-y: auto; }
.docs-nav .group { font-size: 12px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .08em; padding: 16px 10px 6px; }
.docs-nav .group:first-child { padding-top: 0; }
.docs-nav a { color: var(--gray-600); padding: 6px 10px; border-radius: 6px; }
.docs-nav a:hover { color: var(--ink); background: var(--gray-50); }
.prose { max-width: 820px; font-size: 15.5px; line-height: 1.7; color: var(--gray-700); }
.prose h1 { font-size: 36px; letter-spacing: -0.03em; margin-bottom: 12px; }
.prose h2 { font-size: 24px; margin: 56px 0 14px; padding-top: 8px; scroll-margin-top: 90px; }
.prose h3 { font-size: 17px; margin: 32px 0 10px; scroll-margin-top: 90px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .code-block, .prose .code, .prose .alert, .prose .table-wrap, .prose .endpoint { margin: 0 0 20px; }
.prose .table-wrap { border: 1px solid var(--border); border-radius: var(--radius-md); }
.prose .table { font-size: 14px; }
.prose .lead { font-size: 18px; color: var(--gray-500); }
.endpoint { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--gray-50); font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); }
.method { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 5px; letter-spacing: .02em; }
.method.post { background: var(--green-50); color: var(--green-700); }
.method.get { background: var(--brand-50); color: var(--brand-700); }

/* Legal */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.strong { color: var(--text-strong); font-weight: 600; }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.success-text { color: var(--green-700); }
.danger-text { color: var(--red-700); }
.warning-text { color: var(--amber-700); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { word-break: break-all; }
.tabular { font-variant-numeric: tabular-nums; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.stack > * + * { margin-top: 20px; }

/* Blazor */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 12px 20px; background: var(--amber-50); border-top: 1px solid var(--amber-100); color: var(--amber-700); font-size: 14px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
.blazor-error-boundary { padding: 16px; background: var(--red-50); color: var(--red-700); border-radius: var(--radius); }
.blazor-error-boundary::after { content: "Алдаа гарлаа. Хуудсаа дахин ачаална уу."; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .operators { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .hero .container, .dev-grid { grid-template-columns: minmax(0, 1fr); }
    .phone-stage { margin-top: 24px; }
    .steps, .features { grid-template-columns: minmax(0, 1fr); }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-aside { display: none; }
    .docs { grid-template-columns: minmax(0, 1fr); }
    .docs-nav { display: none; }
    .mk-footer .cols { grid-template-columns: 1fr 1fr; }
    .grid-halves { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .shell { grid-template-columns: minmax(0, 1fr); background: none; }
    .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: var(--shadow-xl); }
    .shell.nav-open .sidebar { transform: none; }
    .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgb(11 27 63 / .35); z-index: 55; }
    .menu-toggle { display: inline-flex; }
    .topbar, .content { padding-left: 16px; padding-right: 16px; }
    .mk-nav nav { display: none; }
    .form-row { grid-template-columns: minmax(0, 1fr); }
    .dl { grid-template-columns: minmax(0, 1fr); }
    .dl dt { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: minmax(0, 1fr); }
    .section { padding: 64px 0; }
    .hero { padding: 40px 0 64px; }
    .cta-band { padding: 40px 24px; }
    .float-a, .float-b { display: none; }
    .operators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-main { padding: 20px; }
    .mk-nav .right .btn-ghost { display: none; }
}

/* ---------- Landing & docs additions ---------- */

/* Hero phone animation: one 10s loop — type code, send, bubble appears, site card flips to verified, webhook fires. */
.sms-input { position: relative; }
.anim-ph { position: absolute; left: 14px; color: #8e8e93; animation: slk-ph 10s infinite; }
.anim-typed { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; width: 0; font-size: 15px; letter-spacing: 0; animation: slk-type 10s infinite; }
.anim-send { animation: slk-send 10s infinite; }
.anim-bubble { opacity: 0; animation: slk-bubble 10s infinite; }
.anim-delivered { opacity: 0; animation: slk-delivered 10s infinite; }
.anim-webhook { opacity: 0; animation: slk-webhook 10s infinite; }
.swap { display: grid; }
.swap > div { grid-area: 1 / 1; }
.swap-a { animation: slk-swap-a 10s infinite; }
.swap-b { opacity: 0; animation: slk-swap-b 10s infinite; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--amber-500); vertical-align: 1px; animation: slk-pulse 1.2s ease-in-out infinite; }

@keyframes slk-ph { 0%, 8% { opacity: 1; } 9%, 40% { opacity: 0; } 41%, 100% { opacity: 1; } }
@keyframes slk-type {
    0%, 9% { width: 0; animation-timing-function: steps(6, end); }
    30%, 40% { width: 6ch; }
    41%, 100% { width: 0; }
}
@keyframes slk-send { 0%, 35% { transform: scale(1); } 38% { transform: scale(.82); } 41%, 100% { transform: scale(1); } }
@keyframes slk-bubble { 0%, 41% { opacity: 0; transform: translateY(10px) scale(.95); } 45%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes slk-delivered { 0%, 50% { opacity: 0; } 53%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes slk-swap-a { 0%, 55% { opacity: 1; } 58%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slk-swap-b { 0%, 55% { opacity: 0; transform: translateY(4px); } 58%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes slk-webhook { 0%, 60% { opacity: 0; transform: translateY(10px); } 64%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes slk-pulse { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
    .anim-ph, .anim-typed, .anim-send, .anim-bubble, .anim-delivered, .anim-webhook, .swap-a, .swap-b, .pulse-dot { animation: none; }
    .anim-bubble, .anim-delivered, .anim-webhook, .swap-b { opacity: 1; }
    .swap-a { opacity: 0; }
}

/* Step card visuals */
.mini-input { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.mini-btn { margin-top: 8px; height: 34px; border-radius: var(--radius); background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 2px; }
.kv + .kv { border-top: 1px solid var(--border); }

/* Operators */
.operator { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.op-tag { display: block; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--gray-400); }
.op-live { border-color: var(--green-100); }
.op-live .op-tag { color: var(--green-700); }

/* Code tabs (tabs are followed by a panel wrapper, not the block itself) */
.dev-code { min-width: 0; }
.code-tabs { overflow-x: auto; }
[data-tabs] [data-panel] .code { border-top-left-radius: 0; border-top-right-radius: 0; }
.prose [data-tabs] { margin-bottom: 20px; }
.prose [data-tabs] .code-block { margin-bottom: 0; }
.prose .code { font-size: 12.5px; }
.prose .endpoint .btn { margin-left: auto; }

/* Docs */
.docs-steps { margin-bottom: 8px !important; padding-left: 0 !important; }
.docs-steps li { margin-bottom: 0; }
.docs-steps li > div { padding-top: 1px; }
.prose h2 { border-top: 1px solid var(--border); padding-top: 40px; margin-top: 48px; }
.prose h1 + .lead + .endpoint { margin-top: 8px; }
.prose .table code { font-size: 12.5px; white-space: nowrap; }

/* Legal */
.legal.prose { max-width: 760px; }
.legal.prose h2 { border-top: 0; padding-top: 0; margin-top: 36px; font-size: 20px; }
.draft-note { margin-bottom: 28px; }

@media (max-width: 560px) {
    .prose h1 { font-size: 30px; }
    .prose .table code { white-space: normal; word-break: break-all; }
}

/* FocusOnNavigate focuses the page heading (tabindex=-1); it is not interactive, so no focus ring. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* Hero float cards sit over the empty part of the SMS thread, clear of the header and the sent bubble. */
.phone-stage .float-a { top: 190px; left: auto; right: -56px; }
.phone-stage .float-b { top: 330px; bottom: auto; left: -64px; right: auto; }
@media (max-width: 1100px) {
    .phone-stage .float-a { right: -12px; }
    .phone-stage .float-b { left: -12px; }
}
@media (max-width: 560px) {
    .hero .ctas .btn { width: 100%; }
}
.code { font-variant-ligatures: none; }
