body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 100%);
    color: #0f172a;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #e0ecff 0%, #f6f8ff 38%, #ecfdf5 100%);
}

.app-body {
    min-height: 100vh;
    background: #f5f7fb;
}

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

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.12);
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.brand-mark {
    width: 42px;
    height: 52px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 10px 25px rgba(37,99,235,0.4);
}

.brand-name {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.72rem;
    opacity: 0.7;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 18px;
}

.user-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.user-role {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    opacity: 0.7;
    text-transform: uppercase;
}

.user-name {
    margin-top: 6px;
    font-weight: 700;
}

.btn-logout {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148,163,184,0.15);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h4 {
    font-weight: 800;
    color: #0f172a;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chip {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

.page-content {
    padding: 28px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.content-header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 800;
    color: #111827;
}

.page-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
    color: #fff;
    border-radius: 22px;
    padding: 28px 26px;
    margin-bottom: 26px;
    box-shadow: 0 18px 35px rgba(30,64,175,0.22);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.page-hero h2 {
    margin: 0;
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.page-hero small {
    display: inline-block;
    opacity: 0.85;
    margin-bottom: 8px;
}

.card {
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 18px;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.06);
    background: rgba(255,255,255,0.9);
}

.card-header {
    padding: 1.1rem 1.2rem;
    background: #fff;
    border-bottom: 1px solid rgba(148,163,184,0.15);
    font-weight: 800;
    color: #111827;
}

.card-body {
    padding: 1.2rem;
}

.stat-box {
    position: relative;
    border-radius: 18px;
    padding: 1.4rem 1.2rem;
    min-height: 150px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color: #fff;
}

.stat-box::after {
    content: "";
    position: absolute;
    bottom: -26px;
    right: -18px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.stat-box .small {
    position: relative;
    z-index: 1;
    font-weight: 700;
    opacity: 0.9;
}

.stat-box h2 {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 2.1rem;
    font-weight: 800;
}

.stat-box.success { background: linear-gradient(135deg, #10b981, #059669); }
.stat-box.warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1f2937; }
.stat-box.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-box { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

.table thead th {
    background: #eef4ff;
    color: #1f2937;
    border-bottom: 0;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table tbody td {
    vertical-align: middle;
    padding: 0.9rem 0.8rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(239, 246, 255, 0.5);
}

.login-card {
    max-width: 440px;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    border: none;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.login-card .card-body {
    padding: 2rem;
}

.login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    width: 72px;
    height: 88px;
    object-fit: contain;
    margin-bottom: 12px;
}

.login-brand h3 {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}

.login-brand p {
    margin-top: 8px;
    margin-bottom: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    border: 1px solid #dfe8f6;
    background: #fff;
}

.form-label {
    font-weight: 600;
    color: #334155;
}

.btn {
    border-radius: 12px;
    padding: 0.7rem 1.1rem;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.alert {
    border-radius: 12px;
    border: none;
}

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

    .sidebar {
        width: 100%;
        padding-bottom: 8px;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .page-content {
        padding: 18px;
    }
}

@media (max-width: 767px) {
    .topbar,
    .content-header,
    .page-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-hero {
        padding: 22px 18px;
    }

    .card-body {
        padding: 1rem;
    }
}