:root {
    --primary-color: #4e73df;
    --primary-hover: #2e59d9;
    --text-color: #5a5c69;
    --bg-body: #f8f9fc;
    --navbar-height: 70px;
    --hpt-border: #e1e7f1;
    --hpt-ink: #182844;
}

/* Layout chung */
body {
    font-family: 'Inter', 'Nunito', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar-custom {
    background: #fff;
    box-shadow: 0 .15rem 1.75rem rgba(58, 59, 69, .15);
    height: var(--navbar-height);
    padding: 0;
}

.navbar-custom .navbar-brand img {
    height: 45px;
    width: auto;
    transition: transform .2s;
}

.navbar-custom .navbar-brand:hover img { transform: scale(1.05); }

.navbar-custom .nav-link {
    color: var(--text-color);
    font-size: .95rem;
    font-weight: 600;
    padding: .5rem 1rem;
    margin: 0 .2rem;
    border-radius: .35rem;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary-color);
    background: #edf2ff;
}

.navbar-custom .nav-link i { width: 20px; margin-right: 5px; text-align: center; }

.navbar-custom .dropdown-menu {
    border: 0;
    border-radius: .5rem;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

.navbar-custom .dropdown-item {
    padding: .6rem 1.5rem;
    color: var(--text-color);
    font-size: .9rem;
    font-weight: 500;
}

.navbar-custom .dropdown-item:hover { color: var(--primary-color); background: #f8f9fa; }
.navbar-custom .dropdown-item i { width: 20px; margin-right: 10px; text-align: center; }

.user-avatar-box {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eaecf4;
    color: var(--primary-color);
}

#app > main {
    flex: 1;
    padding-top: calc(var(--navbar-height) + 20px);
    padding-bottom: 40px;
}

#app > footer {
    background: #fff;
    padding: 25px 0;
    border-top: 1px solid #e3e6f0;
    color: #858796;
    font-size: .85rem;
}

.hpt-register-link { background: var(--primary-color); border: 0; }
.hpt-popup-close { z-index: 1050; background-color: #0008; border-radius: 50%; padding: 10px; }
.hpt-admin-topbar.navbar-custom { box-shadow: 0 1px 0 var(--hpt-border); }

/* Sidebar quản trị */
.hpt-admin-shell {
    --hpt-sidebar-width: 248px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    flex: 1;
    padding-top: var(--navbar-height);
    background: #f5f7fc;
}

.hpt-admin-shell > .hpt-admin-main { min-width: 0; padding: 0 0 24px; }
.hpt-admin-sidebar { --bs-offcanvas-width: min(var(--hpt-sidebar-width), 88vw); }

.hpt-sidebar-surface {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    color: var(--hpt-ink);
    border-right: 1px solid var(--hpt-border);
}

.hpt-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 17px 16px;
    border-bottom: 1px solid var(--hpt-border);
}

.hpt-sidebar-nav {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
}

.hpt-sidebar-group + .hpt-sidebar-group { margin-top: 14px; }

.hpt-sidebar-label {
    padding: 4px 10px;
    color: #586984;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.hpt-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    margin: 2px 0;
    padding: 8px 10px;
    border-radius: 7px;
    color: #263a59;
    font-size: .88rem;
    font-weight: 550;
    text-decoration: none;
}

