/* ─── CUSTOM VARIABLES & THEME ─── */
:root {
    --bg-dark: #0a0b14;
    --card-bg: rgba(20, 22, 45, 0.65);
    --card-border: rgba(124, 58, 237, 0.15);
    --card-border-glow: rgba(99, 102, 241, 0.25);
    
    --primary: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.5);
    --primary-hover: #6d28d9;
    
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    
    --error: #f43f5e;
    --error-glow: rgba(244, 63, 94, 0.2);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --sidebar-width: 260px;
    --mobile-nav-height: 64px;
    --bottom-nav-height: 60px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
    
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ─── BASE RESET & SETUP ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ─── BACKGROUND EFFECTS (NEON GLOW) ─── */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.bg-glow-1 {
    top: -200px;
    left: -100px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.bg-glow-2 {
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

/* ─── APP CONTAINER LAYOUT ─── */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ─── DESKTOP SIDEBAR ─── */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(13, 14, 28, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-logo svg {
    width: 24px;
    height: 24px;
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.brand-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-item:hover svg {
    transform: translateX(2px);
}

.nav-item.active {
    color: white;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-left: 3px solid var(--primary);
    box-shadow: inset 0 0 10px rgba(124, 58, 237, 0.05);
}

.nav-item.active svg {
    color: var(--primary);
}

.badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-accent {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 18px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: rgba(124, 58, 237, 0.2);
    color: var(--accent);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── MOBILE HEADER & NAVIGATION ─── */
.mobile-header {
    display: none; /* Desktop default */
}

.bottom-nav {
    display: none; /* Desktop default */
}

.mobile-nav-overlay {
    display: none;
}

.mobile-sidebar {
    display: none;
}

/* ─── MAIN CONTENT AREA ─── */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    max-width: 1400px;
    min-height: 100vh;
    padding-bottom: 60px;
}

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

.welcome-text h1 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.system-quick-status {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-online {
    background: rgba(16, 185, 129, 0.06);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.15);
}

.system-latency {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* ─── GENERAL CARD STYLING ─── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.card:hover {
    border-color: var(--card-border-glow);
    box-shadow: 0 10px 24px -2px rgba(124, 58, 237, 0.05), var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ─── STATS GRID ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

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

.stat-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.stat-icon-bg {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-bg.primary { background: rgba(124, 58, 237, 0.15); color: #c084fc; }
.stat-icon-bg.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon-bg.warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-icon-bg.info { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }

.stat-icon-bg svg {
    width: 18px;
    height: 18px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.stat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.trend {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
}

.trend-up { color: var(--success); }
.trend-up svg { width: 12px; height: 12px; }

.meta-label {
    color: var(--text-muted);
}

.sparkline-container {
    height: 30px;
    margin-top: auto;
    width: 100%;
}

.sparkline {
    width: 100%;
    height: 100%;
}

/* ─── INTERACTIVE DASHBOARD GRID ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.grid-span-2 {
    grid-column: span 2;
}

/* ─── INTERACTIVE PLAYGROUND ─── */
.interactive-playground {
    display: flex;
    flex-direction: column;
}

.strategy-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    margin-top: 4px;
}

.strategy-selector label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.strategy-selector select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.playground-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.input-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-panel textarea {
    width: 100%;
    height: 90px;
    background: rgba(10, 11, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-panel textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

/* ─── ROUTER SIMULATOR VISUALIZATION PANEL ─── */
.visualization-panel {
    background: rgba(10, 11, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vis-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    min-height: 100px;
}

.vis-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 80px;
    position: relative;
    z-index: 10;
}

.node-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.vis-node.active .node-icon {
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
    background: rgba(124, 58, 237, 0.1);
}

.vis-node.success .node-icon {
    border-color: var(--success);
    box-shadow: 0 0 14px var(--success-glow);
    background: rgba(16, 185, 129, 0.1);
}

.vis-node.error .node-icon {
    border-color: var(--error);
    box-shadow: 0 0 14px var(--error-glow);
    background: rgba(244, 63, 94, 0.1);
}

.node-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    color: var(--text-main);
    white-space: nowrap;
}

.node-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

.flow-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 -10px;
    position: relative;
}

.flow-line.active {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.pulse-particle {
    display: none;
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c084fc;
    box-shadow: 0 0 8px #c084fc;
    animation: flowAcross 1.5s infinite linear;
}

@keyframes flowAcross {
    0% { left: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.vis-targets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.target-node {
    width: 140px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

.target-node .node-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.target-node.active {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.target-node.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.target-node.error {
    border-color: var(--error);
    background: rgba(244, 63, 94, 0.05);
    opacity: 0.6;
}

.node-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    right: 6px;
}
.node-status-dot.online { background-color: var(--success); box-shadow: 0 0 6px var(--success); }
.node-status-dot.offline { background-color: var(--error); box-shadow: 0 0 6px var(--error); }

/* Compression info bar */
.compression-bar-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    animation: fadeIn 0.3s ease;
}

.compression-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.compression-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.compression-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #a7f3d0);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.compression-meta-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Terminal Console */
.simulation-console {
    background: #06070c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.console-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-actions {
    display: flex;
    gap: 4px;
}

.circle-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.circle-btn.red { background-color: var(--error); }
.circle-btn.yellow { background-color: var(--warning); }
.circle-btn.green { background-color: var(--success); }

.console-body {
    padding: 12px;
    height: 120px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    animation: slideUp 0.15s ease-out;
}

.log-entry.system { color: #a5b4fc; }
.log-entry.info { color: #e2e8f0; }
.log-entry.warn { color: #fcd34d; font-weight: 500; }
.log-entry.success { color: #34d399; }
.log-entry.error { color: #f87171; font-weight: 500; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Response panel */
.response-panel {
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
    animation: fadeIn 0.3s ease;
}

.response-panel h4 {
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 6px;
}

.response-text {
    line-height: 1.5;
    color: #e2e8f0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── PROVIDER TABLE ─── */
.provider-list-card {
    display: flex;
    flex-direction: column;
}

.provider-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-grow: 1;
}

.provider-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.provider-table th {
    color: var(--text-muted);
    font-weight: 500;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.provider-table td {
    padding: 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    vertical-align: middle;
}

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

.provider-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.provider-logo {
    font-size: 0.8rem;
    filter: drop-shadow(0 0 4px currentColor);
}

.openai-color { color: #10a37f; }
.anthropic-color { color: #f28c28; }
.gemini-color { color: #1a73e8; }
.groq-color { color: #f59e0b; }
.deepseek-color { color: #3b82f6; }
.cohere-color { color: #8c52ff; }

.provider-name-container div {
    display: flex;
    flex-direction: column;
}

.provider-name-container strong {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.provider-name-container span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge-online {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.status-badge-degraded {
    background: rgba(244, 63, 94, 0.1);
    color: #f87171;
}

.latency-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100px;
}

.latency-number {
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.latency-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.latency-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ─── SWITCH BUTTONS ─── */
.rules-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.rule-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.rule-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Custom Checkbox Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ─── SERVER INFO CARD ─── */
.config-overview-card {
    display: flex;
    flex-direction: column;
}

.server-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
}

.info-val {
    color: white;
    font-weight: 500;
}

.val-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.text-success { color: var(--success); }
.text-accent { color: #c084fc; }

.quick-actions-box {
    margin-top: auto;
}

/* ─── LOGS VIEWER ─── */
.logs-viewer-card {
    grid-column: span 3;
}

.log-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logs-container-box {
    background: #06070c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    height: 200px;
    overflow-y: auto;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.logs-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    color: #a5b4fc;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ─── TOAST NOTIFICATION ─── */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(13, 14, 28, 0.95);
    border: 1px solid var(--primary);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 0.875rem;
    color: white;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ──────────────────────────────────────────────────────── */
/* ─── RESPONSIVE MEDIA QUERIES ─── */
/* ──────────────────────────────────────────────────────── */

/* TABLETS AND SMALL DESKTOPS */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }
    
    .brand-info, .sidebar-footer .user-details, .nav-item span, .badge {
        display: none; /* Icon-only sidebar */
    }
    
    .brand {
        justify-content: center;
        margin-bottom: 30px;
    }
    
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 30px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-span-2 {
        grid-column: span 1;
    }
    
    .logs-viewer-card {
        grid-column: span 1;
    }
}

/* SMARTPHONES AND HANDHELD DEVICES (max-width: 768px) */
@media (max-width: 768px) {
    /* Hide desktop-specific elements */
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: calc(var(--mobile-nav-height) + 15px);
        padding-bottom: calc(var(--bottom-nav-height) + 30px);
    }
    
    /* Show mobile-specific header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: var(--mobile-nav-height);
        background: rgba(10, 11, 20, 0.85);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 0 20px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 500;
    }
    
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-brand .brand-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    
    .mobile-brand .brand-logo svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-brand .brand-name {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.1rem;
        background: linear-gradient(90deg, #fff 0%, #a5b4fc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .hamburger-menu {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.02);
        color: var(--text-main);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        outline: none;
    }
    
    .hamburger-menu svg {
        width: 20px;
        height: 20px;
    }
    
    /* Layout styling adaptations */
    .content-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .welcome-text h1 {
        font-size: 1.5rem;
    }
    
    .system-quick-status {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr; /* Stack statistics vertically */
        gap: 16px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 18px;
        border-radius: 12px;
    }
    
    /* Playground specific mobile tuning */
    .playground-body {
        gap: 14px;
    }
    
    .input-panel textarea {
        height: 100px;
    }
    
    .vis-flow {
        flex-direction: column;
        gap: 14px;
        align-items: center;
        padding: 15px 0;
    }
    
    .flow-line {
        width: 2px;
        height: 20px;
        margin: -5px 0;
    }
    
    .flow-line .pulse-particle {
        width: 6px;
        height: 6px;
        top: 0;
        left: -2px;
        animation: flowDown 1s infinite linear;
    }
    
    @keyframes flowDown {
        0% { top: 0%; opacity: 0; }
        10% { opacity: 1; }
        90% { opacity: 1; }
        100% { top: 100%; opacity: 0; }
    }
    
    .vis-targets {
        flex-direction: row;
        gap: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .target-node {
        width: calc(50% - 5px);
        font-size: 0.75rem;
        padding: 8px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .target-node .node-icon {
        width: 24px;
        height: 24px;
    }
    
    .target-node div {
        align-items: center;
    }
    
    /* Bottom Navigation Bar for Mobile */
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: var(--bottom-nav-height);
        background: rgba(10, 11, 20, 0.9);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 500;
        flex-grow: 1;
        padding: 8px 0;
        transition: color 0.2s ease;
    }
    
    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
    }
    
    .bottom-nav-item.active {
        color: var(--primary);
    }
    
    /* Mobile Sidebar Menu Overlay drawer */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 900;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .mobile-nav-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }
    
    .mobile-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: rgba(13, 14, 28, 0.98);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        padding: 20px;
        transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .mobile-sidebar.show {
        right: 0;
    }
    
    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .mobile-sidebar-title {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.1rem;
        color: white;
    }
    
    .close-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .close-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .mobile-nav-menu {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex-grow: 1;
    }
    
    .mobile-nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        color: var(--text-muted);
        text-decoration: none;
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 500;
    }
    
    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-nav-item.active {
        color: white;
        background: rgba(124, 58, 237, 0.1);
        border-left: 3px solid var(--primary);
    }
    
    .mobile-sidebar-footer {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 18px;
    }
    
    .toast {
        left: 20px;
        right: 20px;
        text-align: center;
    }
}
