/**
 * DriveHub Frontend CSS — Design system thống nhất cho toàn bộ trang site
 * Tông màu: xanh navy (tin cậy) + vàng hổ phách (biển báo giao thông)
 * Không phụ thuộc CDN; dùng chung với Bootstrap 3 của theme default.
 */

.dh {
    /* Theo màu của theme đang dùng (theme DriveHub đặt --th-primary/--th-accent); theme khác giữ màu mặc định */
    --dh-primary: var(--th-primary, #1d4ed8);
    --dh-primary-dark: var(--th-primary-dark, #0b2e59);
    --dh-primary-soft: var(--th-primary-soft, #eff6ff);
    --dh-accent: var(--th-accent, #f59e0b);
    --dh-accent-dark: var(--th-accent-dark, #b45309);
    --dh-ink: #0f172a;
    --dh-muted: #64748b;
    --dh-bg: #f1f5f9;
    --dh-surface: #ffffff;
    --dh-border: #e2e8f0;
    --dh-success: #16a34a;
    --dh-success-soft: #f0fdf4;
    --dh-danger: #dc2626;
    --dh-danger-soft: #fef2f2;
    --dh-warning: #d97706;
    --dh-warning-soft: #fffbeb;
    --dh-radius: 14px;
    --dh-radius-sm: 8px;
    --dh-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
    --dh-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(15, 23, 42, 0.12);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dh-ink);
    font-size: 15px;
    line-height: 1.6;
}

.dh *,
.dh *::before,
.dh *::after {
    box-sizing: border-box;
}

/* ══════════════ HERO ══════════════ */
.dh-hero {
    position: relative;
    background: linear-gradient(140deg, var(--dh-primary-dark) 0%, #143d80 55%, var(--dh-primary) 100%);
    color: #fff;
    padding: 56px 24px 88px;
    border-radius: var(--dh-radius);
    overflow: hidden;
    text-align: center;
}

/* Vạch kẻ đường cách điệu dưới chân hero */
.dh-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    height: 4px;
    background: repeating-linear-gradient(90deg,
        var(--dh-accent) 0 36px,
        transparent 36px 64px);
    opacity: 0.85;
}

.dh-hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.dh-hero h1 {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.25;
}

.dh-hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin: 0 auto 32px;
}

.dh-hero-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.dh-stat {
    min-width: 130px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 22px;
}

.dh-stat-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #fcd34d;
    line-height: 1.2;
}

.dh-stat-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.75);
}

/* ══════════════ KHỐI TRA CỨU ══════════════ */
.dh-lookup {
    position: relative;
    z-index: 5;
    max-width: 620px;
    margin: -48px auto 40px;
    background: var(--dh-surface);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius);
    box-shadow: var(--dh-shadow-lg);
    padding: 28px;
}

.dh-lookup-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
}

.dh-lookup-desc {
    font-size: 13px;
    color: var(--dh-muted);
    text-align: center;
    margin: 0 0 18px;
}

.dh-lookup-form {
    display: flex;
    gap: 10px;
}

.dh-lookup-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--dh-ink);
    background: var(--dh-bg);
    border: 1.5px solid var(--dh-border);
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

.dh-lookup-input:focus {
    outline: none;
    border-color: var(--dh-primary);
    background: #fff;
}

/* ══════════════ NÚT ══════════════ */
.dh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

.dh-btn:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.35);
    outline-offset: 2px;
}

.dh-btn-primary {
    background: var(--dh-primary);
    color: #fff;
}

.dh-btn-primary:hover,
.dh-btn-primary:focus {
    background: #1e40af;
    color: #fff;
    text-decoration: none;
}

.dh-btn-accent {
    background: var(--dh-accent);
    color: #422006;
}

.dh-btn-accent:hover,
.dh-btn-accent:focus {
    background: #d97706;
    color: #422006;
    text-decoration: none;
}

.dh-btn-outline {
    background: transparent;
    border: 1.5px solid var(--dh-border);
    color: var(--dh-ink);
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.dh-btn-outline:hover,
.dh-btn-outline:focus {
    border-color: var(--dh-primary);
    color: var(--dh-primary);
    text-decoration: none;
}

.dh-btn-block {
    display: flex;
    width: 100%;
}

/* ══════════════ BỐ CỤC & THẺ ══════════════ */
.dh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4px;
}

.dh-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dh-card {
    background: var(--dh-surface);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius);
    box-shadow: var(--dh-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.dh-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--dh-border);
}

.dh-card-title .fa {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dh-primary-soft);
    color: var(--dh-primary);
    border-radius: 9px;
    font-size: 15px;
}

/* Header trang con (schedule / result / dashboard) */
.dh-page-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--dh-primary-dark), var(--dh-primary));
    color: #fff;
    border-radius: var(--dh-radius);
    padding: 26px 28px;
    margin-bottom: 24px;
}

.dh-page-head .fa {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 22px;
    color: #fcd34d;
}

.dh-page-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.dh-page-head p {
    margin: 2px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* ══════════════ DANH SÁCH LỊCH / SỰ KIỆN ══════════════ */
.dh-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dh-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--dh-border);
}

.dh-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dh-list-date {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    background: var(--dh-primary-soft);
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 6px 4px;
    color: var(--dh-primary);
    font-weight: 800;
    font-size: 15px;
    line-height: 1.3;
}