.hpt-sidebar-link i { flex: 0 0 19px; text-align: center; }
.hpt-sidebar-link:hover,
.hpt-sidebar-link.is-active { color: #2846a9; background: #edf2ff; }
.hpt-sidebar-link.is-active { font-weight: 700; }
.hpt-sidebar-link:focus-visible { outline: 2px solid #304eb5; outline-offset: -2px; }

/* Dashboard */
.hpt-dashboard {
    max-width: 1380px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px);
    color: var(--hpt-ink);
}

.hpt-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hpt-stat,
.hpt-recent { background: #fff; border: 1px solid var(--hpt-border); border-radius: 12px; }
.hpt-stat { padding: 15px; }

.hpt-stat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    height: 36px;
    border-radius: 8px;
    background: #edf2ff;
    color: #304eb5;
}

.hpt-stat--indigo .hpt-stat-icon { background: #f1edff; color: #593c9e; }
.hpt-stat--amber .hpt-stat-icon { background: #fff2e1; color: #81501f; }
.hpt-stat--green .hpt-stat-icon { background: #e9f7ef; color: #176549; }

.hpt-recent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
}

.hpt-recent-row + .hpt-recent-row { border-top: 1px solid var(--hpt-border); }
.hpt-recent-info { min-width: 0; overflow-wrap: anywhere; }

.hpt-dashboard-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eef1f6;
    color: #536581;
    font-size: .75rem;
    font-weight: 700;
}

.hpt-dashboard-badge.is-public { background: #e9f7ef; color: #176549; }

@media (min-width: 992px) {
    .hpt-admin-shell {
        grid-template-columns: var(--hpt-sidebar-width) minmax(0, 1fr);
    }

    .hpt-admin-sidebar {
        position: sticky;
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        height: calc(100dvh - var(--navbar-height));
    }
}

@media (min-width: 1200px) {
    .hpt-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .navbar-custom .navbar-collapse {
        background: #fff;
        border: 1px solid var(--hpt-border);
        border-radius: 8px;
    }

    .hpt-sidebar-link { min-height: 44px; }
}

@media (max-width: 460px) {
    .hpt-stat-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Dashboard chiếm hết chiều ngang bên phải sidebar */
.hpt-admin-main > .hpt-dashboard {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px 24px 32px;
}

/* Khung tiêu đề Dashboard */
.hpt-dashboard > header {
    padding: 18px 20px;
    border: 1px solid #dbe5f6;
    border-radius: 12px;
    background: linear-gradient(110deg, #e8efff 0%, #f7faff 100%);
}

.hpt-dashboard > header h1 {
    color: #203a78;
}
/* Quản lý vòng thi · Mở rộng nội dung bên phải sidebar */
.hpt-admin-main #hpt-exams {
    padding-inline: 24px;
}

.hpt-admin-main #hpt-exams .he-wrap {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

@media (max-width: 767.98px) {
    .hpt-admin-main #hpt-exams {
        padding-inline: 12px;
    }
}

/* =====================================================
   HPT - DASHBOARD CẤP TỈNH / HUYỆN / TRƯỜNG
   ===================================================== */

/* Mở rộng toàn bộ Dashboard */
.hpt-admin-main > .hpt-unit-dashboard {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
}

/* Header */
.hpt-unit-dashboard .hpt-unit-header {
    padding: 20px 24px;
    border: 1px solid #dbe5f6;
    border-radius: 12px;
    background: linear-gradient(110deg, #e8efff 0%, #f8faff 100%);
}

.hpt-unit-header h1 {
    color: #203a78;
}

.hpt-unit-scope {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dbe5f6;
    color: #3458a6;
    font-size: .85rem;
    font-weight: 700;
}

/* Cards thống kê */
.hpt-unit-dashboard .hpt-stat {
    --hpt-stat-accent: #4e73df;
    --hpt-stat-tint: #f3f7ff;
    min-height: 130px;
    border-top: 3px solid var(--hpt-stat-accent);
    background: linear-gradient(145deg, #fff 35%, var(--hpt-stat-tint) 100%);
    box-shadow: 0 3px 12px rgba(23, 41, 77, .035);
}

.hpt-unit-dashboard .hpt-stat--blue {
    --hpt-stat-accent: #4e73df;
    --hpt-stat-tint: #f3f7ff;
}

.hpt-unit-dashboard .hpt-stat--green {
    --hpt-stat-accent: #10b981;
    --hpt-stat-tint: #f0fdf7;
}

.hpt-unit-dashboard .hpt-stat--amber {
    --hpt-stat-accent: #f59e0b;
    --hpt-stat-tint: #fffbeb;
}

.hpt-unit-dashboard .hpt-stat--indigo {
    --hpt-stat-accent: #8b5cf6;
    --hpt-stat-tint: #f8f5ff;
}

.hpt-unit-dashboard .hpt-stat-icon {
    background: var(--hpt-stat-tint);
    color: var(--hpt-stat-accent);
}

/* Panel biểu đồ và danh sách */
.hpt-unit-panel {
    background: #fff;
    border: 1px solid #e1e7f1;
    border-radius: 12px;
    overflow: hidden;
}

.hpt-unit-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e1e7f1;
    background: #f8faff;
}

.hpt-unit-panel-body {
    padding: 20px;
}

.hpt-unit-chart {
    position: relative;
    width: 100%;
}

.hpt-unit-chart--pie {
    height: 290px;
}

.hpt-unit-chart--bar {
    height: 340px;
}

.hpt-unit-chart-label {
    display: inline-block;
    margin: 4px 8px;
    color: #536581;
    font-size: .85rem;
}

/* Bộ lọc */
.hpt-unit-filter {
    padding: 18px;
    border: 1px solid #e3eaf5;
    border-radius: 10px;
    background: #f8faff;
}

.hpt-unit-filter .form-label {
    color: #34486b;
    font-size: .85rem;
    font-weight: 700;
}

.hpt-unit-filter .form-control,
.hpt-unit-filter .form-select {
    min-height: 40px;
    border-color: #d7dfed;
}

.hpt-unit-filter .form-control:focus,
.hpt-unit-filter .form-select:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 .2rem rgba(78, 115, 223, .12);
}

/* Bảng thành viên */
.hpt-unit-table {
    min-width: 800px;
}

.hpt-unit-table thead th {
    padding: 13px;
    background: #f1f5fc;
    color: #34486b;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}

.hpt-unit-table tbody td {
    padding: 13px;
    border-color: #edf1f7;
}

.hpt-unit-table tbody tr:hover {
    background: #f7faff;
}

/* Nhãn trạng thái */
.hpt-unit-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.hpt-unit-badge--success {
    background: #e5f8ee;
    color: #13764c;
}

.hpt-unit-badge--muted {
    background: #edf0f5;
    color: #67768b;
}

.hpt-unit-score {
    font-size: 1.1rem;
    color: #304eb5;
}

.hpt-unit-count {
    padding: 5px 10px;
    border-radius: 6px;
    background: #edf2ff;
    color: #3458a6;
    font-size: .8rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 991.98px) {
    .hpt-admin-main > .hpt-unit-dashboard {
        padding: 16px;
    }

    .hpt-unit-chart--pie,
    .hpt-unit-chart--bar {
        height: 280px;
    }
}

@media (max-width: 575.98px) {
    .hpt-admin-main > .hpt-unit-dashboard {
        padding: 12px;
    }

    .hpt-unit-dashboard .hpt-unit-header {
        padding: 16px;
    }

    .hpt-unit-panel-body {
        padding: 12px;
    }

    .hpt-unit-filter {
        padding: 12px;
    }
}



/* ==================================================
   HPT CRM V2 - MODERN ADMIN UI
   Sidebar + Dashboard
   ================================================== */

/* ============ SIDEBAR ============ */

.hpt-admin-shell {
    --hpt-sidebar-width: 268px;
}

.hpt-sidebar-v2 {
    --bs-offcanvas-width: 268px;
}

.hpt-sidebar-v2 .hptv2-sidebar-surface {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(175deg, #14264b 0%, #0d1a35 100%);
    border-right: 1px solid rgba(255,255,255,.08);
    color: #fff;
}

.hptv2-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 24px 18px 18px;
}

.hptv2-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.hptv2-brand-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    background: linear-gradient(135deg, #507cf1, #7958d5);
    color: #fff;
    font-size: 19px;
    box-shadow: 0 5px 16px rgba(20, 30, 80, .2);
}

.hptv2-brand-name {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.hptv2-brand-subtitle {
    margin-top: 3px;
    color: #a9b9d8;
    font-size: 11px;
}

.hptv2-sidebar-quick {
    padding: 10px 15px 18px;
}

.hptv2-create-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(110deg, #4f74e9, #6b59d9);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(44, 71, 161, .25);
    transition: background .2s, transform .2s;
}

.hptv2-create-btn:hover {
    color: #fff;
    background: linear-gradient(110deg, #6286fa, #806be8);
    transform: translateY(-1px);
}

.hptv2-create-arrow {
    margin-left: auto;
    opacity: .7;
    font-size: 11px;
}

/* Sidebar Navigation */

.hpt-sidebar-v2 .hptv2-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 12px 18px;
    scrollbar-width: thin;
    scrollbar-color: #435678 transparent;
}

.hptv2-menu-group {
    margin-bottom: 9px;
}

.hptv2-menu-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 11px;
    cursor: pointer;
    border-radius: 9px;
    color: #b6c5e3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    user-select: none;
    transition: background .2s;
    list-style: none;
}

.hptv2-menu-heading::-webkit-details-marker {
    display: none;
}

.hptv2-menu-heading:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
}

.hptv2-menu-heading-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hptv2-menu-heading-left i {
    width: 17px;
    text-align: center;
    font-size: 13px;
}

.hptv2-menu-chevron {
    font-size: 10px;
    transition: transform .2s;
}

.hptv2-menu-group[open] .hptv2-menu-chevron {
    transform: rotate(180deg);
}

.hptv2-menu-items {
    padding: 3px 0 7px;
}

.hpt-sidebar-v2 .hptv2-menu-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    margin: 3px 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #c4d0e8;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.hpt-sidebar-v2 .hptv2-menu-link:hover {
    background: rgba(255,255,255,.075);
    color: #fff;
}

.hpt-sidebar-v2 .hptv2-menu-link.is-active {
    background: rgba(93,132,239,.20);
    border-color: rgba(116,153,255,.22);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #75a2ff;
}

.hptv2-link-icon {
    display: grid;
    place-items: center;
    width: 19px;
    flex: 0 0 19px;
    font-size: 14px;
}

.hptv2-link-text {
    flex: 1;
    min-width: 0;
}

.hptv2-active-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #83adff;
}

/* Sidebar Footer */

.hptv2-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.08);
}

