/* ══════════════════════════════════════════════
   DASHBOARD.CSS – Premium Master Dashboard
   Arcyna & BuiltNotBought 2026
   ══════════════════════════════════════════════ */

:root {
    --bg-main: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-panel: #121215;
    --bg-header: rgba(10, 10, 12, 0.8);
    --accent: #41c8ff;
    --accent-glow: rgba(65, 200, 255, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a0a0aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.1);
    --divider: rgba(255, 255, 255, 0.05);
    --danger: #ff4d4d;
    --safe: #2dd882;
    --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
}

/* Base Layout */
.dash-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dash-header {
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-content {
    flex: 1;
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Navigation Tabs */
.dash-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.dash-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}
.tab-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.tab-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Tab Panels */
.tab-panel {
    display: none;
    animation: dashFadeIn 0.3s ease-out;
}
.tab-panel.active { display: block; }

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

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}
.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Charts & Lists */
.dash-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}
.panel-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--divider);
}
.panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.panel-body { padding: 24px; }

/* Table Style */
.dash-table {
    width: 100%;
    border-collapse: collapse;
}
.dash-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--divider);
}
.dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--divider);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: rgba(255,255,255,0.015); }

/* Utility Classes */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #5ed2ff; box-shadow: 0 4px 12px var(--accent-glow); }
.btn-secondary { background: var(--bg-card); color: #fff; border-color: var(--border-color); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.filter-item {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
}
.filter-item.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* Brand Styles */
.brand-bnb { --accent: #41c8ff; --accent-glow: rgba(65, 200, 255, 0.4); }
.brand-testlab { --accent: #7c6af7; --accent-glow: rgba(124, 106, 247, 0.4); }
.brand-roadrace { --accent: #ff4d4d; --accent-glow: rgba(255, 77, 77, 0.4); }
.brand-kanban { --accent: #2dd882; --accent-glow: rgba(45, 216, 130, 0.4); }
.brand-c3dp { --accent: #ff782d; --accent-glow: rgba(255, 120, 45, 0.4); }

/* Login Page Styles (Restored) */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}
.login-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dash-header { padding: 0 16px; min-height: 80px; }
    .dash-content { padding: 24px 16px; }
    .stat-value { font-size: 1.6rem; }
    .dash-tabs { gap: 6px; }
    .tab-btn { padding: 8px 16px; font-size: 0.85rem; }
    
    .dash-table thead { display: none; }
    .dash-table tr { display: block; margin-bottom: 16px; background: rgba(255,255,255,0.02); border-radius: 12px; padding: 8px 0; }
    .dash-table td { display: flex; justify-content: space-between; padding: 6px 16px; border: none; font-size: 0.8rem; }
    .dash-table td::before { content: attr(data-label); font-weight: 700; color: var(--text-muted); padding-right: 12px; }
}