.dh-list-date small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--dh-muted);
}

.dh-list-title {
    font-weight: 700;
    font-size: 14.5px;
    margin-bottom: 3px;
}

.dh-list-meta {
    font-size: 13px;
    color: var(--dh-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.dh-empty {
    text-align: center;
    color: var(--dh-muted);
    padding: 36px 16px;
}

.dh-empty .fa {
    display: block;
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

/* ══════════════ TIN TỨC ══════════════ */
.dh-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.dh-news-card {
    display: flex;
    flex-direction: column;
    background: var(--dh-surface);
    border: 1px solid var(--dh-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.dh-news-card:hover {
    box-shadow: var(--dh-shadow-lg);
    transform: translateY(-3px);
}

.dh-news-img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--dh-bg);
}

.dh-news-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dh-news-time {
    font-size: 12px;
    color: var(--dh-muted);
}

.dh-news-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.dh-news-title a {
    color: var(--dh-ink);
    text-decoration: none;
}

.dh-news-title a:hover {
    color: var(--dh-primary);
}

.dh-news-desc {
    font-size: 13.5px;
    color: var(--dh-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ══════════════ BẢNG DỮ LIỆU ══════════════ */
.dh-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dh-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--dh-muted);
    background: var(--dh-bg);
    padding: 12px 14px;
    border-bottom: 2px solid var(--dh-border);
    white-space: nowrap;
}

.dh-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--dh-border);
    vertical-align: middle;
}

.dh-table tbody tr:hover td {
    background: var(--dh-primary-soft);
}

.dh-table tbody tr:last-child td {
    border-bottom: none;
}

/* Bảng chuyển thành thẻ xếp chồng trên điện thoại */
@media (max-width: 640px) {
    .dh-table-stack thead {
        display: none;
    }

    .dh-table-stack tbody tr {
        display: block;
        border: 1px solid var(--dh-border);
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 6px 0;
    }

    .dh-table-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        border-bottom: 1px dashed var(--dh-border);
        padding: 9px 14px;
    }

    .dh-table-stack td:last-child {
        border-bottom: none;
    }

    .dh-table-stack td::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--dh-muted);
        flex-shrink: 0;
    }
}

/* ══════════════ NHÃN TRẠNG THÁI ══════════════ */
.dh .label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    line-height: 1.5;
}

.dh .label-success { background: var(--dh-success-soft); color: var(--dh-success); }
.dh .label-danger  { background: var(--dh-danger-soft);  color: var(--dh-danger); }
.dh .label-warning { background: var(--dh-warning-soft); color: var(--dh-warning); }
.dh .label-info    { background: var(--dh-primary-soft); color: var(--dh-primary); }
.dh .label-primary { background: var(--dh-primary-soft); color: var(--dh-primary); }
.dh .label-default { background: var(--dh-bg);           color: var(--dh-muted); }

/* ══════════════ HỒ SƠ HỌC VIÊN (DASHBOARD) ══════════════ */
.dh-profile {
    text-align: center;
}

.dh-avatar {
    width: 84px;
    height: 84px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dh-primary-soft);
    color: var(--dh-primary);
    border: 3px solid #dbeafe;
    border-radius: 50%;
    font-size: 34px;
}

.dh-profile h3 {
    margin: 0 0 2px;
    font-size: 19px;
    font-weight: 800;
}

.dh-profile-code {
    font-size: 13px;
    color: var(--dh-muted);
    margin-bottom: 16px;
}

.dh-profile-fields {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.dh-profile-fields li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--dh-border);
    font-size: 14px;
}

.dh-profile-fields li:last-child {
    border-bottom: none;
}

.dh-profile-fields .dh-field-label {
    color: var(--dh-muted);
    flex-shrink: 0;
}

.dh-profile-fields .dh-field-value {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* ══════════════ TIMELINE LỊCH THỰC HÀNH ══════════════ */
.dh-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.dh-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: repeating-linear-gradient(180deg,
        #bfdbfe 0 10px,
        transparent 10px 18px);
}

.dh-timeline-item {
    position: relative;
    padding: 0 0 18px 32px;
}

.dh-timeline-item:last-child {
    padding-bottom: 0;
}

.dh-timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--dh-primary);
    border: 3px solid #dbeafe;
}

.dh-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.dh-timeline-date {
    font-weight: 800;
    color: var(--dh-primary);
}

.dh-timeline-time {
    font-size: 13px;
    color: var(--dh-muted);
}

.dh-timeline-body {
    font-size: 14px;
    color: var(--dh-ink);
    margin-top: 3px;
}

.dh-timeline-body .text-muted {
    color: var(--dh-muted);
}

/* ══════════════ VÒNG TIẾN ĐỘ (RESULT) ══════════════ */
.dh-progress-ring {
    width: 160px;
    margin: 18px auto;
}

.dh-progress-ring .ring-bg {
    stroke: var(--dh-border);
}

.dh-progress-ring .ring-value {
    stroke: var(--dh-success);
    transition: stroke-dasharray 1s ease-out;
}

.dh-alert-success {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dh-success-soft);
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}

.dh-alert-success .fa {
    font-size: 22px;
    color: var(--dh-success);
}

/* Kết quả tra cứu AJAX */
.dh-lookup-result {
    margin-top: 16px;
}

.dh-lookup-result .alert {
    border-radius: 10px;
}

