* {
    font-family: 'Sarabun', 'TH Sarabun New', sans-serif;
}

body {
    background: #f3f8f5;
    color: #1f2933;
    min-height: 100vh;
    font-size: 18px;
    font-weight: 400;
}

.main-navbar {
    background: linear-gradient(135deg, #006b3f, #0b8f5a);
}

/* ─── HERO ─── */
.hero-section {
    background: #006b3f;
    color: white;
    padding: 0;               /* แก้ conflict: ใช้ 0 เพราะ inner จัดการเอง */
    position: relative;
    overflow: hidden;
}

.hero-bg-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    min-height: 280px;
}

.hero-left {
    padding: 52px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-eyebrow-dot {
    width: 6px;
    height: 6px;
    background: #4fd49b;
    border-radius: 50%;
    flex-shrink: 0;
}

.hero-title {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    letter-spacing: -.01em;
    margin-bottom: 14px;
}

.hero-title-accent {
    color: #4fd49b;
}

/* ลบ .hero-badge เดิมออกได้เพราะไม่ใช้แล้ว */
.hero-badge {
    display: none;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,.72);
    margin: 0 0 26px;
    line-height: 1.7;
    max-width: 480px;
    opacity: 1;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    color: #006b3f;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    align-self: flex-start;
    transition: .15s ease;
}

.hero-cta-btn:hover {
    background: #e7f6ef;
    color: #006b3f;
}

.hero-cta-arrow {
    font-style: normal;
    display: inline-block;
    transition: transform .15s;
}

.hero-cta-btn:hover .hero-cta-arrow {
    transform: translateX(3px);
}

.hero-right-panel {
    background: rgba(0,0,0,.2);
    border-left: 1px solid rgba(255,255,255,.1);
    padding: 40px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.hero-stat-item {
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding-bottom: 20px;
}

.hero-stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,.45);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.hero-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.95);
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(79,212,155,.15);
    display: grid;
    place-items: center;
    color: #4fd49b;
    font-size: 14px;
    flex-shrink: 0;
}

/* ─── STEPS BAR ─── */
.steps-bar {
    background: #ffffff;
    border-bottom: 1px solid #e0eee5;
    padding: 16px 0;
}

.steps-inner {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 480px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9bb09e;
    flex: 1;
}

.step.done {
    color: #007a49;
}

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e7f6ef;
    color: #007a49;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-num.inactive {
    background: #f3f8f5;
    color: #9bb09e;
}

.step-line {
    height: 1px;
    flex: 1;
    background: #d6e8dd;
    margin: 0 8px;
}

/* ─── SECTION LABEL ─── */
.section-label-row {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #789084;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label-row::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d6e8dd;
}

/* ─── MENU CARDS ─── */
.menu-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0eee5;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
    transition: .18s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #1f2933;
}

.menu-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 0;
    background: #0b8f5a;
    opacity: 0;
    transition: .18s ease;
}

.menu-card.active,
.menu-card:hover {
    border-color: #0b8f5a;
    transform: translateY(-2px);
}

.menu-card.active::before,
.menu-card:hover::before {
    opacity: 1;
}

.menu-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #e7f6ef;
    color: #007a49;
    font-size: 22px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.menu-card h5 {
    font-size: 14px;
    font-weight: 700;
    color: #1a2e25;
    margin-bottom: 4px;
}

.menu-card p {
    font-size: 12px;
    color: #789084;
    line-height: 1.5;
    margin: 0;
}

.menu-card-arrow {
    position: absolute;
    bottom: 14px;
    right: 14px;
    font-size: 14px;
    color: #d6e8dd;
    transition: .18s ease;
    font-style: normal;
}

.menu-card:hover .menu-card-arrow,
.menu-card.active .menu-card-arrow {
    color: #0b8f5a;
    transform: translateX(2px);
}

/* ─── HOW-TO STEPS ─── */
.howto-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e0eee5;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.howto-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #006b3f;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.howto-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a2e25;
    margin-bottom: 4px;
}

.howto-desc {
    font-size: 12px;
    color: #789084;
    line-height: 1.5;
    margin: 0;
}

/* ─── PHASE CARDS ─── */
.phase-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #e0eee5;
    text-align: center;
}