.hptv2-user-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(255,255,255,.12);
    color: #e3eafa;
}

.hptv2-user-info {
    flex: 1;
    min-width: 0;
}

.hptv2-user-name {
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hptv2-user-role {
    color: #a9b9d8;
    font-size: 10px;
    margin-top: 3px;
}

.hptv2-user-settings {
    color: #b8c8e6;
    padding: 7px;
    border-radius: 7px;
}

.hptv2-user-settings:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}

/* ============ DASHBOARD ============ */

.hpt-admin-main > .hptv2-dashboard {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 28px;
    color: #1c2c4c;
}

.hptv2-dashboard {
    --hptv2-border: #e5eaf3;
    --hptv2-muted: #78869d;
}

.hptv2-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 28px;
    margin-bottom: 24px;
    border: 1px solid #dce5fa;
    border-radius: 17px;
    background:
        radial-gradient(circle at 92% 15%, rgba(107,139,238,.15), transparent 32%),
        linear-gradient(110deg, #eaf0ff 0%, #f9fbff 100%);
}

.hptv2-eyebrow {
    margin-bottom: 10px;
    color: #4569bb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.hptv2-eyebrow i {
    font-size: 7px;
    color: #5684ef;
    vertical-align: middle;
}

.hptv2-dashboard-header h1 {
    margin: 0 0 9px;
    color: #1e3769;
    font-size: clamp(23px, 2.4vw, 30px);
    font-weight: 800;
    letter-spacing: -.7px;
}

