/* =============================================================================
   ADMIN DASHBOARD - Design System
   Modern dark theme with racing-inspired accents
   ============================================================================= */

/* CSS Variables */
:root {
    /* Primary - Racing blue theme */
    --primary-400: #38BDF8;
    --primary-500: #0EA5E9;
    --primary-600: #0284C7;
    --primary-700: #0369A1;

    /* Semantic Colors */
    --success: #22C55E;
    --success-dim: rgba(34, 197, 94, 0.15);
    --warning: #F59E0B;
    --warning-dim: rgba(245, 158, 11, 0.15);
    --danger: #EF4444;
    --danger-dim: rgba(239, 68, 68, 0.15);
    --info: #3B82F6;

    /* Neutrals */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;
    --bg-input: #0F172A;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --border-light: #475569;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.2);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.app-header h1 .logo {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Main Content */
.app-main {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Footer */
.app-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-md) var(--space-xl);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.app-footer span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Navigation */
.app-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-left: var(--space-xl);
    flex: 1;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    max-width: fit-content;
}

.nav-link {
    color: var(--text-secondary);
    background: var(--bg-input);
    /* Button-like background */
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 20px;
    /* Increased padding */
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    /* Reserve space for border */
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.nav-link.active {
    color: white;
    background: var(--primary-600);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    font-weight: 600;
}

.nav-link.active:hover {
    background: var(--primary-500);
}

/* =============================================================================
   STATS GRID
   ============================================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.stat-card__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card__value.online {
    color: var(--success);
}

.stat-card__value.offline {
    color: var(--danger);
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.offline {
    background: var(--danger);
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* =============================================================================
   DATA TABLE
   ============================================================================= */

.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.table-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-input);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 500;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Styling */
.lobby-code {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    background: var(--bg-input);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
}

.player-count {
    font-weight: 500;
}

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-xl);
    font-style: italic;
}

/* State Badges */
.state-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.state-badge.Waiting,
.state-badge.waiting {
    background: var(--success-dim);
    color: var(--success);
}

.state-badge.InQueue,
.state-badge.in_queue {
    background: var(--warning-dim);
    color: var(--warning);
}

.state-badge.Starting,
.state-badge.starting {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.state-badge.InGame,
.state-badge.in_game {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn--secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn--secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn--ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn--sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Logout Button */
.logout-btn {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.logout-btn:hover {
    color: var(--danger);
    background: var(--danger-dim);
}

/* =============================================================================
   MODAL
   ============================================================================= */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.modal__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-400);
}

.modal__close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    line-height: 1;
}

.modal__close:hover {
    background: var(--danger-dim);
    color: var(--danger);
}

.modal__body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(85vh - 60px);
}

/* Modal Sections */
.modal-section {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section__header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card-hover);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-section__header:hover {
    background: var(--border);
}

.modal-section__content {
    padding: var(--space-md);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm) var(--space-lg);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-item__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.info-item__value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Player List */
.player-list {
    list-style: none;
}

.player-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.player-item:last-child {
    border-bottom: none;
}

.player-item__icon {
    width: 20px;
    text-align: center;
}

.player-item__name {
    flex: 1;
    font-weight: 500;
}

.player-item__status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.player-item__status.ready {
    color: var(--success);
}

/* JSON Display */
.json-display {
    background: #0a0a1a;
    color: #7fdbca;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
}

/* =============================================================================
   LOGIN PAGE
   ============================================================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.login-card h1 {
    text-align: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: var(--space-md);
    margin-top: var(--space-sm);
}

/* Alerts */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

.alert--error {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert--info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast--success {
    border-left: 3px solid var(--success);
}

.toast--error {
    border-left: 3px solid var(--danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================================================
   LOADING STATES
   ============================================================================= */

.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .app-header {
        padding: var(--space-md);
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .app-main {
        padding: var(--space-md);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-header {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: stretch;
    }

    .data-table th,
    .data-table td {
        padding: var(--space-sm);
        font-size: 0.8rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .app-footer {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .env-sections {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   DUAL-ENVIRONMENT SECTIONS
   ============================================================================= */

.env-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.env-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.env-section--prod {
    border-left: 4px solid var(--success);
}

.env-section--dev {
    border-left: 4px solid var(--warning);
}

.env-section__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.env-stats {
    display: flex;
    gap: var(--space-sm);
}

.stat-card--sm {
    padding: var(--space-sm) var(--space-md);
    flex: 1;
}

.stat-card--sm .stat-card__value {
    font-size: 1.25rem;
}

.stat-card--sm .stat-card__label {
    font-size: 0.65rem;
}

/* Last Update Bar */
.last-update-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Environment Badges in Lobby Table */
.env-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    min-width: 42px;
}

.env-badge.prod {
    background: var(--success);
    color: #000;
}

.env-badge.dev {
    background: var(--warning);
    color: #000;
}

/* Row highlighting by environment */
.env-row-prod {
    background: rgba(34, 197, 94, 0.03);
}

.env-row-prod:hover {
    background: rgba(34, 197, 94, 0.08) !important;
}

.env-row-dev {
    background: rgba(245, 158, 11, 0.03);
}

.env-row-dev:hover {
    background: rgba(245, 158, 11, 0.08) !important;
}

/* Responsive for environment sections */
@media (max-width: 768px) {
    .env-sections {
        grid-template-columns: 1fr;
    }

    .env-stats {
        flex-direction: column;
    }
}

/* =============================================================================
   Phase 6.2: SERVER CONSOLE
   ============================================================================= */

.console-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.console-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
}

.console-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.console-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.console-controls select {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.75rem;
}

.console-output {
    height: 300px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.75rem;
    padding: var(--space-sm);
    background: #0a0a1a;
    color: #e0e0e0;
}

.console-line {
    display: flex;
    gap: var(--space-sm);
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.console-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.console-time {
    color: #666;
    flex-shrink: 0;
    width: 80px;
}

.console-level {
    flex-shrink: 0;
    width: 45px;
    text-align: center;
    border-radius: 2px;
    font-size: 0.65rem;
    padding: 1px 4px;
    font-weight: 600;
}

.console-level.information {
    background: #2196f3;
    color: white;
}

.console-level.warning {
    background: #ff9800;
    color: black;
}

.console-level.error {
    background: #f44336;
    color: white;
}

.console-level.debug {
    background: #9e9e9e;
    color: white;
}

.console-category {
    color: #9c27b0;
    flex-shrink: 0;
    width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.console-message {
    color: #e0e0e0;
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
}

.console-loading,
.console-empty {
    color: #666;
    font-style: italic;
    padding: var(--space-lg);
    text-align: center;
}

.btn--danger {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn--danger:hover:not(:disabled) {
    background: var(--danger);
    color: white;
}

@media (max-width: 1200px) {
    .console-sections {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   Phase 6.4: Unified Console Panel
   ============================================================================= */

.console-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: var(--space-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.console-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-input) 100%);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.console-tabs {
    display: flex;
    gap: 0;
}

.console-tab {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.console-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.console-tab.active {
    color: var(--primary-400);
    border-bottom-color: var(--primary-500);
    background: rgba(14, 165, 233, 0.1);
}

.console-search {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 180px;
}

.console-search:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.console-body {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.console-body.collapsed {
    max-height: 0 !important;
}

/* Hide old console-sections layout */
.console-sections {
    display: none;
}