/* หน้าการนิเทศ 3 รอบ (supervision.php, school_supervision.php) และการ์ดบนแดชบอร์ดโรงเรียน */
.sup-page { margin: 0; background: #f4f7fb; color: #1e293b; font-family: 'Sarabun', sans-serif; font-size: 16px; }
.sup-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 24px; background: #1e3a8a; color: #fff; }
.sup-brand { font-weight: 700; font-size: 1.1rem; }
.sup-nav-links { display: flex; gap: 16px; align-items: center; }
.sup-nav-links a { color: #fff; text-decoration: none; }
.sup-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.sup-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.sup-card h2 { margin: 0 0 12px; font-size: 1.15rem; color: #1e3a8a; }
.sup-muted { color: #64748b; }
.sup-flash { background: #dcfce7; color: #166534; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.sup-flash.is-error { background: #fee2e2; color: #991b1b; }
.sup-filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.sup-filter label, .sup-plan-form label, .sup-visit-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.sup-page input, .sup-page select, .sup-page textarea { font: inherit; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.sup-page button, .sup-btn { font: inherit; font-weight: 600; background: #2563eb; color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.sup-rounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.sup-round { display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.sup-round span { display: block; font-size: .88rem; color: #64748b; margin-top: 4px; }
.sup-round.active { border: 2px solid #2563eb; background: #eff6ff; }
.sup-plan-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sup-plan-form .wide { grid-column: 1 / -1; }
.sup-plan-form button { justify-self: start; }
.sup-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sup-btn-light { background: #e0e7ff; color: #1e3a8a; }
.sup-school-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.sup-school-row span { display: block; color: #64748b; font-size: .88rem; }
.sup-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sup-badge { background: #dbeafe; color: #1e40af; border-radius: 999px; padding: 2px 10px; font-size: .82rem; }
.sup-badge.ktpn { background: #ede9fe; color: #5b21b6; }
.sup-badge.empty { background: #f1f5f9; color: #64748b; }
.sup-back a { color: #2563eb; text-decoration: none; }
.sup-level-switch, .sup-form-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.sup-level-switch a, .sup-form-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid #cbd5e1; color: inherit; text-decoration: none; }
.sup-level-switch a.active, .sup-form-tabs a.active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.sup-form-tabs button { margin-left: auto; background: #475569; }
.sup-level-switch a.sup-board-link { margin-left: auto; background: #2563eb; color: #fff; border-color: #2563eb; }
.sup-brief-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sup-brief-grid div { background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.sup-brief-grid span { display: block; font-size: .85rem; color: #64748b; }
.sup-prev { margin-top: 10px; background: #f8fafc; border-radius: 10px; padding: 8px 12px; }
.sup-prev summary { cursor: pointer; font-weight: 600; }
.sup-visit-form { display: flex; flex-direction: column; gap: 14px; }
.sup-visit-form h2 { margin-bottom: 0; }
.sup-visit-form fieldset { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; }
.sup-visit-form legend { font-weight: 700; padding: 0 6px; }
.sup-visit-form .sup-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; padding: 3px 0; }
.sup-visit-form button { align-self: flex-start; }
.sup-plan-line { margin: 0 0 8px; }
.sup-result { border-top: 1px solid #f1f5f9; padding-top: 10px; margin-top: 10px; }
.sup-result p { margin: 4px 0; }

/* การ์ดเดียวบนแดชบอร์ดโรงเรียน */
.sup-school-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; color: #1e3a8a; text-decoration: none; }
.sup-school-card strong { display: block; font-size: 1.02rem; }
.sup-school-card span { font-size: .9rem; color: #334155; }

@media (max-width: 720px) {
    .sup-rounds, .sup-brief-grid, .sup-plan-form { grid-template-columns: 1fr; }
    .sup-school-row { grid-template-columns: 1fr; }
    .sup-badges { justify-content: flex-start; }
}
@media print {
    .sup-nav, .sup-filter, .sup-rounds, .sup-back, .sup-form-tabs, .sup-level-switch, .sup-visit-form button { display: none !important; }
    .sup-page { background: #fff; }
    .sup-card { border: 0; padding: 0; }
}

/* ผู้ช่วยเขียนข้อเสนอแนะในหน้าผู้นิเทศ */
.fb-assist { border: 1px dashed #c7d2fe; border-radius: 12px; padding: 10px 12px; margin: 8px 0 10px; background: #f8faff; }
.fb-assist-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: #3730a3; margin-bottom: 6px; }
.fb-ai-btn { font: inherit; font-weight: 600; background: #4f46e5; color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.fb-ai-btn[disabled] { opacity: .6; cursor: wait; }
.fb-assist-row { margin-top: 6px; }
.fb-assist-row > b { display: block; font-size: .85rem; color: #475569; margin-bottom: 4px; }
.fb-ai-status { display: block; margin-top: 8px; color: #64748b; }

/* หน้าจัดการคลังข้อเสนอแนะ */
.fb-bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fb-bank-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
@media (max-width: 720px) { .fb-bank-grid { grid-template-columns: 1fr; } }

/* สลับระดับปฐมวัย/ขั้นพื้นฐานบนแถบบนของหน้าผู้นิเทศ */
.sup-level-toggle { display: inline-flex; background: #eef2ff; border-radius: 999px; padding: 3px; gap: 2px; }
.sup-level-toggle a { padding: 6px 14px; border-radius: 999px; color: #3730a3; text-decoration: none; font-weight: 600; white-space: nowrap; }
.sup-level-toggle a.active { background: #2563eb; color: #fff; }

/* คลังข้อเสนอแนะแบบพับได้ ให้กล่องผู้ช่วยกระชับ */
.fb-bank { margin-top: 4px; }
.fb-bank > summary { cursor: pointer; color: #4338ca; font-weight: 600; font-size: .9rem; list-style: none; }
.fb-bank > summary::-webkit-details-marker { display: none; }
.fb-bank[open] > summary { margin-bottom: 4px; }
.fb-assist { padding: 8px 10px; }
.fb-ai-status { margin-top: 6px; font-size: .82rem; }

/* เช็กลิสต์ตรวจรายขั้น */
.chk-box { border: 1px solid #c7d2fe; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #f8faff; }
.chk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: #3730a3; margin-bottom: 6px; }
.chk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #e0e7ff; }
.chk-text { flex: 1; font-size: .95rem; }
.chk-btns { display: flex; gap: 4px; flex-shrink: 0; }
.chk-btns button { font: inherit; font-size: .85rem; border: 1px solid #cbd5e1; background: #fff; color: #475569; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.chk-btns .chk-pass.on { background: #dcfce7; border-color: #22c55e; color: #166534; }
.chk-btns .chk-fail.on { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.chk-note { width: 100%; box-sizing: border-box; margin-top: 8px; font: inherit; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; }

/* ===== หน้าตรวจรายขั้นแบบหน้าจอเดียว (body.sup-onescreen) ===== */
.one-step-tabs { display: none; }
body.sup-onescreen .one-step-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: sticky; top: 72px; z-index: 20; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 8px; margin: 0 0 10px; }
.one-step-tab { font: inherit; font-size: .9rem; border: 1px solid #e2e8f0; background: #f8fafc; color: #334155; border-radius: 999px; padding: 6px 12px; cursor: pointer; border-left-width: 4px; }
.one-step-tab b { margin-right: 2px; }
.one-step-tab.is-waiting { border-left-color: #f59e0b; }
.one-step-tab.is-revision { border-left-color: #ef4444; }
.one-step-tab.is-verified { border-left-color: #22c55e; }
.one-step-tab.active { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.one-step-tool { margin-left: auto; border-left-width: 1px; }
.one-step-legend { width: 100%; font-size: .78rem; color: #64748b; display: flex; gap: 12px; align-items: center; }
.one-step-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.one-step-legend .dot.is-waiting { background: #f59e0b; } .one-step-legend .dot.is-revision { background: #ef4444; } .one-step-legend .dot.is-verified { background: #22c55e; }

body.sup-onescreen .school-detail-header { padding: 12px 18px !important; margin-bottom: 10px !important; }
body.sup-onescreen .school-detail-header .school-review-overview,
body.sup-onescreen .school-detail-header .supervisor-next-action { display: none !important; }
body.sup-onescreen .school-detail-header h1, body.sup-onescreen .school-detail-header h2 { font-size: 1.3rem !important; margin: 0 !important; }

body.sup-onescreen .standard-evaluator, body.sup-onescreen .overall-feedback-card { display: none; }
body.sup-onescreen.show-standard-tool .standard-evaluator, body.sup-onescreen.show-standard-tool .overall-feedback-card { display: block; }
body.sup-onescreen.show-standard-tool .step-container.active { display: none !important; }

body.sup-onescreen .step-container.active { border-radius: 18px !important; }
body.eiqa-supervisor.sup-v2.sup-onescreen .step-container .step-grid { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) !important; height: calc(100vh - 200px); min-height: 460px; }
body.sup-onescreen .step-container .col-info { display: none !important; }
body.sup-onescreen .step-container .col-data, body.sup-onescreen .step-container .col-chat { overflow-y: auto; padding: 18px 20px !important; min-height: 0; }
body.sup-onescreen .step-container .col-chat { display: flex; flex-direction: column; }
body.sup-onescreen .step-container .col-chat .feedback-decision-form { order: -1; margin-bottom: 12px; }
body.sup-onescreen .step-container .cc-chat-box { max-height: 180px; min-height: 0 !important; }
body.sup-onescreen .step-container .feedback-actions { position: sticky; bottom: -18px; background: #fff; padding: 10px 0; z-index: 2; border-top: 1px solid #e2e8f0; }
body.sup-onescreen .step-container .step-footer { padding: 8px 16px !important; }

@media (max-width: 1100px) {
    body.sup-onescreen .one-step-tabs { top: 60px; }
    body.eiqa-supervisor.sup-v2.sup-onescreen .step-container .step-grid { grid-template-columns: 1fr !important; height: auto; }
    body.sup-onescreen .step-container .col-data, body.sup-onescreen .step-container .col-chat { overflow: visible; }
    body.sup-onescreen .step-container .feedback-actions { bottom: 0; }
}

/* ไม่ใช้แถบเมนูด้านข้างในหน้าตรวจโรงเรียน (มีแท็บด้านบนแล้ว) */
body.eiqa-supervisor.sup-v2.sup-onescreen .workspace-sidebar { display: none !important; }
body.eiqa-supervisor.sup-v2.sup-onescreen .workspace-shell { grid-template-columns: minmax(0,1fr) !important; }
.one-step-back { font-weight: 600; color: #1e3a8a; text-decoration: none; padding: 6px 10px 6px 4px; white-space: nowrap; }

/* การ์ดสรุป AI วิเคราะห์ในขั้นที่ 1 (เต็มรูปแบบอยู่ในแท็บ AI วิเคราะห์มาตรฐาน) */
.ai-mini-card { border: 1px solid #ddd6fe; background: #faf5ff; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.ai-mini-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; color: #5b21b6; }
.ai-mini-head b { color: #4c1d95; }
.ai-mini-text { margin: 6px 0 8px; color: #334155; line-height: 1.6; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ai-mini-btn { font: inherit; font-weight: 600; font-size: .88rem; background: #7c3aed; color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
a.ai-mini-btn { display: inline-block; text-decoration: none; }
.ai-mini-text.is-open { display: block; -webkit-line-clamp: unset; white-space: pre-line; max-height: 260px; overflow-y: auto; }
/* ขั้นที่ 2 ใช้การ์ด AI ด้านบนแทนกล่องเปิดเครื่องมือเดิม */
body.sup-onescreen .plan-tool-launch { display: none !important; }

/* ตัวช่วยตรวจ 3 ขั้น: ดูสรุป → ติ๊กเกณฑ์ → ยืนยันส่ง */
.wiz { border: 1px solid #c7d2fe; border-radius: 14px; background: #fff; padding: 10px 12px; }
.wiz-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.wiz-tab { font: inherit; font-size: .85rem; font-weight: 600; border: 0; border-radius: 10px; padding: 7px 4px; background: #f1f5f9; color: #64748b; cursor: pointer; }
.wiz-tab.active { background: #e0e7ff; color: #3730a3; }
.wiz-pane { display: none; }
.wiz-pane.active { display: block; }
.wiz .chk-box { border: 0; padding: 0; background: transparent; margin: 0; }
.wiz .ai-mini-card { margin-bottom: 8px; }
.wiz .ai-mini-text { -webkit-line-clamp: 6; }
.wiz-evidence { display: inline-block; margin: 4px 0; color: #2563eb; font-weight: 600; text-decoration: none; }
.wiz-hint { color: #64748b; font-size: .85rem; margin: 6px 0 0; }
.wiz-summary { background: #f8fafc; border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.wiz-summary ul { margin: 6px 0 0; padding-left: 20px; }
.wiz-preview { margin-top: 8px; }
.wiz-preview > summary { cursor: pointer; color: #4338ca; font-size: .88rem; font-weight: 600; }
.wiz-preview textarea { margin-top: 6px; min-height: 120px; }
.wiz .feedback-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; position: static !important; border: 0 !important; padding: 0 !important; }
.wiz .feedback-actions button { width: 100%; }
.wiz .btn-send-chat.is-secondary { background: #fff !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; box-shadow: none !important; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.wiz-nav button { font: inherit; font-weight: 600; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.wiz-nav .wiz-next { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }

/* ฝั่งโรงเรียน: ผลการนิเทศเป็นรายการสิ่งที่ต้องทำ */
.sch-todo { border: 1px solid #c7d2fe; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.sch-todo-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; color: #1e3a8a; }
.sch-badge { border-radius: 999px; padding: 3px 12px; font-size: .85rem; font-weight: 700; }
.sch-badge.ok { background: #dcfce7; color: #166534; }
.sch-badge.fix { background: #fef3c7; color: #92400e; }
.sch-todo-title { font-weight: 700; margin: 10px 0 4px; }
.sch-todo-item { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.sch-todo-item input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.sch-todo-item input:checked + span { color: #94a3b8; text-decoration: line-through; }
.sch-todo-tip { color: #64748b; font-size: .82rem; margin: 6px 0 0; }
.sch-good { color: #166534; margin: 10px 0 0; font-size: .92rem; }
.sch-more { margin-bottom: 12px; }
.sch-more > summary { cursor: pointer; color: #4338ca; font-weight: 600; padding: 6px 0; list-style: none; }

/* AI ผู้ช่วยตรวจปุ่มเดียว */
.ai-state { font-weight: 600; color: #64748b; font-size: .8rem; }
.ai-state.is-running { color: #7c3aed; }
.ai-sources { display: block; color: #94a3b8; font-size: .78rem; margin: -4px 0 8px; }
.chk-reason { display: block; color: #64748b; font-size: .8rem; margin-top: 2px; }
.chk-reason:empty { display: none; }
/* ตัดเครื่องมือละเอียดขั้น 1–2 ออกจากหน้าตรวจ (ใช้ AI ปุ่มเดียวแทน) */
body.sup-onescreen .standard-evaluator, body.sup-onescreen .plan-tool-launch { display: none !important; }

/* ===== กระดานโรงเรียนแบบตาราง (cluster_dashboard.php) ===== */
.board-matrix { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px 16px; margin: 0 0 14px; }
.board-matrix-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.board-matrix-head strong { font-size: 1.05rem; color: #1e3a8a; }
.board-matrix-head span { color: #475569; font-size: .9rem; }
.board-matrix-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-matrix-table th { font-weight: 600; font-size: .85rem; color: #64748b; padding: 6px 4px; text-align: center; }
.board-matrix-table th:first-child { text-align: left; width: 44%; }
.board-matrix-table td { border-top: 1px solid #f1f5f9; padding: 5px 4px; }
.board-matrix-step { font-size: .92rem; }
.board-matrix-step b { display: inline-block; width: 22px; color: #1e3a8a; }
.board-cell { width: 100%; font: inherit; font-size: .85rem; font-weight: 600; border-radius: 999px; padding: 6px 8px; cursor: pointer; border: 1px solid #e2e8f0; background: #fff; color: #64748b; }
.board-cell.verified { background: #dcfce7; border-color: #86efac; color: #166534; }
.board-cell.submitted, .board-cell.reviewing { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.board-cell.revision { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.board-cell.completed, .board-cell.progress { background: #f1f5f9; color: #334155; }
.board-cell.active { outline: 3px solid #6366f1; outline-offset: 1px; }
.board-matrix-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: .78rem; color: #64748b; }
.board-matrix-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; background: #e2e8f0; }
.board-matrix-legend .verified::before { background: #22c55e; } .board-matrix-legend .submitted::before { background: #3b82f6; } .board-matrix-legend .revision::before { background: #f59e0b; } .board-matrix-legend .completed::before { background: #94a3b8; }
.board-matrix-tip { margin: 8px 0 0; color: #94a3b8; font-size: .8rem; }
.board-matrix .own-edit-links { margin-top: 10px; }
.board-todo { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.board-todo strong { color: #92400e; }
.board-todo ul { margin: 6px 0 0; padding-left: 20px; }

/* แสดงรายละเอียดทีละช่อง และตัดส่วนที่ซ้ำ/ว่าง */
.compact-board .level-panel { display: none; border: 0 !important; background: transparent !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
.compact-board .level-panel.has-selected { display: block; }
.compact-board .level-panel .level-title { display: none !important; }
.compact-board .public-step-grid { display: block !important; padding: 0 !important; }
.compact-board .public-result-card { display: none !important; }
.compact-board .public-result-card.is-selected { display: block !important; max-width: none !important; }
.compact-board .public-result-statuses,
.compact-board .public-supervisor-message.empty,
.compact-board .public-review-snapshot.empty,
.compact-board .public-result-open { display: none !important; }

/* ===== หน้าภาพรวมแอดมิน (admin_dashboard.php แท็บ overview) ===== */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.ov-kpi { display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px 18px; text-decoration: none; color: #1e293b; cursor: pointer; }
.ov-kpi span { display: block; color: #64748b; font-weight: 600; }
.ov-kpi strong { display: block; font-size: 2rem; line-height: 1.2; margin: 4px 0; }
.ov-kpi small { color: #94a3b8; }
.ov-kpi.waiting { background: #eff6ff; border-color: #bfdbfe; } .ov-kpi.waiting strong { color: #1d4ed8; }
.ov-kpi.revision { background: #fffbeb; border-color: #fde68a; } .ov-kpi.revision strong { color: #b45309; }
.ov-kpi.verified { background: #f0fdf4; border-color: #bbf7d0; } .ov-kpi.verified strong { color: #15803d; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.ov-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px 18px; }
.ov-card h3 { margin: 0 0 10px; font-size: 1.08rem; color: #1e3a8a; }
.ov-card h3 small { color: #94a3b8; font-weight: 500; font-size: .8rem; margin-left: 6px; }
.ov-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f1f5f9; color: #334155; text-decoration: none; }
.ov-row:hover { background: #f8fafc; }
.ov-row em { font-style: normal; color: #2563eb; font-weight: 700; white-space: nowrap; }
.ov-empty, .ov-more { color: #94a3b8; margin: 8px 0 0; }
.ov-bar { display: grid; grid-template-columns: minmax(0, 1fr) 1.2fr 46px; gap: 10px; align-items: center; padding: 7px 0; color: #334155; text-decoration: none; }
.ov-bar small { color: #94a3b8; }
.ov-bar i { display: block; height: 10px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.ov-bar b { display: block; height: 100%; background: #22c55e; border-radius: 999px; }
.ov-bar em { font-style: normal; font-weight: 700; text-align: right; }
.ov-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ov-quick a { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; color: #1e3a8a; font-weight: 600; text-decoration: none; background: #f8fafc; }
@media (max-width: 900px) { .ov-kpis { grid-template-columns: 1fr 1fr; } .ov-grid { grid-template-columns: 1fr; } }
.ov-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.ov-filters select { font: inherit; font-size: .88rem; padding: 7px 8px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; min-width: 0; }
.ov-row small { display: block; color: #94a3b8; font-size: .78rem; }
.ov-row[hidden] { display: none; }
.ov-more-btn { margin-top: 8px; width: 100%; font: inherit; font-weight: 600; border: 1px solid #cbd5e1; background: #f8fafc; color: #1e3a8a; border-radius: 10px; padding: 8px; cursor: pointer; }
@media (max-width: 900px) { .ov-filters { grid-template-columns: 1fr; } }
.area-cb { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: 400; cursor: pointer; }
.area-hint { display: block; color: #94a3b8; font-size: .8rem; margin-top: 2px; }

/* ===== หน้าโรงเรียนแบบแท็บ (school_dashboard.php) ===== */
.sch-tabs { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 70px; z-index: 30; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 6px; margin: 0 0 14px; box-shadow: 0 4px 14px rgba(15,23,42,.05); }
.sch-tab { font: inherit; font-weight: 600; font-size: .95rem; border: 0; background: transparent; color: #475569; border-radius: 12px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sch-tab:hover { background: #f1f5f9; }
.sch-tab.active { background: #1e3a8a; color: #fff; }
/* แต่ละแท็บแสดงเฉพาะส่วนของตัวเอง */
body[data-stab] .sup-school-card { display: none; }
body[data-stab]:not([data-stab="profile"]) #school-context,
body[data-stab]:not([data-stab="profile"]) #schoolProfileDockbar { display: none !important; }
body[data-stab]:not([data-stab="overview"]) .school-overview { display: none !important; }
body[data-stab="overview"] .sup-school-card { display: flex; }
body[data-stab="profile"] .level-workspace-shell, body[data-stab="overview"] .level-workspace-shell { display: none !important; }
body[data-stab="profile"] .step-container, body[data-stab="overview"] .step-container, body[data-stab="calendar"] .step-container { display: none !important; }
body[data-stab="steps"] .implementation-calendar { display: none !important; }
body[data-stab="calendar"] .level-workspace-shell > *:not(.implementation-calendar) { display: none !important; }
@media (max-width: 720px) { .sch-tabs { top: 56px; overflow-x: auto; flex-wrap: nowrap; } .sch-tab { white-space: nowrap; padding: 8px 11px; } }
