body {
    background: linear-gradient(180deg, #eef3f8 0%, #f9fbfd 100%);
    color: #17324d;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.portal-nav {
    background: linear-gradient(90deg, #003399 0%, #0099cc 100%);
    min-height: 96px;
    display: flex;
    align-items: center;
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.2rem;
    line-height: 1.1;
}

.brand-app {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.hero {
    position: relative;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 61, 99, 0.16);
}

.hero-full-bleed {
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-radius: 0;
    box-shadow: none;
}

.hero-slider {
    position: relative;
    min-height: 353px;
    background: #0f2740;
}

.home-cards-wrap {
    position: relative;
    margin-top: -24px;
    z-index: 3;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 3rem;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 30, 60, 0.72) 0%, rgba(0, 65, 110, 0.42) 55%, rgba(0, 0, 0, 0.38) 100%);
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
    color: #fff;
}

.hero-slide.is-active .hero-copy {
    animation: heroDropIn 0.85s ease;
}

.hero-badge {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.hero-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.15;
    font-weight: 800;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.hero-dots {
    position: absolute;
    left: 3rem;
    bottom: 1.5rem;
    z-index: 2;
    display: flex;
    gap: 0.55rem;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-dot.is-active {
    background: #ffffff;
}

@keyframes heroDropIn {
    0% {
        opacity: 0;
        transform: translateY(-38px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.training-card,
.dashboard-card,
.auth-card,
.panel-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(16, 42, 67, 0.08);
}

.auth-card-shell {
    border-radius: 24px;
    overflow: hidden;
}

.auth-card-banner {
    padding: 1.35rem 1.5rem;
    color: #fff;
    background: linear-gradient(90deg, #003399 0%, #0099cc 100%);
}

.auth-card-banner h2 {
    font-weight: 800;
}

.auth-card-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.auth-input {
    min-height: 46px;
    border: 1px solid #9eb6d6;
    border-radius: 14px;
    box-shadow: inset 0 1px 1px rgba(0, 51, 153, 0.04);
}

.auth-input:focus {
    border-color: #3d8bfd;
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.12);
}

.badge-soft {
    background: #eef7ff;
    color: #145b7d;
}

.progress {
    height: 10px;
    border-radius: 999px;
}

.sidebar-card {
    background: #10344f;
    color: #fff;
    border-radius: 20px;
}

.dashboard-main-layout {
    align-items: flex-start;
}

.dashboard-profile-strip {
    max-width: 180px;
}

.dashboard-course-card {
    min-height: 580px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(16, 42, 67, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dashboard-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 56px rgba(16, 42, 67, 0.16);
}

.home-course-card {
    min-height: 0;
}

.home-course-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-course-card .dashboard-card-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.home-course-card .dashboard-description {
    min-height: 86px;
}

.home-course-card .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    font-weight: 700;
}

.home-course-card .dashboard-card-content > .btn {
    margin-top: auto;
    flex-shrink: 0;
}

.dashboard-course-card-inactive {
    background: linear-gradient(180deg, #fcfdff 0%, #f1f5f8 100%);
}

.dashboard-course-card-inactive:hover {
    transform: none;
    box-shadow: 0 22px 48px rgba(16, 42, 67, 0.12);
}

.dashboard-card-banner {
    margin: 0;
    height: 90px;
    padding: 0.85rem 1.25rem;
    border-radius: 22px 22px 0 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.dashboard-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.dashboard-card-banner h4,
.dashboard-card-banner .dashboard-banner-badge {
    position: relative;
    z-index: 1;
}

.dashboard-card-banner h4 {
    max-width: 60%;
    font-size: 1.18rem;
    line-height: 1.35;
}

.dashboard-banner-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.home-course-card .dashboard-banner-badge {
    padding: 0.45rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 800;
}

.dashboard-card-content {
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
}

.dashboard-description {
    min-height: 110px;
    margin-bottom: 1rem;
    color: #4f6276;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .hero-slider {
        min-height: 286px;
    }

    .hero-slide {
        padding: 1.6rem 1.4rem 3.2rem;
        align-items: flex-end;
    }

    .hero-dots {
        left: 1.4rem;
        bottom: 1.1rem;
    }

    .home-cards-wrap {
        margin-top: -12px;
    }

    .home-course-card .dashboard-card-content {
        padding: 1rem !important;
    }

    .home-course-card .dashboard-description {
        line-height: 1.35;
        margin-bottom: 0.55rem;
        min-height: 0;
    }

    .home-course-card .small-meta {
        margin-bottom: 0.35rem !important;
    }

    .home-course-card .dashboard-card-content > .mb-4 {
        margin-bottom: 0.55rem !important;
    }

    .home-course-card .dashboard-card-content > .btn {
        margin-top: 0.2rem;
    }

    .home-course-card .btn {
        min-height: 40px;
        padding: 0.55rem 0.8rem;
    }

    .dashboard-course-card {
        min-height: 540px;
    }

    .home-course-card.dashboard-course-card {
        min-height: 0;
    }



    .dashboard-card-banner {
        height: 76px;
        padding: 0.7rem 1rem;
    }

    .dashboard-card-banner h4 {
        max-width: 65%;
        font-size: 1.02rem;
    }
}

.dashboard-action-row {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: 100%;
}

.dashboard-action-row .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    white-space: nowrap;
    padding: 0.72rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 22px rgba(21, 47, 74, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.dashboard-action-row a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(21, 47, 74, 0.18);
    filter: saturate(1.05);
}

.certificate-sheet {
    position: relative;
    background-color: #fff;
    border: 12px solid #e7b65b;
    border-radius: 18px;
    width: 1000px;
    max-width: 100%;
    height: 600px;
    padding: 0;
    box-shadow: 0 18px 45px rgba(20, 45, 75, 0.15);
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
}

.certificate-sheet-demo {
    border-color: #e4a701;
}

.certificate-sheet-basic {
    border-color: #0099cc;
}

.certificate-sheet-advance {
    border-color: #660099;
}

.certificate-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.certificate-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 34px 80px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.14));
}

.certificate-brand {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 8px;
}

.certificate-logo {
    height: 64px;
    object-fit: contain;
    width: 64px;
}

.certificate-company {
    color: #17324d;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.15;
}

.certificate-program {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #5c4a20;
}

.certificate-title {
    margin-bottom: 16px;
    font-size: 2.35rem;
    line-height: 1.12;
    color: #17324d;
}

.certificate-copy {
    margin-bottom: 8px;
    font-size: 1.16rem;
    line-height: 1.2;
    color: #4e5d6c;
}

.certificate-name {
    margin-bottom: 4px;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.12;
    color: #0f3d63;
}

.certificate-user-company {
    color: #52687d;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 10px;
}

.certificate-course {
    margin-bottom: 14px;
    font-size: 1.6rem;
    line-height: 1.15;
    color: #17324d;
}

.certificate-score-row {
    color: #23384f;
    display: flex;
    gap: 2rem;
    justify-content: center;
    line-height: 1.2;
    margin-bottom: 16px;
    white-space: nowrap;
}

.certificate-meta {
    font-size: 1rem;
    line-height: 1.22;
    margin-top: 6px;
    color: #23384f;
}

.small-meta {
    font-size: 0.9rem;
    color: #5b7186;
}

.dashboard-active-label {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ddf8ea 0%, #c6f1d9 100%);
    color: #118154;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(17, 129, 84, 0.12);
}

.dashboard-demo-label {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff0c7 0%, #ffe0a2 100%);
    color: #b56a00;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(181, 106, 0, 0.14);
}

.dashboard-btn-training {
    background: linear-gradient(135deg, #00afd7 0%, #007ea7 100%);
    border: 0;
    color: #fff;
}

.dashboard-btn-training:hover {
    color: #fff;
}

.dashboard-btn-quiz {
    background: linear-gradient(135deg, #00a58c 0%, #007d6c 100%);
    border: 0;
    color: #fff;
}

.dashboard-btn-quiz:hover {
    color: #fff;
}

.dashboard-btn-result {
    background: linear-gradient(135deg, #f0b000 0%, #d18900 100%);
    border: 0;
    color: #fff;
}

.dashboard-btn-result:hover {
    color: #fff;
}

.dashboard-btn-certificate {
    background: linear-gradient(135deg, #7f35c9 0%, #56248c 100%);
    border: 0;
    color: #fff;
}

.dashboard-btn-certificate:hover {
    color: #fff;
}

.dashboard-btn-purchase {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    padding: 0.72rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 0;
    color: #fff;
    box-shadow: 0 10px 22px rgba(21, 47, 74, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.dashboard-btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(21, 47, 74, 0.18);
    filter: saturate(1.05);
    color: #fff;
}

.dashboard-btn-disabled,
.dashboard-btn-disabled.disabled {
    background: linear-gradient(180deg, #eef2f6 0%, #dde4eb 100%);
    border: 1px solid #d2dae2;
    color: #73879b;
    pointer-events: none;
    opacity: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dashboard-course-unavailable-alert {
    border: 1px solid #d3dce4;
    background: linear-gradient(180deg, #f1f5f8 0%, #e8eef4 100%);
    color: #5c6f82;
}

.dashboard-course-unavailable-message {
    margin-top: 0.4rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #3e556b;
    letter-spacing: 0.01em;
}

.dashboard-feedback-modal {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(16, 42, 67, 0.18);
}

.dashboard-feedback-modal-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #14966d 0%, #0f7b5c 100%);
    box-shadow: 0 16px 30px rgba(20, 150, 109, 0.22);
}

.dashboard-feedback-modal-text {
    color: #41586f;
    font-size: 1rem;
    line-height: 1.65;
}

.dashboard-feedback-modal-button {
    min-width: 120px;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #145b7d 0%, #0f3d63 100%);
    box-shadow: 0 12px 24px rgba(15, 61, 99, 0.18);
}

.dashboard-feedback-modal-button:hover {
    color: #fff;
    filter: saturate(1.05);
}

#dashboardPaymentModal[data-feedback-type="error"] .dashboard-feedback-modal-icon {
    background: linear-gradient(135deg, #eb6b46 0%, #c84a2a 100%);
    box-shadow: 0 16px 30px rgba(200, 74, 42, 0.22);
}

#dashboardPaymentModal[data-feedback-type="error"] .dashboard-feedback-modal-button {
    background: linear-gradient(135deg, #eb6b46 0%, #c84a2a 100%);
    box-shadow: 0 12px 24px rgba(200, 74, 42, 0.18);
}

.quiz-shell {
    background:
        radial-gradient(circle at top right, rgba(153, 51, 204, 0.12), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f5fbfd 100%);
}

.quiz-chip {
    background: linear-gradient(90deg, #0099cc 0%, #660099 100%);
    color: #fff;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.quiz-progress-wrap {
    background: #f3f7fb;
    border: 1px solid #d7e3ec;
    border-radius: 18px;
    padding: 1rem;
}

.quiz-progress-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #17324d;
}

.quiz-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #4d6378;
    letter-spacing: 0.01em;
}

.quiz-progress-meta {
    font-size: 0.8rem;
    color: #5b7186;
}

.quiz-progress-bar {
    height: 14px;
    background: #dbe6ef;
    border-radius: 999px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0099cc 0%, #9933cc 100%);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.quiz-slide {
    display: none;
}

.quiz-slide.active {
    display: block;
}

.quiz-question {
    font-size: 1.45rem;
    line-height: 1.35;
    color: #16324d;
}

.quiz-options {
    display: grid;
    gap: 0.9rem;
}

.quiz-option {
    display: block;
    cursor: pointer;
}

.quiz-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quiz-option-text {
    display: block;
    background: linear-gradient(180deg, #eef8fb 0%, #e7f0f7 100%);
    border: 1px solid #cfe0ea;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #20425f;
    transition: all 0.2s ease;
}

.quiz-option:hover .quiz-option-text {
    border-color: #7bc7dd;
    transform: translateY(-1px);
}

.quiz-option-input:checked + .quiz-option-text {
    background: linear-gradient(90deg, #0099cc 0%, #9933cc 100%);
    border-color: #7a3db8;
    color: #fff;
    box-shadow: 0 12px 24px rgba(38, 76, 122, 0.18);
}

.quiz-action-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.85rem;
}

.quiz-action-btn {
    min-width: 180px;
    min-height: 48px;
    border-radius: 14px;
    border: 0;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #1296db 0%, #0b5ed7 100%);
    box-shadow: 0 14px 28px rgba(13, 104, 207, 0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.quiz-action-btn:hover {
    color: #fff;
    filter: saturate(1.08);
}

.quiz-action-btn:disabled {
    background: linear-gradient(180deg, #eef2f6 0%, #dde4eb 100%);
    color: #73879b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    cursor: not-allowed;
    filter: none;
}

.portal-footer {
    background: #000000;
    color: rgba(255, 255, 255, 0.78);
    margin-top: auto;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.portal-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.footer-copyright-mark {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
}

.portal-footer a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}

.portal-footer a:hover {
    color: #fff;
}

@media (max-width: 1100px) {
    .certificate-sheet {
        width: 100%;
        height: auto;
        aspect-ratio: 5 / 3;
    }

    .certificate-inner {
        min-height: auto;
        padding: 48px 28px 40px;
    }

    .certificate-title {
        font-size: 2rem;
    }

    .certificate-name {
        font-size: 1.7rem;
    }

    .certificate-course {
        font-size: 1.3rem;
    }

    .certificate-score-row {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.85rem;
        margin-bottom: 12px;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    body {
        background: #fff;
        display: block;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .portal-nav,
    .portal-footer,
    .print-hidden {
        display: none !important;
    }

    main.container {
        max-width: none !important;
        width: 100%;
        padding: 0 !important;
        margin: 0 !important;
    }

    .certificate-sheet {
        width: 277mm;
        height: 166.2mm;
        margin: 0 auto;
        box-shadow: none;
        border-width: 3mm;
        border-radius: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .certificate-inner {
        height: 100%;
        padding: 10mm 22mm 13mm;
        break-inside: avoid;
        page-break-inside: avoid;
        line-height: 1.2;
    }

    .certificate-bg {
        display: block !important;
    }

    .certificate-title {
        font-size: 24pt;
        margin-bottom: 12pt;
    }

    .certificate-name {
        font-size: 22pt;
        margin-bottom: 3pt;
    }

    .certificate-course {
        font-size: 16pt;
        margin-bottom: 10pt;
    }

    .certificate-copy,
    .certificate-program,
    .certificate-meta {
        font-size: 12pt;
        line-height: 1.18;
    }

    .certificate-program {
        margin-bottom: 8pt;
    }

    .certificate-copy {
        margin-bottom: 6pt;
    }

    .certificate-company {
        font-size: 13pt;
        line-height: 1.12;
    }

    .certificate-user-company {
        font-size: 12pt;
        margin-bottom: 8pt;
    }

    .certificate-score-row {
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 18pt;
        justify-content: center;
        margin-bottom: 12pt;
        white-space: nowrap;
    }

    .certificate-logo {
        height: 16mm;
        width: 16mm;
    }
}
