/* ============================================================
   MICROQ — DESIGN SYSTEM
   ============================================================ */

/* 1 · DESIGN TOKENS
   ============================================================ */
:root {
    /* Brand */
    --brand:       #0d8a7e;
    --brand-light: #11b5a5;
    --brand-dim:   rgba(13, 138, 126, 0.11);
    --brand-glow:  rgba(13, 138, 126, 0.22);

    /* Surfaces */
    --bg:        #f5f7fa;
    --surface:   #ffffff;
    --surface-2: #f0f5f9;
    --surface-3: #e7edf3;
    --elevated:  #ffffff;

    /* Text */
    --text:   #0e1c2b;
    --text-2: #3d556e;
    --muted:  #7a93a8;

    /* Borders */
    --border:   #dce8f0;
    --border-2: #c5d8e6;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(14, 28, 43, 0.07);
    --shadow-md: 0 8px 28px rgba(14, 28, 43, 0.10);
    --shadow-xl: 0 24px 48px rgba(14, 28, 43, 0.13);

    /* Semantic */
    --success: #0a7a4e;
    --danger:  #c92f49;
    --warning: #a85f00;

    /* Code */
    --code-bg:   #eef3f8;
    --code-text: #1a3252;

    /* Transition */
    --dur: 160ms;
}

[data-theme="dark"] {
    --brand:       #13c4b3;
    --brand-light: #18dbca;
    --brand-dim:   rgba(19, 196, 179, 0.13);
    --brand-glow:  rgba(19, 196, 179, 0.2);

    --bg:        #090f18;
    --surface:   #101c2b;
    --surface-2: #152333;
    --surface-3: #1c2e42;
    --elevated:  #1c2e42;

    --text:   #dceaf7;
    --text-2: #8cacc8;
    --muted:  #4e6e8a;

    --border:   #1e3450;
    --border-2: #274462;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.65);

    --success: #3ecf8e;
    --danger:  #f06070;
    --warning: #f0b860;

    --code-bg:   #071018;
    --code-text: #a8d4f0;
}

/* 2 · RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

::selection {
    background: var(--brand-glow);
    color: var(--text);
}

/* Thin scrollbars — Chrome / Edge / Safari */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

[data-theme="dark"] { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 40% at 5% 0%, var(--brand-dim) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 95% 0%, var(--brand-dim) 0%, transparent 60%);
    background-attachment: fixed;
    transition: background-color var(--dur), color var(--dur);
}

/* 3 · TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.15;
    margin: 0;
    color: var(--text);
}

h2 { font-size: 1.1rem; margin-bottom: 0.9rem; }
h3 { font-size: 1rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

ul { padding-left: 1.4rem; margin: 0.5rem 0 0.75rem; }
li { margin-bottom: 0.3rem; color: var(--text-2); }
li code { color: var(--brand); }

a {
    color: var(--brand);
    text-decoration: none;
    transition: opacity var(--dur);
}
a:hover { opacity: 0.75; }

/* 4 · LAYOUT
   ============================================================ */
.page-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 5rem;
}

/* 5 · NAVBAR
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 247, 250, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    transition: background var(--dur), border-color var(--dur);
}

[data-theme="dark"] .navbar {
    background: rgba(9, 15, 24, 0.88);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    transition: opacity var(--dur);
}
.nav-brand:hover { opacity: 0.85; }

.nav-brand-logo {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--brand-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
}

.nav-link {
    padding: 0.38rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    transition: color var(--dur), background var(--dur);
}
.nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
    opacity: 1;
}
.nav-link.active {
    color: var(--brand);
    background: var(--brand-dim);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background var(--dur), border-color var(--dur), color var(--dur);
    padding: 0;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border-2);
    transform: none;
    box-shadow: none;
}
.theme-toggle svg { pointer-events: none; }

/* Scoped with two-class specificity (0,2,0) to beat .theme-toggle svg (0,1,1) */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hamburger button (visible on mobile, hidden on desktop) */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background var(--dur), border-color var(--dur), color var(--dur);
    padding: 0;
    flex-shrink: 0;
}
.nav-hamburger:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border-2);
}
.nav-hamburger svg { pointer-events: none; }
.nav-hamburger .ham-close { display: none; }
.nav-hamburger[aria-expanded="true"] .ham-bars  { display: none; }
.nav-hamburger[aria-expanded="true"] .ham-close { display: block; }

/* Mobile dropdown menu */
.nav-mobile-menu {
    border-top: 1px solid var(--border);
    background: var(--bg);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    padding: 0.6rem 1.25rem 0.9rem;
    animation: rise 160ms ease-out both;
}
[data-theme="dark"] .nav-mobile-menu { background: rgba(9, 15, 24, 0.96); }

.nav-mobile-inner {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 1120px;
    margin: 0 auto;
}

.nav-mobile-menu .nav-link {
    font-size: 0.975rem;
    padding: 0.7rem 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 10px;
}

/* 6 · PAGE HERO
   ============================================================ */
.page-hero {
    padding: 2.5rem 0 2.25rem;
    animation: rise 380ms ease-out both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--brand);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
}

.page-hero h1 {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.65rem;
    background: linear-gradient(140deg, var(--text) 40%, var(--text-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero .subtitle {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 52ch;
    line-height: 1.65;
    margin: 0;
}

/* 7 · CARDS
   ============================================================ */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
    animation: rise 500ms ease-out both;
}

.card h2 {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 1rem;
}

/* 8 · FORMS
   ============================================================ */
.stack-form { display: grid; gap: 0.75rem; }

.card-subtitle {
    font-size: 0.875rem;
    margin-bottom: 0.875rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.3rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    font: inherit;
    font-size: 0.92rem;
    padding: 0.58rem 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
    -webkit-appearance: none;
    appearance: none;
}
input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
input::placeholder { color: var(--muted); }

/* Input with inline toggle button (e.g. show/hide password) */
.input-with-toggle {
    position: relative;
}
.input-with-toggle input {
    padding-right: 2.6rem;
}
.input-toggle-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    width: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 0 10px 10px 0;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--dur);
    box-shadow: none;
    outline: none;
}
.input-toggle-btn:hover { color: var(--text-2); transform: translateY(-50%); }
.input-toggle-btn:active { transform: translateY(-50%) scale(0.9); }

/* Admin key field */
.admin-key-field {
    margin-bottom: 0.875rem;
}

/* QR + Public Link card */
.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.qr-card h2,
.qr-card .card-subtitle {
    align-self: flex-start;
    text-align: left;
}

.qr-image-wrap {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    border: 1.5px solid var(--border);
    display: inline-flex;
    margin-bottom: 0.875rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur), box-shadow var(--dur);
}
.qr-image-wrap:hover {
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.1));
    border-color: var(--border-2, var(--border));
}
.qr-image-wrap img {
    display: block;
    width: 152px;
    height: 152px;
}

.public-link-box {
    width: 100%;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.45rem 0.45rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: border-color var(--dur), background var(--dur);
}
.public-link-box:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.public-link-url {
    flex: 1;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.72rem;
    color: var(--text-2);
    word-break: break-all;
    line-height: 1.5;
    text-align: left;
    user-select: all;
}

.copy-link-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.5rem;
    height: auto;
    border-radius: 7px;
    color: var(--muted);
    transition: color var(--dur), background var(--dur);
}
.copy-link-btn:hover { color: var(--brand); background: var(--brand-dim); }

