/* ============================================================
   BytePad Marketing Website — Stylesheet
   ============================================================ */

/* --- Tokens (Design Tokens / CSS Custom Properties) --- */
:root {
    --bg-base: #08080c;
    --bg-surface: #111118;
    --bg-card: #181820;
    --bg-elevated: #222230;
    --bg-hover: #2a2a3a;

    --accent: #d4a843;
    --accent-bright: #f0c456;
    --accent-dim: #a07c2e;
    --accent-glow: rgba(212, 168, 67, 0.15);
    --accent-mint: #56d4b0;
    --accent-mint-dim: rgba(86, 212, 176, 0.12);

    --text-1: #eaeaef;
    --text-2: #9494a3;
    --text-3: #5c5c6e;

    --border: #222233;
    --border-light: #2e2e42;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'Figtree', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-1);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
code { font-family: var(--font-mono); }

/* --- Noise overlay --- */
.noise {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section Header --- */
.section-head {
    max-width: 640px;
    margin-bottom: 64px;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.12;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 20px;
}
.section-head h2 em {
    font-style: italic;
    color: var(--accent);
}
.section-head p {
    font-size: 1.1rem;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 540px;
}
.label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 5px 12px;
    background: var(--accent-glow);
    border-radius: 100px;
    border: 1px solid rgba(212, 168, 67, 0.15);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(8, 8, 12, 0.82);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom-color: var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 40px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    white-space: nowrap;
}
.nav-logo-img {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.footer-logo-img {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    flex-shrink: 0;
    border-radius: 5px;
    object-fit: cover;
}
.nav-logo-text {
    font-family: var(--font-body);
}
.nav-links {
    display: flex;
    gap: 32px;
    margin-left: auto;
}
.nav-links a {
    font-size: 0.9rem;
    color: var(--text-2);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-1); }
.nav-download {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg-base);
    background: var(--accent);
    padding: 8px 20px;
    border-radius: 100px;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.nav-download:hover { background: var(--accent-bright); transform: translateY(-1px); }

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    margin-left: auto;
}
.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-1);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-burger.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-burger.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(24px);
    align-items: center;
    justify-content: center;
}
.mobile-overlay.open { display: flex; }
.mobile-overlay-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}
.mobile-overlay-inner a {
    font-size: 1.4rem;
    color: var(--text-2);
    font-weight: 500;
    transition: color 0.2s;
}
.mobile-overlay-inner a:hover { color: var(--text-1); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 100px;
    transition: all 0.25s var(--ease-out);
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    color: var(--bg-base);
    box-shadow: 0 2px 20px rgba(212, 168, 67, 0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(212, 168, 67, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-ghost {
    border: 1px solid var(--border-light);
    color: var(--text-2);
}
.btn-ghost:hover {
    border-color: var(--text-3);
    color: var(--text-1);
    background: rgba(255,255,255,0.03);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: glow-pulse 8s ease-in-out infinite alternate;
}
.hero-glow-b {
    position: absolute;
    top: 200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(86, 212, 176, 0.04) 0%, transparent 70%);
    pointer-events: none;
    animation: glow-pulse 10s ease-in-out 2s infinite alternate;
}
@keyframes glow-pulse {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}
.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hero-content { max-width: 720px; margin-bottom: 64px; }

/* Pill badge */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-2);
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    margin-bottom: 28px;
    background: rgba(255,255,255,0.02);
}
.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-mint);
    box-shadow: 0 0 8px var(--accent-mint);
    animation: dot-blink 2.5s ease infinite;
}
@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7.5vw, 5.2rem);
    line-height: 1.05;
    font-weight: 400;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}
.hero-title em {
    font-style: italic;
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 1.15rem;
    color: var(--text-2);
    line-height: 1.75;
    max-width: 600px;
    margin: 0 auto 36px;
}
.hero-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-3);
    font-family: var(--font-mono);
}
.dot { opacity: 0.4; }

/* ============================================================
   WINDOW MOCKUPS
   ============================================================ */
.hero-window {
    width: 100%;
    max-width: 820px;
    perspective: 1200px;
}
.win {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.15),
        0 20px 60px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.03) inset;
}
.win-sm {
    border-radius: var(--radius-md);
}

