:root {
    --app-bg: #f5f7fb;
    --app-surface: #ffffff;
    --app-border: #e3e8ef;
    --app-text: #172033;
    --app-muted: #667085;
    --app-primary: #2563eb;
    --app-primary-dark: #1d4ed8;
    --app-success: #0f9f6e;
    --app-warning: #d97706;
    --app-danger: #dc2626;
    --app-info: #0891b2;
    --app-sidebar: #101828;
    --app-sidebar-soft: #182230;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
    font-size: 15px;
}

.content-wrapper {
    background: var(--app-bg);
}

.content-header {
    padding: 22px 1rem 8px;
}

.content-header h1,
.content-header h5 {
    color: var(--app-text);
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.main-header.navbar {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
    backdrop-filter: blur(12px);
}

.main-sidebar {
    background: var(--app-sidebar);
    box-shadow: 12px 0 30px rgba(15, 23, 42, .16);
}

.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
    min-height: 64px;
    padding: 16px 14px;
}

.brand-link .brand-image {
    background: #fff;
    box-shadow: none !important;
    margin-top: 0;
    opacity: 1 !important;
}

.brand-text {
    color: #fff;
    font-weight: 700 !important;
}

.nav-sidebar {
    padding: 8px;
}

.nav-sidebar .nav-item {
    margin-bottom: 4px;
}

.nav-sidebar .nav-link {
    border-radius: 8px;
    color: #cbd5e1 !important;
    font-weight: 600;
}

.nav-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff !important;
}

.nav-sidebar .nav-link.active {
    background: var(--app-primary) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .32);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #98a2b3;
    padding: 14px 12px;
}

.card,
.small-box,
.modal-content {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.card {
    overflow: hidden;
}

.card-header {
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    font-weight: 700;
}

.table {
    background: var(--app-surface);
    border-radius: 10px;
    overflow: hidden;
}

.table thead th,
table.dataTable thead th {
    background: #eef4ff !important;
    border-bottom: 1px solid #d7e3ff !important;
    color: #1e3a8a !important;
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.table td,
.table th {
    border-color: var(--app-border);
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafcff;
}

.dataTables_wrapper {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
    padding: 16px;
}

.dataTables_wrapper .table {
    box-shadow: none;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0;
}

.btn-sm {
    border-radius: 7px;
    font-size: 12px;
    padding: .32rem .58rem;
}

.btn-primary,
.btn-success {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-success:hover {
    background: var(--app-primary-dark);
    border-color: var(--app-primary-dark);
}

.btn-info {
    background: var(--app-info);
    border-color: var(--app-info);
    color: #fff;
}

.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #1f2937;
}

.btn-danger {
    background: var(--app-danger);
    border-color: var(--app-danger);
}

.form-control,
.custom-select,
.select2-container--bootstrap4 .select2-selection {
    border-color: #cfd7e3;
    border-radius: 8px;
    min-height: 40px;
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 .18rem rgba(37, 99, 235, .14);
}

.app-dashboard-hero {
    align-items: center;
    background: linear-gradient(135deg, #10233f 0%, #1e4ed8 56%, #0891b2 100%);
    border-radius: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
    min-height: 150px;
    overflow: hidden;
    padding: 28px;
    position: relative;
}

.app-dashboard-hero::after {
    background: rgba(255, 255, 255, .13);
    border-radius: 999px;
    content: "";
    height: 220px;
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
}

.app-dashboard-hero h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.app-dashboard-hero p {
    color: #dbeafe;
    margin: 0;
    max-width: 640px;
}

.app-stat-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
    display: flex;
    gap: 16px;
    height: 100%;
    padding: 18px;
}

.app-stat-icon,
.app-action-icon {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    flex: 0 0 48px;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.app-stat-icon {
    color: #fff;
    font-size: 20px;
}

.app-stat-card h3 {
    color: var(--app-text);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 6px;
}

.app-stat-card p,
.app-action-card span {
    color: var(--app-muted);
    margin: 0;
}

.app-section-title {
    color: var(--app-text);
    font-size: 18px;
    font-weight: 800;
    margin: 28px 0 14px;
}

.app-action-card {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    display: flex;
    gap: 14px;
    height: 100%;
    padding: 16px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.app-action-card:hover {
    border-color: #b8c7e6;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
    color: var(--app-text);
    text-decoration: none;
    transform: translateY(-2px);
}

.app-action-card strong {
    display: block;
    font-size: 16px;
}

@media (max-width: 767.98px) {
    .content-header {
        padding-top: 16px;
    }

    .app-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .app-dashboard-hero h1 {
        font-size: 24px;
    }

    .dataTables_wrapper {
        padding: 12px;
    }
}