/* ── Global focus-visible ring ── */
button:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 9 · BUTTONS
   ============================================================ */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border: 1.5px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background var(--dur), color var(--dur), border-color var(--dur),
                box-shadow var(--dur), transform 80ms ease;
    text-decoration: none;
    white-space: nowrap;
}
button:active { transform: scale(0.97); }

button:not(.ghost):not(.theme-toggle),
.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 1px 3px var(--brand-glow);
}
button:not(.ghost):not(.theme-toggle):hover,
.btn-primary:hover {
    background: var(--brand-light);
    box-shadow: 0 4px 14px var(--brand-glow);
    transform: translateY(-1px);
}

button.ghost, .btn-ghost {
    background: var(--surface-2);
    color: var(--text-2);
    border-color: var(--border);
}
button.ghost:hover, .btn-ghost:hover {
    background: var(--surface-3);
    color: var(--text);
    border-color: var(--border-2);
    transform: translateY(-1px);
}

.actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.875rem;
    flex-wrap: wrap;
}

.btn-full { width: 100%; }

/* 10 · STATUS BOX
   ============================================================ */
.status-box {
    border-radius: 12px;
    border: 1.5px solid var(--border);
    padding: 1rem;
    background: var(--surface-2);
    min-height: 96px;
    transition: background var(--dur), border-color var(--dur);
}
.status-box.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.875rem;
    font-style: italic;
    text-align: center;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.status-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.status-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.status-value.brand { color: var(--brand); }

.status-id {
    grid-column: 1 / -1;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
}
.status-id .status-value {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-2);
    word-break: break-all;
    line-height: 1.4;
}

/* 11 · PILLS & BADGES
   ============================================================ */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.pill-green {
    background: rgba(10, 122, 78, 0.1);
    color: var(--success);
}
[data-theme="dark"] .pill-green {
    background: rgba(62, 207, 142, 0.14);
}

.badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.badge-get  { background: rgba(13, 138, 126, 0.14); color: var(--brand-light); }
.badge-post { background: rgba(120, 80, 200, 0.14); color: #9b6ef0; }
[data-theme="dark"] .badge-get  { background: rgba(19, 196, 179, 0.15); }
[data-theme="dark"] .badge-post { background: rgba(155, 110, 240, 0.15); }

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-dim);
    animation: pulse 2.4s ease-in-out infinite;
}

/* 12 · TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

thead th {
    text-align: left;
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    border-bottom: 1.5px solid var(--border);
}

tbody td {
    padding: 0.7rem 0.7rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background var(--dur);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

.empty-row {
    color: var(--muted);
    text-align: center;
    font-style: italic;
    padding: 2rem 0.7rem !important;
}

.queue-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.queue-count-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h2 svg {
    display: inline-block;
    vertical-align: -0.15em;
    margin-right: 0.3em;
    flex-shrink: 0;
}

/* 13 · TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow-xl);
    pointer-events: auto;
    max-width: 320px;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    animation: toast-in 300ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
    transition: background var(--dur), border-color var(--dur);
}
.toast.removing { animation: toast-out 240ms ease-in forwards; }

.toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast.success .toast-icon { background: rgba(62, 207, 142, 0.18); color: var(--success); }
.toast.error   .toast-icon { background: rgba(240, 96, 112, 0.18); color: var(--danger); }
.toast.info    .toast-icon { background: var(--brand-dim);          color: var(--brand); }

.toast-body  { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; margin-bottom: 0.1rem; }
.toast-msg   { color: var(--text-2); font-size: 0.82rem; }

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  }
.toast.info    { border-left: 3px solid var(--brand);   }

/* 14 · DOCS PAGE
   ============================================================ */
.docs-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.docs-sidebar {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 1rem;
    transition: background var(--dur), border-color var(--dur);
}

.sidebar-group { margin-bottom: 1.25rem; }
.sidebar-group:last-child { margin-bottom: 0; }

.sidebar-group-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding: 0 0.5rem;
    margin-bottom: 0.3rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.38rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    transition: background var(--dur), color var(--dur);
    line-height: 1.4;
}
.sidebar-link:hover {
    background: var(--surface-2);
    color: var(--text);
    opacity: 1;
}
.sidebar-link.active {
    background: var(--brand-dim);
    color: var(--brand);
    font-weight: 700;
}

.docs-content { min-width: 0; }

.docs-section {
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
    scroll-margin-top: 82px;
}
.docs-section:last-child { border-bottom: none; margin-bottom: 0; }

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.6rem;
    color: var(--text);
    text-transform: none;
}

.docs-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}

.docs-section p { color: var(--text-2); line-height: 1.75; }

.endpoint-block {
    margin: 1.25rem 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color var(--dur);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.endpoint-path {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.875rem;
    color: var(--text);
}

.endpoint-body {
    padding: 1.25rem;
    display: grid;
    gap: 1.25rem;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: background var(--dur), border-color var(--dur);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: var(--surface-2);
}

.code-block pre {
    margin: 0;
    padding: 1rem 1.1rem;
    font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    font-size: 0.83rem;
    line-height: 1.7;
    color: var(--code-text);
    overflow-x: auto;
}

.code-block code { font-family: inherit; }

:not(pre) > code {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.83em;
    padding: 0.15em 0.42em;
    border-radius: 5px;
    background: var(--code-bg);
    color: var(--brand);
    border: 1px solid var(--border);
}

.copy-btn {
    font-size: 0.72rem;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    height: auto;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.params-table th,
.params-table td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}
.params-table th {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.params-table td:first-child code { color: var(--brand); }
.params-table tbody tr:last-child td { border-bottom: none; }

.required { color: var(--danger); font-size: 0.78rem; font-weight: 700; }
.optional { color: var(--muted);  font-size: 0.78rem; }

.callout {
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    border-left: 3px solid var(--brand);
    background: var(--brand-dim);
    font-size: 0.875rem;
    color: var(--text-2);
    margin: 1rem 0;
    line-height: 1.65;
}
.callout.warning {
    border-left-color: var(--warning);
    background: rgba(168, 95, 0, 0.08);
}
[data-theme="dark"] .callout.warning {
    background: rgba(240, 184, 96, 0.08);
}

/* 15 · FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 1.25rem 1.5rem;
    margin-top: 5rem;
    transition: border-color var(--dur);
    background: var(--surface);
}
.site-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin: 0 0 0.35rem;
}
.footer-col a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.84rem;
    transition: color var(--dur);
}
.footer-col a:hover {
    color: var(--text);
}
.footer-col-brand {
    gap: 0.6rem;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    text-decoration: none;
}
.footer-tagline {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
    max-width: 260px;
}
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-col-brand {
        grid-column: 1 / -1;
    }
}

/* 16 · UTILITIES
   ============================================================ */
.muted { color: var(--muted); }

.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;
}

/* 17 · ANIMATIONS
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(14px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(8px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--brand-dim); }
    50%       { box-shadow: 0 0 0 4px var(--brand-dim); }
}

/* 18 · RESPONSIVE
   ============================================================ */

/* ── Mobile-first nav (< 640px): hide desktop links, show hamburger ── */
@media (max-width: 639px) {
    .nav-links { display: none; }
}

/* ── Desktop nav (>= 640px): hide hamburger + mobile menu ── */
@media (min-width: 640px) {
    .nav-hamburger       { display: none !important; }
    .nav-mobile-menu     { display: none !important; }

    .page-shell { padding: 2rem 1.75rem 5rem; }

    .grid-layout { grid-template-columns: repeat(12, 1fr); }
    /* User queue page: Join | Status | QR / Live Queue full-width */
    .grid-layout > .card:nth-child(1) { grid-column: span 4; }
    .grid-layout > .card:nth-child(2) { grid-column: span 4; }
    .grid-layout > .card:nth-child(3) { grid-column: span 4; }
    .grid-layout > .card:nth-child(4) { grid-column: span 12; }

    /* Admin page: consistent 4+8 pairing across all rows */
    .admin-grid > .card:nth-child(1) { grid-column: span 4; }
    .admin-grid > .card:nth-child(2) { grid-column: span 8; }
    .admin-grid > .card:nth-child(3) { grid-column: span 4; }  /* Share */
    .admin-grid > .card:nth-child(4) { grid-column: span 8; }  /* Branding */
    .admin-grid > .card:nth-child(5) { grid-column: span 4; }  /* Sound */
    .admin-grid > .card:nth-child(6) { grid-column: span 8; }  /* Service Types */
    .admin-grid > .card:nth-child(7) { grid-column: span 4; }  /* Queue Type */
    .admin-grid > .card:nth-child(8) { grid-column: span 8; }  /* Embed Widget */
}

@media (min-width: 768px) {
    .docs-layout { grid-template-columns: 216px 1fr; gap: 2.5rem; }

    .docs-sidebar {
        position: sticky;
        top: 78px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 1.1rem;
    }

    .docs-sidebar::-webkit-scrollbar { width: 3px; }
    .docs-sidebar::-webkit-scrollbar-track { background: transparent; }
    .docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
}

@media (min-width: 1024px) {
    .docs-layout { grid-template-columns: 240px 1fr; gap: 3.5rem; }
    .endpoint-body { grid-template-columns: 1fr 1fr; }
}

/* 19 · CREATE QUEUE PAGE
   ============================================================ */

/* Narrow centred layout */
.create-shell {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Smaller hero on create page */
.create-hero h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.15rem);
}