/* ══════════════ HIỆU ỨNG ══════════════ */
@keyframes dhFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dh-animate {
    animation: dhFadeUp 0.5s ease-out both;
}

.dh-animate-1 { animation-delay: 0.08s; }
.dh-animate-2 { animation-delay: 0.16s; }
.dh-animate-3 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .dh-animate,
    .dh-animate-1,
    .dh-animate-2,
    .dh-animate-3 {
        animation: none;
    }

    .dh-news-card,
    .dh-btn {
        transition: none;
    }
}

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 768px) {
    .dh-hero {
        padding: 40px 18px 72px;
    }

    .dh-lookup {
        margin: -40px 12px 28px;
        padding: 20px;
    }

    .dh-lookup-form {
        flex-direction: column;
    }

    .dh-lookup-form .dh-btn {
        width: 100%;
    }

    .dh-page-head {
        padding: 20px;
    }

    .dh-card {
        padding: 18px;
    }
}

/* ══════════════ CHƯƠNG TRÌNH ĐÀO TẠO ══════════════ */
.dh-program {
    display: flex;
    flex-direction: column;
}
.dh-program-code {
    align-self: flex-start;
    background: var(--dh-accent);
    color: #422006;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 10px;
    margin-bottom: 12px;
}
.dh-program-price small {
    display: block;
    color: var(--dh-muted);
    font-size: 13px;
}
.dh-program-price strong {
    font-size: 24px;
    color: var(--dh-primary);
}
.dh-program-duration {
    color: var(--dh-muted);
    margin: 8px 0 14px;
}
.dh-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dh-check-list li {
    position: relative;
    padding: 6px 0 6px 26px;
    border-top: 1px dashed var(--dh-border);
}
.dh-check-list li::before {
    content: "\f00c";
    font-family: FontAwesome;
    position: absolute;
    left: 2px;
    color: var(--dh-success);
}
.dh-grid-2 > .dh-card {
    margin-bottom: 0;
}

/* ══════════════ FORM NGOÀI SITE (đăng ký tư vấn, tra cứu, cổng) ══════════════ */
.dh-muted { color: var(--dh-muted); }
.dh-small { font-size: 12.5px; }
.dh-alert-danger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dh-danger-soft);
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}
.dh-alert-danger .fa { font-size: 20px; color: var(--dh-danger); }
.dh-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0 20px;
}
.dh-field {
    display: block;
    margin-bottom: 16px;
    font-weight: normal;
}
.dh-field > span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dh-ink);
    margin-bottom: 6px;
}
.dh-field > span b { color: var(--dh-danger); }
.dh-field input,
.dh-field select,
.dh-field textarea,
.dh-captcha input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--dh-ink);
    background: var(--dh-surface);
    border: 1.5px solid var(--dh-border);
    border-radius: var(--dh-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dh-field input:focus,
.dh-field select:focus,
.dh-field textarea:focus,
.dh-captcha input:focus {
    outline: none;
    border-color: var(--dh-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}
.dh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dh-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.dh-captcha .fa { cursor: pointer; color: var(--dh-muted); font-size: 18px; }
.dh-captcha input { width: 140px; }

/* Tiến độ đào tạo */
.dh-enrollment {
    padding: 16px 0;
    border-bottom: 1px dashed var(--dh-border);
}
.dh-enrollment:last-child { border-bottom: none; padding-bottom: 0; }
.dh-enrollment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.dh-progress-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 24px;
    margin: 14px 0 10px;
}
.dh-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 5px;
}
.dh-progress-label span:last-child { color: var(--dh-muted); white-space: nowrap; }
.dh-progress {
    height: 8px;
    background: var(--dh-bg);
    border-radius: 999px;
    overflow: hidden;
}
.dh-progress span {
    display: block;
    height: 100%;
    background: var(--dh-primary);
    border-radius: 999px;
}
.dh-progress-item.done .dh-progress span { background: var(--dh-success); }
.dh-tests { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════════ CỔNG HỌC VIÊN / NHÂN VIÊN ══════════════ */
.dh-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 2px;
}
.dh-tab {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--dh-surface);
    border: 1px solid var(--dh-border);
    color: var(--dh-ink);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.dh-tab:hover, .dh-tab:focus { border-color: var(--dh-primary); color: var(--dh-primary); text-decoration: none; }
.dh-tab.active { background: var(--dh-primary); border-color: var(--dh-primary); color: #fff; }
.dh-badge {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--dh-danger);
    color: #fff;
    font-size: 12px;
    text-align: center;
}
.dh-subtitle { font-size: 15px; font-weight: 700; margin: 20px 0 8px; }
.dh-grow { flex: 1; min-width: 0; }
.dh-btn-sm { padding: 6px 12px; font-size: 13px; min-height: 36px; flex-shrink: 0; }
.dh-text-danger { color: var(--dh-danger); }
.dh-text-success { color: var(--dh-success); }
.dh-notice-body { font-size: 14px; margin: 4px 0; }
.dh-unread .dh-list-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--dh-primary);
    vertical-align: middle;
}

