body {
    font-family: 'Kanit', sans-serif;
    background: #f4f7fb;
    color: #334155;
}

:root {
    --cts-primary: #3b82f6;
    --cts-secondary: #e2e8f0;
    --cts-dark: #1e293b;
    --cts-light: #ffffff;
    --cts-muted: #64748b;
    --cts-border: #dbe3ee;
}

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

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1d4ed8 0%, #1e3a8a 100%);
    color: #fff;
    padding: 1rem;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transition: transform .25s ease, width .25s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 92px;
}

.sidebar.collapsed .brand-subtitle,
.sidebar.collapsed .menu-link span {
    display: none;
}

.sidebar.collapsed .menu-link {
    justify-content: center;
}

.sidebar-brand {
    padding: .75rem .5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 1rem;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.brand-subtitle {
    font-size: .875rem;
    color: rgba(255,255,255,.8);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    color: #fff;
    text-decoration: none;
    padding: .9rem 1rem;
    border-radius: 14px;
    transition: .2s ease;
}

.menu-link:hover,
.menu-link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.content-wrap {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease, width .25s ease;
}

.content-wrap.expanded {
    margin-left: 92px;
    width: calc(100% - 92px);
}

.topbar {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--cts-border);
    z-index: 1030;
}

.main-content {
    flex: 1;
}

.footer {
    border-top: 1px solid var(--cts-border);
    background: #fff;
    color: var(--cts-muted);
}

.dashboard-card,
.panel-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--cts-border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.stat-card {
    padding: 1.25rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--cts-border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
    height: 100%;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,.12);
    color: var(--cts-primary);
    font-size: 1.2rem;
}

.table thead th {
    background: #eef4ff;
    color: #1e3a8a;
    border-bottom: 0;
}

.btn-primary {
    background: var(--cts-primary);
    border-color: var(--cts-primary);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(59,130,246,.25), transparent 35%), #eff6ff;
}

.login-card {
    max-width: 460px;
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--cts-border);
    box-shadow: 0 20px 50px rgba(30, 41, 59, .12);
}

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

.filter-bar {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.mobile-show {
        transform: translateX(0);
    }

    .content-wrap,
    .content-wrap.expanded {
        margin-left: 0;
        width: 100%;
    }
}

.report-head {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.report-kicker,
.section-kicker {
    display: inline-block;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: .35rem;
}

.report-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0f172a;
}

.report-chip-wrap {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.report-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .95rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
    border: 1px solid #dbeafe;
}

.filter-bar-report {
    align-items: end;
}

.filter-bar-report > div {
    min-width: 160px;
}

.stat-card-report {
    position: relative;
    overflow: hidden;
}

.stat-card-report::after {
    content: '';
    position: absolute;
    inset: auto -20px -30px auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.09), transparent 70%);
}

.stat-label {
    color: #64748b;
    font-size: .92rem;
}

.stat-subtext {
    font-size: .8rem;
    color: #94a3b8;
}

.progress-thin {
    height: 6px;
    border-radius: 999px;
    background: #e8eef8;
}

.progress-thin .progress-bar {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    border-radius: 999px;
}

.report-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.chart-box-md {
    min-height: 330px;
}

.chart-box-sm {
    min-height: 300px;
}

.table-report-wrap {
    border-radius: 18px;
    overflow: hidden;
}

.table-report thead th {
    background: #edf4ff;
    color: #1e3a8a;
    font-size: .84rem;
    font-weight: 600;
    border-bottom: 1px solid #dde8f7;
    white-space: nowrap;
}

.table-report tbody td {
    border-color: #eef2f7;
    vertical-align: middle;
    font-size: .92rem;
}

.table-report tbody tr:hover {
    background: #fafcff;
}

.content-cell {
    min-width: 220px;
    max-width: 280px;
}

.achieve-cell {
    min-width: 110px;
}

.badge-soft {
    font-weight: 500;
    border-radius: 999px;
    padding: .42rem .62rem;
}

.badge-soft-secondary {
    background: #e2e8f0;
    color: #475569;
}

.badge-soft-success {
    background: #dcfce7;
    color: #166534;
}

.badge-soft-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-soft-info {
    background: #cffafe;
    color: #0f766e;
}

.badge-soft-primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-soft-light {
    background: #f1f5f9;
    color: #64748b;
}

.highcharts-background {
    fill: transparent;
}

@media (max-width: 767.98px) {
    .report-title {
        font-size: 1.3rem;
    }

    .content-cell {
        min-width: 180px;
    }
}