/* Field hint below inputs */
.field-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.45;
}
.preview-slug {
    font-size: 0.78em;
    color: var(--brand);
}

/* Public/Private toggle row */
.toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
}

.toggle-label-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    display: block;
}

/* CSS toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    transition: background var(--dur);
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform var(--dur);
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Inline error banner */
.create-error {
    background: rgba(201, 47, 73, 0.08);
    border: 1.5px solid var(--danger);
    color: var(--danger);
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    animation: rise 200ms ease-out both;
}
[data-theme="dark"] .create-error { background: rgba(240, 96, 112, 0.1); }

/* Result card */
.result-card { animation: rise 400ms ease-out both; }

.result-header {
    text-align: center;
    padding-bottom: 1.35rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--border);
}
.result-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.55rem;
    animation: rise 350ms ease-out both;
}
.result-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}
.result-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
}
.result-subtitle code {
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    color: var(--muted);
}

.result-body { display: grid; gap: 1.1rem; }

.result-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 0.4rem;
    display: block;
}

/* Admin key row — blurred until revealed */
.admin-key-reveal {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.45rem 0.45rem 0.75rem;
    transition: border-color var(--dur), background var(--dur);
}
.admin-key-text {
    flex: 1;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.78rem;
    color: var(--text);
    word-break: break-all;
    line-height: 1.5;
    filter: blur(4px);
    transition: filter 220ms ease;
    user-select: none;
}
.admin-key-text.revealed {
    filter: none;
    user-select: all;
}

/* QR section */
.result-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.result-qr-section .qr-image-wrap img {
    width: 164px;
    height: 164px;
}

/* Result action buttons */
.result-actions {
    display: grid;
    gap: 0.5rem;
    padding-top: 0.2rem;
}

/* Navbar CTA pill */
.nav-cta {
    background: var(--brand-dim);
    color: var(--brand) !important;
    font-weight: 700 !important;
    transition: background var(--dur), color var(--dur) !important;
}
.nav-cta:hover {
    background: var(--brand) !important;
    color: #fff !important;
    opacity: 1 !important;
}

/* Admin access link inside QR card footer */
.qr-card-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.admin-access-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--dur);
}
.admin-access-link:hover { color: var(--brand); }

/* Admin hero */
.admin-hero h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.admin-hero .subtitle code {
    font-size: 0.8rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.15em 0.45em;
}
.admin-hero-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Admin logout form — push to far right in flex hero-actions row */
.admin-logout-form {
    margin: 0;
    margin-left: auto;
}

/* Admin logout button — danger colouring to distinguish from action buttons */
.admin-logout-btn {
    color: var(--danger) !important;
    border-color: rgba(201, 47, 73, 0.25) !important;
}
.admin-logout-btn:hover {
    background: rgba(201, 47, 73, 0.07) !important;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
    transform: none !important;
    box-shadow: none !important;
}
[data-theme="dark"] .admin-logout-btn { border-color: rgba(240, 96, 112, 0.3) !important; }
[data-theme="dark"] .admin-logout-btn:hover { background: rgba(240, 96, 112, 0.1) !important; }

/* Admin key save-once warning (create-queue result card) */
.admin-key-save-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 9px;
    background: rgba(168, 95, 0, 0.08);
    border: 1.5px solid rgba(168, 95, 0, 0.25);
    color: var(--warning);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 0.5rem;
}
[data-theme="dark"] .admin-key-save-warning {
    background: rgba(240, 184, 96, 0.09);
    border-color: rgba(240, 184, 96, 0.3);
}

.admin-upgrade-cta {
    margin-bottom: 0.95rem;
}

/* Last served feedback */
.last-served-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(10, 122, 78, 0.08);
    border: 1px solid var(--success);
    font-size: 0.82rem;
    color: var(--success);
    animation: rise 200ms ease-out both;
}
[data-theme="dark"] .last-served-box { background: rgba(62, 207, 142, 0.08); }

/* Admin share card — horizontal QR + link layout */
.admin-share-card .admin-share-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.admin-share-card .qr-image-wrap {
    flex-shrink: 0;
}
.admin-share-card .qr-image-wrap img {
    width: 120px;
    height: 120px;
}
.admin-share-link {
    flex: 1;
    min-width: 200px;
    padding-top: 0.25rem;
}

/* ── What's next steps in result card ── */
.whatsnext-steps {
    padding: 0.9rem 1.1rem;
    background: var(--surface-2);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.whatsnext-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.5rem;
}
.steps-list {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.865rem;
    color: var(--text-2);
}
.steps-list li { line-height: 1.45; }

/* URL preview pill (above submit button) */
.url-preview-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--brand-dim);
    border: 1.5px solid var(--brand-glow);
    font-size: 0.82rem;
    color: var(--brand);
    line-height: 1.45;
    animation: rise 180ms ease-out both;
}
.url-preview-card svg { flex-shrink: 0; margin-top: 1px; }
.url-preview-card strong {
    display: block;
    margin-top: 0.2rem;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.76rem;
    word-break: break-all;
}

/* Auto-open countdown */
.countdown-hint {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    margin: 0;
}
.inline-link {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
}
.inline-link:hover { color: var(--text-2); }

/* Returning owner banner */
.return-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    animation: rise 250ms ease-out both;
}
.return-banner-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-2);
}
.return-banner-content svg { color: var(--brand); flex-shrink: 0; }
.return-banner-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    border-radius: 8px;
    font-weight: 600;
}

/* 20 · ADMIN BRANDING
   ============================================================ */
.admin-branding-card .stack-form {
    gap: 0.85rem;
}

.branding-colors-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.branding-colors-row input[type="color"] {
    width: 100%;
    min-height: 40px;
    padding: 0.2rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
}
.branding-colors-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.branding-colors-row input[type="color"]::-webkit-color-swatch { border-radius: 5px; border: none; }

