/* MiroTalk Partners — design tokens and components mirrored from docs.mirotalk.com/sites/ultimate/ */

:root {
    color-scheme: dark;
    --bg: #07080f;
    --bg-2: #0e1018;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.07);
    --border-hi: rgba(255, 255, 255, 0.13);
    --primary: #4f46e5;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --green: #10b981;
    --amber: #f59e0b;
    --red: #f87171;
    --cyan: #22d3ee;
    --indigo-lite: #818cf8;
    --indigo-pale: #a5b4fc;
    --grid-line: rgba(148, 163, 184, 0.055);
    --grid-strong: rgba(129, 140, 248, 0.07);
    --header-bg: rgba(7, 8, 15, 0.88);
    --text-1: #f1f5f9;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.55);
    --max-w: 1100px;
    --font: 'Manrope', system-ui, -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme='light'] {
    color-scheme: light;
    --bg: #f8fafc;
    --bg-2: #eef2f7;
    --surface: rgba(255, 255, 255, 0.78);
    --border: rgba(15, 23, 42, 0.1);
    --border-hi: rgba(15, 23, 42, 0.18);
    --primary: #4338ca;
    --grad: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    --green: #047857;
    --amber: #b45309;
    --red: #dc2626;
    --cyan: #0891b2;
    --indigo-lite: #4f46e5;
    --indigo-pale: #3730a3;
    --grid-line: rgba(71, 85, 105, 0.075);
    --grid-strong: rgba(67, 56, 202, 0.07);
    --header-bg: rgba(248, 250, 252, 0.84);
    --text-1: #172033;
    --text-2: #536071;
    --text-3: #718096;
    --shadow-md: 0 8px 32px rgba(23, 32, 51, 0.12);
}

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 10% 12%, rgba(34, 211, 238, 0.08), transparent 24rem),
        radial-gradient(circle at 90% 42%, rgba(16, 185, 129, 0.065), transparent 28rem),
        linear-gradient(var(--grid-strong) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: auto, auto, 260px 260px, 260px 260px, 52px 52px, 52px 52px;
    background-attachment: fixed;
    color: var(--text-1);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--indigo-lite); font-weight: 600; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 72px; }
.section--sm { padding-block: 40px; }
.text-center { text-align: center; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.stack > * + * { margin-top: 16px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-hi) 25%, var(--border-hi) 75%, transparent); }
.mx-auto { margin-inline: auto; }
.mt-lg { margin-top: 28px; }
.mb-lg { margin-bottom: 28px; }
.w-sm { max-width: 440px; }
.w-md { max-width: 700px; }
.w-lg { max-width: 760px; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* ── Header / footer ─────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: var(--header-bg); backdrop-filter: blur(18px); }
.site-nav { min-height: 68px; display: flex; align-items: center; gap: 24px; }
.site-nav__brand { font-size: 17px; font-weight: 800; white-space: nowrap; }
.site-nav__brand span { color: var(--indigo-lite); }
.site-nav__links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav__links > a { white-space: nowrap; }
.site-nav__links > a:not(.btn) { font-size: 13px; font-weight: 600; color: var(--text-2); }
.site-nav__links > a:not(.btn):hover { color: var(--text-1); }
.site-nav .btn { padding: 9px 16px; font-size: 13px; white-space: nowrap; }
.site-nav form { display: inline; }
.theme-toggle { background: none; border: 1px solid var(--border-hi); color: var(--text-2); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 28px; font-size: 13px; color: var(--text-2); }
.site-footer__inner nav { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--text-1); }

/* ── Typography ──────────────────────────────────── */
.label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--indigo-lite); }
.label::before { content: ''; display: inline-block; width: 18px; height: 1px; margin: 0 9px 3px 0; background: linear-gradient(90deg, var(--cyan), var(--indigo-lite)); }
.h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 800; line-height: 1.05; }
.h2 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; line-height: 1.1; }
.h3 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { font-size: clamp(15px, 1.8vw, 19px); color: var(--text-2); line-height: 1.68; }