/* Chrome (title bar) */
.win-chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.win-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.win-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.d-red { background: #ff5f57; }
.d-yel { background: #febc2e; }
.d-grn { background: #28c840; }

.win-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
}
.win-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-3);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background 0.15s;
}
.win-tab.active {
    background: var(--bg-surface);
    color: var(--text-1);
}
.win-tab-x {
    font-size: 0.9rem;
    opacity: 0.4;
    line-height: 1;
}
.win-tab-dirty {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.win-tab-add {
    padding: 4px 10px;
    font-size: 0.85rem;
    color: var(--text-3);
    cursor: default;
}
.win-title {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-3);
    flex: 1;
    text-align: center;
}
.win-toolbar {
    display: flex;
    gap: 2px;
    margin-left: auto;
}
.tb-btn {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-3);
    cursor: default;
}
.tb-btn.active {
    background: var(--bg-elevated);
    color: var(--text-2);
}

/* Body */
.win-body {
    display: flex;
    min-height: 300px;
    position: relative;
}
.win-sm .win-body {
    min-height: 240px;
}
.gutter {
    display: flex;
    flex-direction: column;
    padding: 14px 0;
    min-width: 44px;
    text-align: right;
    border-right: 1px solid var(--border);
    background: rgba(0,0,0,0.12);
    user-select: none;
}
.gutter span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.7;
    padding: 0 10px;
    color: var(--text-3);
}

