/* ==========================================================================
   Base & Typography
   ========================================================================== */
html,
body {
    overflow-x: hidden;
}

body.bg-landing {
    background-color: #b97753;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333333;
    min-height: 100vh;
}

.page-container {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.main-layout-container {
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Header Card
   ========================================================================== */
.header-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 14px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #c9d2e4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-card-main {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.header-logo {
    height: 52px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-edmicro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    color: #0369a1;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    width: fit-content;
}

.header-edmicro-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.btn-change-exam {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
}

.btn-change-exam:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-info h4 {
    color: #2b4182;
    font-weight: 700;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    text-transform: uppercase;
}

.header-info p {
    margin: 4px 0 0;
    font-size: 0.85rem;
}

/* ==========================================================================
   Form Wrapper & Sections
   ========================================================================== */
.form-wrapper {
    padding: 10px;
    border-radius: 16px;
    background: #f4f6fb;
    margin: 0 auto;
    color: #2b4182;
}

.card-section {
    background: #ffffff;
    border: 1px solid #2b4182;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.section-title {
    font-weight: 700;
    color: #2b4182;
    margin-bottom: 14px;
    font-size: 1rem;
}

.section-subtitle {
    font-size: 0.78rem;
    color: #2b4182;
    font-style: italic;
    margin-bottom: 16px;
    margin-top: -6px;
}

.section-note {
    font-size: 0.78rem;
    color: #2b4182;
    line-height: 1.45;
    margin-bottom: 14px;
}

.name-note {
    font-size: 0.72rem;
    color: #dc2626;
    font-style: italic;
    display: inline-block;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #222222;
    margin-bottom: 5px;
}

.form-control,
.form-select {
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid #b8cde4;
    padding: 6px 12px;
    color: #333333;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control::placeholder {
    color: #8fa3be;
    font-size: 0.82rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #2b4182;
    box-shadow: 0 0 0 2px rgba(43, 65, 130, 0.18);
    outline: none;
}

.form-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

.text-danger {
    color: #dc2626 !important;
}

/* ==========================================================================
   Package Cards Grid (Desktop & Tablet)
   ========================================================================== */
.packages-grid {
    display: grid;
    gap: 16px;
    width: 100%;
}

.packages-grid-1 {
    grid-template-columns: 1fr;
}

.packages-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.packages-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.packages-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Fallback từ 5 gói trở lên */
.packages-grid:not(.packages-grid-1):not(.packages-grid-2):not(.packages-grid-3):not(.packages-grid-4) {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.package-card {
    border: 1.5px solid #2b4182;
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    background-color: #ffffff;
    position: relative;
    transition: all 0.2s ease-in-out;
    user-select: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.package-card:hover {
    border-color: #204586;
    box-shadow: 0 2px 8px rgba(43, 65, 130, 0.12);
}

.package-card input[type="radio"] {
    display: none;
}

.package-radio-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 17px;
    height: 17px;
    border: 1.5px solid #2b4182;
    border-radius: 3px;
    background-color: #ffffff;
    transition: all 0.2s;
}

.package-card.selected {
    background-color: #f4f8fe;
    border-color: #2b4182;
}

.package-card.selected .package-radio-icon {
    background-color: #2b4182;
    border-color: #2b4182;
}

.package-card.selected .package-radio-icon::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.package-title {
    font-weight: 700;
    color: #2b4182;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.35;
    padding-right: 24px;
}

.package-desc {
    font-size: 0.78rem;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.45;
    flex-grow: 1;
    /* Cho phép giãn đều để các card bằng chiều cao và price nằm ngang hàng đáy */
}

.package-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #2b4182;
    margin-top: auto;
}

/* ==========================================================================
   Terms, Notes & Helpers
   ========================================================================== */
.terms-note {
    font-size: 0.75rem;
    color: #555555;
    line-height: 1.45;
}

.terms-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terms-check input {
    border-color: #b8cde4;
    width: 16px;
    height: 16px;
    margin-top: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-check label {
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
}

.text-course-info {
    font-size: 0.82rem;
    color: #4b5563;
}

.text-course-info a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.text-course-info a:hover {
    color: #1d4ed8;
}

/* ==========================================================================
   Error Box & Submit Button
   ========================================================================== */
.error-box {
    background-color: #fde8e8;
    border: 1px solid #f8b4b4;
    border-radius: 4px;
    padding: 8px 16px;
    color: #dc2626;
    font-size: 0.82rem;
}

.error-box ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.error-box ul li {
    margin-bottom: 2px;
}

.btn-payment {
    background-color: #33558b;
    color: #ffffff;
    font-weight: 600;
    padding: 9px 38px;
    border-radius: 4px;
    border: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.btn-payment:hover {
    background-color: #24416f;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.btn-payment:active {
    background-color: #1b3257;
    transform: translateY(1px);
}

/* ==========================================================================
   RESPONSIVE: 1. TABLET (768px - 991px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .header-card {
        padding: 14px 18px;
        gap: 16px;
    }

    .header-logo {
        height: 48px;
        max-width: 170px;
    }

    .header-info h4 {
        font-size: 1rem;
    }

    .card-section {
        padding: 18px;
    }

    /* 4 gói trên tablet chia 2x2 cho thoáng */
    .packages-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   RESPONSIVE: 2. MOBILE (< 768px)
   ========================================================================== */
@media (max-width: 767px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 12px !important;
        padding-bottom: 20px !important;
    }

    /* Header card xếp dọc trên mobile */
    .header-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 14px 12px;
        margin-bottom: 12px;
    }

    .header-logo {
        height: 44px;
        max-width: 180px;
        margin: 0 auto;
    }

    .header-info h4 {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .header-info p {
        font-size: 0.8rem;
    }

    /* Form Wrapper & Card Sections */
    .form-wrapper {
        padding: 4px;
        border-radius: 10px;
    }

    .card-section {
        padding: 14px 12px;
        margin-bottom: 12px;
        border-radius: 6px;
    }

    .section-title {
        font-size: 0.92rem;
        margin-bottom: 10px;
    }

    .section-subtitle,
    .section-note {
        font-size: 0.74rem;
        margin-bottom: 10px;
    }

    /* Input & Select: Đặt font 16px để ngăn iOS Safari auto-zoom khi focus */
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 7px 10px;
        border-radius: 4px;
    }

    .form-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }

    /* Grid Packages trên Mobile:
       - Nếu có 1 gói: rộng full 100%
       - Nếu có từ 2 gói trở lên: hỗ trợ cuộn ngang (Swipeable Carousel) cực mượt,
         các thẻ được đồng nhất độ cao bằng nhau 100% theo thẻ có nội dung dài nhất!
    */
    .packages-grid-1 {
        display: grid;
        grid-template-columns: 1fr;
    }

    .packages-grid:not(.packages-grid-1) {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 86%;
        align-items: stretch;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 10px;
        margin-left: -2px;
        margin-right: -2px;
        padding-left: 2px;
        padding-right: 2px;
    }

    /* Tùy chỉnh thanh cuộn ngang tinh tế */
    .packages-grid:not(.packages-grid-1)::-webkit-scrollbar {
        height: 4px;
    }

    .packages-grid:not(.packages-grid-1)::-webkit-scrollbar-track {
        background: #e2e8f0;
        border-radius: 4px;
    }

    .packages-grid:not(.packages-grid-1)::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 4px;
    }

    .packages-grid:not(.packages-grid-1) .package-card {
        height: 100%;
        min-width: 250px;
        max-width: 320px;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .package-card {
        padding: 13px 12px;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .package-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
        padding-right: 22px;
    }

    .package-desc {
        font-size: 0.74rem;
        margin-bottom: 12px;
        line-height: 1.4;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .package-price {
        font-size: 1.08rem;
        margin-top: auto;
    }

    /* Điều khoản căn lề đầu dòng */
    .terms-check {
        align-items: flex-start;
        gap: 8px;
    }

    .terms-check input {
        margin-top: 2px;
    }

    .terms-check label {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .terms-note {
        font-size: 0.72rem;
    }

    /* Nút Thanh Toán Full Width trên Mobile */
    .btn-payment {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.98rem;
        border-radius: 6px;
    }
}

/* ==========================================================================
   RESPONSIVE: 3. EXTRA SMALL MOBILE (< 360px)
   ========================================================================== */
@media (max-width: 359px) {
    .container {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .packages-grid:not(.packages-grid-1) {
        grid-auto-columns: 92%;
    }

    .packages-grid:not(.packages-grid-1) .package-card {
        min-width: 230px;
    }

    .package-title {
        font-size: 0.85rem;
    }

    .package-price {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Payment Modal (SweetAlert2) Responsive & Clean Styling
   ========================================================================== */
.payment-modal-popup {
    border-radius: 16px !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    width: 560px !important;
    max-width: 95vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.payment-modal-popup .swal2-html-container,
.payment-modal-html {
    overflow-x: hidden !important;
    margin: 0.25rem 0 0 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.payment-modal-title {
    font-size: 1.25rem !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    padding: 0 0 0.5rem 0 !important;
    line-height: 1.3 !important;
}

.payment-qr-container {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
}

.payment-qr-img {
    width: 200px;
    height: 200px;
    max-width: 100%;
    object-fit: contain;
    background: #ffffff;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: inline-block;
}

.payment-info-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    box-sizing: border-box;
    width: 100%;
}

.payment-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #e2e8f0;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}

.payment-info-row:last-child {
    border-bottom: none;
}

.payment-info-label {
    color: #64748b;
    font-size: 0.86rem;
    flex-shrink: 0;
}

.payment-info-value-group {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
    justify-content: flex-end;
}

.payment-transfer-block {
    box-sizing: border-box;
    width: 100%;
}

.btn-copy-field {
    border-radius: 4px;
    font-size: 0.78rem;
    padding: 2px 8px;
    line-height: 1.4;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-download-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 6px;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-download-qr:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Tablet & Mobile Breakpoints for Payment Modal */
@media (max-width: 768px) {
    .payment-modal-popup {
        padding: 1.25rem 1rem !important;
        width: 94vw !important;
        max-width: 500px !important;
    }

    .payment-qr-img {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 576px) {
    .payment-modal-popup {
        padding: 1rem 0.75rem !important;
        width: 96vw !important;
        border-radius: 12px !important;
    }

    .payment-modal-title {
        font-size: 1.1rem !important;
        padding-top: 0.25rem !important;
    }

    .payment-modal-popup .swal2-actions {
        flex-direction: column-reverse !important;
        width: 100% !important;
        gap: 8px !important;
        margin: 1rem 0 0 0 !important;
    }

    .payment-modal-popup .swal2-actions button {
        width: 100% !important;
        margin: 0 !important;
        font-size: 0.92rem !important;
        padding: 11px 16px !important;
        border-radius: 8px !important;
    }

    .payment-qr-container {
        padding: 8px;
        margin-bottom: 10px;
    }

    .payment-qr-img {
        width: 160px;
        height: 160px;
    }

    .payment-info-box {
        padding: 8px 10px;
    }
}

/* ==========================================================================
   Exam Portal / Hub Styles
   ========================================================================== */
.portal-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.portal-hero {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid #e1e7f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #eef2fa;
    color: #204586;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.portal-hero-title {
    color: #1a2d54;
    font-weight: 800;
    font-size: 1.45rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.portal-hero-desc {
    color: #55627a;
    font-size: 0.95rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.portal-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e1e7f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none !important;
    color: inherit;
}

.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(32, 69, 134, 0.12);
    border-color: #b0c4de;
}

.portal-card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    position: relative;
}

.portal-card-logo-wrap {
    background: #ffffff;
    border-radius: 10px;
    padding: 6px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-card-logo {
    height: 38px;
    max-width: 130px;
    object-fit: contain;
}

.portal-status-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.portal-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portal-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
    min-height: 2.8em;
}

.portal-card-deadline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #555555;
    background: #f7f9fc;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.portal-card-deadline svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #204586;
}

.portal-card-footer {
    margin-top: auto;
    padding-top: 8px;
}

.btn-portal-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    border: none;
    transition: filter 0.2s ease, transform 0.15s ease;
}

.portal-card:hover .btn-portal-action {
    filter: brightness(1.08);
}

/* PORTAL FILTER TABS */
.portal-filter-tabs {
    display: inline-flex;
    background: #ffffff;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.portal-filter-tabs .filter-tab {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.portal-filter-tabs .filter-tab:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.portal-filter-tabs .filter-tab.active {
    background: #1e3a8a;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}

/* EXAM CHOICE BUTTONS */
.portal-actions-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-exam-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-exam-choice .choice-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-exam-choice .choice-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

.btn-exam-choice .choice-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
}

.btn-exam-choice .choice-sub {
    font-size: 0.73rem;
    line-height: 1.2;
    opacity: 0.85;
}

.btn-exam-choice .choice-arrow {
    transition: transform 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.btn-exam-choice:hover .choice-arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* Thí sinh Tự do style */
.btn-exam-choice.btn-freedom {
    background: #f0f7ff;
    border-color: #bfdbfe;
    color: #1d4ed8 !important;
}
.btn-exam-choice.btn-freedom .choice-icon {
    background: #dbeafe;
    color: #1e40af;
}
.btn-exam-choice.btn-freedom:hover {
    background: #1e40af;
    border-color: #1e40af;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}
.btn-exam-choice.btn-freedom:hover .choice-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.btn-exam-choice.btn-freedom:hover .choice-sub {
    color: #e0e7ff;
}

/* Theo Trường học style */
.btn-exam-choice.btn-school {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d !important;
}
.btn-exam-choice.btn-school .choice-icon {
    background: #dcfce7;
    color: #166534;
}
.btn-exam-choice.btn-school:hover {
    background: #166534;
    border-color: #166534;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.2);
}
.btn-exam-choice.btn-school:hover .choice-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.btn-exam-choice.btn-school:hover .choice-sub {
    color: #dcfce7;
}

.portal-support-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e1e7f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.portal-support-text {
    font-size: 0.9rem;
    color: #445069;
    margin: 0;
}

.portal-hotline-badge {
    font-weight: 700;
    color: #204586;
    background: #eef2fa;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
}

/* ==========================================================================
   General Hub Portal Styles (Trang chủ tổng quát)
   ========================================================================== */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.hub-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.hub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.hub-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.hub-card-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hub-card-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hub-badge-open {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.hub-badge-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.hub-badge-soon {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.hub-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.35;
}

.hub-card-desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 20px;
    flex: 1;
}

.hub-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.hub-btn-primary {
    background: #1e3a8a;
    color: #ffffff;
}

.hub-card:hover .hub-btn-primary {
    background: #1d4ed8;
    color: #ffffff;
}

.hub-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.hub-card:hover .hub-btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.hub-card-disabled {
    cursor: default;
    opacity: 0.75;
    background: #fcfdfe;
}

.hub-card-disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
    border-color: #e2e8f0 !important;
}

.hub-btn-disabled {
    background: #f1f5f9;
    color: #94a3b8;
    justify-content: center;
    border-color: #e2e8f0;
    cursor: default;
}

/* HUB HIGHLIGHTS */
.hub-features-row {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 24px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.hub-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hub-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hub-feature-text h6 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.hub-feature-text p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   Edmicro Branding System: Topbar & Footer
   ========================================================================== */
.badge-edmicro-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.edmicro-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}

.edmicro-topbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.edmicro-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.edmicro-brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.edmicro-brand-text {
    display: flex;
    flex-direction: column;
}

.edmicro-brand-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.edmicro-brand-sub {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.edmicro-topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.edmicro-secure-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.edmicro-topbar-hotline {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.edmicro-topbar-hotline:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* EDMICRO FOOTER */
.edmicro-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 28px 0 20px;
    color: #475569;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.03);
}

.edmicro-footer-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.edmicro-footer-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.3px;
}

.edmicro-footer-subtitle {
    font-size: 0.74rem;
    color: #64748b;
    display: block;
}

.edmicro-footer-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748b;
    max-width: 580px;
}

.edmicro-footer-info-list {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #475569;
}

.edmicro-footer-info-list a {
    color: #2563eb;
    text-decoration: none;
}

.edmicro-footer-info-list a:hover {
    text-decoration: underline;
}

.edmicro-trust-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

@media (min-width: 992px) {
    .edmicro-trust-badges {
        align-items: flex-end;
    }
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 12px;
    font-weight: 500;
}

.edmicro-copyright {
    font-size: 0.74rem;
    color: #94a3b8;
}

/* RESPONSIVE TWEAKS */
@media (max-width: 576px) {
    .edmicro-brand-name {
        font-size: 0.85rem;
    }
    .edmicro-brand-sub {
        font-size: 0.68rem;
    }
    .edmicro-brand-logo {
        height: 32px;
    }
    .header-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }
    .header-card-main {
        width: 100%;
    }
}

/* ==========================================================================
   Clean QR-Only Payment Modal (Sample Form Design)
   ========================================================================== */
.payment-clean-modal-popup {
    border-radius: 20px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    width: 440px !important;
    max-width: 94vw !important;
    border: none !important;
}

.payment-clean-modal-html {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.payment-clean-modal-popup .swal2-close {
    color: #ffffff !important;
    top: 8px !important;
    right: 12px !important;
    font-size: 1.6rem !important;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.payment-clean-modal-popup .swal2-close:hover {
    color: #fecdd3 !important;
    opacity: 0.9;
}

.payment-clean-modal-popup .swal2-actions {
    margin: 0 !important;
    padding: 10px 16px 16px !important;
    background: #ffffff;
    width: 100%;
    justify-content: center;
}

.payment-clean-modal-popup .swal2-actions button {
    border-radius: 10px !important;
    font-size: 0.88rem !important;
    padding: 8px 24px !important;
}

.payment-modal-container {
    width: 100%;
    background: #ffffff;
    font-family: inherit;
    text-align: left;
}

.payment-modal-header-banner {
    background: linear-gradient(135deg, #880826 0%, #990024 100%);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
}

.payment-modal-header-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
}

.payment-modal-inner-body {
    padding: 24px 22px 14px;
    text-align: center;
}

.payment-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.payment-qr-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.payment-qr-image {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.btn-download-qr-clean {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.btn-download-qr-clean:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.payment-amount-headline {
    font-size: 1.65rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-top: 10px;
    margin-bottom: 2px;
    letter-spacing: -0.3px;
}

.payment-scan-guide {
    color: #64748b;
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.payment-divider-line {
    width: 100%;
    height: 1px;
    background: #f1f5f9;
    margin-bottom: 14px;
}

.payment-spec-table {
    text-align: left;
    width: 100%;
    padding: 2px 4px;
}

.payment-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 0.88rem;
    gap: 12px;
}

.payment-spec-label {
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    min-width: 90px;
}

.payment-spec-value {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.payment-live-status-box {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

@media (max-width: 576px) {
    .payment-clean-modal-popup {
        width: 94vw !important;
        border-radius: 16px !important;
    }
    .payment-modal-inner-body {
        padding: 18px 14px 10px;
    }
    .payment-qr-image {
        width: 180px;
        height: 180px;
    }
    .payment-amount-headline {
        font-size: 1.45rem;
    }
    .payment-spec-row {
        font-size: 0.82rem;
    }
}