/* ====== Coupang Admin — Dark Theme ====== */
:root {
    --bg-body: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --radius: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ====== Layout ====== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.brand-icon { font-size: 24px; }

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-icon { font-size: 16px; }

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.logout-btn {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}
.logout-btn:hover { background: var(--bg-hover); color: var(--red); }

.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 28px 32px;
    min-height: 100vh;
}

/* ====== Page Header ====== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.updated-time {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ====== Buttons ====== */
.btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}
.btn-secondary:hover { color: var(--text-primary); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }

.btn-block { width: 100%; }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); }
.btn-danger:hover { background: rgba(239,68,68,0.15); }
.btn-danger-solid {
    background: rgba(239,68,68,0.18);
    color: #fecaca;
}
.btn-danger-solid:hover { background: rgba(239,68,68,0.28); color: #fff; }

/* ====== Filter Bar ====== */
.filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
}
.badge-green { background: rgba(16,185,129,0.2); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.2); color: var(--red); }
.badge-orange { background: rgba(245,158,11,0.2); color: var(--orange); }
.badge-gray { background: rgba(100,116,139,0.2); color: var(--text-muted); }

/* ====== Data Table ====== */
.cookie-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.1s;
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table tbody tr:last-child { border-bottom: none; }

.data-table td { padding: 10px 16px; }

.cell-name { font-weight: 600; }
.cell-muted { color: var(--text-muted); font-size: 12px; }
.cell-remark { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { white-space: nowrap; }
.login-credential,
.mail-credential {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mail-password {
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    word-break: break-all;
}

.node-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(99,102,241,0.12);
    color: var(--accent);
    font-weight: 500;
}

.status-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-right: 5px;
}
.status-active { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-expired { background: var(--red); }
.status-mfa_required { background: var(--orange); box-shadow: 0 0 6px rgba(245,158,11,0.6); }
.status-refreshing {
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.75);
    animation: status-pulse 1.2s ease-in-out infinite;
}
.status-disabled { background: var(--text-muted); }
.status-text { font-size: 12px; }
@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}
.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.cell-mfa { min-width: 260px; }
.mfa-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 300px;
}
.mfa-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.mfa-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(245,158,11,0.16);
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
}
.mfa-input-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto auto;
    gap: 6px;
}
.mfa-plugin-row {
    grid-template-columns: auto;
    justify-content: start;
}
.mfa-input-row input {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 12px;
}
.mfa-input-row input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.14);
}
.mfa-message {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
    max-width: 300px;
}

/* ====== Modal ====== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 16px; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal form { padding: 20px 22px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

/* ====== Forms ====== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.required { color: var(--red); }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-group textarea { resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin-top: 20px;
    color: var(--text-secondary);
}

.form-group .checkbox-label input {
    width: auto;
    margin: 0;
}

/* ====== Flash Messages ====== */
.flash-messages { margin-bottom: 16px; }
.flash {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}
.flash-error { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.flash-success { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }

/* ====== Empty State ====== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.text-muted { color: var(--text-muted); font-size: 13px; }

/* ====== Login Page ====== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px;
    width: 380px;
    box-shadow: var(--shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo { font-size: 40px; margin-bottom: 8px; }
.login-header h1 { font-size: 20px; font-weight: 700; }
.login-header p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.login-form .btn { margin-top: 8px; padding: 11px; font-size: 14px; }

/* ====== Dashboard: Stats Grid ====== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.stats-grid.stats-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid.stats-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid.stats-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-gradient-blue { background: linear-gradient(135deg, #1e3a5f, #1e293b); border: 1px solid rgba(99,102,241,0.2); }
.stat-gradient-purple { background: linear-gradient(135deg, #2d1b69, #1e293b); border: 1px solid rgba(139,92,246,0.2); }
.stat-gradient-green { background: linear-gradient(135deg, #064e3b, #1e293b); border: 1px solid rgba(16,185,129,0.2); }
.stat-gradient-orange { background: linear-gradient(135deg, #78350f, #1e293b); border: 1px solid rgba(245,158,11,0.2); }
.stat-gradient-cyan { background: linear-gradient(135deg, #164e63, #1e293b); border: 1px solid rgba(6, 182, 212, 0.2); }
.stat-gradient-indigo { background: linear-gradient(135deg, #312e81, #1e293b); border: 1px solid rgba(99, 102, 241, 0.2); }

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.15;
    word-break: break-word;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

/* 5-up summary strips (e.g. category coverage) */
.stats-grid.coverage-summary-grid,
.stats-grid.stats-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .stats-grid.coverage-summary-grid,
    .stats-grid.stats-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .stats-grid.stats-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .stats-grid,
    .stats-grid.coverage-summary-grid,
    .stats-grid.stats-grid-5,
    .stats-grid.stats-grid-4,
    .stats-grid.stats-grid-3,
    .stats-grid.stats-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ====== Dashboard: Sections ====== */
.dashboard-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.dashboard-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.chart-container { height: 300px; position: relative; }
.chart-small { height: 200px; }

/* ====== Dashboard: Nodes ====== */
.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.node-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    transition: border-color 0.2s;
}
.node-card:hover { border-color: var(--accent); }
.node-offline { opacity: 0.5; }