/* Check-in bằng điện thoại */
.dh-checkin { max-width: 560px; margin-left: auto; margin-right: auto; }
.dh-checkin-info { font-weight: 600; }
.dh-checkin-stage {
    position: relative;
    background: #0f172a;
    border-radius: var(--dh-radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    max-height: 58vh;
    margin-bottom: 12px;
}
.dh-checkin-stage video,
.dh-checkin-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
}
.dh-checkin-stage [hidden] { display: none; }
.dh-checkin-status { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; color: var(--dh-muted); }
.dh-checkin-status li { padding: 3px 0; }
.dh-checkin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dh-checkin-actions .dh-btn { flex: 1; min-height: 48px; }
.dh-checkin-result:empty { display: none; }
.dh-checkin-chip {
    position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; background: rgba(15, 23, 42, .72); color: #fde68a; font-size: 13px; font-weight: 700;
}
.dh-checkin-stage img:not([hidden]) ~ .dh-checkin-chip { display: none; }
.dh-checkin-actions .dh-checkin-submit { flex-basis: 100%; min-height: 52px; font-size: 17px; }
.dh-checkin-actions [hidden] { display: none; }
.dh-checkin-https { font-weight: 700; text-decoration: underline; }

/* ══════════════ THI THỬ LÝ THUYẾT ══════════════ */
.dh-quiz-hangs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.dh-quiz-hang {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1.5px solid var(--dh-border);
    border-radius: var(--dh-radius-sm);
    cursor: pointer;
    font-weight: normal;
}
.dh-quiz-hang:has(input:checked) { border-color: var(--dh-primary); background: var(--dh-primary-soft); }
.dh-quiz-hang input { margin-top: 4px; }
.dh-quiz-hang small { display: block; color: var(--dh-muted); font-size: 12.5px; }
.dh-quiz-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    background: var(--dh-surface);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-sm);
    box-shadow: var(--dh-shadow);
    padding: 10px 16px;
    margin-bottom: 14px;
}
.dh-quiz-timer { font-size: 18px; color: var(--dh-primary); }
.dh-quiz-timer.dh-quiz-hurry { color: var(--dh-danger); }
.dh-quiz-progress { color: var(--dh-muted); margin-left: auto; }
.dh-quiz-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.dh-quiz-nav a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    color: var(--dh-ink);
    background: var(--dh-surface);
    font-size: 13px;
    text-decoration: none;
}
.dh-quiz-nav a.answered { background: var(--dh-primary); border-color: var(--dh-primary); color: #fff; }
.dh-quiz-nav a.correct { background: var(--dh-success-soft); border-color: var(--dh-success); color: var(--dh-success); }
.dh-quiz-nav a.wrong { background: var(--dh-danger-soft); border-color: var(--dh-danger); color: var(--dh-danger); }
.dh-quiz-nav a.blank { background: var(--dh-warning-soft); border-color: var(--dh-warning); color: var(--dh-warning); }
.dh-question { scroll-margin-top: 70px; }
.dh-question-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; color: var(--dh-primary); margin-bottom: 8px; }
.dh-question-text { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; }
.dh-question-img { display: block; max-width: 100%; max-height: 360px; margin: 0 auto 12px; border-radius: var(--dh-radius-sm); }
.dh-options { display: grid; gap: 8px; }
.dh-option {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1.5px solid var(--dh-border);
    border-radius: var(--dh-radius-sm);
    font-weight: normal;
    cursor: pointer;
    min-height: 44px;
}
.dh-option:has(input:checked) { border-color: var(--dh-primary); background: var(--dh-primary-soft); }
.dh-option input { margin-top: 3px; flex-shrink: 0; }
.dh-option.dh-opt-correct { border-color: var(--dh-success); background: var(--dh-success-soft); }
.dh-option.dh-opt-wrong { border-color: var(--dh-danger); background: var(--dh-danger-soft); }
.dh-question.dh-q-wrong, .dh-question.dh-q-blank { border-left: 4px solid var(--dh-danger); }
.dh-question.dh-q-correct { border-left: 4px solid var(--dh-success); }
.dh-explain { margin-top: 12px; padding: 10px 12px; background: var(--dh-bg); border-radius: var(--dh-radius-sm); font-size: 14px; }

/* ══════════════ TIN NHẮN 1-1 ══════════════ */
.dh-msg {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 768px) {
    .dh-msg { grid-template-columns: 1fr; }
}
.dh-msg-list { list-style: none; margin: 0; padding: 0; }
.dh-msg-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--dh-radius-sm);
    color: var(--dh-ink);
    text-decoration: none;
}
.dh-msg-contact span:first-child { flex: 1; min-width: 0; font-weight: 600; }
.dh-msg-contact small { color: var(--dh-muted); font-size: 12px; }
.dh-msg-contact:hover, .dh-msg-contact:focus { background: var(--dh-bg); text-decoration: none; color: var(--dh-ink); }
.dh-msg-contact.active { background: var(--dh-primary-soft); color: var(--dh-primary); }
.dh-msg-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 14px;
}
.dh-msg-item { max-width: 80%; align-self: flex-start; }
.dh-msg-item.dh-msg-mine { align-self: flex-end; text-align: right; }
.dh-msg-bubble {
    display: inline-block;
    text-align: left;
    padding: 9px 13px;
    border-radius: 14px;
    background: var(--dh-bg);
    word-break: break-word;
}
.dh-msg-mine .dh-msg-bubble { background: var(--dh-primary); color: #fff; }
.dh-msg-item small { display: block; color: var(--dh-muted); font-size: 11.5px; margin-top: 2px; }
.dh-msg-form textarea { min-height: 64px; }
.dh-msg-image { display: block; width: fit-content; max-width: 100%; margin-bottom: 4px; }
.dh-msg-image img {
    display: block;
    max-width: min(260px, 60vw);
    max-height: 260px;
    border-radius: 12px;
    border: 1px solid var(--dh-border);
    object-fit: cover;
}
.dh-msg-mine .dh-msg-image { margin-left: auto; }
.dh-msg-item .dh-msg-image + .dh-msg-bubble { display: table; margin-left: 0; }
.dh-msg-mine .dh-msg-image + .dh-msg-bubble { margin-left: auto; }
.dh-msg-attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }
.dh-msg-file { position: relative; overflow: hidden; cursor: pointer; margin: 0; }
.dh-msg-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.dh-msg-file:focus-within { outline: 2px solid var(--dh-primary); outline-offset: 2px; }
.dh-msg-preview { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 8px 4px 4px; border-radius: 10px; background: var(--dh-bg); }
.dh-msg-preview[hidden] { display: none; }
.dh-msg-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.dh-msg-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; font-size: 13px; }
.dh-msg-hint { flex-basis: 100%; color: var(--dh-muted); font-size: 12px; }

