* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f7f1e6;
    color: #241a1d;
}

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

/* ---------- Sidebar ---------- */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #14072f;
    color: #e8e3d8;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}
.sidebar-brand {
    padding: 0 24px 24px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    font-weight: 900;
}
.sidebar-brand .brand-mark { color: #fff; }
.sidebar-brand .brand-sub {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    color: #a83a4a;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-top: 2px;
}
.sidebar-nav { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 20px; }
.nav-group-label {
    padding: 8px 24px 4px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7d84a3;
}
.nav-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    color: #d6d2c4;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.nav-tab:hover { background: rgba(255,255,255,0.06); }
.nav-tab.active {
    background: rgba(168,58,74,0.18);
    color: #fff;
    font-weight: 600;
    border-right: 3px solid #a83a4a;
}
.tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    flex-shrink: 0;
}
.sidebar-logout {
    margin: 12px 24px 0;
    color: #9aa0bc;
    text-decoration: none;
    font-size: 13px;
}
.sidebar-logout:hover { color: #fff; }

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 40;
    background: #16213f;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 25;
}

/* ---------- Main content ---------- */
.main {
    flex: 1;
    padding: 32px 40px;
    min-width: 0;
}
.main-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.crumb {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a7a72;
    margin-bottom: 4px;
}
.main-topbar h1 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 900;
    font-size: 30px;
    color: #16213f;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fffdf8;
    border: 1px solid #e8ddc9;
    border-radius: 12px;
    padding: 18px 20px;
}
.stat-label {
    font-size: 12px;
    color: #8a7a72;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #a83a4a;
}

.empty-panel {
    background: #fffdf8;
    border: 1px dashed #d8c9a8;
    border-radius: 12px;
    padding: 24px;
    color: #8a7a72;
    font-size: 14px;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .mobile-menu-toggle { display: block; }
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 30;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .main { padding: 72px 16px 24px; }
}