/* Code */
.code {
    flex: 1;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    color: var(--text-2);
    tab-size: 4;
}
.code s { text-decoration: none; }
.kw { color: #c586c0; }
.tp { color: #4ec9b0; }
.fn { color: #dcdcaa; }
.st { color: #ce9178; }
.cm { color: #6a9955; font-style: italic; }
.nu { color: #b5cea8; }
.pm { color: #9cdcfe; }

/* Markdown code */
.code-md .md-h { color: #d4a843; font-weight: 600; }
.code-md .md-h2 { color: #d4a843; }
.code-md .md-b { color: #f0c456; font-weight: 600; }
.code-md .md-i { color: #ce9178; font-style: italic; }
.code-md .md-li { color: #4ec9b0; }
.code-md .md-bq { color: #6a9955; }

/* Status bar */
.win-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-3);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.win-status-l, .win-status-r {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Split view */
.win-split-view {
    display: flex;
}
.split-left {
    flex: 1;
    overflow: auto;
}
.split-left .code {
    min-height: 100%;
    font-size: 0.72rem;
}
.split-divider {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
}
.split-right {
    flex: 1;
    padding: 16px 20px;
    overflow: auto;
}

/* Markdown preview */
.md-preview {
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-2);
}
.md-preview h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-1);
    margin-bottom: 8px;
    font-weight: 400;
}
.md-preview h5 {
    font-size: 0.95rem;
    color: var(--text-1);
    margin: 12px 0 6px;
    font-weight: 600;
}
.md-preview p { margin-bottom: 8px; }
.md-preview strong { color: var(--text-1); font-weight: 600; }
.md-preview em { color: var(--accent); font-style: italic; }
.md-preview ul { padding-left: 18px; margin-bottom: 10px; }
.md-preview li {
    list-style: disc;
    color: var(--text-2);
    margin-bottom: 3px;
}
.md-preview li::marker { color: var(--accent-mint); }
.md-preview blockquote {
    border-left: 3px solid var(--accent-dim);
    padding: 6px 14px;
    color: var(--text-3);
    font-style: italic;
    margin-top: 8px;
    background: rgba(212, 168, 67, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* CSV Table */
.csv-table-wrap {
    display: block;
    overflow: auto;
    padding: 0;
}
.csv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    font-family: var(--font-body);
}
.csv-table th {
    text-align: left;
    padding: 8px 14px;
    background: var(--bg-card);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.csv-table td {
    padding: 8px 14px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.csv-table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.015);
}
.csv-table tbody tr:hover td {
    background: rgba(212, 168, 67, 0.04);
}
.csv-active { color: var(--accent-mint); }
.csv-away { color: var(--accent); }

/* Terminal */
.win-term .win-body {
    background: #0c0c10;
}
.term-body {
    display: block;
    padding: 14px 18px;
    flex: 1;
}
.term-output {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    line-height: 1.65;
    color: var(--text-2);
    white-space: pre;
}
.t-prompt { color: #56d4b0; font-weight: 600; }
.t-path { color: #6ba3f7; }
.t-arrow { color: var(--text-3); }
.t-dir { color: #6ba3f7; font-weight: 500; }
.t-ok { color: #28c840; font-weight: 600; }
.t-cursor {
    animation: cursor-blink 1s step-end infinite;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-section {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-surface);
}
.marquee-track {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-content {
    display: flex;
    gap: 36px;
    align-items: center;
    animation: marquee 40s linear infinite;
    width: max-content;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-item {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-3);
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.3s;
}
.marquee-item:hover { color: var(--accent); }
.marquee-sep { color: var(--text-3); opacity: 0.2; }

/* ============================================================
   STATS
   ============================================================ */
.stats {
    padding: 80px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat {
    padding: 32px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.stat:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}
.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 8px;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-2);
    font-weight: 500;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features {
    padding: 120px 0;
}
.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feat {
    padding: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.feat:hover {
    border-color: rgba(212, 168, 67, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(212, 168, 67, 0.08) inset;
}
.feat.wide {
    grid-column: span 2;
}
.feat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--accent);
}
.feat h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-1);
}
.feat p {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.65;
}
.feat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}
.feat-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
    color: var(--text-3);
    transition: border-color 0.2s, color 0.2s;
}
.feat-tags span:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* ============================================================
   SHOWCASE SECTIONS
   ============================================================ */
.showcase {
    padding: 120px 0;
}
.showcase-alt {
    background: var(--bg-surface);
}
.showcase-split {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 64px;
    align-items: center;
}
.showcase-split.reverse {
    grid-template-columns: 1.15fr 1fr;
}
.showcase-split.reverse .showcase-text {
    order: 2;
}
.showcase-split.reverse .showcase-visual {
    order: 1;
}
.showcase-text h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    line-height: 1.12;
    margin-bottom: 20px;
}
.showcase-text h2 em {
    font-style: italic;
    color: var(--accent);
}
.showcase-text p {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 24px;
}
.showcase-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.showcase-list li {
    font-size: 0.92rem;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 10px;
}
.showcase-list li::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}
.showcase-list li code {
    font-size: 0.82rem;
    padding: 1px 6px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    color: var(--accent-mint);
    border: 1px solid var(--border);
}

/* ============================================================
   THEMES
   ============================================================ */
.themes {
    padding: 120px 0;
}
.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.theme-card {
    text-align: center;
}
.theme-preview {
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.theme-card:hover .theme-preview {
    transform: translateY(-4px);
    border-color: var(--border-light);
}
.tp-bar {
    height: 8px;
    border-radius: 4px;
    margin-bottom: 14px;
    opacity: 0.6;
}
.tp-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tp-lines span {
    display: block;
    height: 6px;
    border-radius: 3px;
}
.tp-kw { width: 35%; }
.tp-txt { width: 65%; }
.tp-fn { width: 50%; }
.tp-st { width: 55%; }
.tp-cm { width: 40%; }
.tp-tp { width: 45%; }

/* Default dark */
.tp-default { background: #1e1e2e; }
.tp-default .tp-bar { background: #313244; }
.tp-default .tp-kw { background: #c586c0; }
.tp-default .tp-txt { background: #569cd6; }
.tp-default .tp-fn { background: #dcdcaa; }
.tp-default .tp-st { background: #ce9178; }
.tp-default .tp-cm { background: #6a9955; }
.tp-default .tp-tp { background: #4ec9b0; }

/* Lavender */
.tp-lavender { background: #1a1529; }
.tp-lavender .tp-bar { background: #2d2640; }
.tp-lavender .tp-kw { background: #b48ead; }
.tp-lavender .tp-txt { background: #81a1c1; }
.tp-lavender .tp-fn { background: #ebcb8b; }
.tp-lavender .tp-st { background: #a3be8c; }
.tp-lavender .tp-cm { background: #616e88; }
.tp-lavender .tp-tp { background: #88c0d0; }

/* Olive / Monokai */
.tp-olive { background: #272822; }
.tp-olive .tp-bar { background: #3e3d32; }
.tp-olive .tp-kw { background: #f92672; }
.tp-olive .tp-txt { background: #66d9ef; }
.tp-olive .tp-fn { background: #a6e22e; }
.tp-olive .tp-st { background: #e6db74; }
.tp-olive .tp-cm { background: #75715e; }
.tp-olive .tp-tp { background: #fd971f; }

/* Brown / Kimbie */
.tp-brown { background: #221a0f; }
.tp-brown .tp-bar { background: #362712; }
.tp-brown .tp-kw { background: #d3af86; }
.tp-brown .tp-txt { background: #dc3958; }
.tp-brown .tp-fn { background: #889b4a; }
.tp-brown .tp-st { background: #f79a32; }
.tp-brown .tp-cm { background: #a57a4c; }
.tp-brown .tp-tp { background: #7e602c; }

/* Soft Teal / Solarized */
.tp-teal { background: #002b36; }
.tp-teal .tp-bar { background: #073642; }
.tp-teal .tp-kw { background: #859900; }
.tp-teal .tp-txt { background: #268bd2; }
.tp-teal .tp-fn { background: #b58900; }
.tp-teal .tp-st { background: #2aa198; }
.tp-teal .tp-cm { background: #586e75; }
.tp-teal .tp-tp { background: #6c71c4; }

/* Abyss */
.tp-abyss { background: #000c18; }
.tp-abyss .tp-bar { background: #0d1926; }
.tp-abyss .tp-kw { background: #569cd6; }
.tp-abyss .tp-txt { background: #6796e6; }
.tp-abyss .tp-fn { background: #dcdcaa; }
.tp-abyss .tp-st { background: #ce9178; }
.tp-abyss .tp-cm { background: #384887; }
.tp-abyss .tp-tp { background: #4ec9b0; }

.theme-name {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-3);
    font-weight: 500;
}

/* ============================================================
   APPLE INTELLIGENCE
   ============================================================ */
.intelligence {
    padding: 120px 0;
    background: var(--bg-surface);
}
.ai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ai-card {
    padding: 36px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.ai-card:hover {
    border-color: rgba(86, 212, 176, 0.2);
    transform: translateY(-4px);
}
.ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--accent-mint-dim);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--accent-mint);
}
.ai-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-1);
}
.ai-card p {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.65;
}

/* ============================================================
   USE CASES
   ============================================================ */
.use-cases {
    padding: 120px 0;
}
.uc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.uc-card {
    padding: 32px 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.uc-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}
.uc-num {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent-dim);
    margin-bottom: 16px;
    font-style: italic;
}
.uc-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-1);
}
.uc-card p {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.65;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
    position: relative;
    padding: 140px 0;
    text-align: center;
    overflow: hidden;
}
.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 20px;
}
.cta-content h2 em {
    font-style: italic;
    color: var(--accent);
}
.cta-content > p {
    font-size: 1.1rem;
    color: var(--text-2);
    margin-bottom: 36px;
}
.cta-btns {
    margin-bottom: 16px;
}
.cta-note {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-copy {
    font-size: 0.82rem;
    color: var(--text-3);
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    font-size: 0.82rem;
    color: var(--text-3);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-2); }

.footer-partner-link {
    display: inline-flex;
    align-items: center;
}

.footer-partner-logo {
    height: 24px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-partner-link:hover .footer-partner-logo {
    opacity: 1;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children of feature grids */
.feat-grid [data-reveal],
.theme-grid [data-reveal],
.ai-grid [data-reveal],
.uc-grid [data-reveal] {
    transition-delay: var(--reveal-delay, 0s);
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1024px) {
    .feat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .feat.wide {
        grid-column: span 2;
    }
    .showcase-split,
    .showcase-split.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .showcase-split.reverse .showcase-text { order: 1; }
    .showcase-split.reverse .showcase-visual { order: 2; }
    .uc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 640px) {
    .nav-links, .nav-download { display: none; }
    .nav-burger { display: flex; }

    .hero { padding: 120px 0 60px; }
    .hero-title {
        font-size: clamp(2.4rem, 10vw, 3.2rem);
    }
    .hero-sub { font-size: 1rem; }
    .hero-btns { flex-direction: column; align-items: center; }
    .hero-meta { flex-wrap: wrap; justify-content: center; }

    .section-head { margin-bottom: 40px; }
    .section-head h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); }

    .feat-grid {
        grid-template-columns: 1fr;
    }
    .feat.wide { grid-column: span 1; }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-grid {
        grid-template-columns: 1fr;
    }
    .uc-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .stat { padding: 24px 12px; }
    .stat-num { font-size: 2.4rem; }

    .showcase { padding: 80px 0; }
    .features { padding: 80px 0; }
    .themes { padding: 80px 0; }
    .intelligence { padding: 80px 0; }
    .use-cases { padding: 80px 0; }
    .cta { padding: 100px 0; }

    .win-tabs { display: none; }
    .win-toolbar { display: none; }
    .gutter { min-width: 34px; }
    .gutter span { font-size: 0.6rem; padding: 0 6px; }
    .code { font-size: 0.68rem; padding: 10px 12px; }

    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Very small */
@media (max-width: 380px) {
    .hero-title { font-size: 2rem; }
    .theme-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Pricing Page
   ============================================================ */

.pricing-hero {
    padding: 140px 0 80px;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 80px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    position: relative;
    text-align: center;
}

.pricing-featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(212, 168, 67, 0.08);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.pricing-plan {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 8px;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 20px 0 8px;
}

.pricing-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-2);
}

.pricing-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.pricing-period {
    font-size: 0.9rem;
    color: var(--text-2);
}

.pricing-desc {
    color: var(--text-2);
    margin-bottom: 24px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 28px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-1);
}

.pricing-features svg {
    color: var(--accent-mint);
    flex-shrink: 0;
}

.pricing-buy {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 14px 0;
}

.pricing-note {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 12px;
}

.pricing-message {
    max-width: 520px;
    margin: 0 auto 32px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.95rem;
}

.pricing-success {
    background: rgba(86, 212, 176, 0.1);
    border: 1px solid rgba(86, 212, 176, 0.3);
    color: var(--accent-mint);
}

.pricing-canceled {
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid rgba(212, 168, 67, 0.3);
    color: var(--accent);
}

/* FAQ */
.pricing-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-faq h3 {
    font-size: 1.5rem;
    margin-bottom: 32px;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.faq-item h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .faq-grid { grid-template-columns: 1fr; }
    .pricing-card { padding: 32px 24px; }
}

/* ============================================================
   Auth Pages (Login, Register, Forgot)
   ============================================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-1);
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-2);
    margin-bottom: 28px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
}

.form-group input::placeholder {
    color: var(--text-3);
}

.auth-error {
    background: rgba(220, 60, 60, 0.1);
    border: 1px solid rgba(220, 60, 60, 0.3);
    color: #dc3c3c;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
}

.auth-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.auth-links a {
    font-size: 0.85rem;
    color: var(--accent);
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--accent-bright);
}

/* ============================================================
   Portal & Admin Common
   ============================================================ */

.portal-main {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.portal-header {
    margin-bottom: 40px;
}

.portal-header h1 {
    font-size: 2rem;
    font-weight: 600;
}

.portal-greeting {
    color: var(--text-2);
    margin-top: 4px;
}

.portal-section {
    margin-bottom: 48px;
}

.portal-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.portal-loading {
    color: var(--text-3);
    padding: 40px 0;
    text-align: center;
}

.portal-empty {
    text-align: center;
    padding: 48px 0;
    color: var(--text-2);
}

.portal-empty .btn {
    margin-top: 16px;
}

.portal-empty-text {
    color: var(--text-3);
    padding: 20px 0;
}

.portal-error {
    color: #dc3c3c;
    padding: 16px;
    background: rgba(220, 60, 60, 0.1);
    border-radius: var(--radius-sm);
}

.portal-download {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
}

.portal-download h2 {
    margin-bottom: 8px;
}

.portal-download p {
    color: var(--text-2);
    margin-bottom: 16px;
}

/* License Cards */
.license-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.license-plan {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 12px;
    margin-right: 8px;
}

.license-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
}

.license-status-active {
    background: rgba(86, 212, 176, 0.12);
    color: var(--accent-mint);
}

.license-status-suspended {
    background: rgba(212, 168, 67, 0.12);
    color: var(--accent);
}

.license-status-revoked,
.license-status-expired {
    background: rgba(220, 60, 60, 0.12);
    color: #dc3c3c;
}

.license-copy {
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(212, 168, 67, 0.2);
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.license-copy:hover {
    background: rgba(212, 168, 67, 0.25);
}

.license-key {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    text-align: center;
}

.license-meta {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--text-3);
}

.license-devices {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.license-devices h4 {
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--text-2);
}

.device-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.device-row:last-child {
    border-bottom: none;
}

.device-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-3);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    border-bottom: 2px solid var(--border);
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-1);
}

.data-table code {
    font-size: 0.8rem;
    color: var(--accent);
}

.order-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.order-status-completed {
    background: rgba(86, 212, 176, 0.12);
    color: var(--accent-mint);
}

.order-status-refunded {
    background: rgba(220, 60, 60, 0.12);
    color: #dc3c3c;
}

.order-status-pending {
    background: rgba(212, 168, 67, 0.12);
    color: var(--accent);
}

/* Small Buttons */
.btn-small {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-1);
    transition: background 0.2s;
}

.btn-small:hover {
    background: var(--bg-hover);
}

.btn-small.btn-danger {
    border-color: rgba(220, 60, 60, 0.3);
    color: #dc3c3c;
}

.btn-small.btn-danger:hover {
    background: rgba(220, 60, 60, 0.1);
}

.btn-small.btn-primary {
    border-color: rgba(86, 212, 176, 0.3);
    color: var(--accent-mint);
}

/* ============================================================
   User Dashboard
   ============================================================ */

/* Welcome Banner */
.dash-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 32px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.dash-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-bright), var(--accent-mint));
}

.dash-welcome h1 {
    font-size: 1.6rem;
    font-weight: 600;
}

.dash-welcome-sub {
    color: var(--text-3);
    font-size: 0.9rem;
    margin-top: 2px;
}

.dash-download-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.85rem;
}

/* Stats Row */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 40px;
}

.dash-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-1);
}

.dash-stat-active {
    color: var(--accent-mint) !important;
}

.dash-stat-inactive {
    color: var(--accent) !important;
}

/* Sections */
.dash-section {
    margin-bottom: 48px;
}

.dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dash-section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* License Key Display */
.license-key-display {
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    text-align: center;
}

.license-key-display code {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1.5px;
    user-select: all;
}

.license-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.license-actions {
    display: flex;
    gap: 8px;
}

.license-copy-success {
    color: var(--accent-mint) !important;
    border-color: rgba(86, 212, 176, 0.3) !important;
}

/* License Meta (improved) */
.license-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.license-meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
}

.license-meta-value {
    font-size: 0.85rem;
    color: var(--text-2);
    font-weight: 500;
}

/* Device Info */
.device-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
}

.device-info svg {
    flex-shrink: 0;
}

/* Skeleton Loading */
.dash-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-skeleton-card {
    height: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.dash-skeleton-row {
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.dash-skeleton-row:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty State */
.dash-empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.dash-empty-state svg {
    margin: 0 auto 16px;
    opacity: 0.5;
}

.dash-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.dash-empty-state p {
    color: var(--text-3);
    font-size: 0.9rem;
    max-width: 320px;
    margin: 0 auto;
}

.dash-empty-text {
    color: var(--text-3);
    padding: 24px 0;
    text-align: center;
}

/* Table Wrap */
.dash-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-table-wrap .data-table td:last-child,
.dash-table-wrap .data-table th:last-child {
    text-align: right;
}

/* Getting Started */
.dash-help {
    margin-top: 8px;
}

.dash-help h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.dash-help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dash-help-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.dash-help-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.dash-help-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.dash-help-card p {
    font-size: 0.8rem;
    color: var(--text-3);
    line-height: 1.5;
}

/* ============================================================
   Admin Dashboard
   ============================================================ */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-top: 4px;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    height: 300px;
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.admin-search {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.admin-search:focus {
    border-color: var(--accent);
}

.admin-search::placeholder {
    color: var(--text-3);
}

.admin-select {
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-2);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.user-role {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.user-role-admin {
    background: rgba(212, 168, 67, 0.12);
    color: var(--accent);
}

.user-role-customer {
    background: rgba(86, 212, 176, 0.08);
    color: var(--text-2);
}

/* Generate Result */
.generate-result {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    text-align: center;
}

.generate-result h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--accent-mint);
}

.generate-result .license-key {
    margin-bottom: 16px;
}

/* Nav active state */
.nav-links a.active {
    color: var(--accent);
}

@media (max-width: 1024px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-help-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .admin-stats { grid-template-columns: 1fr; }
    .admin-toolbar { flex-direction: column; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-welcome { flex-direction: column; gap: 16px; text-align: center; padding: 24px; }
    .dash-download-btn { width: 100%; justify-content: center; }
    .license-meta { flex-direction: column; gap: 8px; }
    .license-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .device-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .auth-card { padding: 32px 24px; }
    .auth-links { flex-direction: column; text-align: center; }
}