/* 21 · KIOSK MODE
   ============================================================ */
.kiosk-shell {
    min-height: 100vh;
    padding: 1.5rem;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    background: linear-gradient(165deg, var(--surface-2), var(--bg));
}

.kiosk-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.kiosk-brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.kiosk-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
}

.kiosk-business-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.1rem, 2.4vw, 1.8rem);
    font-weight: 700;
    line-height: 1.2;
}

.kiosk-subtitle {
    color: var(--muted);
    font-size: 0.82rem;
}

.kiosk-status-pill {
    border-radius: 999px;
    background: var(--brand-dim);
    color: var(--brand);
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
}

.kiosk-status-pill.warning {
    background: rgba(201, 47, 73, 0.12);
    color: var(--danger);
}

.kiosk-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
    min-height: 0;
}

.kiosk-hero-card,
.kiosk-list-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.kiosk-hero-card {
    padding: clamp(1.2rem, 2.6vw, 2rem);
    display: grid;
    align-content: center;
    gap: 1rem;
}

.kiosk-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    margin-bottom: 0.25rem;
}

.kiosk-big-value {
    font-size: clamp(2.4rem, 10vw, 7rem);
    color: var(--brand);
    line-height: 1;
}

.kiosk-next-value {
    font-size: clamp(1.8rem, 6vw, 4.6rem);
    color: var(--text);
    line-height: 1;
}

.kiosk-list-card {
    padding: 1rem;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
}

.kiosk-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.kiosk-upcoming-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.45rem;
    overflow: auto;
}

.kiosk-upcoming-list li {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 0.55rem;
    background: var(--surface-2);
}

.kiosk-upcoming-list li strong {
    color: var(--text);
    font-size: 1.02rem;
}

.kiosk-upcoming-list li em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.82rem;
}

.kiosk-next-item {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 1px var(--brand-dim);
    background: linear-gradient(120deg, var(--brand-dim), transparent);
}

.kiosk-empty {
    text-align: center;
    color: var(--muted);
    border-style: dashed !important;
    grid-template-columns: 1fr !important;
}

.kiosk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: flex-end;
}

.kiosk-toolbar .ghost {
    font-size: 0.78rem;
    padding: 0.38rem 0.85rem;
}

.kiosk-changed {
    animation: pulse 420ms ease-out;
}

@media (max-width: 1024px) {
    .kiosk-main-grid {
        grid-template-columns: 1fr;
    }
}

/* 22 · ANALYTICS DASHBOARD
   ============================================================ */
.analytics-shell {
    max-width: 1180px;
}

.analytics-controls {
    margin-top: 1rem;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.analytics-controls select {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 9px;
    padding: 0.38rem 2rem 0.38rem 0.7rem;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a93a8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    transition: border-color var(--dur), box-shadow var(--dur), background-color var(--dur);
}
.analytics-controls select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.analytics-loading {
    text-align: center;
    color: var(--text-2);
    font-weight: 600;
}

.analytics-upgrade {
    border-left: 3px solid var(--warning);
}

.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.analytics-stat-card {
    min-height: 124px;
}

.analytics-stat-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.75rem;
}

.analytics-stat-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
}

.analytics-charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.analytics-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.analytics-chart {
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}

.analytics-grid {
    stroke: var(--border);
    stroke-width: 1;
}

.analytics-axis {
    fill: var(--muted);
    font-size: 10px;
    font-family: "Manrope", sans-serif;
}

.analytics-axis-line {
    stroke: var(--border-2);
    stroke-width: 1;
}

.analytics-bar {
    fill: var(--brand);
    opacity: 0.78;
}

.analytics-bar.peak {
    fill: var(--brand-light);
}

.analytics-line {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2;
}

.analytics-point {
    fill: var(--brand-light);
    stroke: var(--surface);
    stroke-width: 1.5;
}

.analytics-table-wrap {
    max-height: 380px;
    overflow: auto;
}

/* Service-Type Analytics */
.st-analytics-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1.5px solid var(--border);
}

.st-section-head {
    margin-bottom: 1rem;
}

.st-empty-notice {
    border-left: 3px solid var(--border-2);
    color: var(--text-2);
}

.st-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.st-metric-card {
    padding: 1rem 1.15rem;
}

.st-metric-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.st-metric-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.st-badge,
.st-badge-sm {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.st-badge-sm {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    vertical-align: middle;
}

.st-metric-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.st-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.st-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.st-metric-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

@media (min-width: 600px) {
    .st-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .st-metric-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1100px) {
    .st-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.auth-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 720px) {
    .analytics-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .analytics-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .analytics-charts-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 23 · EMBEDDABLE WIDGET
   ============================================================ */
.embed-body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-widget {
    width: 100%;
    max-width: 480px;
    margin: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.embed-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.embed-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.embed-business-name {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.embed-live-pill {
    border-radius: 999px;
    background: var(--brand-dim);
    color: var(--brand);
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.embed-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
}

.embed-stat {
    text-align: center;
    padding: 1rem 0.5rem;
    border-right: 1px solid var(--border);
}

.embed-stat:last-child {
    border-right: none;
}

.embed-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.embed-value {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.embed-value-brand {
    color: var(--brand);
}

.embed-stat-accent {
    background: var(--brand-dim);
}

.embed-footer {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.65rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.embed-footer strong {
    color: var(--brand);
}

/* 24 · ADMIN — SOUND SETTINGS
   ============================================================ */
.admin-sound-card select {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 9px;
    padding: 0.45rem 2rem 0.45rem 0.7rem;
    width: 100%;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a93a8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    transition: border-color var(--dur), box-shadow var(--dur);
}

.admin-sound-card select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.sound-test-row {
    display: flex;
    justify-content: flex-end;
}

.upgrade-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(168, 95, 0, 0.08);
    border: 1px solid rgba(168, 95, 0, 0.2);
    color: var(--warning);
    font-size: 0.82rem;
    line-height: 1.5;
}

.upgrade-notice a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.upgrade-notice a:hover {
    text-decoration: underline;
}

/* 25 · ADMIN — EMBED CODE
   ============================================================ */
.embed-code-section,
.embed-preview-section {
    margin-top: 0.75rem;
}

.embed-code-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.embed-code-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0.55rem 0.75rem;
    overflow: hidden;
}

.embed-code-snippet {
    flex: 1;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    color: var(--code-text);
    word-break: break-all;
    white-space: pre-wrap;
}

.copy-embed-btn {
    flex-shrink: 0;
}

.embed-preview-frame {
    width: 100%;
    height: 280px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}

/* 26 · ADMIN — BRANDING PREVIEW
   ============================================================ */
.branding-preview-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.branding-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: background var(--dur);
}

.branding-swatch-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
}

.branding-preview-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* 27 · PUBLIC PAGE — BRAND ROW
   ============================================================ */
.page-brand-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.page-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   28 · SERVICE TYPES
   ───────────────────────────────────────────────────────────────────────────── */
.service-badge {
    display: inline-block;
    padding: .15em .45em;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.3;
    color: var(--brand);
    background: var(--brand-dim, rgba(13,138,126,.1));
    border-radius: var(--radius-sm, 6px);
    text-transform: uppercase;
    white-space: nowrap;
}

.service-type-create-form { margin-bottom: 1.25rem; }

.service-type-form-row {
    display: flex;
    gap: .75rem;
}

.service-type-form-field { flex: 1; }
.service-type-code-field { max-width: 100px; }

.service-types-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.service-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    gap: .75rem;
    transition: border-color var(--dur), background var(--dur);
}
.service-type-item:hover {
    border-color: var(--border-2);
    background: var(--surface-3);
}

.service-type-item-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
    min-width: 0;
}

