:root {
    --sidebar-bg: #1a2332;
    --sidebar-width: 260px;
    --accent: #e85d04;
    --accent-hover: #dc2f02;
    --card-shadow: 0 2px 12px rgba(0,0,0,.08);
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f4f6f9;
    min-height: 100vh;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2332 0%, #2d3a4f 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.brand-accent { color: var(--accent); }
.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    min-height: 44px;
}
.btn-accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

/* Sidebar */
.app-wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #cbd5e1;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .3s ease;
}
.sidebar-brand {
    padding: 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    min-height: 64px;
}
.brand-text {
    color: var(--accent);
    font-weight: 700;
    line-height: 1.2;
}
.brand-text--login {
    font-size: 1.35rem;
}
.brand-logo {
    display: block;
    max-height: 42px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}
.brand-logo--login {
    max-height: 56px;
    margin: 0 auto;
}
.brand-logo-preview {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}
.sidebar-brand span { color: var(--accent); }
.sidebar-nav { padding: .5rem 0; }
.sidebar-nav .nav-link {
    color: #94a3b8;
    padding: .65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
    border-left: 3px solid transparent;
    min-height: 44px;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.05);
    border-left-color: var(--accent);
}
.sidebar-nav .nav-section {
    padding: .75rem 1.25rem .25rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1035;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}
.topbar {
    background: #fff;
    padding: .75rem 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.page-content { padding: 1.5rem; }

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: 100%;
    transition: transform .15s;
}
.kpi-card:hover { transform: translateY(-2px); }
.kpi-card .card-body { padding: 1.25rem; }
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 700; }
.kpi-card .kpi-label { font-size: .8rem; color: #64748b; }
.kpi-bar { height: 4px; }
.kpi-green .kpi-bar { background: #22c55e; }
.kpi-red .kpi-bar { background: #ef4444; }
.kpi-blue .kpi-bar { background: #3b82f6; }
.kpi-orange .kpi-bar { background: var(--accent); }
.kpi-purple .kpi-bar { background: #8b5cf6; }
.kpi-yellow .kpi-bar { background: #eab308; }
.kpi-dark .kpi-bar { background: #334155; }

.kpi-green .kpi-icon { color: #22c55e; }
.kpi-red .kpi-icon { color: #ef4444; }
.kpi-blue .kpi-icon { color: #3b82f6; }
.kpi-orange .kpi-icon { color: var(--accent); }

/* Tables */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.table-responsive { border-radius: 0 0 12px 12px; }

/* Status rows */
.row-available { background: #f0fdf4 !important; }
.row-overdue { background: #fef2f2 !important; }
.row-rented { background: #fdf2f8 !important; }
.row-reserved { background: #fefce8 !important; }

.badge-banned { background: #ef4444; }

/* Occupancy grid */
.occ-grid { font-size: .75rem; overflow-x: auto; }
.occ-grid td, .occ-grid th { text-align: center; padding: .25rem; min-width: 28px; }
.occ-0 { background: #dcfce7; }
.occ-partial { background: #fecaca; }
.occ-full { background: #f87171; color: #fff; }

/* Mobile */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
}

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0; }
}
