/* ═══════════════════════════════════════════════
   Stats Dashboard — v3 Full Redesign
   3-Col layout: [Ad] [Center Content] [Ad]
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=IBM+Plex+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ─── Shell tokens ─── */
.stx-shell {
    /* Dark / default tokens */
    --stx-accent: #7C3AED;
    --stx-accent2: #06B6D4;
    --stx-amber: #F59E0B;
    --stx-emerald: #10B981;
    --stx-rose: #F43F5E;
    --stx-purple: #A855F7;
    --stx-ink: #F1F5F9;
    --stx-mute: #64748B;
    --stx-mute2: #94A3B8;
    --stx-glass: rgba(255, 255, 255, 0.038);
    --stx-border: rgba(255, 255, 255, 0.08);
    --stx-bg: #0D0D14;
    --stx-r: 16px;
}

/* ── Pastel theme tokens ── */
html[data-theme="pastel"] .stx-shell {
    --stx-accent: #ffb3ba;
    --stx-accent2: #bae1ff;
    --stx-amber: #ffdfba;
    --stx-emerald: #baffc9;
    --stx-rose: #ffb3ba;
    --stx-purple: #f3baff;
    --stx-ink: #e6e6e6;
    --stx-mute: #a9a9b3;
    --stx-mute2: #888896;
    --stx-glass: rgba(255, 179, 186, 0.06);
    --stx-border: rgba(255, 179, 186, 0.18);
    --stx-bg: #2e2e38;
}

/* ── Light theme tokens ── */
html[data-theme="light"] .stx-shell {
    --stx-accent: #6D28D9;
    --stx-accent2: #0891B2;
    --stx-amber: #D97706;
    --stx-emerald: #059669;
    --stx-rose: #E11D48;
    --stx-purple: #7C3AED;
    --stx-ink: #0F172A;
    --stx-mute: #475569;
    --stx-mute2: #64748B;
    --stx-glass: rgba(0, 0, 0, 0.028);
    --stx-border: rgba(0, 0, 0, 0.09);
    --stx-bg: #F8FAFC;
}

/* ─── Main content wrapper ─── */
.main-content.stx-main-wrap {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible;
}

.stx-shell {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 56px);
    margin-top: 56px;
    overflow: visible;
    isolation: isolate;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    background:
        radial-gradient(ellipse 70% 40% at 10% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 90% 90%, rgba(6, 182, 212, 0.12) 0%, transparent 55%),
        linear-gradient(170deg, #0D0D14 0%, #08080F 100%);
}

