/* === METRO NEON THEME === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-panel: #1a1a2e;
    --bg-card: #191c23;
    --border: #2a2a4a;
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --neon-green: #00ff87;
    --neon-blue: #00d4ff;
    --neon-pink: #ff00e5;
    --neon-yellow: #ffe600;
    --neon-orange: #ff6b00;
    --neon-red: #ff1744;
    --sidebar-width: 220px;
    --topbar-height: 50px;
}

[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-panel: #e8eaf0;
    --bg-card: #ffffff;
    --border: #d0d5dd;
    --text-primary: #1a1a2e;
    --text-secondary: #666;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* === TOP BAR === */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--neon-green);
}

.topbar-brand span { font-size: 20px; }

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

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 12px 0;
    overflow-y: auto;
    z-index: 90;
    transition: transform 0.25s ease, width 0.25s ease;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
}

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

.nav-item.active {
    color: var(--neon-green);
    border-left-color: var(--neon-green);
    background: rgba(0,255,135,0.05);
}

.nav-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 20px;
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    transition: margin-left 0.25s ease;
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* === TABLE === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

.data-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.text-green { color: var(--neon-green); }
.text-red { color: var(--neon-red); }
.text-blue { color: var(--neon-blue); }
.text-yellow { color: var(--neon-yellow); }
.text-right { text-align: right; }
.font-mono { font-family: 'SF Mono', 'Consolas', monospace; }

/* === BADGE === */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
}

.badge-green { background: rgba(0,255,135,0.15); color: var(--neon-green); }
.badge-red { background: rgba(255,23,68,0.15); color: var(--neon-red); }
.badge-blue { background: rgba(0,212,255,0.15); color: var(--neon-blue); }
.badge-yellow { background: rgba(255,171,0,0.15); color: #ffab00; }

/* === SIDEBAR FOOTER === */
.sidebar-footer {
    position: absolute;
    bottom: 12px;
    left: 16px;
    font-size: 10px;
    color: var(--text-secondary);
}

/* === LOGIN PAGE === */
body.login-body {
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 380px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--neon-green);
    font-size: 18px;
    letter-spacing: 2px;
}

.login-container p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}

.login-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: var(--neon-green);
}

.login-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--neon-green);
    color: #000;
    letter-spacing: 1px;
}

.login-btn:hover { opacity: 0.9; }
.login-btn:disabled { background: #555; cursor: not-allowed; color: #888; }

.login-error {
    color: var(--neon-red);
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
    min-height: 18px;
}

.login-info {
    color: var(--neon-blue);
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
    min-height: 18px;
}

/* === BLANK PAGE === */
.blank-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: var(--text-secondary);
    font-size: 14px;
}
