:root {
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1d4ed8;
    --body-bg: #f4f6f9;
    --card-radius: 16px;
}

body {
    background: var(--body-bg);
    color: #1f2937;
}

.login-body {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.login-card {
    max-width: 440px;
    width: 100%;
    border-radius: 22px;
    border: none;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: #2563eb;
    color: white;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
}

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

.sidebar {
    width: 280px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: white;
    padding: 18px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.sidebar-brand h5 {
    margin: 0;
    font-weight: 700;
}

.sidebar-brand small {
    color: #94a3b8;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: 0.2s ease-in-out;
    font-size: 14px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-divider {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin: 14px 0;
}

.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
}

.topbar {
    background: #fff;
    min-height: 76px;
    padding: 18px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-user {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-area {
    padding: 24px;
}

.metric-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 22px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 120px;
}

.metric-card small {
    color: #64748b;
    font-weight: 600;
}

.metric-card h2 {
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 800;
}

.metric-card i {
    font-size: 36px;
}

.panel-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.panel-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.panel-card-header h5 {
    margin: 0;
    font-weight: 700;
}

.panel-card-body {
    padding: 20px;
}

.table th {
    color: #475569;
    font-weight: 700;
}

.btn {
    border-radius: 10px;
}

.form-control,
.form-select {
    border-radius: 10px;
}

.card {
    border-radius: var(--card-radius);
}

@media (max-width: 992px) {
    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .app-wrapper {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }
}

@media print {
    .sidebar,
    .topbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    body {
        background: #fff;
    }

    .panel-card,
    .metric-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
