:root {
    --primary: #c0392b;
    --primary-dark: #96281b;
    --secondary: #2c3e50;
    --sidebar-width: 260px;
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --border-color: #dee2e6;
}

[data-theme="dark"] {
    --bg-body: #1a1d21;
    --bg-card: #212529;
    --text-main: #e9ecef;
    --border-color: #495057;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text-main); }
.app-body { background: var(--bg-body); min-height: 100vh; }
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--secondary) 0%, #1a252f 100%);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sidebar-brand i { color: var(--primary); font-size: 1.5rem; }
.sidebar-nav { padding: 1rem 0; }
.sidebar-nav .nav-link {
    color: rgba(255,255,255,.75);
    padding: .7rem 1.25rem;
    margin: .15rem .75rem;
    border-radius: .5rem;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 1.35rem;
    text-align: center;
    transition: transform 0.2s ease, color 0.2s ease;
}
.sidebar-nav .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(192, 57, 43, 0.55) 0%, rgba(192, 57, 43, 0.18) 100%);
    color: #fff;
    font-weight: 700;
    border-left-color: #e74c3c;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.sidebar-nav .nav-link.active i {
    color: #fff;
    transform: scale(1.08);
}

.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.top-navbar { background: var(--bg-card); border-bottom: 1px solid var(--border-color); height: 60px; }
.content-area { flex: 1; }

.stat-card {
    background: var(--bg-card);
    border-radius: .75rem;
    padding: 1.35rem 1.25rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    height: 100%;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-left-width 0.28s ease;
    will-change: transform, box-shadow;
}
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(44, 62, 80, 0.14), 0 6px 12px rgba(192, 57, 43, 0.08);
    border-left-width: 5px;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    transition: transform 0.28s ease;
}
.stat-card:hover .stat-value {
    transform: scale(1.03);
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: .875rem;
    margin-top: .25rem;
}
.stat-card--warning {
    border-left-color: #f39c12;
}
.stat-card--warning .stat-value {
    color: #f39c12;
}
.stat-card--warning:hover {
    box-shadow: 0 16px 32px rgba(243, 156, 18, 0.18), 0 6px 12px rgba(243, 156, 18, 0.1);
}
.stat-card--danger {
    border-left-color: #e74c3c;
}
.stat-card--danger .stat-value {
    color: #e74c3c;
}
.stat-card--danger:hover {
    box-shadow: 0 16px 32px rgba(231, 76, 60, 0.18), 0 6px 12px rgba(231, 76, 60, 0.1);
}

[data-theme="dark"] .stat-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 6px 14px rgba(192, 57, 43, 0.15);
}

.card { background: var(--bg-card); border-color: var(--border-color); }
.table { color: var(--text-main); }

.guest-body {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guest-container { width: 100%; max-width: 420px; padding: 1rem; }
.guest-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.brand-logo { font-size: 3rem; color: var(--primary); }
.brand-title { color: var(--secondary); font-weight: 700; }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.qr-verify-card {
    max-width: 600px;
    margin: 0 auto;
    border-top: 5px solid var(--primary);
}
.verified-badge {
    background: #27ae60;
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 2rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s; }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

.public-body { background: var(--bg-body); }