.node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.node-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}

.pulse-green {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 6px var(--green); }
    50% { box-shadow: 0 0 14px var(--green); }
}

.dot-red { background: var(--red); }

.node-role {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99,102,241,0.12);
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
}

.node-metrics { display: flex; flex-direction: column; gap: 6px; }

.node-runtime-section {
    margin-bottom: 16px;
}

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

.node-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.node-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
}

.node-chip-online {
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
}

.node-chip-offline {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.node-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.node-card-compact {
    padding: 12px 14px;
}

.node-online-label {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.node-card-compact:not(.node-offline) .node-online-label {
    color: #34d399;
}

.node-card-compact.node-offline .node-online-label {
    color: #fca5a5;
}

.node-window-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 2px 0 8px;
}

.node-progress-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.node-progress-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 64px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.035);
}

.node-progress-item span {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.2;
}

.node-progress-item strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.node-progress-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0 2px;
}

.node-router-status {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid rgba(99,102,241,0.22);
    border-radius: 7px;
    background: rgba(99,102,241,0.06);
    font-size: 10px;
}

.node-router-status.router-shortfall {
    border-color: rgba(245,158,11,0.35);
    background: rgba(245,158,11,0.08);
}

.node-router-head,
.node-router-lanes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 8px;
}

.node-router-head span,
.node-router-lanes {
    color: var(--text-muted);
}

.node-router-warning {
    color: #fbbf24;
    line-height: 1.4;
}

.node-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 8px;
}

.node-runtime-counters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.runtime-counter {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.035);
    color: var(--text-muted);
    font-size: 11px;
}

.runtime-counter strong {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.node-runtime-time {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
}

.metric {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.metric-label {
    width: 30px;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-value {
    width: 36px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-big { font-size: 16px; font-weight: 800; color: var(--accent); }

.progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}
.progress-mem { background: var(--purple); }

.node-footer {
    margin-top: 10px;
    font-size: 10px;
    color: var(--text-muted);
}

/* ====== Dashboard: Funnel ====== */
.funnel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.funnel-label {
    width: 56px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
}

.funnel-bar-wrapper {
    flex: 1;
    height: 22px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
}

.funnel-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.funnel-value {
    width: 48px;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
}

/* ====== Dashboard: Category Keyword Progress ====== */
.category-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.category-progress-pane {
    min-width: 0;
}

.category-progress-pane + .category-progress-pane {
    border-left: 1px solid var(--border);
    padding-left: 22px;
}

.category-progress-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.category-progress-topline strong {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}

.category-progress-topline > span {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.category-progress-kicker {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
}

.category-progress-bar {
    height: 9px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}

.category-progress-fill {
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.category-progress-fill-keyword { background: var(--accent); }
.category-progress-fill-category { background: var(--green); }

.category-progress-rate {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.category-progress-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.category-progress-metric {
    min-width: 0;
}

.category-progress-metric span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.category-progress-metric strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.category-progress-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 12px;
}

.health-stack {
    display: grid;
    gap: 4px;
    min-width: 180px;
    font-size: 12px;
    line-height: 1.25;
}

.health-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.health-ok {
    color: #7ee2b8;
    background: rgba(25, 195, 125, 0.13);
}

.health-warn {
    color: #f7bd67;
    background: rgba(245, 158, 11, 0.13);
}

.cooldown-text {
    color: #f7bd67;
    overflow-wrap: anywhere;
}

/* ====== Loading ====== */
.loading-placeholder {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
    .sidebar { width: 60px; }
    .sidebar-brand span, .nav-item span:not(.nav-icon), .user-info span:not(.user-avatar), .sidebar-footer { display: none; }
    .sidebar-brand { justify-content: center; }
    .nav-item { justify-content: center; padding: 12px; }
    .sidebar-footer { padding: 8px; justify-content: center; }
    .main-content { margin-left: 60px; padding: 20px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-row { flex-direction: column; }
    .category-progress-grid { grid-template-columns: 1fr; }
    .category-progress-pane + .category-progress-pane {
        border-left: 0;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 18px;
    }
    .category-progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
