/* === MAIN LAYOUT & SIDEBAR === */
:root {
    --bg-body: #0a0b10;
    --bg-sidebar: #0f1117;
    --bg-card: #13151c;
    --bg-card-hover: #1a1d26;
    --bg-input: #1a1d26;
    --accent-primary: #f97316;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --accent-color: var(--accent-primary);
    --accent-hover: #ea580c;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255,255,255,0.06);
}

[data-theme="light"] {
    --bg-body: #f4f7fe;
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f1f5f9;
    --accent-primary: #f97316;
    --accent-secondary: #0ea5e9;
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --accent-color: var(--accent-primary);
    --accent-hover: #ea580c;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.06);
}

/* Light mode sidebar text needs to stay light */
[data-theme="light"] .sidebar { color: #f1f5f9; }
[data-theme="light"] .nav-item { color: #94a3b8; }
[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active { color: #ffffff; }
[data-theme="light"] .sidebar-logo { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }

body {
    background: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.app-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 9999;
    box-sizing: border-box;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 30px;
    color: white;
}

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

.nav-item {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.nav-item svg { width: 22px; height: 22px; }

.nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid var(--border-color);
    z-index: 10000;
}

.nav-item:hover::after { opacity: 1; }

.sidebar-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.main-content {
    margin-left: 70px;
    padding: 24px;
    min-height: 100vh;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    width: calc(100% - 70px);
}
