:root {
    --npu-blue: #0b3a75;
    --npu-blue-2: #0f4f98;
    --npu-gold: #d8a728;
    --ink: #172033;
    --muted: #667085;
    --line: #d9e2ef;
    --surface: #ffffff;
    --soft: #f4f7fb;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: "Kanit", "Sarabun", system-ui, sans-serif;
}

.app-navbar {
    background: linear-gradient(90deg, var(--npu-blue), var(--npu-blue-2));
    box-shadow: 0 10px 28px rgba(11, 58, 117, .2);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--npu-gold);
    color: #10233f;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-title {
    font-weight: 600;
}

.hero-section {
    min-height: 560px;
    display: flex;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(8, 35, 76, .94) 0%, rgba(11, 58, 117, .72) 55%, rgba(7, 25, 53, .45) 100%),
        url("https://images.unsplash.com/photo-1523580846011-d3a5bc25702b?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-content {
    max-width: 780px;
    padding: 72px 0;
}

.hero-badge,
.section-kicker {
    display: inline-block;
    color: var(--npu-gold);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .85rem;
}

.hero-content h1 {
    margin: 12px 0 16px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.16;
    font-weight: 700;
}

.hero-content p {
    max-width: 680px;
    color: rgba(255, 255, 255, .88);
    font-size: 1.15rem;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #082c59;
    border-color: #082c59;
}

.btn-gold {
    background: var(--npu-gold);
    border-color: var(--npu-gold);
    color: #14243a;
}

.btn-gold:hover {
    background: #c3951d;
    border-color: #c3951d;
    color: #14243a;
}

.feature-card,
.app-card,
.stat-card,
.thankyou-box,
.login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(31, 50, 82, .07);
}

.feature-card {
    height: 100%;
    padding: 24px;
}

.feature-card i {
    color: var(--npu-blue);
    font-size: 2rem;
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(11, 58, 117, .08);
    color: var(--npu-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex: 0 0 46px;
}

.feature-card h2,
.app-card h2 {
    margin: 12px 0 8px;
    font-size: 1.2rem;
}

.feature-card p,
.login-card p,
.thankyou-box p {
    color: var(--muted);
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-heading h1 {
    margin: 4px 0 0;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 700;
}

.app-card {
    padding: 22px;
    margin-bottom: 18px;
}

.app-card h2 span {
    color: var(--npu-gold);
}

.required::after {
    content: " *";
    color: #dc3545;
}

.form-subsection-title {
    margin-top: 8px;
    padding: 12px 14px;
    border-left: 4px solid var(--npu-gold);
    background: #fff8df;
    font-weight: 600;
    color: #10233f;
}

.employment-document-card {
    margin-bottom: 18px;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(31, 50, 82, .07);
}

.employment-doc-header {
    display: grid;
    grid-template-columns: 92px 1fr;
    border: 1.5px solid #222;
    color: #111;
}

.employment-doc-logo {
    display: grid;
    place-items: center;
    min-height: 82px;
    border-right: 1.5px solid #222;
}

.employment-doc-logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.employment-doc-title {
    display: grid;
    place-items: center;
    padding: 10px 16px;
    text-align: center;
    font-size: 1.08rem;
    line-height: 1.7;
}

.employment-doc-body {
    margin-top: 28px;
    color: #111;
    line-height: 1.95;
}

.employment-doc-body .indent {
    text-indent: 3.5rem;
}

.employment-doc-list {
    margin-bottom: 0;
}

.employment-doc-list li {
    margin-bottom: 6px;
}

.sticky-progress {
    position: sticky;
    top: 70px;
    z-index: 20;
    height: 28px;
    margin-bottom: 18px;
    border-radius: 8px;
}

.progress-bar {
    background: var(--npu-blue);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 0 20px;
    background: linear-gradient(180deg, rgba(244, 247, 251, .3), var(--soft));
}

.quality-table th,
.quality-table td {
    vertical-align: middle;
}

.quality-table th:not(:first-child),
.quality-table td:not(:first-child) {
    width: 56px;
}

.table-section td,
.table-section {
    background: #edf4ff !important;
    font-weight: 600;
}

.app-footer {
    padding: 20px 0;
    background: #fff;
    border-top: 1px solid var(--line);
}

.app-footer .container-fluid {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.thankyou-box,
.login-card {
    max-width: 560px;
    margin: 42px auto;
    padding: 36px;
    text-align: center;
}

.success-icon {
    color: #198754;
    font-size: 4rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(140deg, #082c59, #0f4f98);
}

.login-card {
    text-align: left;
}

.login-card h1,
.login-card p {
    text-align: center;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: calc(100vh - 88px);
}

.admin-sidebar {
    padding: 20px;
    background: #fff;
    border-right: 1px solid var(--line);
}

.sidebar-heading {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: .9rem;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
}

.admin-sidebar a:hover {
    background: #edf4ff;
    color: var(--npu-blue);
}

.admin-content {
    min-width: 0;
    padding: 24px;
}

.stat-card {
    padding: 18px;
}

.stat-card span,
.detail-item span {
    display: block;
    color: var(--muted);
    font-size: .9rem;
}

.stat-card strong {
    display: block;
    margin: 4px 0;
    color: var(--npu-blue);
    font-size: 2rem;
}

.detail-item {
    height: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.detail-item strong {
    display: block;
    margin-top: 4px;
    font-weight: 500;
    word-break: break-word;
}

.summary-score,
.report-total {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 8px;
    background: #fff8df;
    border: 1px solid #f1d989;
}

.report-total {
    font-size: 2rem;
    font-weight: 700;
    color: var(--npu-blue);
}

.suggestion-line {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.action-buttons .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-sidebar a {
        white-space: nowrap;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 520px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-card {
        padding: 16px;
    }

    .quality-table {
        min-width: 760px;
    }
}

@media print {
    body {
        background: #fff;
        font-size: 12pt;
    }

    .no-print,
    .app-navbar,
    .app-footer,
    .admin-sidebar,
    .form-actions {
        display: none !important;
    }

    .admin-layout {
        display: block;
    }

    .admin-content,
    .container {
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .app-card {
        box-shadow: none;
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    a[href]::after {
        content: "";
    }
}
