:root {
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255,255,255,.08);
    --primary-soft: #eef4ff;
    --card-border: rgba(15, 23, 42, .08);
}

body {
    background: #f5f7fb;
    color: #1e293b;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-box small {
    color: rgba(255,255,255,.6);
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-size: 1.4rem;
    box-shadow: 0 18px 40px rgba(37, 99, 235, .3);
    color: #fff;
}

.menu-list .nav-link {
    color: rgba(255,255,255,.78);
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: .25s ease;
    font-weight: 500;
}

.menu-list .nav-link:hover,
.menu-list .nav-link.active {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 18px;
    color: rgba(255,255,255,.85);
}

.main-content {
    flex: 1;
    padding: 28px;
}

.topbar {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.7rem;
    font-weight: 700;
}

.date-badge,
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.user-badge {
    padding-right: 10px;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.dashboard-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #7c3aed 100%);
    border-radius: 28px;
    color: #fff;
    padding: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(37, 99, 235, .18);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    right: -70px;
    top: -70px;
}

.glass-box {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 22px;
    padding: 20px;
}

.stat-card,
.panel-card,
.mini-card {
    border: 1px solid var(--card-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .04);
}

.stat-card {
    padding: 22px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    font-size: 1.2rem;
}

.panel-card,
.mini-card {
    padding: 22px;
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    border-bottom: 0;
}

.table>:not(caption)>*>* {
    padding: .9rem .75rem;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 46px;
    border-radius: 14px;
}

textarea.form-control {
    min-height: auto;
}

.btn {
    border-radius: 14px;
    padding: .7rem 1rem;
    font-weight: 600;
}

.qr-box {
    min-height: 220px;
    border: 2px dashed #cbd5e1;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.badge-soft {
    background: #eef2ff;
    color: #4338ca;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #7c3aed 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 30px;
    align-items: center;
    max-width: 1220px;
    margin: 0 auto;
    padding: 40px 24px;
}

.login-side {
    color: #fff;
    padding: 30px 10px;
}

.login-card {
    background: rgba(255,255,255,.96);
    border-radius: 30px;
    padding: 32px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .22);
}

.demo-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .login-shell {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }
}