.service-type-item-info strong {
    font-weight: 600;
}

.service-type-item-info .muted {
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-type-item-actions {
    flex-shrink: 0;
}

.st-delete-btn {
    color: var(--muted);
    font-size: .9rem;
    cursor: pointer;
}
.st-delete-btn:hover { color: var(--danger, #e53e3e); }


/* ── Queue Type Settings ────────────────────────────────────────────────────── */

.calling-options {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: .6rem;
    border: 1px solid var(--border);
}

/* ── Feature Announcement Banner ────────────────────────────────────────────── */

.feature-banner {
    position: relative;
    border-left: 4px solid var(--brand);
    padding: 1rem 2.5rem 1rem 1.25rem;
    margin-bottom: 15px;
}

.feature-banner-content {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
}

.feature-banner-icon {
    flex-shrink: 0;
    color: var(--brand);
    margin-top: .1rem;
}

.feature-banner-content strong {
    color: var(--text);
}

.feature-banner-link {
    color: var(--brand);
    font-weight: 600;
    margin-left: .35rem;
    white-space: nowrap;
}

.feature-banner-dismiss {
    position: absolute;
    top: .5rem;
    right: .75rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--muted);
    cursor: pointer;
    padding: .15rem .35rem;
    line-height: 1;
    border-radius: .25rem;
}

.feature-banner-dismiss:hover {
    color: var(--text);
    background: var(--border);
}

/* ── Number Badge (kiosk + tables) ──────────────────────────────────────────── */

.number-badge {
    display: inline-block;
    background: var(--brand-dim);
    color: var(--brand);
    font-size: .72rem;
    font-weight: 600;
    padding: .15em .55em;
    border-radius: .35rem;
    letter-spacing: .02em;
    vertical-align: middle;
}


/* ─────────────────────────────────────────────────────────────────────────────
   § 29 — Landing Page
───────────────────────────────────────────────────────────────────────────── */
.landing-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

/* Hero */
.landing-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0 3rem;
}

.landing-eyebrow {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--brand);
    margin-bottom: .75rem;
}

.landing-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
}

.landing-subline {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 2rem;
    max-width: 46ch;
}

.landing-cta-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.landing-cta-primary {
    font-size: 1rem;
    padding: .75rem 1.5rem;
}

.landing-cta-demo {
    font-size: 1rem;
    padding: .75rem 1.25rem;
}

/* Hero preview card */
.landing-preview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
    transition: border-color var(--dur);
}

.landing-preview-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: .75rem;
}

.landing-preview-rows {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.landing-preview-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .65rem;
    border-radius: 8px;
    background: var(--surface-2);
    font-size: .9rem;
}

.landing-preview-row-dim {
    opacity: .5;
}

.landing-preview-pos {
    font-weight: 700;
    color: var(--brand);
    min-width: 2rem;
    font-size: .82rem;
}

.landing-preview-name {
    flex: 1;
    font-weight: 500;
}

.landing-preview-eta {
    font-size: .8rem;
}

.landing-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    margin-top: .75rem;
    border-top: 1px solid var(--border);
}

/* Strip */
.landing-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    padding: .9rem 1rem;
    background: var(--surface-2);
    border-radius: 10px;
    font-size: .82rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 3.5rem;
}

.landing-strip-sep { opacity: .35; }

/* Steps */
.landing-steps {
    padding: 1rem 0 3.5rem;
    text-align: center;
}

.landing-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: .5rem 0 2.5rem;
    text-align: center;
}

.landing-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: left;
}

.landing-step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem 1.4rem 1.4rem;
    transition: border-color var(--dur);
}

.landing-step-card:hover { border-color: var(--brand); }

.landing-step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: .75rem 0 .5rem;
}

.landing-step-card .muted { font-size: .9rem; line-height: 1.55; }

.landing-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feature rows */
.landing-features { padding: 0 0 1rem; }

.landing-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.landing-feature-row-alt {
    direction: rtl;
}

.landing-feature-row-alt > * { direction: ltr; }

.landing-feature-copy h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: .5rem 0 .75rem;
    line-height: 1.2;
}

.landing-feature-copy .muted { font-size: .95rem; line-height: 1.65; }

/* Kiosk mock */
.kiosk-preview-mock {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 6px 24px rgba(0,0,0,.07);
}

.kiosk-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: .9rem;
}

.kiosk-preview-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    font-size: .85rem;
}

.kiosk-preview-logo-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand);
    opacity: .7;
}

.kiosk-preview-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: start;
}

.kiosk-preview-current {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--brand);
    line-height: 1;
}

.kiosk-preview-item {
    font-size: .82rem;
    padding: .3rem .5rem;
    border-radius: 6px;
    background: var(--surface-2);
    margin-bottom: .3rem;
    font-weight: 500;
}

.kiosk-preview-item-dim { opacity: .45; }

/* Analytics mock */
.landing-analytics-mock-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 6px 24px rgba(0,0,0,.07);
    position: relative;
    overflow: hidden;
}

.analytics-mock-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1rem;
}

.analytics-mock-stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .7rem .85rem;
}

.analytics-mock-val {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: .15rem;
    filter: blur(5px);
    user-select: none;
}

.analytics-mock-chart {
    filter: blur(3px);
    opacity: .7;
    pointer-events: none;
    user-select: none;
}

.landing-analytics-upgrade-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .95rem;
    color: var(--text);
    background: rgba(var(--bg-raw, 255,255,255), 0.55);
    backdrop-filter: blur(2px);
    border-radius: 14px;
    pointer-events: none;
}

[data-theme="dark"] .landing-analytics-upgrade-label {
    background: rgba(18,20,26,0.55);
}

/* Final CTA */
.landing-final-cta {
    text-align: center;
    padding: 3.5rem 1rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.landing-final-cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 .65rem;
}

.landing-final-cta .muted { margin-bottom: 1.75rem; }

/* Responsive landing */
@media (max-width: 800px) {
    .landing-hero {
        grid-template-columns: 1fr;
        padding: 2.5rem 0 2rem;
        gap: 2rem;
    }
    .landing-hero-visual { order: -1; }
    .landing-steps-grid { grid-template-columns: 1fr; }
    .landing-feature-row,
    .landing-feature-row-alt {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 2rem;
    }
    .analytics-mock-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 500px) {
    .analytics-mock-stats { grid-template-columns: 1fr 1fr; }
}


/* ─────────────────────────────────────────────────────────────────────────────
   § 30 — Demo Page
───────────────────────────────────────────────────────────────────────────── */
.demo-notice {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: var(--brand-dim);
    border: 1px solid var(--brand);
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: .88rem;
    color: var(--text);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.demo-cta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}


/* ─────────────────────────────────────────────────────────────────────────────
   § 31 — Share prompts
───────────────────────────────────────────────────────────────────────────── */
.join-share-row {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.join-share-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.push-prompt-row {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.push-prompt-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   § 32 — Kiosk watermark
───────────────────────────────────────────────────────────────────────────── */
.kiosk-watermark {
    position: fixed;
    bottom: .85rem;
    right: 1rem;
    font-size: .72rem;
    color: var(--muted);
    opacity: .55;
    pointer-events: auto;
    z-index: 10;
    transition: opacity .2s;
}

.kiosk-watermark:hover { opacity: .85; }

.kiosk-watermark a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.kiosk-watermark a:hover { color: var(--brand); }


/* ─────────────────────────────────────────────────────────────────────────────
   § 33 — Analytics blur/preview upgrade overlay
───────────────────────────────────────────────────────────────────────────── */
.analytics-content-blurred {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.analytics-upgrade-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(2px);
    padding: 1rem;
}

.analytics-upgrade-overlay-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.25rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
}

.analytics-upgrade-overlay-inner svg {
    color: var(--brand);
    margin-bottom: .75rem;
    width: 28px;
    height: 28px;
}

.analytics-upgrade-overlay-inner h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 .6rem;
}