.phase-tag {
    display: inline-block;
    background: #e7f6ef;
    color: #007a49;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.phase-title {
    font-size: 13px;
    font-weight: 700;
    color: #1a2e25;
    margin-bottom: 6px;
    line-height: 1.4;
}

.phase-score {
    font-size: 28px;
    font-weight: 700;
    color: #006b3f;
}

.phase-score small {
    font-size: 13px;
    color: #789084;
}

.phase-desc {
    font-size: 12px;
    color: #789084;
    margin-top: 8px;
    line-height: 1.5;
}

/* ─── INFO STRIP ─── */
.info-strip {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e0eee5;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-strip-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(40,167,69,.15);
}

/* ─── ส่วนที่ใช้ใน exam-report ─── */
.search-card,
.result-profile-card,
.score-card {
    border-radius: 24px;
}

.form-select,
.form-control {
    border-radius: 14px;
    border-color: #d6e8dd;
}

.form-select:focus,
.form-control:focus {
    border-color: #0b8f5a;
    box-shadow: 0 0 0 .2rem rgba(11,143,90,.16);
}

.btn-success {
    background: #007a49;
    border-color: #007a49;
    border-radius: 14px;
}

.btn-success:hover {
    background: #006b3f;
    border-color: #006b3f;
}

.profile-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: #e7f6ef;
    color: #007a49;
    font-size: 32px;
    flex-shrink: 0;
}

.final-status-box {
    background: #f1faf5;
    border: 1px solid #d8eee2;
    border-radius: 18px;
    padding: 16px 20px;
}

.score-card {
    overflow: hidden;
    position: relative;
}

.score-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #006b3f, #28a745);
}

.score-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.score-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #007a49;
    font-size: 28px;
    flex-shrink: 0;
}

.bg-green-soft { background: #e7f6ef; }

.score-desc {
    min-height: 120px;
    font-size: 14px;
    color: #607d6d;
    line-height: 1.7;
}

.score-number {
    font-size: 42px;
    font-weight: 700;
    color: #006b3f;
}

.score-number small {
    font-size: 18px;
    color: #789084;
}

.status-badge {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
}

.status-pass  { background: #e3f7ea; color: #08783f; }
.status-fail  { background: #fdeaea; color: #c62828; }
.status-default { background: #eef2f0; color: #607d6d; }

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: grid;
    place-items: center;
}

.loading-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 44px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,.14);
    border: 1px solid #e0eee5;
}

.footer-section {
    padding: 28px 0;
    color: #789084;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-left {
        padding: 36px 20px 28px;
    }

    .hero-right-panel {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,.1);
        padding: 22px 20px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-stat-item {
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,.1);
        padding-bottom: 0;
        padding-right: 12px;
        flex: 1;
        min-width: 120px;
    }

    .hero-stat-item:last-child {
        border-right: none;
        padding-right: 0;
    }

    .score-desc {
        min-height: auto;
    }

    .final-status-box {
        text-align: left;
    }
}

/* ─── Global size fix ─────────────────────────── */
body {
    font-size: 15px;        /* ลดจาก 18px */
}

/* ─── Card radius fix ─────────────────────────── */
.search-card,
.result-profile-card,
.score-card {
    border-radius: 16px;    /* มุมมนเท่ากันทั้ง 4 ด้าน */
    overflow: hidden;       /* clip ให้ชัดเจน */
}

/* แก้ score-card::before ที่ตัดมุมบน */
.score-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;            /* บางลง */
    width: 100%;
    background: linear-gradient(90deg, #006b3f, #28a745);
    border-radius: 0;       /* ไม่ต้องมน เพราะ card มน แล้ว */
}

/* ─── Form size ────────────────────────────────── */
.form-select,
.form-control {
    font-size: 14px;
    padding: 9px 14px;
    height: auto;
}

/* override bootstrap -lg */
.form-select-lg,
.form-control-lg {
    font-size: 14px !important;
    padding: 9px 14px !important;
    border-radius: 14px !important;
    height: auto !important;
}

.btn-lg {
    font-size: 14px !important;
    padding: 9px 18px !important;
}

/* ─── Score card ───────────────────────────────── */
.score-number {
    font-size: 34px;        /* เล็กลงจาก 42px */
    font-weight: 700;
    color: #006b3f;
}

.score-number small {
    font-size: 15px;
    color: #789084;
}