html[data-theme="pastel"] .stx-shell {
    background:
        radial-gradient(ellipse 70% 40% at 10% 0%, rgba(255, 179, 186, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 90% 90%, rgba(186, 225, 255, 0.08) 0%, transparent 55%),
        linear-gradient(170deg, #2e2e38 0%, #26262f 100%);
}

html[data-theme="light"] .stx-shell {
    background:
        radial-gradient(ellipse 70% 40% at 10% 0%, rgba(109, 40, 217, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 90% 90%, rgba(8, 145, 178, 0.05) 0%, transparent 55%),
        linear-gradient(170deg, #F8FAFC 0%, #EEF2FF 100%);
}

/* Subtle dot grid */
.stx-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M60 0H0v60' fill='none' stroke='%23ffffff' stroke-opacity='0.025' stroke-width='0.5'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

html[data-theme="light"] .stx-shell::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M60 0H0v60' fill='none' stroke='%23000000' stroke-opacity='0.03' stroke-width='0.5'/%3E%3C/svg%3E");
}

html[data-theme="pastel"] .stx-shell::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M60 0H0v60' fill='none' stroke='%23ffb3ba' stroke-opacity='0.04' stroke-width='0.5'/%3E%3C/svg%3E");
}

.stx-noise {
    position: absolute;
    inset: 0;
    opacity: 0.022;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Outer 3-column layout ─── */
.stx-page-frame {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 140px;
    gap: 0;
    min-height: calc(100vh - 56px);
    padding: 0;
}

/* ─── Side Ad Rails ─── */
.stx-side-ad {
    padding: 24px 10px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.stx-ad-vertical {
    width: 120px;
    min-height: 600px;
    border-radius: 18px;
    border: 1px dashed rgba(124, 58, 237, 0.25);
    background: linear-gradient(180deg,
            rgba(124, 58, 237, 0.04) 0%,
            rgba(6, 182, 212, 0.02) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: sticky;
    top: 76px;
    overflow: hidden;
}

html[data-theme="pastel"] .stx-ad-vertical {
    border-color: rgba(255, 179, 186, 0.25);
    background: linear-gradient(180deg,
            rgba(255, 179, 186, 0.05) 0%,
            rgba(186, 225, 255, 0.03) 100%);
}

html[data-theme="light"] .stx-ad-vertical {
    border-color: rgba(109, 40, 217, 0.18);
    background: linear-gradient(180deg,
            rgba(109, 40, 217, 0.03) 0%,
            rgba(8, 145, 178, 0.02) 100%);
}

.stx-ad-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--stx-mute);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.7;
}

.stx-ad-vertical ins.adsbygoogle {
    display: block;
    width: 120px;
    min-height: 600px;
}

/* ─── Center Content Column ─── */
.stx-body {
    padding: 28px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* ─── Hero ─── */
.stx-hero {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stx-hero-kicker {
    margin: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--stx-accent);
}

.stx-hero-title {
    margin: 0;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--stx-ink);
}

.stx-hero-title>span {
    background: linear-gradient(110deg, var(--stx-accent), var(--stx-accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="pastel"] .stx-hero-title>span {
    background: linear-gradient(110deg, #ffb3ba, #bae1ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stx-hero-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--stx-mute);
}

/* ─── KPI Strip ─── */
.stx-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 680px) {
    .stx-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stx-kpi-card {
    position: relative;
    border-radius: var(--stx-r);
    border: 1px solid var(--stx-border);
    background: var(--stx-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 15px 16px 17px;
    overflow: hidden;
    cursor: default;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stx-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--stx-r) var(--stx-r) 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stx-kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .stx-kpi-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

html[data-theme="pastel"] .stx-kpi-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.stx-kpi-card:hover::before {
    opacity: 1;
}

.stx-kpi-card--last::before {
    background: linear-gradient(90deg, #06B6D4, #7C3AED);
}

.stx-kpi-card--max::before {
    background: linear-gradient(90deg, #F59E0B, #F43F5E);
}

.stx-kpi-card--avg::before {
    background: linear-gradient(90deg, #10B981, #06B6D4);
}

.stx-kpi-card--total::before {
    background: linear-gradient(90deg, #7C3AED, #A855F7);
}

html[data-theme="pastel"] .stx-kpi-card--last::before {
    background: linear-gradient(90deg, #bae1ff, #ffb3ba);
}

html[data-theme="pastel"] .stx-kpi-card--max::before {
    background: linear-gradient(90deg, #ffdfba, #ffb3ba);
}

html[data-theme="pastel"] .stx-kpi-card--avg::before {
    background: linear-gradient(90deg, #baffc9, #bae1ff);
}

html[data-theme="pastel"] .stx-kpi-card--total::before {
    background: linear-gradient(90deg, #ffb3ba, #f3baff);
}

.stx-kpi-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-bottom: 12px;
}

.stx-kpi-card--last .stx-kpi-icon-wrap {
    background: rgba(6, 182, 212, 0.12);
    color: var(--stx-accent2);
}

.stx-kpi-card--max .stx-kpi-icon-wrap {
    background: rgba(245, 158, 11, 0.12);
    color: var(--stx-amber);
}

.stx-kpi-card--avg .stx-kpi-icon-wrap {
    background: rgba(16, 185, 129, 0.12);
    color: var(--stx-emerald);
}

.stx-kpi-card--total .stx-kpi-icon-wrap {
    background: rgba(124, 58, 237, 0.12);
    color: var(--stx-accent);
}

html[data-theme="pastel"] .stx-kpi-card--last .stx-kpi-icon-wrap {
    background: rgba(186, 225, 255, 0.12);
    color: #bae1ff;
}

html[data-theme="pastel"] .stx-kpi-card--max .stx-kpi-icon-wrap {
    background: rgba(255, 223, 186, 0.12);
    color: #ffdfba;
}

html[data-theme="pastel"] .stx-kpi-card--avg .stx-kpi-icon-wrap {
    background: rgba(186, 255, 201, 0.12);
    color: #baffc9;
}

html[data-theme="pastel"] .stx-kpi-card--total .stx-kpi-icon-wrap {
    background: rgba(255, 179, 186, 0.12);
    color: #ffb3ba;
}

.stx-kpi-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stx-mute);
    margin-bottom: 5px;
}

.stx-kpi-val {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stx-kpi-num {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--stx-ink);
}

.stx-kpi-card--last .stx-kpi-num {
    color: var(--stx-accent2);
}

.stx-kpi-card--max .stx-kpi-num {
    color: var(--stx-amber);
}

.stx-kpi-card--avg .stx-kpi-num {
    color: var(--stx-emerald);
}

.stx-kpi-card--total .stx-kpi-num {
    color: var(--stx-accent);
}

html[data-theme="pastel"] .stx-kpi-card--last .stx-kpi-num {
    color: #bae1ff;
}

html[data-theme="pastel"] .stx-kpi-card--max .stx-kpi-num {
    color: #ffdfba;
}

html[data-theme="pastel"] .stx-kpi-card--avg .stx-kpi-num {
    color: #baffc9;
}

html[data-theme="pastel"] .stx-kpi-card--total .stx-kpi-num {
    color: #ffb3ba;
}

.stx-kpi-unit {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    color: var(--stx-mute);
    padding-bottom: 2px;
}

/* Glow blob decoration */
.stx-kpi-card::after {
    content: '';
    position: absolute;
    bottom: -18px;
    right: -18px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    opacity: 0.06;
    transition: opacity 0.3s;
    pointer-events: none;
}

.stx-kpi-card--last::after {
    background: #06B6D4;
}

.stx-kpi-card--max::after {
    background: #F59E0B;
}

.stx-kpi-card--avg::after {
    background: #10B981;
}

.stx-kpi-card--total::after {
    background: #7C3AED;
}

.stx-kpi-card:hover::after {
    opacity: 0.14;
}

/* ─── Filter Card (full-width horizontal) ─── */
.stx-scope-card {
    border-radius: var(--stx-r);
    border: 1px solid var(--stx-border);
    background: var(--stx-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.stx-scope-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stx-ink);
    white-space: nowrap;
    flex-shrink: 0;
}

.stx-scope-title i {
    color: var(--stx-accent);
    font-size: 11px;
}

.stx-chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--stx-border);
    color: var(--stx-mute2);
    background: var(--stx-glass);
    white-space: nowrap;
    flex-shrink: 0;
}

.stx-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.stx-pill {
    border: 1px solid var(--stx-border);
    background: transparent;
    color: var(--stx-mute);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.stx-pill:hover {
    color: var(--stx-ink);
    border-color: var(--stx-accent);
    background: rgba(124, 58, 237, 0.08);
}

html[data-theme="pastel"] .stx-pill:hover {
    background: rgba(255, 179, 186, 0.1);
}

.stx-pill.active {
    color: var(--stx-accent);
    border-color: var(--stx-accent);
    background: rgba(124, 58, 237, 0.12);
}

html[data-theme="pastel"] .stx-pill.active {
    color: #ffb3ba;
    border-color: rgba(255, 179, 186, 0.45);
    background: rgba(255, 179, 186, 0.12);
}

html[data-theme="light"] .stx-pill:hover {
    background: rgba(109, 40, 217, 0.06);
}

html[data-theme="light"] .stx-pill.active {
    background: rgba(109, 40, 217, 0.10);
    color: #6D28D9;
    border-color: #6D28D9;
}

#languageFilter {
    display: none;
}

/* ─── Chart Panel ─── */
.stx-chart-panel {
    border-radius: var(--stx-r);
    border: 1px solid var(--stx-border);
    background: var(--stx-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.stx-chart-cap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px 11px;
    border-bottom: 1px solid var(--stx-border);
}

.stx-chart-cap h2 {
    margin: 0;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--stx-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stx-chart-cap h2 i {
    color: var(--stx-accent);
    font-size: 13px;
}

.stx-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    color: var(--stx-accent2);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(6, 182, 212, 0.28);
    background: rgba(6, 182, 212, 0.07);
}

html[data-theme="pastel"] .stx-badge {
    color: #bae1ff;
    border-color: rgba(186, 225, 255, 0.28);
    background: rgba(186, 225, 255, 0.07);
}

.stx-chart-vessel {
    position: relative;
    padding: 8px 10px 12px;
    min-height: 280px;
}

.stx-chart-vessel>div,
#wpmChart {
    width: 100%;
    min-height: 265px;
}

/* ─── Recent Sessions (below chart) ─── */
.stx-dock {
    border-radius: var(--stx-r);
    border: 1px solid var(--stx-border);
    background: var(--stx-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.stx-dock-h {
    margin: 0;
    padding: 10px 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--stx-mute);
    border-bottom: 1px solid var(--stx-border);
    display: flex;
    align-items: center;
    gap: 7px;
}

.stx-dock-h i {
    color: var(--stx-accent);
}

.stx-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.stx-mini-table th {
    text-align: left;
    padding: 8px 14px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--stx-mute);
    border-bottom: 1px solid var(--stx-border);
}

.stx-mini-table td {
    padding: 9px 14px;
    color: var(--stx-ink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
    font-size: 12px;
    transition: background 0.15s;
}

html[data-theme="light"] .stx-mini-table td {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

html[data-theme="pastel"] .stx-mini-table td {
    border-bottom-color: rgba(255, 179, 186, 0.08);
}

.stx-mini-table tr:last-child td {
    border-bottom: none;
}

.stx-mini-table tr:hover td {
    background: rgba(124, 58, 237, 0.04);
}

html[data-theme="pastel"] .stx-mini-table tr:hover td {
    background: rgba(255, 179, 186, 0.05);
}

.stx-mini-table .stx-w {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    color: var(--stx-accent2);
    font-size: 12px;
}

html[data-theme="pastel"] .stx-mini-table .stx-w {
    color: #bae1ff;
}

.stx-mini-table .stx-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(124, 58, 237, 0.1);
    color: #A78BFA;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

html[data-theme="pastel"] .stx-mini-table .stx-tag {
    background: rgba(255, 179, 186, 0.1);
    color: #ffb3ba;
    border-color: rgba(255, 179, 186, 0.22);
}

.stx-dock--wide .stx-mini-table td {
    max-width: none;
}

/* ─── Empty / No-data states ─── */
.table-empty {
    text-align: center;
    padding: 20px 12px !important;
    color: var(--stx-mute);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
}

.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    gap: 10px;
    color: var(--stx-mute);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

.no-data-message i {
    font-size: 30px;
    opacity: 0.18;
    color: var(--stx-accent);
}

/* ─── Login Overlay (Keyboard Style) ─── */
.stats-login-locked .stx-body {
    filter: blur(2.5px);
    opacity: 0.65;
    pointer-events: none;
    user-select: none;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.stats-login-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 25px;
    z-index: 1000;
    background: transparent;
    pointer-events: none;
    perspective: 1000px;
}

/* Keyboard Base */
.v-keyboard-frame {
    pointer-events: auto;
    background: #111116;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 280px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 -4px 10px rgba(0, 0, 0, 0.3) inset,
        0 2px 0 rgba(255, 255, 255, 0.05) inset;
    transform-origin: right center;
    animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    0% {
        transform: translateX(50px) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Base Key Style */
.vkb-key {
    background: #1e1e24;
    border-radius: 8px;
    position: relative;
    padding-bottom: 6px;
    transition: transform 0.15s, padding-bottom 0.15s;
    text-decoration: none;
    display: block;
}

.vkb-key-inner {
    background: linear-gradient(180deg, #2a2a35 0%, #22222a 100%);
    border: 1px solid #383846;
    border-top: 1px solid #4a4a5c;
    border-radius: 6px;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
}

/* Specific Keys */
.vkb-key--icon .vkb-key-inner {
    padding: 24px;
}

.vkb-key--icon i {
    font-size: 28px;
    color: var(--stx-accent);
}

.vkb-key--text .vkb-key-inner {
    padding: 20px 16px;
}

.vkb-key--text h3 {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
}

.vkb-key--text p {
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* Action Key (Enter) */
.vkb-key--enter {
    background: #4a2199;
    cursor: pointer;
    margin-top: 8px;
}

.vkb-key--enter .vkb-key-inner {
    background: linear-gradient(180deg, var(--stx-accent) 0%, var(--stx-accent2) 100%);
    border: 1px solid #9b51e0;
    border-top: 1px solid #c285ff;
    flex-direction: row;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px;
}

.vkb-key--enter:hover .vkb-key-inner {
    background: linear-gradient(180deg, #8a4be0 0%, #682ece 100%);
}

.vkb-key--enter:active {
    padding-bottom: 2px;
    transform: translateY(4px);
}

/* Pastel Theme Overrides */
html[data-theme="pastel"] .v-keyboard-frame {
    background: #eadae4;
    border-color: #f6edf2;
}

html[data-theme="pastel"] .vkb-key {
    background: #d4beca;
}

html[data-theme="pastel"] .vkb-key-inner {
    background: linear-gradient(180deg, #ffffff 0%, #f7f1f5 100%);
    border-color: #ebd7e3;
    border-top-color: #ffffff;
    color: #2e2e38;
}

html[data-theme="pastel"] .vkb-key--text h3 {
    color: #2e2e38;
}

html[data-theme="pastel"] .vkb-key--text p {
    color: #666;
    text-shadow: none;
}

html[data-theme="pastel"] .vkb-key--icon i {
    color: #ffb3ba;
}

html[data-theme="pastel"] .vkb-key--enter {
    background: #c68a92;
}

html[data-theme="pastel"] .vkb-key--enter .vkb-key-inner {
    background: linear-gradient(180deg, #ffb3ba 0%, #ffc8cf 100%);
    border-color: #ffa1aa;
    border-top-color: #ffced4;
    color: #2e2e38;
}

html[data-theme="pastel"] .vkb-key--enter:hover .vkb-key-inner {
    background: linear-gradient(180deg, #ffa1aa 0%, #ffb3ba 100%);
}

/* ─── Notification ─── */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    z-index: 1000;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    max-width: 320px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: rgba(244, 63, 94, 0.95);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 17px;
}

/* ─── Responsive: hide side ads on narrow viewports ─── */
@media (max-width: 1100px) {
    .stx-page-frame {
        grid-template-columns: 0 minmax(0, 1fr) 0;
    }

    .stx-side-ad {
        display: none;
    }
}

@media (max-width: 640px) {
    .stx-body {
        padding: 18px 14px 48px;
        gap: 14px;
    }

    .stx-kpi-strip {
        gap: 8px;
    }

    .stx-scope-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}