.analytics-upgrade-overlay-inner .muted {
    font-size: .9rem;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.analytics-upgrade-btn {
    font-size: 1rem;
    padding: .75rem 1.5rem;
    width: 100%;
}

/* ── Pro Badge ──────────────────────────────────────────────────────────────── */

.pro-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .15em .55em;
    border-radius: .35rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    vertical-align: middle;
    margin-left: .4em;
    line-height: 1.4;
}

/* ── Pricing Page ───────────────────────────────────────────────────────────── */

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 750px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.pricing-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    position: relative;
    transition: box-shadow .2s;
}

.pricing-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
}

.pricing-card-pro {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand), 0 8px 32px rgba(13,138,126,.12);
}

.pricing-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .3em 1em;
    border-radius: 2rem;
    letter-spacing: .03em;
}

.pricing-card-header h2 {
    font-size: 1.3rem;
    margin: 0 0 .5rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: .25rem;
    margin-bottom: .75rem;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.1;
}

.pricing-period {
    font-size: .95rem;
    color: var(--muted);
}

.pricing-desc {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    display: grid;
    gap: .6rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    line-height: 1.4;
}

.pricing-check {
    color: var(--brand);
    flex-shrink: 0;
}

.pricing-check.pro {
    color: #f59e0b;
}

.pricing-cross {
    color: var(--muted);
    opacity: .5;
    flex-shrink: 0;
}

.pricing-feature-disabled {
    color: var(--muted);
    opacity: .65;
}

.pricing-cta {
    display: block;
    text-align: center;
    width: 100%;
    padding: .85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: .6rem;
    text-decoration: none;
    transition: background .15s, transform .15s;
}

.pricing-cta-free {
    background: var(--surface);
    color: var(--heading);
    border: 1.5px solid var(--border);
}

.pricing-cta-free:hover {
    background: var(--hover);
}

.pricing-cta-pro {
    background: var(--brand);
    color: #fff;
    border: none;
}

.pricing-cta-pro:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Pricing FAQ */

.pricing-faq {
    max-width: 750px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.pricing-faq h2 {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.pricing-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.pricing-faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .75rem;
    padding: 1.25rem;
}

.pricing-faq-item h3 {
    font-size: .95rem;
    margin: 0 0 .5rem;
}

.pricing-faq-item p {
    font-size: .85rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Upgrade Page ───────────────────────────────────────────────────────────── */

.upgrade-page-hero {
    padding-bottom: 1.25rem;
}

/* Two-column layout: summary card + form card */
.upgrade-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2rem;
    max-width: 860px;
    margin: 0 auto 3rem;
    padding: 0 1.25rem;
    align-items: start;
}

/* ── Summary card (left) ── */
.upgrade-summary-card {
    background: var(--surface);
    border: 2px solid var(--brand);
    border-radius: 1.25rem;
    padding: 2rem 1.75rem;
    position: relative;
    box-shadow: 0 8px 32px rgba(13,138,126,.09);
}

.upgrade-card-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: .35em 1.2em;
    border-radius: 2rem;
    letter-spacing: .04em;
    white-space: nowrap;
}

.upgrade-price-row {
    display: flex;
    align-items: baseline;
    gap: .3rem;
    margin: .75rem 0 .5rem;
}

.upgrade-price {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.upgrade-period {
    font-size: 1rem;
    color: var(--muted);
}

.upgrade-card-desc {
    font-size: .85rem;
    margin-bottom: 1.25rem;
}

.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: .55rem;
}

.upgrade-features li {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .88rem;
    color: var(--text-2);
}

/* Price breakdown table */
.upgrade-price-breakdown {
    border-top: 1px solid var(--border);
    padding-top: .9rem;
    display: grid;
    gap: .45rem;
    margin-bottom: .75rem;
}

.upgrade-price-line {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--text-2);
}

.upgrade-price-line-vat {
    color: var(--muted);
    font-size: .78rem;
}

.upgrade-price-total {
    font-weight: 700;
    font-size: .88rem;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: .45rem;
    margin-top: .2rem;
}

.upgrade-vat-note {
    font-size: .75rem;
    line-height: 1.5;
    margin: 0;
}

/* ── Form card (right) ── */
.upgrade-form-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem 1.75rem;
}

.upgrade-form-title {
    font-size: 1.2rem;
    margin: 0 0 .35rem;
}

.upgrade-form-sub {
    font-size: .86rem;
    margin: 0 0 1.5rem;
}

.upgrade-form {
    display: grid;
    gap: 1.1rem;
}

.upgrade-form-row {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.upgrade-form-row-optional .upgrade-form-label {
    color: var(--text-2);
}

.upgrade-form-label {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
}

.upgrade-required {
    color: var(--danger);
    margin-left: .1rem;
}

.upgrade-optional {
    font-size: .78rem;
    font-weight: 400;
    color: var(--muted);
}

.upgrade-input {
    padding: .6rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: .5rem;
    background: var(--bg);
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    transition: border-color var(--dur), box-shadow var(--dur);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.upgrade-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-dim);
}

.upgrade-input.input-error {
    border-color: var(--danger);
}

.upgrade-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%237a93a8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.upgrade-field-error {
    font-size: .78rem;
    color: var(--danger);
    margin: 0;
}

.upgrade-field-hint {
    font-size: .76rem;
    color: var(--muted);
    margin: 0;
}

/* Consent checkboxes */
.upgrade-consent-block {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: .625rem;
    border: 1px solid var(--border);
}

.upgrade-checkbox-label {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: .5rem;
    align-items: start;
    font-size: .83rem;
    color: var(--text-2);
    line-height: 1.55;
    cursor: pointer;
}

.upgrade-checkbox-optional {
    color: var(--muted);
}

.upgrade-checkbox {
    margin-top: .15rem;
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
}

.upgrade-checkbox-label a {
    color: var(--brand);
    text-decoration: underline;
}

/* EU legal notice box */
.upgrade-legal-notice {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    background: rgba(13, 138, 126, 0.06);
    border: 1px solid rgba(13, 138, 126, 0.22);
    border-radius: .5rem;
    padding: .75rem .9rem;
}

.upgrade-legal-notice svg {
    color: var(--brand);
    flex-shrink: 0;
    margin-top: .15rem;
}

.upgrade-legal-notice p {
    font-size: .78rem;
    color: var(--text-2);
    line-height: 1.55;
    margin: 0;
}

.upgrade-legal-notice a {
    color: var(--brand);
    text-decoration: underline;
}

.upgrade-cta-btn {
    width: 100%;
    padding: .85rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: .6rem;
    cursor: pointer;
    transition: filter var(--dur), transform var(--dur);
}

.upgrade-cta-btn:not(:disabled):hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.upgrade-cta-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.upgrade-card-note {
    font-size: .78rem;
    margin: .6rem 0 0;
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-content: center;
}

/* ── Pending state ── */
.upgrade-pending-section,
.upgrade-success-section {
    max-width: 520px;
    margin: 0 auto 3rem;
    padding: 0 1.25rem;
}