.score-desc {
    font-size: 13px;
    min-height: 100px;
    color: #607d6d;
    line-height: 1.6;
}

/* ─── Profile card ─────────────────────────────── */
.profile-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 26px;
}

.final-status-box {
    font-size: 14px;
}

/* ─── Status badge ─────────────────────────────── */
.status-badge {
    font-size: 13px;
    padding: 6px 14px;
}

/* ─── Card header ──────────────────────────────── */
.card-header h4 {
    font-size: 16px;
    font-weight: 700;
}

.card-header p {
    font-size: 13px;
}

.navbar-brand-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

@media (max-width: 576px) {
    .navbar-brand-text {
        font-size: 12px;
    }

    .main-navbar img {
        width: 28px;
    }
}
.hero-brand-row {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1100px;
}

.hero-logo-wrap {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border: none;
    padding: 0;
    transform: translateY(4px);
}

.hero-obec-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
}

.hero-left {
    min-width: 0;
}

@media (max-width: 768px) {
    .hero-brand-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
    }

    .hero-logo-wrap {
        width: 96px;
        height: 96px;
        border-radius: 24px;
        padding: 12px;
    }

    .hero-left {
        width: 100%;
    }
}
.login-logo-wrap {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    display: block;
}

@media (max-width: 576px) {
    .login-logo-wrap {
        width: 82px;
        height: 82px;
    }

    .login-logo {
        width: 82px;
        height: 82px;
    }
}

/* =================================================
   RESULT SCORE TABLE — Green Official Template
   ใช้กับหน้า /exam-result รูปแบบตารางประกาศคะแนน
================================================= */

.result-score-table-card {
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e0eee5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

/* หัวตาราง */
.score-table-header {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #006b3f, #0b8f5a);
    color: #ffffff;
    font-weight: 700;
    padding: 14px 18px;
    font-size: 15px;
}

/* แถวคะแนน */
.score-table-row,
.score-total-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    gap: 12px;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid #e4f1e9;
    background: #ffffff;
}

.score-table-row:nth-child(even) {
    background: #fbfefc;
}

/* แถวหัวข้อ ภาค ข / ภาค ค */
.score-section-row {
    background: linear-gradient(90deg, #e7f6ef, #f7fcf9);
    color: #006b3f;
    font-weight: 700;
    padding: 14px 18px;
    font-size: 16px;
    border-top: 1px solid #d6e8dd;
    border-bottom: 1px solid #d6e8dd;
}

/* ชื่อวิชา/ภาค */
.score-subject {
    color: #1a2e25;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.45;
}

/* คะแนนเต็ม */
.score-full {
    text-align: right;
    color: #263238;
    font-size: 15px;
    font-weight: 600;
}

/* คะแนนที่ได้ */
.score-got {
    justify-self: end;
    background: linear-gradient(135deg, #007a49, #0b8f5a);
    color: #ffffff;
    border-radius: 10px;
    padding: 7px 12px;
    min-width: 90px;
    text-align: right;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 122, 73, .16);
}

/* แถวรวม */
.score-total-row {
    background: linear-gradient(90deg, #e7f6ef, #f7fcf9);
    border-bottom: none;
}

.score-total-row .score-subject,
.score-total-row .score-full {
    color: #006b3f;
    font-weight: 800;
}

.score-total-row .score-got {
    background: linear-gradient(135deg, #005c3b, #007a49);
    font-size: 16px;
}

/* กล่องข้อมูลสถานะรวมให้เข้ากับตาราง */
.result-profile-card + .result-score-table-card {
    margin-top: 10px;
}

/* Responsive ตารางคะแนน */
@media (max-width: 768px) {
    .result-score-table-card {
        border-radius: 14px;
        overflow-x: auto;
    }

    .score-table-header,
    .score-table-row,
    .score-total-row {
        grid-template-columns: minmax(210px, 1fr) 82px 88px;
        gap: 8px;
        min-width: 420px;
        padding: 12px;
    }

    .score-table-header {
        font-size: 13px;
    }

    .score-section-row {
        min-width: 420px;
        font-size: 14px;
        padding: 12px;
    }

    .score-subject,
    .score-full,
    .score-got {
        font-size: 13px;
    }

    .score-got {
        min-width: 74px;
        padding: 6px 8px;
        border-radius: 8px;
    }

    .score-total-row .score-got {
        font-size: 13px;
    }
}