.hptv2-dashboard-header p {
    margin: 0;
    color: #62748e;
    font-size: 13px;
}

.hptv2-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 14px;
    color: #566d91;
    font-size: 12px;
    font-weight: 600;
}

.hptv2-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 18px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #365fcb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(54,95,203,.18);
}

.hptv2-primary-btn:hover {
    background: #294eac;
    color: #fff;
}

/* KPI */

.hptv2-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.hptv2-kpi {
    --hptv2-accent: #426bea;
    --hptv2-tint: #edf3ff;
    position: relative;
    min-width: 0;
    padding: 21px;
    border: 1px solid var(--hptv2-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 3px 15px rgba(26, 48, 88, .035);
    transition: transform .2s, box-shadow .2s;
}

.hptv2-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 24px rgba(26,48,88,.075);
}

.hptv2-kpi--purple {
    --hptv2-accent: #7756d7;
    --hptv2-tint: #f2edff;
}

.hptv2-kpi--orange {
    --hptv2-accent: #cc861b;
    --hptv2-tint: #fff4e3;
}

.hptv2-kpi--green {
    --hptv2-accent: #19976a;
    --hptv2-tint: #e5f8ef;
}

.hptv2-kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.hptv2-kpi-title {
    color: #63728b;
    font-size: 12px;
    font-weight: 700;
}