/* Cổng nhân viên: điểm danh / duyệt check-in / sát hạch */
.dh-pick a.dh-grow { color: inherit; text-decoration: none; display: block; }
.dh-pick.active { background: var(--dh-bg); border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.dh-input-sm {
    width: 100%;
    max-width: min(260px, 60vw);
    padding: 6px 10px;
    border: 1px solid var(--dh-border);
    border-radius: 8px;
    font-size: 14px;
    min-height: 36px;
    background: #fff;
}
.dh-review-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.dh-review-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.dh-review-form .dh-input-sm { flex: 1 1 180px; }

/* ===================== Trang chủ dạng landing (khóa học + đăng ký tư vấn) ===================== */
.dh-landing { max-width: none; padding: 0; }
.dh-section { padding: 80px 0; background: #fff; }
.dh-section-muted { background: #f8fafc; }
.dh-section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.dh-eyebrow { color: var(--dh-accent-dark); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 8px; }
.dh .dh-section-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; color: var(--dh-primary); margin: 0; line-height: 1.25; }
.dh-section-title::after { content: ""; display: block; width: 60px; height: 4px; border-radius: 2px; background: var(--dh-accent); margin: 14px auto 0; }
.dh-section-title.dh-text-left::after { margin-left: 0; }
.dh-section-intro { color: var(--dh-muted); margin: 16px 0 0; }

.dh-pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.dh-pricing {
    background: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05), 0 8px 20px rgba(0, 0, 0, .07), 0 20px 40px rgba(0, 0, 0, .06);
    transition: transform .25s, box-shadow .25s;
}
.dh-pricing:hover { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(0, 0, 0, .07), 0 12px 28px rgba(0, 0, 0, .10), 0 28px 56px rgba(0, 0, 0, .08); }
.dh-pricing-head { padding: 24px; color: #fff; background: linear-gradient(135deg, var(--dh-primary), color-mix(in srgb, var(--dh-primary) 55%, #fff)); }
.dh-pricing-accent .dh-pricing-head { background: linear-gradient(135deg, var(--dh-accent), var(--dh-accent-dark)); }
.dh-pricing-dark .dh-pricing-head { background: linear-gradient(135deg, #334155, #0f172a); }
.dh-pricing-title { display: flex; gap: 12px; align-items: center; }
.dh-pricing-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.dh-pricing-code { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.dh .dh-pricing-head h3 { margin: 2px 0 0; color: #fff; font-size: 19px; font-weight: 900; line-height: 1.3; }
.dh-pricing-price { font-size: 30px; font-weight: 900; margin-top: 18px; line-height: 1.1; }
.dh-pricing-note { font-size: 12px; color: rgba(255, 255, 255, .75); margin-top: 4px; }
.dh-pricing-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.dh-pricing-body .dh-check-list { flex: 1; margin-bottom: 18px; }
.dh-pricing-duration { display: flex; justify-content: space-between; gap: 10px; background: #f8fafc; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--dh-muted); margin-bottom: 18px; }
.dh-pricing-duration strong { color: var(--dh-primary); }
.dh-pricing-btn { background: var(--dh-primary); color: #fff !important; padding: 13px 18px; border-radius: 12px; font-weight: 700; }
.dh-pricing-btn:hover { background: var(--dh-primary-dark); }
.dh-pricing-accent .dh-pricing-btn { background: var(--dh-accent); }
.dh-pricing-accent .dh-pricing-btn:hover { background: var(--dh-accent-dark); }
.dh-pricing-dark .dh-pricing-btn { background: #1e293b; }

.dh-register { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.dh-register-intro .dh-check-list { margin: 22px 0 26px; }
.dh-register-hotline { display: inline-flex; align-items: center; gap: 14px; padding: 14px 22px; border-radius: 16px; background: #fff; text-decoration: none !important; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.dh-register-hotline .fa { width: 44px; height: 44px; border-radius: 50%; background: var(--dh-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.dh-register-hotline small { display: block; color: var(--dh-muted); font-size: 12px; }
.dh-register-hotline strong { display: block; color: var(--dh-primary); font-size: 20px; font-weight: 900; }
.dh-register-card { padding: 28px; }
.dh-register-privacy { margin: 12px 0 0; text-align: center; }
@media (max-width: 991px) {
    .dh-register { grid-template-columns: 1fr; gap: 28px; }
    .dh-section { padding: 56px 0; }
}

/* Ảnh chân dung ở đầu cổng học viên */
.dh-page-head-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); flex-shrink: 0; background: #fff; }

/* ===================== Khung cổng (học viên / nhân viên) — ưu tiên điện thoại ===================== */
.dh-portal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.dh-portal-main { min-width: 0; }
.dh-pnav {
    position: sticky; top: 90px; background: #fff; border-radius: var(--dh-radius); padding: 14px 10px;
    box-shadow: var(--dh-shadow); max-height: calc(100vh - 110px); overflow-y: auto;
}
.dh-pnav-profile { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--dh-border); }
.dh-pnav-profile img, .dh-pnav-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
/* Tên + ảnh ở đầu menu là liên kết mở hồ sơ cá nhân */
.dh-pnav-me { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 6px; margin: -6px; border-radius: 12px; text-decoration: none !important; transition: background .15s; }
.dh-pnav-me:hover, .dh-pnav-me.active { background: var(--dh-primary-soft); }
.dh-pnav-me-link { display: block; margin-top: 3px; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--dh-primary); }
.dh-pnav-me.active .dh-pnav-me-link { display: none; }
/* Nút "Hồ sơ" ở đầu cổng (đầu cổng chỉ hiện trên điện thoại) */
.dh-page-head .dh-page-head-link {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); color: #fff !important; font-weight: 700; font-size: 13.5px;
    text-decoration: none !important; white-space: nowrap;
}
.dh-page-head .dh-page-head-link .fa { width: auto; height: auto; background: none; border: 0; border-radius: 0; font-size: 14px; color: #fcd34d; }
.dh-pnav-avatar { display: flex; align-items: center; justify-content: center; background: var(--dh-primary-soft); color: var(--dh-primary); font-size: 22px; }
.dh-pnav-who { min-width: 0; flex: 1; }
.dh-pnav-who strong { display: block; color: var(--dh-ink); font-size: 15px; line-height: 1.3; }
.dh-pnav-who small { display: block; color: var(--dh-muted); font-size: 12.5px; }
.dh-pnav-close { display: none; border: 0; background: var(--dh-bg); width: 36px; height: 36px; border-radius: 50%; color: var(--dh-muted); }
.dh-pnav-group { padding: 6px 0; }
.dh-pnav-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; padding: 8px 12px 4px; }
.dh-pnav-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--dh-text, #334155) !important;
    font-weight: 600; font-size: 14.5px; text-decoration: none !important; transition: background .15s, color .15s;
}
.dh-pnav-item .fa { color: var(--dh-muted); font-size: 16px; }
.dh-pnav-item:hover { background: var(--dh-bg); }
.dh-pnav-item.active { background: var(--dh-primary-soft); color: var(--dh-primary) !important; }
.dh-pnav-item.active .fa { color: var(--dh-primary); }
.dh-pnav-item span { flex: 1; }
.dh-pnav-ext { font-size: 11px !important; opacity: .6; }
.dh-pnav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--dh-danger); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.dh-pnav-dot { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.dh-pnav-backdrop, .dh-bnav { display: none; }
.dh-portal-main > .dh-page-head { display: none; }
/* Người đã đăng nhập cổng không cần nút "Đăng ký học" nổi của theme */
body:has(.dh-portal) .th-float-cta { display: none !important; }

@media (max-width: 991px) {
    .dh-portal { display: block; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .dh-portal-main > .dh-page-head { display: flex; padding: 16px 18px; }
    .dh-portal-main > .dh-page-head h2 { font-size: 18px; }
    /* Bảng "Thêm": chính cột menu trượt lên từ đáy */
    .dh-pnav {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1060; max-height: 82vh; border-radius: 22px 22px 0 0;
        padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -12px 40px rgba(15, 23, 42, .25);
    }
    .dh-pnav.dh-open { transform: none; }
    .dh-pnav-close { display: inline-flex; align-items: center; justify-content: center; }
    .dh-pnav-group { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
    .dh-pnav-title { grid-column: 1 / -1; }
    .dh-pnav-item { padding: 12px; background: var(--dh-bg); min-height: 48px; }
    .dh-pnav-backdrop { position: fixed; inset: 0; z-index: 1055; background: rgba(15, 23, 42, .45); }
    .dh-pnav-backdrop.dh-open { display: block; }
    /* Thanh nút cố định ở đáy */
    .dh-bnav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050; background: #fff;
        border-top: 1px solid var(--dh-border); box-shadow: 0 -4px 18px rgba(15, 23, 42, .08); padding-bottom: env(safe-area-inset-bottom);
    }
    .dh-bnav-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px;
        border: 0; background: none; color: var(--dh-muted) !important; text-decoration: none !important; font-size: 11.5px; font-weight: 600; padding: 6px 2px;
    }
    .dh-bnav-item.active { color: var(--dh-primary) !important; }
    .dh-bnav-icon { position: relative; font-size: 21px; line-height: 1; }
    .dh-bnav-icon .dh-pnav-badge { position: absolute; top: -6px; left: 14px; }
    .dh-bnav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    /* Trong cổng: dải tiêu đề của theme thừa (đã có thẻ hồ sơ + tiêu đề trang); nút lên đầu trang che thanh đáy */
    body:has(.dh-portal) .th-page-head, body:has(.dh-portal) .th-to-top { display: none !important; }
    body:has(.dh-portal) .th-section-body { padding-top: 16px; }
    body.dh-nav-locked { overflow: hidden; }
}
@media (min-width: 992px) and (max-width: 1199px) { .dh-portal { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; } }

/* ===================== Trang trong cổng ===================== */
.dh .dh-portal-heading { font-size: 20px; font-weight: 800; color: var(--dh-ink); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.dh-portal-heading .fa { color: var(--dh-primary); }
a.dh-course-card { display: block; color: inherit !important; text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
a.dh-course-card:hover { transform: translateY(-2px); box-shadow: var(--dh-shadow-lg); }
.dh-next { margin: 12px 0 0; }
.dh-link-more { color: var(--dh-primary); font-weight: 700; }
.dh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dh-tile {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 14px 10px;
    background: #fff; border-radius: var(--dh-radius); box-shadow: var(--dh-shadow); color: var(--dh-ink) !important; font-weight: 700; font-size: 14px;
    text-align: center; text-decoration: none !important; transition: transform .2s;
}
.dh-tile .fa { font-size: 24px; color: var(--dh-primary); }
.dh-tile:hover { transform: translateY(-2px); }
.dh-tile .dh-pnav-badge { position: absolute; top: 10px; right: 10px; }
.dh-fee-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.dh-fee-summary > div { background: var(--dh-bg); border-radius: 12px; padding: 12px; text-align: center; }
.dh-fee-summary small { display: block; color: var(--dh-muted); font-size: 12px; }
.dh-fee-summary strong { display: block; font-size: 16px; color: var(--dh-ink); }
.dh-profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.dh-profile-top strong { display: block; font-size: 18px; color: var(--dh-ink); }
.dh-profile-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: var(--dh-shadow); }
.dh-profile-noimg { display: flex; align-items: center; justify-content: center; background: var(--dh-primary-soft); color: var(--dh-primary); font-size: 38px; }
.dh-icon-link { width: 40px; height: 40px; border-radius: 50%; background: var(--dh-primary-soft); color: var(--dh-primary) !important; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dh-progress-item.warn .dh-progress span { background: var(--dh-warning); }
@media (max-width: 991px) {
    .dh .dh-portal-heading { font-size: 18px; }
    .dh-tiles { grid-template-columns: repeat(2, 1fr); }
    .dh-fee-summary strong { font-size: 14px; }
}

/* ══════════════ THANH TOÁN ONLINE (VNPay) — tab Học phí cổng học viên ══════════════ */
.dh-alert-warning,
.dh-alert-info {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}
.dh-alert-warning { background: var(--dh-warning-soft); border: 1px solid #fde68a; color: #92400e; }
.dh-alert-warning .fa { font-size: 20px; color: var(--dh-warning); }
.dh-alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.dh-alert-info .fa { font-size: 20px; color: #2563eb; }
.dh-vnpay-form {
    margin: 12px 0 4px;
    padding: 12px 14px;
    border: 1px dashed var(--dh-border, #e2e8f0);
    border-radius: 12px;
}
.dh-vnpay-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.dh-vnpay-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dh-vnpay-row .form-control { flex: 1 1 160px; max-width: 240px; }
.dh-vnpay-form .dh-small { margin: 6px 0 0; }
@media (max-width: 575px) {
    .dh-vnpay-row .form-control { max-width: none; }
    .dh-vnpay-row .dh-btn { flex: 1 1 100%; }
}

/* ══════════════ THI THỬ: câu hỏi | bảng trả lời bám theo khi cuộn (12/10/2026) ══════════════ */
.dh-quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 20px; align-items: start; }
.dh-quiz-questions .dh-question { margin-bottom: 14px; }
.dh-question { scroll-margin-top: 96px; }
.dh-question-head small { font-weight: 500; color: var(--dh-muted); }
.dh-quiz-side { position: sticky; top: 92px; }
.dh-quiz-panel {
    background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--dh-radius);
    box-shadow: var(--dh-shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px;
    max-height: calc(100vh - 110px);
}
.dh-quiz-panel-head { display: flex; flex-direction: column; gap: 8px; }
.dh-quiz-hang-name { font-size: 13px; font-weight: 700; color: var(--dh-muted); line-height: 1.35; }
.dh-quiz-stats { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dh-quiz-panel .dh-quiz-timer { font-size: 26px; font-weight: 800; line-height: 1; color: var(--dh-primary); font-variant-numeric: tabular-nums; }
.dh-quiz-panel .dh-quiz-timer .fa { font-size: 20px; }
.dh-quiz-panel .dh-quiz-progress { margin: 0; font-weight: 700; color: var(--dh-ink); font-variant-numeric: tabular-nums; }
.dh-quiz-meter { height: 6px; border-radius: 999px; background: var(--dh-border); overflow: hidden; }
.dh-quiz-meter span { display: block; height: 100%; width: 0; background: var(--dh-primary); transition: width .25s; }
.dh-quiz-sheet { overflow-y: auto; min-height: 0; padding: 2px; }
.dh-quiz-panel .dh-quiz-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; }
.dh-quiz-panel .dh-quiz-nav a { width: auto; height: 38px; font-weight: 600; }
.dh-quiz-panel .dh-quiz-nav a:hover { border-color: var(--dh-primary); }
.dh-quiz-panel .dh-quiz-nav a.current { box-shadow: 0 0 0 2px var(--dh-accent, #f59e0b); }
.dh-quiz-legend { margin: 8px 0 0; font-size: 12px; color: var(--dh-muted); }
.dh-quiz-submit { margin: 0; }
.dh-quiz-back { font-size: 13px; text-align: center; }
.dh-quiz-toggle { display: none; }
.dh-quiz .dh-quiz-bar { display: none; }

@media (max-width: 991px) {
    .dh-quiz-layout { grid-template-columns: minmax(0, 1fr); }
    .dh-quiz-side { position: static; }
    .dh-quiz-panel { max-height: none; }
    /* Đang làm bài trên điện thoại: bảng trả lời thành thanh dính đáy màn hình, lưới câu mở bằng nút */
    .dh-quiz[data-mode="take"] .dh-quiz-layout { padding-bottom: 92px; }
    .dh-quiz[data-mode="take"] .dh-quiz-side { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 1030; }
    .dh-quiz[data-mode="take"] .dh-quiz-panel {
        border-radius: 16px 16px 0 0; border-bottom: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(15, 23, 42, .14); gap: 8px; max-height: 75vh;
    }
    .dh-quiz[data-mode="take"] .dh-quiz-panel-head { flex-direction: row; align-items: center; gap: 12px; }
    .dh-quiz[data-mode="take"] .dh-quiz-hang-name, .dh-quiz[data-mode="take"] .dh-quiz-meter, .dh-quiz[data-mode="take"] .dh-quiz-back { display: none; }
    .dh-quiz[data-mode="take"] .dh-quiz-stats { flex: 1; justify-content: flex-start; gap: 14px; }
    .dh-quiz[data-mode="take"] .dh-quiz-panel .dh-quiz-timer { font-size: 22px; }
    .dh-quiz[data-mode="take"] .dh-quiz-toggle {
        display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--dh-border); background: var(--dh-surface);
        border-radius: 10px; padding: 7px 12px; font-weight: 600; color: var(--dh-ink); cursor: pointer;
    }
    .dh-quiz[data-mode="take"] .dh-quiz-sheet { display: none; }
    .dh-quiz[data-mode="take"] .dh-quiz-side.is-open .dh-quiz-sheet { display: block; max-height: 45vh; }
    .dh-quiz[data-mode="take"] .dh-quiz-panel .dh-quiz-nav { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
    .dh-quiz[data-mode="take"] .dh-quiz-submit { padding: 9px 12px; }

}
/* Đang làm bài: ẩn nút kêu gọi nổi của theme (tránh che, giữ tập trung) */
body:has(.dh-quiz[data-mode="take"]) .th-float-cta, body:has(.dh-quiz[data-mode="take"]) .th-to-top { display: none !important; }

/* ══════════════ XÓA THÔNG BÁO / THU HỒI, XÓA TIN NHẮN (13/10/2026) ══════════════ */
.dh-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0;
    border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--dh-muted); cursor: pointer;
}
.dh-icon-btn:hover, .dh-icon-btn:focus-visible { background: var(--dh-danger-soft); color: var(--dh-danger); border-color: var(--dh-danger-soft); }
.dh-link-btn { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.dh-link-btn:hover, .dh-link-btn:focus-visible { color: var(--dh-danger); }
.dh-notice-tools { display: flex; justify-content: flex-end; margin: -4px 0 6px; }
.dh-notice-del { margin: 0; }
.dh-msg-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--dh-border);
}
.dh-msg-head .dh-card-title { margin: 0; padding: 0; border: 0; }
.dh-msg-head form { margin: 0; }
.dh-msg-recall { display: inline; margin: 0 0 0 6px; }
.dh-msg-recalled .dh-msg-bubble, .dh-msg-mine.dh-msg-recalled .dh-msg-bubble {
    background: transparent; color: var(--dh-muted); border: 1px dashed var(--dh-border); font-style: italic;
}

/* ══════════════ LỊCH SỬ ĐIỂM DANH THEO BUỔI (cổng học viên, 13/10/2026) ══════════════ */
.dh-att-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.dh-att-sum > div { background: var(--dh-bg); border-radius: var(--dh-radius-sm); padding: 10px 8px; text-align: center; }
.dh-att-sum b { display: block; font-size: 22px; line-height: 1.1; }
.dh-att-sum span { font-size: 12px; color: var(--dh-muted); }
@media (max-width: 575px) { .dh-att-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dh-list li.dh-att { align-items: center; }
.dh-att-icon {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--dh-bg); color: var(--dh-muted);
}
.dh-att-success .dh-att-icon { background: var(--dh-success-soft, #ecfdf5); color: var(--dh-success); }
.dh-att-danger .dh-att-icon { background: var(--dh-danger-soft); color: var(--dh-danger); }
.dh-att-warning .dh-att-icon { background: #fffbeb; color: #b45309; }
.dh-att-info .dh-att-icon { background: var(--dh-primary-soft); color: var(--dh-primary); }
.dh-att-note { font-size: 13px; color: var(--dh-muted); margin-top: 2px; }
.dh-text-warning { color: #b45309; }
