:root {
        color-scheme: dark;
        --bg: #0a0a0b;
        --surface: #141416;
        --surface-2: #1c1c1f;
        --border: #26262b;
        --border-strong: #34343b;
        --text: #ededef;
        --muted: #8b8b93;
        --accent: #818cf8;
        --accent-hover: #a5b4fc;
        --live: #22c55e;
        --warn: #f59e0b;
        --danger: #ef4444;
        --radius: 10px;
        --radius-sm: 8px;
        --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    }

    * { box-sizing: border-box; }
    html, body { background: var(--bg); }
    body {
        margin: 0;
        font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
        color: var(--text);
        -webkit-font-smoothing: antialiased;
        min-height: 100vh;
    }
    a { color: var(--accent); text-decoration: none; }
    a:hover { color: var(--accent-hover); }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    /* ── Layout ── */
    .page-shell {
        width: min(1080px, calc(100% - 32px));
        margin: 0 auto;
        padding-bottom: 64px;
    }
    .topbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px 24px;
        padding: 18px 0;
        border-bottom: 1px solid var(--border);
        margin-bottom: 32px;
    }
    .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 600;
        letter-spacing: -0.01em;
        color: var(--text);
    }
    .brand::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent);
    }
    .nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 20px;
        font-size: 14px;
    }
    .nav a { color: var(--muted); }
    .nav a:hover { color: var(--text); }
    .nav-user {
        color: var(--muted);
        padding-right: 20px;
        border-right: 1px solid var(--border);
    }
    .nav-user strong { color: var(--text); font-weight: 500; }

    h1, h2, h3, h4, h5 { margin: 0 0 12px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
    h1 { font-size: 28px; letter-spacing: -0.02em; }
    h2 { font-size: 22px; }
    h3 { font-size: 17px; }
    h4 { font-size: 15px; }
    h5 {
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--muted);
    }
    p { margin: 0 0 12px; }
    hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0 32px; }
    ul { margin: 0 0 12px; padding-left: 18px; }
    .muted, .hero p { color: var(--muted); }
    .hint { font-size: 13px; color: var(--muted); }
    .mono { font-family: var(--mono); font-size: 13px; }
    .text-danger { color: var(--danger); }

    .stack { display: grid; gap: 16px; }
    :is(.stack, .stack-sm, .stack-lg, .row) > :is(h1, h2, h3, h4, h5, p) { margin: 0; }
    .stack-sm { display: grid; gap: 8px; }
    .stack-lg { display: grid; gap: 32px; }
    .row, .inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .row--between { justify-content: space-between; gap: 12px; }
    .row--top { align-items: flex-start; }
    .section-spacer { margin: 24px 0; }
    .hero { display: grid; gap: 12px; }
    #customer-cards { display: grid; gap: 16px; }
    #active-streams:not(:empty) { margin-bottom: 32px; }

    /* ── Surfaces ── */
    .card, .layout-card, .mini-card, article {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 20px;
    }
    .card--inset { background: var(--bg); padding: 16px; }
    .card--dashed { background: transparent; border-style: dashed; }
    [hidden] { display: none !important; }
    .narrow { max-width: 440px; }
    .stat-grid, .home-links, .grid-stats {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .stat {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px 18px;
    }
    .stat-value {
        font-size: 24px;
        font-weight: 600;
        letter-spacing: -0.02em;
        font-variant-numeric: tabular-nums;
    }
    .stat-label { font-size: 13px; color: var(--muted); }
    .stat--live .stat-value { color: var(--live); }
    .balance--ok { color: var(--live); }
    .balance--low { color: var(--warn); }
    .balance--empty { color: var(--danger); }
    .empty {
        text-align: center;
        padding: 40px 20px;
        color: var(--muted);
        border: 1px dashed var(--border);
        border-radius: var(--radius);
    }
    .empty strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }

    /* ── Forms ── */
    form { display: grid; gap: 12px; max-width: 440px; margin: 0; }
    form > button { justify-self: start; }
    form > label + :is(input, select, textarea) { margin-top: -6px; }
    form + p { margin-top: 16px; }
    form.row { display: flex; max-width: none; }
    form.inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: none; }
    form.row input, form.inline input { width: auto; flex: 1 1 160px; }
    .field { display: grid; gap: 6px; }
    form.row select.grow { width: auto; flex: 1 1 160px; }
    form.row input.amount { flex: 0 1 110px; }
    label { font-size: 13px; font-weight: 500; color: var(--muted); }
    input, select, textarea {
        font: inherit;
        font-size: 14px;
        width: 100%;
        min-width: 0;
        padding: 9px 12px;
        color: var(--text);
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        transition: border-color 0.15s;
    }
    input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
    input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
    input::placeholder { color: #5c5c64; }
    input[type="file"] { padding: 6px; color: var(--muted); }
    input[type="file"]::file-selector-button {
        font: inherit;
        font-size: 13px;
        margin-right: 10px;
        padding: 5px 10px;
        color: var(--text);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 6px;
        cursor: pointer;
    }
    textarea { min-height: 110px; }
    .file-pick { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer;
        padding: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .file-pick:hover { border-color: var(--border-strong); }
    .file-pick:focus-within { border-color: var(--accent); }
    .file-pick input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
    .file-pick__btn { flex: none; font-size: 13px; padding: 5px 10px; color: var(--text); background: var(--surface);
        border: 1px solid var(--border); border-radius: 6px; }
    .file-pick__names { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .file-picks { display: flex; flex: 1; min-width: 0; }
    .file-pick-mobile { display: none; }
    .file-pick--kind { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; }
    .file-pick__title { font-size: 15px; font-weight: 500; color: var(--text); }
    .file-pick--kind .file-pick__names { max-width: 100%; }
    /* Pekskärm: en stor knapp per filtyp i stället för en gemensam filväljare. */
    @media (pointer: coarse) {
        .file-picks { flex-basis: 100%; }
        .file-pick--all { display: none; }
        .file-pick-mobile { display: grid; gap: 8px; width: 100%; }
    }
    .upload-progress { width: 100%; }
    .upload-progress__bar { height: 8px; margin: 4px 0 6px; overflow: hidden; background: var(--surface-2);
        border: 1px solid var(--border); border-radius: 999px; }
    .upload-progress__bar span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .3s; }

    button, .btn {
        font: inherit;
        font-size: 14px;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 9px 16px;
        color: #0a0a0b;
        background: var(--accent);
        border: 1px solid transparent;
        border-radius: var(--radius-sm);
        cursor: pointer;
        text-decoration: none;
        white-space: nowrap;
        transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    button:hover, .btn:hover { background: var(--accent-hover); color: #0a0a0b; }
    .btn--ghost { color: var(--text); background: transparent; border-color: var(--border); }
    .btn--ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
    .btn--danger { color: var(--danger); background: transparent; border-color: rgba(239, 68, 68, 0.35); }
    .btn--danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
    .btn--sm { padding: 5px 10px; font-size: 13px; }
    button[disabled], button[disabled]:hover { opacity: 0.4; cursor: not-allowed; background: var(--accent); }

    /* ── Status ── */
    .badge, .pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 3px 10px;
        font-size: 12px;
        font-weight: 500;
        color: var(--muted);
        border: 1px solid var(--border);
        border-radius: 999px;
        white-space: nowrap;
    }
    .badge--live, .badge--offline { gap: 7px; }
    .badge--live::before, .badge--offline::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }
    .badge--live { color: var(--live); background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); }
    .badge--offline::before { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
    a.badge--link { color: var(--accent); border-color: rgba(129, 140, 248, 0.3); }
    a.badge--link:hover { background: rgba(129, 140, 248, 0.1); }

    .feedback {
        padding: 10px 14px;
        margin-bottom: 16px;
        font-size: 14px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-left: 3px solid var(--muted);
        border-radius: var(--radius-sm);
    }
    .feedback.ok { border-left-color: var(--live); }
    .feedback.error { border-left-color: var(--danger); }
    .stack > .feedback { margin: 0; }

    /* ── Data ── */
    .table-wrap {
        overflow-x: auto;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }
    table { width: 100%; border-collapse: collapse; font-size: 14px; }
    th {
        text-align: left;
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--muted);
        padding: 10px 14px;
        border-bottom: 1px solid var(--border);
    }
    td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
    tbody tr:last-child td { border-bottom: 0; }
    td.empty-row { color: var(--muted); text-align: center; padding: 24px; }

    details > summary {
        cursor: pointer;
        font-size: 14px;
        color: var(--muted);
        list-style: none;
        user-select: none;
    }
    details > summary::-webkit-details-marker { display: none; }
    details > summary::before { content: "+"; display: inline-block; width: 16px; }
    details[open] > summary::before { content: "−"; }
    details > summary:hover { color: var(--text); }
    details[open] > summary { margin-bottom: 12px; }
    /* Admin: hopfällda stream-kort – det viktigaste syns i summary-raden */
    details.admin-stream > summary { display: flex; align-items: baseline; gap: 4px; color: var(--text); font-size: 15px; }
    details.admin-stream > summary > .admin-stream__head { flex: 1; min-width: 0; }

    .activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow: auto;
        border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .activity li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 8px 12px; font-size: 14px; }
    .activity li + li { border-top: 1px solid var(--border); }
    .activity time { color: var(--muted); font-size: 13px; white-space: nowrap; }
    .activity .act--good { color: var(--text); }
    .activity .act--warn { color: var(--warn); }
    .activity .act--stop, .activity .act--info { color: var(--muted); }
    @media (max-width: 560px) { .activity li { grid-template-columns: 1fr; gap: 2px; } }
    .log-output {
        margin: 0;
        padding: 12px 14px;
        max-height: 280px;
        overflow: auto;
        font: 12px/1.6 var(--mono);
        color: #a1a1aa;
        background: #000;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    /* ── Page header & sections ── */
    .stack-xl { display: grid; gap: 72px; }
    .page-head { margin-bottom: 32px; }
    .page-head h1 { margin-bottom: 6px; }
    .lead { font-size: 16px; color: var(--muted); max-width: 640px; }
    .lead strong { color: var(--text); font-weight: 500; }
    .section-head { display: grid; gap: 4px; }
    .section-head > * { margin: 0; }
    .section-head p { max-width: 640px; }
    .count { color: var(--muted); font-weight: 400; }
    .nav a.btn { color: #0a0a0b; }
    .btn--lg { padding: 12px 22px; font-size: 15px; }
    .split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; }
    .split > * { flex: 1 1 320px; }

    /* ── Landing page ── */
    .promo-banner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px 20px;
        padding: 16px 20px;
        margin-bottom: 24px;
        background: rgba(129, 140, 248, 0.08);
        border: 1px solid rgba(129, 140, 248, 0.35);
        border-radius: var(--radius);
    }
    .promo-banner strong { color: var(--text); font-weight: 600; }
    .promo-banner p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
    .promo-banner--closed { background: var(--surface); border-color: var(--border); }
    .trial-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius);
        border: 1px solid rgba(129, 140, 248, 0.35); background: rgba(129, 140, 248, 0.08); font-size: 14px; }
    .trial-note strong { color: var(--text); }
    .trial-note .trial-days { color: var(--accent); font-weight: 700; font-size: 18px; white-space: nowrap; }
    .trial-note span { color: var(--muted); }
    .narrow > .trial-note, .narrow > .promo-banner { margin-bottom: 20px; }
    .spots { display: inline-flex; gap: 3px; margin-top: 8px; }
    .spots i { width: 14px; height: 4px; border-radius: 2px; background: var(--accent); }
    .spots i.taken { background: var(--border-strong); }
    .trial-badge { color: var(--accent); border-color: rgba(129, 140, 248, 0.35); }
    .landing-hero { display: grid; gap: 20px; padding: 48px 0 8px; max-width: 760px; }
    .landing-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin: 0; }
    .landing-hero .lead { font-size: 17px; margin: 0; }
    .hero-price { margin: 0; font-size: 16px; color: var(--muted); }
    .hero-price strong { color: var(--text); }
    .hero-copy { display: grid; gap: 20px; }
    .hero-shot { margin: 8px 0 0; display: grid; gap: 8px; align-self: start; align-content: start; }
    /* Bred skärm: text till vänster, skärmdumpen till höger så att den syns utan att scrolla */
    @media (min-width: 1000px) {
        .landing-hero { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); column-gap: 48px; }
        .hero-shot { margin-top: 40px; }
    }
    .hero-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border-strong);
                     border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
    .hero-shot figcaption { font-size: 13px; color: var(--muted); }
    .platform-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
    .platform-row .pill { font-size: 13px; color: var(--text); }
    .eyebrow {
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--accent);
    }
    .steps {
        list-style: none;
        counter-reset: step;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    .steps li { counter-increment: step; }
    .steps li::before {
        content: counter(step);
        display: inline-grid;
        place-items: center;
        width: 28px;
        height: 28px;
        margin-bottom: 14px;
        font-size: 13px;
        font-weight: 600;
        color: var(--accent);
        border: 1px solid rgba(129, 140, 248, 0.4);
        border-radius: 50%;
    }
    .steps h3 { margin-bottom: 6px; }
    .steps p { margin: 0; font-size: 14px; }
    .feature-grid {
        display: grid;
        gap: 28px 32px;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .feature-grid h4 { margin-bottom: 4px; }
    .feature-grid p { margin: 0; font-size: 14px; }
    .price-card { display: grid; gap: 20px; max-width: 560px; }
    .price-value { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
    .price-tiers { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
    .price-tiers th, .price-tiers td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--border); }
    .price-tiers th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
    .price-tiers td + td, .price-tiers th + th { text-align: right; padding-left: 16px; }
    .price-tiers .mono { color: var(--muted); }
    .live-rate { font-variant-numeric: tabular-nums; }
    .checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
    .checklist li { position: relative; padding-left: 24px; color: var(--muted); }
    .checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--live); }
    .faq { display: grid; max-width: 760px; border-top: 1px solid var(--border); }
    .faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
    .faq summary { color: var(--text); font-size: 15px; font-weight: 500; }
    .faq details p { margin: 0; padding-left: 16px; font-size: 14px; }

    /* ── Terms ── */
    .site-footer {
        margin-top: 72px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: flex;
        flex-wrap: wrap;
        gap: 8px 20px;
        font-size: 13px;
        color: var(--muted);
    }
    .site-footer a { color: var(--muted); }
    .footer-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 20px; }
    .faq summary h2.faq-q { display: inline; font-size: 15px; font-weight: 500; margin: 0; letter-spacing: 0; }
    .answer { font-size: 17px; color: var(--text); max-width: 760px; }
    .legal ol { display: grid; gap: 8px; margin-bottom: 12px; padding-left: 20px; }
    .related ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; }
    .related h2 { font-size: 15px; color: var(--muted); }
    .use-cases a { display: block; color: inherit; text-decoration: none; }
    .use-cases a:hover h3 { text-decoration: underline; }
    .site-footer a:hover { color: var(--text); }
    .legal { max-width: 760px; }
    .legal h2 { font-size: 18px; margin: 36px 0 10px; }
    .legal h3 { font-size: 15px; margin: 20px 0 8px; }
    .legal p, .legal li { color: #c4c4cc; font-size: 15px; }
    .legal ul { display: grid; gap: 8px; margin-bottom: 12px; }
    .legal strong { color: var(--text); font-weight: 500; }
    .legal-summary { margin: 16px 0 8px; }
    .legal-summary h3 { margin-top: 0; }
    .legal-list li::marker { color: var(--danger); }
    .terms-scroll {
        max-height: 420px;
        overflow-y: auto;
        padding: 4px 20px 20px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }
    .check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer; }
    .check input { width: auto; margin: 3px 0 0; accent-color: var(--accent); flex: none; }

    /* ── Header & toast ── */
    .page-head--split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
    .page-head--split .lead { margin: 0; }
    .credit-chip {
        display: grid; gap: 2px; min-width: 220px; padding: 12px 16px; color: var(--text);
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        transition: border-color 0.15s;
    }
    .credit-chip:hover { color: var(--text); border-color: var(--accent); }
    .credit-chip .credit-value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
    .credit-chip .link { color: var(--accent); }
    .toast {
        position: fixed; bottom: 80px; right: max(20px, calc((100vw - 1080px) / 2)); z-index: 50; max-width: min(420px, calc(100vw - 40px));
        margin: 0; cursor: pointer; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
        animation: toast-in 0.2s ease-out; transition: opacity 0.3s, transform 0.3s;
    }
    .toast.hide { opacity: 0; transform: translateY(8px); }
    @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

    /* ── Start form ── */
    .seg { position: relative; display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
    .seg input, .switch input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
    .seg label { padding: 7px 14px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer;
                 border-right: 1px solid var(--border); transition: background 0.15s, color 0.15s; }
    .seg label:last-of-type { border-right: 0; }
    .seg label:hover { color: var(--text); background: var(--surface-2); }
    .seg input:checked + label { color: var(--text); background: rgba(129, 140, 248, 0.18); box-shadow: inset 0 -2px 0 var(--accent); }
    .seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
    .start-form { max-width: 560px; }
    .field > .seg { justify-self: start; }
    .start-form .field > .hint, .start-form .field p.hint { margin: 0; }
    .hours-field input { width: 90px; }
    .switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
    .switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); transition: background 0.15s; }
    .switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
                           background: var(--text); transition: transform 0.15s; }
    .switch input:checked + .switch-track { background: var(--accent); }
    .switch input:checked + .switch-track::after { transform: translateX(14px); background: #0a0a0b; }
    .switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
    .processing-error > span { display: grid; gap: 2px; }

    /* ── Stats & media ── */
    .chart { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end; height: 96px;
             padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .chart .bar { height: 100%; display: flex; align-items: flex-end; }
    .chart .bar span { display: block; width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; }
    .chart .bar:hover span { background: var(--accent-hover); }
    .chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
    .media-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .media-groups > * { align-content: start; }
    .file-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .file-list li .mono { overflow-wrap: anywhere; }
    .badge--good { color: var(--live); border-color: rgba(34, 197, 94, 0.3); }
    .badge--warn { color: var(--warn); border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
    .badge--danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); }
    .feedback.warn { border-left-color: var(--warn); }
    .feedback.info { border-left-color: var(--accent); }
    .text-warn { color: var(--warn); }
    .text-live { color: var(--live); }

    /* ── Getting started (customer) ── */
    .onboarding { border-color: rgba(129, 140, 248, 0.35); }
    .progress { height: 4px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
    .progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
    .onboarding-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: ob; }
    .onboarding-steps li {
        counter-increment: ob;
        display: grid;
        grid-template-columns: 28px 1fr;
        gap: 12px;
        padding: 10px 12px;
        border-radius: var(--radius-sm);
    }
    .onboarding-steps li::before {
        content: counter(ob);
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        font-size: 12px;
        font-weight: 600;
        color: var(--muted);
        border: 1px solid var(--border-strong);
        border-radius: 50%;
    }
    .onboarding-steps li p { margin: 2px 0 0; }
    .onboarding-steps li a { display: inline-block; margin-top: 6px; font-size: 14px; }
    .onboarding-steps li[data-step] { cursor: pointer; transition: background 0.15s; }
    .onboarding-steps li[data-step]:hover, .onboarding-steps li[data-step]:focus-visible { background: var(--surface-2); outline: none; }
    .onboarding-steps li.next { background: var(--surface-2); }
    .onboarding-steps li.next::before { color: #0a0a0b; background: var(--accent); border-color: var(--accent); }
    .onboarding-steps li.done { opacity: 0.6; }
    .onboarding-steps li.done > div > strong { text-decoration: line-through; text-decoration-color: var(--muted); }
    .onboarding-steps li.done::before { content: "✓"; color: var(--live); border-color: rgba(34, 197, 94, 0.4); }
    .howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
    .howto strong { color: var(--text); font-weight: 500; }
    .file-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .file-list li { padding: 8px 12px; border-bottom: 1px solid var(--border); }
    .file-list li:last-child { border-bottom: 0; }
    form details > summary { margin-bottom: 0; }
    form details[open] { display: grid; gap: 12px; }

    /* ── Spellista och förhandsvisning ── */
    .playlist li { gap: 12px; }
    .playlist li.off .mono { color: var(--muted); text-decoration: line-through; }
    .playlist .check { align-items: center; min-width: 0; }
    .playlist .check input { margin: 0; }
    .playlist-move { display: flex; gap: 4px; flex: none; }
    .playlist-move button { padding: 2px 8px; }
    .preview-stage { position: relative; max-width: 560px; aspect-ratio: 16 / 9; background: #000;
                     border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
    .preview-stage video, .preview-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
    .preview-tag { position: absolute; top: 8px; left: 8px; font-size: 12px; padding: 2px 8px; border-radius: 999px;
                   color: var(--text); background: rgba(0, 0, 0, 0.6); pointer-events: none; }
    .preview-np { position: absolute; left: 12px; bottom: 12px; font-size: 14px; padding: 4px 10px; border-radius: 6px;
                  color: #fff; background: rgba(0, 0, 0, 0.55); pointer-events: none; }
    .preview audio { width: 100%; max-width: 560px; }
    .preview-stage [hidden] { display: none; }

    /* ── Google & konto ── */
    .btn--google {
        gap: 10px; color: #1f1f1f; background: #fff; border: 1px solid #dadce0; font-weight: 500;
    }
    .btn--google:hover { color: #1f1f1f; background: #f1f3f4; }
    .btn--google svg { width: 18px; height: 18px; flex: none; }
    .divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; font-size: 13px; color: var(--muted); }
    .divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
    .account-grid { display: grid; gap: 16px; max-width: 640px; }

    /* ── Feedback ── */
    .fb-fab {
        position: fixed; right: 20px; bottom: 20px; z-index: 40; padding: 10px 16px; border-radius: 999px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    }
    /* ── Cookie-banner (bara när GOOGLE_ADS_TAG_ID är satt) ── */
    .consent {
        position: fixed; left: max(16px, calc((100vw - 1080px) / 2)); bottom: 20px; z-index: 45;
        width: min(400px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 14px 16px;
        background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); font-size: 14px;
    }
    .consent p { margin: 0; color: var(--muted); }
    .consent .row button { flex: 1; }
    .fb-dialog {
        width: min(480px, calc(100vw - 32px)); padding: 0; color: var(--text); background: var(--surface);
        border: 1px solid var(--border-strong); border-radius: var(--radius);
    }
    .fb-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
    .fb-dialog form { max-width: none; padding: 20px; }
    .fb-dialog textarea { min-height: 130px; resize: vertical; }
    .fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
    .fb-kinds button { padding: 5px 12px; font-size: 13px; color: var(--muted); background: transparent; border-color: var(--border); border-radius: 999px; }
    .fb-kinds button:hover { color: var(--text); background: var(--surface-2); }
    .fb-kinds button[aria-pressed="true"] { color: var(--text); background: rgba(129, 140, 248, 0.18); border-color: var(--accent); }
    .fb-shot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
    .fb-shot img { max-height: 56px; border-radius: 6px; border: 1px solid var(--border); }
    .fb-list { display: grid; gap: 12px; }
    .fb-item { display: grid; gap: 10px; }
    .fb-item .fb-message { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
    .fb-item .fb-reply { padding: 10px 14px; background: rgba(129, 140, 248, 0.08); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); white-space: pre-wrap; }
    .fb-item img.fb-thumb { max-width: 100%; max-height: 260px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
    .fb-filters { display: flex; flex-wrap: wrap; gap: 6px; }
    .fb-filters a { padding: 4px 12px; font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; }
    .fb-filters a.active { color: var(--text); border-color: var(--accent); background: rgba(129, 140, 248, 0.12); }
    /* ⋮-meny i tabellrader (Admin → Users) */
    td.row-menu-cell { width: 1%; text-align: right; }
    td.nowrap { white-space: nowrap; }
    /* Admin → Users på mobil: rollen som ikon vid användarnamnet i stället för egen kolumn */
    .users-table .mobile-only { display: none; }
    details.row-menu > summary { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 0;
                                 font-size: 20px; line-height: 1; color: var(--text); border: 1px solid var(--border);
                                 border-radius: 8px; }
    details.row-menu > summary::before { content: none; }
    details.row-menu > summary:hover, details.row-menu[open] > summary { background: var(--surface-2); }
    details.row-menu[open] > summary { margin-bottom: 0; }
    .row-menu__panel { position: fixed; z-index: 50; display: grid; gap: 8px; width: 240px; max-width: calc(100vw - 32px);
                       padding: 12px; text-align: left; background: var(--surface); border: 1px solid var(--border-strong);
                       border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
    .row-menu__panel form { display: grid; gap: 8px; max-width: none; }
    .row-menu__panel .btn, .row-menu__panel button { width: 100%; justify-content: center; }
    .fb-filters a { display: inline-flex; align-items: center; gap: 6px; }
    .fb-count { min-width: 18px; padding: 0 6px; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
                color: var(--muted); background: var(--surface-2); border-radius: 999px; font-variant-numeric: tabular-nums; }
    .fb-count--hot { color: #0a0a0b; background: var(--accent); }
    .nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
                 font-size: 11px; font-weight: 600; color: #0a0a0b; background: var(--accent); border-radius: 999px; }

    @media (max-width: 640px) {
        .topbar { flex-direction: column; align-items: flex-start; }
        .nav-user { padding-right: 0; border-right: 0; width: 100%; }
        .card, .layout-card, .mini-card, article { padding: 16px; }
        form.row > *, form.inline > * { flex: 1 1 100%; }
        form > button { justify-self: stretch; }
        .stack-xl { gap: 56px; }
        .landing-hero { padding-top: 16px; }
        .users-table .col-email, .users-table .col-role, .users-table .col-customer { display: none; }
        .users-table .mobile-only { display: inline; }
        .users-table .trial-label { display: none; }
        .users-table th, .users-table td { padding: 10px 6px; }
        .users-table td.col-user { overflow-wrap: anywhere; }
        .users-table .col-credit { width: 1%; text-align: right; }
    }