.hptv2-kpi-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--hptv2-tint);
    color: var(--hptv2-accent);
    font-size: 17px;
}

.hptv2-kpi-value {
    margin-top: 7px;
    color: #1c2c4c;
    font-size: clamp(27px, 2.4vw, 36px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.25;
}

.hptv2-kpi-bottom {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: #7b899d;
    font-size: 11px;
}

.hptv2-kpi-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--hptv2-accent);
}

/* Section Heading */

.hptv2-section {
    margin-bottom: 28px;
}

.hptv2-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.hptv2-section-heading h2 {
    margin: 0 0 4px;
    color: #1c2c4c;
    font-size: 17px;
    font-weight: 800;
}

.hptv2-section-heading p {
    margin: 0;
    color: #7b899d;
    font-size: 12px;
}

.hptv2-text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4569c0;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.hptv2-text-link:hover {
    color: #23499e;
    text-decoration: underline;
}

/* Overview */

.hptv2-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hptv2-overview-item {
    --hptv2-overview-accent: #315ec8;
    --hptv2-overview-bg: #edf3ff;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--hptv2-border);
    border-radius: 13px;
    background: #fff;
}

.hptv2-overview--green {
    --hptv2-overview-accent: #18885b;
    --hptv2-overview-bg: #e8f9f0;
}

.hptv2-overview--orange {
    --hptv2-overview-accent: #b97916;
    --hptv2-overview-bg: #fff4df;
}

.hptv2-overview--red {
    --hptv2-overview-accent: #c85454;
    --hptv2-overview-bg: #ffeded;
}

.hptv2-overview-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--hptv2-overview-bg);
    color: var(--hptv2-overview-accent);
    font-size: 17px;
}

.hptv2-overview-value {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.2;
    color: #1c2c4c;
}

.hptv2-overview-label {
    margin-top: 4px;
    color: #738198;
    font-size: 11px;
    font-weight: 600;
}

.hptv2-overview-note {
    margin: 10px 0 0;
    color: #8b96a8;
    font-size: 11px;
}

/* Panel */

.hptv2-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 25px;
}

.hptv2-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hptv2-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 3px 15px rgba(26,48,88,.025);
}

.hptv2-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 22px;
    border-bottom: 1px solid #edf0f6;
}

.hptv2-panel-header h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 5px;
    color: #243957;
    font-size: 15px;
    font-weight: 800;
}

.hptv2-panel-header h2 i {
    color: #5c7bca;
}

.hptv2-panel-header p {
    margin: 0;
    color: #8a96a8;
    font-size: 11px;
}

/* Recent Exams */

.hptv2-recent-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 21px;
    border-bottom: 1px solid #f0f2f7;
}

.hptv2-recent-item:last-child {
    border-bottom: 0;
}

.hptv2-recent-item:hover {
    background: #fafcff;
}

.hptv2-recent-icon {
    display: grid;
    place-items: center;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    border-radius: 10px;
    background: #eef3ff;
    color: #5575c8;
}

.hptv2-recent-info {
    flex: 1;
    min-width: 0;
}