/* ── Buttons / badges ────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 10px; font: 700 15px var(--font); cursor: pointer; transition: all 0.22s ease; border: none; text-align: center; }
.btn-primary { background: linear-gradient(135deg, #4338ca 0%, #6d28d9 58%, #0e7490 140%); color: #fff; box-shadow: 0 4px 20px rgba(79, 70, 229, 0.42); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79, 70, 229, 0.6); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-hi); color: var(--text-1); }
.btn-ghost:hover { border-color: var(--indigo-lite); }
.btn-lg { padding: 17px 34px; font-size: 17px; border-radius: 13px; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-full { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-hi); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); }
.badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid currentColor; }
.pill--pending { color: var(--amber); }
.pill--approved { color: var(--green); }
.pill--paid { color: var(--indigo-lite); }
.pill--void, .pill--suspended { color: var(--red); }

/* ── Cards / grids ───────────────────────────────── */
.card { background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card--featured { background: linear-gradient(135deg, rgba(79, 70, 229, 0.11), rgba(124, 58, 237, 0.07)); border-color: rgba(79, 70, 229, 0.45); box-shadow: var(--shadow-md); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stats-grid { grid-template-columns: repeat(3, 1fr); }
.feature-card__icon { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(124, 58, 237, 0.12)); border: 1px solid rgba(79, 70, 229, 0.28); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--indigo-pale); margin-bottom: 14px; }
.feature-card__title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-card__desc { font-size: 13px; color: var(--text-2); }
.stat__num { font-size: 30px; font-weight: 900; line-height: 1.1; overflow-wrap: break-word; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { font-size: 12px; color: var(--text-3); margin-top: 6px; font-weight: 600; letter-spacing: 0.02em; }
.price { font-size: 52px; font-weight: 900; line-height: 1; margin: 14px 0 6px; }
.tier { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.tier--hi { color: var(--indigo-lite); }
.check-list li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.check-list li:last-child { border-bottom: none; }
.check-list .ck { color: var(--green); font-weight: 700; }

/* ── Forms ───────────────────────────────────────── */
.form { max-width: 560px; margin-inline: auto; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field small { display: block; color: var(--text-3); font-size: 12px; margin-top: 4px; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-hi); background: var(--surface); color: var(--text-1); font: 500 14px var(--font); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
input[type='checkbox'] { width: auto; margin-right: 8px; }
.input-copy { display: flex; gap: 8px; }
.input-copy input { font-family: var(--mono); }
.input-copy--code { max-width: 360px; }
.input-copy--code input { font-weight: 600; letter-spacing: 0.08em; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: auto; padding: 7px 10px; font-size: 13px; }
.inline-form input[type='number'] { width: 72px; }
.inline-form .input-code { width: 110px; }
.inline-form .input-ref { width: 150px; }
.inline-form .input-session { flex: 1; min-width: 220px; }
.table-fit td.wrap { white-space: normal; min-width: 150px; overflow-wrap: anywhere; }
.cell-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: normal; }
.alert { padding: 12px 16px; border-radius: 10px; border: 1px solid; font-size: 14px; margin-bottom: 20px; }
.alert--error { color: var(--red); border-color: currentColor; background: rgba(248, 113, 113, 0.08); }
.alert--ok { color: var(--green); border-color: currentColor; background: rgba(16, 185, 129, 0.08); }
.alert--info { color: var(--indigo-lite); border-color: currentColor; background: rgba(129, 140, 248, 0.08); }

/* ── Dashboard ───────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--bg-2) 82%, transparent); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 28px; text-align: center; color: var(--text-3); }
.show-sm { display: none; }
.text-left { text-align: left; }
.steps { padding-left: 20px; list-style: decimal; }
.steps li + li { margin-top: 4px; }
.dev-status { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.url-box { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); min-width: 0; }
.url-box__label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.url-box code { display: block; font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; line-height: 1.5; }
.url-box mark { background: rgba(16, 185, 129, 0.15); color: var(--green); border-radius: 4px; padding: 0 2px; }
.kit-img { border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; aspect-ratio: 16 / 9; object-fit: contain; width: 100%; background: var(--bg); }

@media (max-width: 720px) {
    .site-nav { gap: 12px; }
    .site-nav__links { gap: 12px; }
    .hide-sm { display: none; }
    .show-sm { display: inline; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat__num { font-size: 22px; }
    .section { padding-block: 48px; }
}

/* ── App shell: sidebar layout (admin + partner) ───────────────────────── */
.container--wide { max-width: 1320px; }
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; padding-block: 40px 72px; }
.app-main { min-width: 0; }
.app-nav { position: sticky; top: 92px; }
.app-nav__title { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); padding: 0 12px 10px; }
.app-nav nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.app-nav a:hover { color: var(--text-1); background: var(--surface); }
.app-nav a.is-active { color: var(--text-1); background: rgba(79, 70, 229, 0.12); border-color: rgba(79, 70, 229, 0.35); }
.app-nav i { width: 18px; text-align: center; color: var(--indigo-lite); }
.app-nav .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; text-align: center; }
.app-nav__sep { height: 1px; margin: 10px 12px; background: var(--border); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin-top: 6px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border: 1px solid var(--border-hi); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.chip:hover { color: var(--text-1); border-color: var(--indigo-lite); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .n { opacity: 0.7; margin-left: 2px; }
.search { display: flex; gap: 8px; align-items: center; }
.search input { width: 300px; padding: 8px 12px; font-size: 13px; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.pager > span { margin-right: auto; }
.row-actions { display: inline-flex; gap: 8px; justify-content: flex-end; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.stat-card { transition: border-color 0.2s; }
a.stat-card:hover { border-color: rgba(79, 70, 229, 0.45); }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.list-item + .list-item { border-top: 1px solid var(--border); }
.list-item .wrap { min-width: 0; overflow-wrap: anywhere; }
.text-right { text-align: right; }
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.dl dt { color: var(--text-3); }
.dl dd { overflow-wrap: anywhere; }
.mb-sm { margin-bottom: 12px; }
.mt-sm { margin-top: 12px; }
details > summary { cursor: pointer; }
.card .empty { padding: 16px 0; }
.callout { display: flex; align-items: center; gap: 14px; border-color: rgba(245, 158, 11, 0.45); }
.callout > i { font-size: 20px; color: var(--amber); }
.callout > span:nth-child(2) { flex: 1; }
a.callout:hover { border-color: var(--amber); }

@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
    .app-nav { position: static; overflow-x: auto; }
    .app-nav nav { flex-direction: row; }
    .app-nav a { white-space: nowrap; }
    .app-nav__title, .app-nav__sep { display: none; }
    .search, .search input { width: 100%; }
    .dl { grid-template-columns: 1fr; gap: 2px; }
    .dl dd { margin-bottom: 8px; }
}
