/* ============================================================
   Underground Checker v3.0 — Filament-inspired Admin Dashboard
   ============================================================ */

:root {
    /* Base */
    --bg-body: #0b1120;
    --bg-sidebar: #0f172a;
    --bg-panel: #111827;
    --bg-card: #1e293b;
    --bg-hover: #1f2937;
    --bg-input: #0f172a;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Accent */
    --accent-primary: #10b981;
    --accent-primary-dark: #059669;
    --accent-primary-light: #34d399;
    --accent-danger: #f43f5e;
    --accent-danger-dark: #e11d48;
    --accent-warning: #f59e0b;
    --accent-info: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;

    /* Border */
    --border-color: #1e293b;
    --border-hover: #334155;
    --border-focus: #10b981;

    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -4px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(16,185,129,0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Font */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Transition */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
    font-family: var(--font-sans);
    font-size: 13px;
    background: var(--bg-body);
    color: var(--text-primary);
    overflow: hidden;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    z-index: 50;
}
.sidebar.collapsed { width: 64px; min-width: 64px; }
.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-footer { display: none; }

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
}
.sidebar-logo .logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}
.nav-group { margin-bottom: 8px; }
.nav-group-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    padding: 8px 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    font-family: inherit;
    text-align: left;
}
.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.nav-item.active {
    background: rgba(16,185,129,0.1);
    color: var(--accent-primary);
    font-weight: 600;
}
.nav-item .nav-icon {
    width: 20px; text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}
.nav-item .nav-label { flex: 1; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}
.channel-card {
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(6,182,212,0.1));
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    text-decoration: none;
    transition: var(--transition);
}
.channel-card:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}
.channel-card .ch-icon {
    font-size: 18px;
}

/* Collapse toggle */
.sidebar-toggle {
    width: 24px; height: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: var(--transition);
    position: absolute;
    right: -12px;
    top: 18px;
    z-index: 60;
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============================================================
   MAIN AREA
   ============================================================ */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: 60px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 16px;
}
.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.topbar-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}
.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
}
.stat-pill .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stat-pill.live { color: var(--accent-primary); border-color: rgba(16,185,129,0.25); }
.stat-pill.live .dot { background: var(--accent-primary); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.stat-pill.ccn { color: var(--accent-cyan); border-color: rgba(6,182,212,0.25); }
.stat-pill.ccn .dot { background: var(--accent-cyan); }
.stat-pill.die { color: var(--accent-danger); border-color: rgba(244,63,94,0.25); }
.stat-pill.die .dot { background: var(--accent-danger); }
.stat-pill.total { color: var(--text-secondary); border-color: var(--border-color); }
.stat-pill.total .dot { background: var(--text-muted); }

/* ============================================================
   CONTENT
   ============================================================ */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Page sections */
.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px);} to { opacity:1; transform: none;} }

/* Config bar */
.config-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}
.form-field input, .form-field select, .form-field textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    min-width: 120px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-dim); }
.form-field.small input, .form-field.small select { min-width: 70px; width: 80px; padding: 7px 8px; }
.form-field.medium input, .form-field.medium select { min-width: 140px; width: 160px; }
.form-field.large input, .form-field.large select { min-width: 260px; width: 300px; }

/* Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border-hover);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    min-width: 120px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-body);
    box-shadow: 0 0 8px rgba(16,185,129,0.4);
}
input[type="range"]::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-body);
    box-shadow: 0 0 8px rgba(16,185,129,0.4);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    color: #fff;
    border-color: var(--accent-primary-dark);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-primary));
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}
.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger), var(--accent-danger-dark));
    color: #fff;
    border-color: var(--accent-danger-dark);
}
.btn-danger:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(244,63,94,0.3); }
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Split pane */
.split-pane {
    display: flex;
    gap: 16px;
    height: calc(100vh - 260px);
    min-height: 320px;
}
.split-left { width: 45%; display: flex; flex-direction: column; gap: 12px; }
.split-right { flex: 1; display: flex; flex-direction: column; gap: 12px; }

/* Card textarea */
.card-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.card-input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
}
.card-input-header h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.card-textarea {
    flex: 1;
    background: var(--bg-input);
    border: none;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    resize: none;
    outline: none;
}
.card-textarea::placeholder { color: var(--text-dim); }
.card-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
}
.card-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.card-actions { display: flex; gap: 8px; }

