:root {
    --sb-bg: #1e293b;
    --sb-active: #2563eb;
    --sb-width: 250px;
}

body { background: #f1f5f9; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- Auth ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #2563eb);
    padding: 1rem;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

/* ---------- Layout ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sb-width);
    background: var(--sb-bg);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand { padding: 1.25rem 1.25rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }
.sidebar-nav .nav-link,
.sidebar-footer .nav-link {
    color: #cbd5e1;
    padding: .6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .92rem;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-link:hover,
.sidebar-footer .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active {
    background: rgba(37,99,235,.2);
    color: #fff;
    border-left-color: var(--sb-active);
}
.sidebar-divider {
    padding: .75rem 1.25rem .25rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
}
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: .5rem 0; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
    background: #fff;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-content { flex: 1; padding: 1.5rem; }
.app-footer { padding: .75rem 1.5rem; color: #94a3b8; border-top: 1px solid #e2e8f0; }

/* ---------- Cards & stats ---------- */
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-icon { position: absolute; right: .75rem; bottom: .5rem; font-size: 2.5rem; opacity: .15; }

/* ---------- Detection ---------- */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: .2s;
    background: #f8fafc;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--sb-active); background: #eff6ff; }
.camera-wrap { background: #000; border-radius: 12px; overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .app-sidebar { position: fixed; z-index: 1050; height: 100vh; }
    .app-content { padding: 1rem; }
}
