:root {
    --app-blue: #0d6efd;
    --app-green: #198754;
    --app-yellow: #ffc107;
    --app-cyan: #19c3d8;
    --app-red: #dc3545;
    --app-bg: #f4f6f9;
    --app-border: #d9dee7;
    --app-dark: #212529;
}

* { letter-spacing: 0; }

body {
    font-family: "Prompt", system-ui, sans-serif;
    font-size: 14px;
    background: var(--app-bg);
    color: #212529;
}

.app-navbar {
    min-height: 50px;
    background: var(--app-blue);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .22);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .navbar-toggler,
.nav-logout {
    color: rgba(255, 255, 255, .92);
}

.app-navbar .navbar-brand {
    font-size: 1.05rem;
}

.app-navbar .nav-link {
    font-weight: 400;
    padding-inline: 14px;
}

.app-navbar .nav-link:hover,
.nav-logout:hover {
    color: #fff;
}

.nav-logout {
    text-decoration: none;
}

.dropdown-menu {
    border-radius: 4px;
    border: 1px solid #cfd8e3;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.app-shell {
    min-height: calc(100vh - 98px);
}

.app-main {
    min-width: 0;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card,
.stat-card,
.filter-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(18, 38, 63, .08);
}

.filter-card {
    padding: 14px;
}

.stat-card {
    position: relative;
    min-height: 88px;
    padding: 18px 22px;
    overflow: hidden;
}

.stat-card .label {
    font-weight: 600;
    color: rgba(255, 255, 255, .92);
}

.stat-card .value {
    margin-top: 6px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-card .unit {
    margin-top: 8px;
    color: rgba(255, 255, 255, .9);
    font-weight: 500;
}

.stat-card .stat-icon {
    position: absolute;
    right: 18px;
    top: 20px;
    font-size: 2rem;
    opacity: .45;
    color: #fff;
}

.stat-blue { background: var(--app-blue); }
.stat-green { background: var(--app-green); }
.stat-yellow { background: var(--app-yellow); }
.stat-cyan { background: var(--app-cyan); }
.stat-red { background: var(--app-red); }
.stat-yellow .label,
.stat-yellow .value,
.stat-yellow .unit,
.stat-yellow .stat-icon { color: #2b2b2b; }

.chart-box {
    min-height: 420px;
}

.chart-wrap {
    height: 330px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #fff;
    color: #212529;
    border-color: var(--app-border);
    font-weight: 600;
    white-space: nowrap;
}

.table tbody tr:nth-child(odd) {
    background: #f0f0f0;
}

.table-responsive {
    width: 100%;
}

.badge {
    border-radius: 4px;
    font-weight: 500;
}

.btn {
    border-radius: 4px;
}

.btn-icon {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.form-control,
.form-select {
    border-radius: 4px;
    min-height: 38px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--app-border);
    margin: 0;
}

.latest-list .latest-item {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.latest-list .latest-item:last-child {
    border-bottom: 0;
}

.department-mini-card {
    border-left: 4px solid var(--app-cyan);
    border-radius: 4px;
}

.app-footer {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6c757d;
    padding: 0 6px;
    background: var(--app-bg);
}

.app-footer a {
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .page-title {
        font-size: 1.35rem;
    }

    .container-fluid {
        padding-inline: 14px !important;
    }

    .app-footer {
        flex-direction: column;
        justify-content: center;
        padding: 10px;
        text-align: center;
    }
}

@media print {
    .app-navbar,
    .app-footer,
    .no-print,
    .dataTables_wrapper .row:first-child,
    .dataTables_wrapper .row:last-child {
        display: none !important;
    }
    body { background: #fff; }
    .content-card, .stat-card, .filter-card { box-shadow: none; }
}