.hptv2-recent-info > a,
.hptv2-schedule-info > a {
    display: block;
    color: #263a5a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.hptv2-recent-info > a:hover,
.hptv2-schedule-info > a:hover {
    color: #365fcb;
}

.hptv2-recent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 6px;
    color: #8a96a8;
    font-size: 11px;
}

.hptv2-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.hptv2-status > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.hptv2-status--public {
    background: #e6f8ee;
    color: #188657;
}

.hptv2-status--public > span {
    background: #188657;
}

.hptv2-status--draft {
    background: #f0f2f6;
    color: #6d788c;
}

.hptv2-status--draft > span {
    background: #8b96a9;
}

/* Quick Actions */

.hptv2-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding: 20px;
}

.hptv2-quick-link {
    --hptv2-quick-color: #4b70da;
    --hptv2-quick-bg: #edf3ff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 17px;
    min-height: 105px;
    border: 1px solid #edf0f6;
    border-radius: 12px;
    background: #fcfdff;
    color: #344765;
    text-decoration: none;
    transition: background .2s, transform .2s;
}

.hptv2-quick-link:hover {
    background: var(--hptv2-quick-bg);
    transform: translateY(-2px);
    color: #263a5a;
}

.hptv2-quick--purple {
    --hptv2-quick-color: #7955c8;
    --hptv2-quick-bg: #f5efff;
}

.hptv2-quick--orange {
    --hptv2-quick-color: #bc7a25;
    --hptv2-quick-bg: #fff6ea;
}

.hptv2-quick--green {
    --hptv2-quick-color: #198e65;
    --hptv2-quick-bg: #ebfaf2;
}

.hptv2-quick--cyan {
    --hptv2-quick-color: #208dab;
    --hptv2-quick-bg: #ebfaff;
}

.hptv2-quick--pink {
    --hptv2-quick-color: #ba5e9b;
    --hptv2-quick-bg: #fff0f8;
}

.hptv2-quick-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--hptv2-quick-bg);
    color: var(--hptv2-quick-color);
    font-size: 14px;
}

.hptv2-quick-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

/* Schedule */

.hptv2-schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid #f0f2f7;
}

.hptv2-schedule-item:last-child {
    border-bottom: 0;
}

.hptv2-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 57px;
    height: 58px;
    border-radius: 10px;
    background: #edf3ff;
    color: #365fcb;
}

.hptv2-date-box strong {
    font-size: 22px;
    line-height: 1.15;
}

.hptv2-date-box span {
    font-size: 10px;
    font-weight: 700;
}

.hptv2-schedule-info {
    flex: 1;
    min-width: 0;
}

.hptv2-schedule-meta {
    margin-top: 5px;
    font-size: 11px;
    color: #8996ab;
    overflow-wrap: anywhere;
}

.hptv2-schedule-time {
    color: #64758f;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.hptv2-schedule-action {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f1f4fa;
    color: #64758f;
    font-size: 12px;
}

.hptv2-schedule-action:hover {
    background: #e6edff;
    color: #365fcb;
}

.hptv2-schedule-footnote {
    padding: 12px 22px;
    background: #fafbfe;
    color: #8491a5;
    font-size: 11px;
}

.hptv2-empty {
    padding: 35px 15px;
    text-align: center;
    color: #92a0b5;
}

.hptv2-empty i {
    font-size: 27px;
}

.hptv2-empty p {
    margin: 10px 0 0;
    font-size: 13px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1250px) {
    .hptv2-kpi-grid,
    .hptv2-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .hptv2-content-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .hpt-admin-main > .hptv2-dashboard {
        padding: 14px;
    }

    .hptv2-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px;
    }

    .hptv2-primary-btn {
        width: 100%;
    }

    .hptv2-panel-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .hptv2-kpi-grid,
    .hptv2-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hptv2-schedule-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .hptv2-schedule-time {
        margin-left: auto;
    }

    .hptv2-quick-grid {
        gap: 9px;
        padding: 12px;
    }

    .hptv2-quick-link {
        padding: 12px;
        min-height: 95px;
    }
}