.upgrade-pending-card,
.upgrade-success-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    padding: 2.75rem 2rem;
    text-align: center;
}

.upgrade-pending-card h2,
.upgrade-success-card h2 {
    font-size: 1.3rem;
    margin: 1rem 0 .6rem;
}

.upgrade-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.upgrade-pending-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.upgrade-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Trust grid below form */
.upgrade-trust {
    max-width: 860px;
    margin: 0 auto 3rem;
    padding: 0 1.25rem;
}

.upgrade-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.25rem;
}

.upgrade-trust-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .75rem;
}

.upgrade-trust-item svg {
    color: var(--brand);
}

.upgrade-trust-item h3 {
    font-size: .9rem;
    margin: 0;
}

.upgrade-trust-item p {
    font-size: .8rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

/* Responsive: stack on mobile */
@media (max-width: 720px) {
    .upgrade-layout {
        grid-template-columns: 1fr;
    }
    .upgrade-summary-card {
        order: 2;
    }
    .upgrade-form-card {
        order: 1;
    }
    .upgrade-trust-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .upgrade-trust-grid {
        grid-template-columns: 1fr;
    }
}
/* ── Docs Locked ────────────────────────────────────────────────────────────── */

.docs-locked-section {
    max-width: 480px;
    margin: 0 auto 3rem;
}

.docs-locked-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
}

.docs-locked-card svg {
    color: var(--muted);
    margin-bottom: .5rem;
}

.docs-locked-card h2 {
    font-size: 1.3rem;
    margin: 0 0 .6rem;
}

.docs-locked-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin-top: 1.5rem;
}

.docs-locked-actions .btn {
    width: 100%;
    max-width: 280px;
}

/* 25 · PRIVACY BANNER
   ============================================================ */
.privacy-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(14, 28, 43, 0.1);
    padding: 1rem 1.25rem;
}
.privacy-banner-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.privacy-banner-inner p {
    font-size: 0.84rem;
    color: var(--text-2);
    margin: 0;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}
.privacy-banner-inner p a {
    color: var(--brand);
    text-decoration: underline;
}
.privacy-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
}

/* 26 · LEGAL PAGES (Privacy, Terms)
   ============================================================ */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
}
.legal-page h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.legal-page .legal-updated {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 2rem;
}
.legal-page h2 {
    font-size: 1.15rem;
    margin: 2rem 0 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.legal-page h3 {
    font-size: 0.98rem;
    margin: 1.25rem 0 0.4rem;
}
.legal-page p,
.legal-page li {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.7;
}
.legal-page ul {
    padding-left: 1.25rem;
}
.legal-page a {
    color: var(--brand);
}

/* 27 · FEATURES PAGE
   ============================================================ */
.features-page .page-hero {
    text-align: center;
    padding: 3rem 1.25rem 2rem;
}
.features-page .page-hero h1 {
    font-size: 2rem;
    max-width: 600px;
    margin: 0 auto 0.6rem;
}
.features-page .subtitle {
    max-width: 540px;
    margin: 0 auto;
}
.feature-section {
    padding: 2.5rem 1.25rem;
}
.feature-section-alt {
    background: var(--surface-2);
}
.feature-section-inner {
    max-width: 760px;
    margin: 0 auto;
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--brand-dim);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.feature-section h2 {
    font-size: 1.35rem;
    margin: 0 0 0.6rem;
}
.feature-section p {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.65;
    max-width: 600px;
}
.feature-benefits {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.feature-benefits li {
    font-size: 0.86rem;
    color: var(--text-2);
    padding-left: 1.25rem;
    position: relative;
}
.feature-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
}
.feature-cta {
    margin-top: 1rem;
    display: inline-flex;
}
@media (max-width: 600px) {
    .feature-benefits {
        grid-template-columns: 1fr;
    }
}

/* 28 · ABOUT PAGE
   ============================================================ */
.about-page .page-hero {
    text-align: center;
    padding: 3rem 1.25rem 2rem;
}
.about-page .page-hero h1 {
    font-size: 2rem;
}
.about-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}
.about-section h2 {
    font-size: 1.25rem;
    margin: 0 0 0.6rem;
}
.about-section p {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.65;
}
.about-audience-grid,
.about-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.about-audience-card,
.about-trust-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.about-audience-card h3,
.about-trust-item h3 {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}
.about-audience-card p,
.about-trust-item p {
    font-size: 0.84rem;
    color: var(--muted);
    margin: 0 0 0.4rem;
    line-height: 1.5;
}
.about-audience-card a {
    font-size: 0.82rem;
    color: var(--brand);
    text-decoration: none;
}
.about-audience-card a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .about-audience-grid,
    .about-trust-grid {
        grid-template-columns: 1fr;
    }
}

/* 29 · USE CASE PAGES
   ============================================================ */
.use-case-page .page-hero {
    text-align: center;
    padding: 3rem 1.25rem 2rem;
}
.use-case-page .page-hero h1 {
    font-size: 1.8rem;
    max-width: 640px;
    margin: 0 auto 0.6rem;
}
.use-case-problem,
.use-case-solution,
.use-case-how {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}
.use-case-problem h2,
.use-case-solution h2,
.use-case-how h2 {
    font-size: 1.25rem;
    margin: 0 0 0.6rem;
}
.use-case-problem p,
.use-case-how p {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.65;
}
.use-case-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.use-case-benefit {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.use-case-benefit h3 {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}
.use-case-benefit p {
    font-size: 0.84rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}
.use-case-steps {
    padding-left: 1.25rem;
    margin: 1rem 0 0;
}
.use-case-steps li {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
    .use-case-benefits-grid {
        grid-template-columns: 1fr;
    }
}


/* ─────────────────────────────────────────────────────────────────────────────
   § 40 — Kiosk Layout Editor
───────────────────────────────────────────────────────────────────────────── */
.kl-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.kl-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kl-card h2 {
    font-size: 1.05rem;
    margin: 0 0 0.15rem;
}

.kl-bg-section {
    transition: opacity var(--dur);
}

.kl-overlay-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: end;
}

.kl-range-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.kl-range-group input[type="range"] {
    flex: 1;
    accent-color: var(--brand);
}

.kl-range-group span {
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
    color: var(--text-2);
}

.kl-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kl-check-row input[type="checkbox"] {
    accent-color: var(--brand);
    width: 16px;
    height: 16px;
}

.kl-check-row label {
    margin: 0;
    font-size: 0.88rem;
}

.kl-gradient-swatches {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 1rem;
    align-items: end;
}

.kl-swatch-label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.kl-gradient-preview-strip {
    height: 8px;
    border-radius: 4px;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    transition: background 0.2s;
}

.kl-save-btn {
    margin-top: 0.25rem;
}

.kl-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.8rem;
    line-height: 1.45;
}

.kl-tip svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Preview ────────────────────────────────────────────────────────────── */
.kl-preview-wrap {
    position: sticky;
    top: 1.5rem;
    align-self: start;
}

.kl-preview-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 0.6rem;
}

.kl-preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    background: #0a1628;
}

.kl-preview-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: background 0.3s;
}

.kl-preview-video,
.kl-preview-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    border: none;
    pointer-events: none;
}

.kl-preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: background 0.3s;
}

.kl-preview-data {
    position: absolute;
    z-index: 2;
    display: flex;
    transition: all 0.3s ease;
}

/* Position variants */
.kl-preview-data[data-pos="bottom"] {
    bottom: 0; left: 0; right: 0;
    padding: 0.75rem 1rem;
}

.kl-preview-data[data-pos="top"] {
    top: 0; left: 0; right: 0;
    padding: 0.75rem 1rem;
}