/* Terminal */
.terminal-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #020617;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}
.terminal-header h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.terminal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}
.terminal-line {
    display: flex;
    gap: 8px;
    align-items: baseline;
    animation: lineIn 0.15s ease;
}
@keyframes lineIn { from { opacity:0; transform: translateX(-4px);} to { opacity:1; transform: none;} }
.terminal-line .ts { color: #475569; font-size: 11px; flex-shrink: 0; }
.terminal-line .lvl {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.terminal-line .msg { color: var(--text-secondary); word-break: break-word; }
.terminal-line.info .lvl { background: rgba(59,130,246,0.15); color: var(--accent-info); }
.terminal-line.success .lvl { background: rgba(16,185,129,0.15); color: var(--accent-primary); }
.terminal-line.warning .lvl { background: rgba(245,158,11,0.15); color: var(--accent-warning); }
.terminal-line.error .lvl { background: rgba(244,63,94,0.15); color: var(--accent-danger); }
.terminal-line.system .lvl { background: rgba(139,92,246,0.15); color: var(--accent-purple); }

/* Results panel */
.results-wrapper {
    margin-top: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 420px;
}
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
    gap: 12px;
    flex-wrap: wrap;
}
.results-header h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-chips { display: flex; gap: 6px; }
.chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    color: var(--text-muted);
    transition: var(--transition);
}
.chip:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.chip.active { border-color: currentColor; color: var(--text-primary); }
.chip.all.active { background: rgba(148,163,184,0.1); border-color: var(--text-muted); }
.chip.live.active { background: rgba(16,185,129,0.1); border-color: var(--accent-primary); color: var(--accent-primary); }
.chip.ccn.active { background: rgba(6,182,212,0.1); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.chip.die.active { background: rgba(244,63,94,0.1); border-color: var(--accent-danger); color: var(--accent-danger); }

.results-table-container { overflow: auto; flex: 1; }
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.results-table th {
    position: sticky;
    top: 0;
    background: var(--bg-sidebar);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.results-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(30,41,59,0.5);
    color: var(--text-secondary);
    white-space: nowrap;
}
.results-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.results-table tbody tr.live td { color: var(--accent-primary); }
.results-table tbody tr.ccn td { color: var(--accent-cyan); }
.results-table tbody tr.die td { color: var(--accent-danger); }
.results-table .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-live { background: rgba(16,185,129,0.12); color: var(--accent-primary); }
.badge-ccn { background: rgba(6,182,212,0.12); color: var(--accent-cyan); }
.badge-die { background: rgba(244,63,94,0.12); color: var(--accent-danger); }

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
    font-size: 13px;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    pointer-events: auto;
    min-width: 240px;
    max-width: 360px;
}
.toast.success { border-left: 3px solid var(--accent-primary); }
.toast.error { border-left: 3px solid var(--accent-danger); }
.toast.warning { border-left: 3px solid var(--accent-warning); }
.toast.info { border-left: 3px solid var(--accent-info); }
@keyframes toastIn { from { opacity:0; transform: translateX(20px);} to { opacity:1; transform: none;} }
@keyframes toastOut { to { opacity:0; transform: translateX(20px); pointer-events: none;} }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.96);} to { opacity:1; transform: none;} }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 20px; cursor: pointer; line-height: 1;
    padding: 2px; border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 16px; overflow-y: auto; flex: 1; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--border-color);
}

/* Progress bar */
.progress-track {
    height: 6px;
    background: var(--bg-sidebar);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }

/* Proxy textarea */
.proxy-textarea {
    width: 100%;
    height: 200px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    resize: none;
    outline: none;
    transition: var(--transition);
    line-height: 1.6;
}
.proxy-textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }

/* BIN results */
.bin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.bin-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: var(--transition);
}
.bin-card:hover { border-color: var(--border-hover); }
.bin-card .bin-brand { font-weight: 700; color: var(--accent-cyan); }
.bin-card .bin-meta { color: var(--text-muted); font-size: 11px; margin-top: 4px; }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
}
.mobile-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

@media (max-width: 1024px) {
    .split-pane { flex-direction: column; height: auto; }
    .split-left, .split-right { width: 100%; height: 360px; }
    .config-bar { flex-direction: column; align-items: stretch; }
    .form-field input, .form-field select { width: 100% !important; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 200;
        transition: left 0.3s ease;
        box-shadow: none;
    }
    .sidebar.open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,0.6); }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active { display: block; }

    .topbar {
        padding: 0 12px;
        gap: 8px;
    }
    .topbar-title { font-size: 14px; }
    .topbar-stats {
        gap: 4px;
    }
    .stat-pill {
        padding: 4px 8px;
        font-size: 10px;
    }
    .stat-pill .dot { width: 6px; height: 6px; }

    .content { padding: 12px; }

    .config-bar {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .config-bar::-webkit-scrollbar { display: none; }
    .config-bar .form-field {
        flex-shrink: 0;
        min-width: 90px;
    }
    .config-bar .form-field.small input,
    .config-bar .form-field.small select { width: 60px !important; min-width: 60px; }
    .config-bar .form-field label { font-size: 9px; }

    .split-pane {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }
    .split-left, .split-right {
        width: 100%;
        height: 280px;
        min-height: 200px;
    }
    .card-input-wrapper, .terminal-wrapper {
        border-radius: var(--radius-md);
    }

    .results-wrapper {
        margin-top: 10px;
        max-height: 320px;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 10px;
    }
    .results-header h4 { font-size: 11px; }
    .filter-chips { flex-wrap: wrap; }
    .chip { padding: 3px 8px; font-size: 10px; }
    .results-table { font-size: 11px; }
    .results-table th, .results-table td { padding: 5px 6px; }
    .badge { padding: 1px 5px; font-size: 9px; }

    .btn { padding: 10px 14px; font-size: 14px; }
    .btn-sm { padding: 7px 10px; font-size: 13px; }

    .modal { max-width: 95vw; border-radius: var(--radius-md); }
    .export-textarea { height: 180px; }

    .terminal-body { font-size: 11px; padding: 8px; }
    .terminal-line .ts { font-size: 10px; }
    .terminal-line .lvl { font-size: 9px; padding: 0 3px; }

    .card-textarea { font-size: 11px; padding: 8px; }

    .sidebar-footer { display: none; }
    .sidebar-toggle { display: none; }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: var(--bg-sidebar);
        border-top: 1px solid var(--border-color);
        z-index: 100;
        justify-content: space-around;
        align-items: center;
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 10px;
        font-family: inherit;
        cursor: pointer;
        padding: 4px 8px;
        flex: 1;
    }
    .bottom-nav-item.active { color: var(--accent-primary); }
    .bottom-nav-item .bn-icon { font-size: 18px; }
    .main-area { padding-bottom: 56px; }
}

@media (max-width: 768px) and (orientation: landscape) {
    .split-left, .split-right { height: 200px; }
}

@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
}

/* Animations */
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1;} 50% { opacity: 0.6;} }

/* Export textarea */
.export-textarea {
    width: 100%;
    height: 240px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    resize: none;
    outline: none;
}