.kl-preview-data[data-pos="left"] {
    top: 0; bottom: 0; left: 0;
    width: 40%;
    padding: 0.75rem;
    flex-direction: column;
}

.kl-preview-data[data-pos="right"] {
    top: 0; bottom: 0; right: 0;
    width: 40%;
    padding: 0.75rem;
    flex-direction: column;
}

.kl-preview-data-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
}

.kl-preview-data[data-pos="left"] .kl-preview-data-inner,
.kl-preview-data[data-pos="right"] .kl-preview-data-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    gap: 0.8rem;
}

.kl-preview-now,
.kl-preview-next {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.kl-preview-label {
    font-size: 0.52rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.kl-preview-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.kl-preview-data[data-pos="left"] .kl-preview-name,
.kl-preview-data[data-pos="right"] .kl-preview-name {
    font-size: 1rem;
}

.kl-preview-now .kl-preview-name {
    color: var(--brand-light, #11b5a5);
    font-size: 1rem;
}

.kl-preview-data[data-pos="left"] .kl-preview-now .kl-preview-name,
.kl-preview-data[data-pos="right"] .kl-preview-now .kl-preview-name {
    font-size: 1.3rem;
}

.kl-preview-pill {
    font-size: 0.55rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
}

.kl-preview-waiting {
    margin-left: auto;
}

.kl-preview-data[data-pos="left"] .kl-preview-waiting,
.kl-preview-data[data-pos="right"] .kl-preview-waiting {
    margin-left: 0;
    margin-top: auto;
}

.kl-preview-watermark {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    z-index: 3;
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.kl-watermark-note {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    margin-top: 0.6rem;
}

.kl-watermark-note svg {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .kl-layout {
        grid-template-columns: 1fr;
    }
    .kl-preview-wrap {
        position: static;
        order: -1;
    }
}


/* ─────────────────────────────────────────────────────────────────────────────
   § 41 — Kiosk Layout Display (applied on /kiosk page)
───────────────────────────────────────────────────────────────────────────── */
.kiosk-layout-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.kiosk-layout-bg video,
.kiosk-layout-bg iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    pointer-events: none;
}

.kiosk-layout-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.kiosk-shell.has-custom-layout {
    background: transparent;
    position: relative;
    z-index: 2;
}

.kiosk-shell.has-custom-layout .kiosk-top,
.kiosk-shell.has-custom-layout .kiosk-toolbar {
    display: none;
}

.kiosk-shell.has-custom-layout .kiosk-main-grid {
    display: none;
}

.kiosk-shell.has-custom-layout .kiosk-queue-name,
.kiosk-shell.has-custom-layout .kiosk-clock {
    display: none;
}

/* Layout data banner on kiosk */
.kiosk-layout-data {
    position: fixed;
    z-index: 3;
    display: flex;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.kiosk-layout-data[data-pos="bottom"] {
    bottom: 0; left: 0; right: 0;
    padding: 1.2rem 2rem;
}

.kiosk-layout-data[data-pos="top"] {
    top: 0; left: 0; right: 0;
    padding: 1.2rem 2rem;
}

.kiosk-layout-data[data-pos="left"] {
    top: 0; bottom: 0; left: 0;
    width: 340px;
    max-width: 40vw;
    padding: 2rem 1.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.kiosk-layout-data[data-pos="right"] {
    top: 0; bottom: 0; right: 0;
    width: 340px;
    max-width: 40vw;
    padding: 2rem 1.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.kiosk-layout-data-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
}

.kiosk-layout-data[data-pos="left"] .kiosk-layout-data-inner,
.kiosk-layout-data[data-pos="right"] .kiosk-layout-data-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.kiosk-layout-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.kiosk-layout-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.kiosk-layout-value {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.kiosk-layout-section.now .kiosk-layout-value {
    color: var(--brand-light, #11b5a5);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
}

.kiosk-layout-pill {
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.kiosk-layout-waiting {
    margin-left: auto;
}

.kiosk-layout-data[data-pos="left"] .kiosk-layout-waiting,
.kiosk-layout-data[data-pos="right"] .kiosk-layout-waiting {
    margin-left: 0;
    margin-top: 1rem;
}

/* Kiosk layout watermark — top right, small */
.kiosk-layout-watermark {
    position: fixed;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
    pointer-events: auto;
    transition: opacity 0.2s;
}

.kiosk-layout-watermark:hover {
    color: rgba(255, 255, 255, 0.6);
}

.kiosk-layout-watermark a {
    color: inherit;
    text-decoration: none;
}

.kiosk-layout-watermark a:hover {
    color: var(--brand-light);
}

/* Kiosk layout toolbar — minimal bottom-right controls */
.kiosk-layout-toolbar {
    position: fixed;
    bottom: 0.75rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.4rem;
}

.kiosk-layout-toolbar .ghost {
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: color 0.2s, background 0.2s;
}

.kiosk-layout-toolbar .ghost:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
}

/* ── Kiosk QR Code Overlay ──────────────────────────────────────────────── */
.kiosk-qr {
    position: fixed;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    /* Default: bottom-right for standard kiosk (no custom layout) */
    bottom: 1.5rem;
    right: 1.5rem;
    transition: all 0.3s ease;
}

.kiosk-qr img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.kiosk-qr-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* When no custom layout is active, style for default kiosk */
.kiosk-shell:not(.has-custom-layout) ~ .kiosk-qr {
    bottom: 4.5rem;
    right: 1.5rem;
}

.kiosk-shell:not(.has-custom-layout) ~ .kiosk-qr .kiosk-qr-label {
    color: var(--muted);
    text-shadow: none;
}

/* Position variants when custom layout is active */
.kiosk-qr[data-qr-pos="top-left"]    { top: 1.5rem;    left: 1.5rem;   bottom: auto; right: auto; }
.kiosk-qr[data-qr-pos="top-right"]   { top: 1.5rem;    right: 1.5rem;  bottom: auto; left: auto; }
.kiosk-qr[data-qr-pos="bottom-left"] { bottom: 1.5rem;  left: 1.5rem;   top: auto; right: auto; }
.kiosk-qr[data-qr-pos="bottom-right"]{ bottom: 1.5rem;  right: 1.5rem;  top: auto; left: auto; }

/* ── Kiosk Queue Name ───────────────────────────────────────────────────── */
.kiosk-queue-name {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0.7;
}

/* On default kiosk, show subtly below the header */
.kiosk-shell:not(.has-custom-layout) ~ .kiosk-queue-name {
    top: auto;
    bottom: 6rem;
    left: 1.5rem;
    transform: none;
    font-size: clamp(0.85rem, 1.4vw, 1.1rem);
    color: var(--brand);
    opacity: 0.6;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Custom layout variant */
.kiosk-layout-queue-name {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.05em;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    white-space: nowrap;
}

/* ── Kiosk Digital Clock ────────────────────────────────────────────────── */
.kiosk-clock {
    position: fixed;
    bottom: 2.8rem;
    right: 1rem;
    z-index: 6;
    text-align: right;
    pointer-events: none;
}

.kiosk-clock-time {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.kiosk-clock-date {
    font-size: clamp(0.65rem, 1.1vw, 0.85rem);
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
}

/* Custom layout clock — bolder, white text */
.kiosk-layout-clock {
    position: fixed;
    bottom: 2.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    text-align: center;
    pointer-events: none;
}

.kiosk-layout-clock-time {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.kiosk-layout-clock-date {
    font-size: clamp(0.75rem, 1.4vw, 1.05rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
