/* ระบบลงทะเบียนนิเทศ — ใช้โทนสีเดียวกับ style.css */
.sv-page{max-width:1180px;margin:auto;padding:24px;display:flex;flex-direction:column;gap:16px}
.sv-page h1{color:#163e67;margin:0}
.sv-lead{color:#607991;margin:4px 0 0}
.sv-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.sv-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #d5e2ed;padding-bottom:0}
.sv-tabs button{width:auto;border:0;background:none;padding:10px 14px;border-bottom:3px solid transparent;color:#5d758b;font:inherit;font-weight:600;cursor:pointer;border-radius:8px 8px 0 0;min-height:44px}
.sv-tabs button[aria-selected="true"]{color:#1669C9;border-bottom-color:#1669C9;background:#eef5fc}
.sv-tabs .count{display:inline-block;margin-left:6px;background:#fff1dc;color:#9a4b08;border-radius:99px;padding:0 7px;font-size:12px}
.sv-card{background:#fff;border:1px solid #d5e2ed;border-radius:14px;padding:18px;box-shadow:0 1px 2px rgba(28,44,61,.04)}
.sv-notice{padding:12px 14px;border:1px solid #cfdfec;background:#f3f9fd;border-radius:12px;color:#33506b}
.sv-notice.warn{background:#fff8ec;border-color:#f1dcb4;color:#7a5414}
.sv-notice.error{color:#9e3131;background:#fff2f2;border-color:#f1caca}
.sv-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.sv-stat{background:#fff;border:1px solid #d5e2ed;border-radius:14px;padding:14px 16px}
.sv-stat span{display:flex;align-items:center;gap:6px;font-size:13px;color:#607991}
.sv-stat i{width:8px;height:8px;border-radius:50%}
.sv-stat b{display:block;font-size:26px;color:#163e67;line-height:1.25;font-variant-numeric:tabular-nums}
.sv-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-height:40px;padding:7px 14px;border-radius:10px;border:1px solid #cbdbe8;background:#fff;color:#1c507c;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.sv-btn:hover{background:#f3f8fc}
.sv-btn.primary{background:#1669C9;border-color:#1669C9;color:#fff}
.sv-btn.primary:hover{background:#0f5aae}
.sv-btn.danger{color:#a8333c;border-color:#f0c9cc}
.sv-btn.danger.solid{background:#b84d55;color:#fff;border-color:#b84d55}
.sv-btn:disabled{opacity:.5;cursor:not-allowed}
.sv-btn.sm{min-height:34px;padding:4px 11px;font-size:14px}
.sv-pill{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;border-radius:99px;padding:2px 10px;white-space:nowrap}
.sv-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.st-pending{background:#fff1dc;color:#9a4b08}.st-confirmed{background:#e6f0fb;color:#1a5fae}.st-evaluated{background:#e3f4ec;color:#187E6B}
.sv-tag{display:inline-block;font-size:12.5px;border:1px solid #d5e2ed;border-radius:6px;padding:1px 8px;color:#5d758b;white-space:nowrap}
.sv-weekbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sv-weekbar b{color:#163e67;font-variant-numeric:tabular-nums}
.sv-weekbar .meta{margin-left:auto;color:#607991;font-size:14px}
.sv-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;color:#607991}
.sv-legend i{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:5px;vertical-align:-1px;border:1px solid #d5e2ed}
.sv-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #d5e2ed;border-radius:12px}
table.sv-grid{border-collapse:separate;border-spacing:0;width:100%;min-width:900px;table-layout:fixed}
.sv-grid th,.sv-grid td{border-bottom:1px solid #e3ecf3;border-right:1px solid #e3ecf3;padding:6px;vertical-align:top;text-align:left}
.sv-grid tr>*:last-child{border-right:0}.sv-grid tbody tr:last-child>*{border-bottom:0}
.sv-grid thead th{background:#f6f9fc;font-weight:500;font-size:13px;padding:10px}
.sv-grid thead th b{display:block;font-size:15px;color:#163e67}
.sv-grid thead th span{display:block;font-size:12.5px}
.sv-grid tr.today th.pcol{background:#e6f0fb}
.sv-grid th.pcol{width:110px;position:sticky;left:0;z-index:1;background:#f6f9fc;font-size:13px;padding:10px}
.sv-grid th.pcol b{display:block;color:#163e67;font-size:15px}
.sv-grid .lunch{width:62px;background:#f6f9fc;text-align:center;color:#607991;font-size:13px;padding:6px;vertical-align:middle}
.sv-grid td.lunch span{display:block;line-height:1.6}
.sv-slot{width:100%;min-height:74px;border-radius:9px;border:1px dashed #d5e2ed;background:none;padding:8px 10px;text-align:left;display:flex;flex-direction:column;gap:2px;font:inherit;font-size:14px;line-height:1.4;color:#1C2A39}
button.sv-slot{cursor:pointer}
.sv-slot b{font-weight:700}
.sv-slot small{color:#607991}
.sv-slot.open{border:1px solid #2B86E5;background:#fff}
.sv-slot.open:hover{background:#eef5fc}
.sv-slot.open .cta{margin-top:auto;color:#1669C9;font-weight:700;font-size:12.5px}
.sv-slot.booked{border-style:solid;border-color:transparent}
.sv-slot.booked.pending{background:#fff1dc}.sv-slot.booked.confirmed{background:#e6f0fb}.sv-slot.booked.evaluated{background:#e3f4ec}
.sv-slot.booked .state{margin-top:auto;font-weight:700;font-size:12.5px}
.sv-slot.past{background:#f6f9fc;opacity:.6}
.sv-slot.full{background:#fdf1f1;border-color:#f2c9c9;color:#9b3b3b;cursor:not-allowed}
.sv-slot.full small{color:#b54848;font-weight:600}
.sv-slot.none{border:0;color:#c9d6e2;align-items:center;justify-content:center}
.sv-slot.off{border:0;background:#f6f9fc;color:#8aa0b4;align-items:center;justify-content:center;font-size:12.5px}
.sv-list{display:flex;flex-direction:column;gap:10px}
.sv-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1.5fr) auto;gap:14px;align-items:center;border:1px solid #d5e2ed;border-radius:12px;padding:14px;background:#fff}
.sv-row .when b{display:block;color:#163e67}
.sv-row .when small{color:#607991}
.sv-row .meta{display:flex;flex-direction:column;gap:5px;min-width:0}
.sv-row .line{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sv-row .topic{font-size:14px;color:#607991;overflow-wrap:anywhere}
.sv-row .owner{font-size:13.5px;color:#607991}.sv-row .owner b{color:#1C2A39;font-weight:600}
.sv-row .acts{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.sv-row.focus{box-shadow:0 0 0 2px #2B86E5}
.sv-conflict{font-size:13px;color:#a8333c}
.sv-chips{display:flex;gap:6px;flex-wrap:wrap}
.sv-chip{width:auto;border:1px solid #cbdbe8;background:#fff;border-radius:99px;padding:6px 14px;cursor:pointer;font:inherit;font-size:14px;min-height:38px;color:#33506b}
.sv-chip[aria-pressed="true"]{background:#1669C9;border-color:#1669C9;color:#fff}
.sv-empty{text-align:center;padding:34px 16px;color:#607991}
.sv-empty b{display:block;color:#163e67;font-size:17px;margin-bottom:4px}
.sv-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.sv-toolbar select,.sv-toolbar input{width:auto;min-width:180px}
/* evaluation */
.sv-eval{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}
.sv-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px 18px;font-size:14.5px;background:#f6f9fc;border-radius:10px;padding:12px 14px}
.sv-info span{display:block;font-size:12.5px;color:#607991}
.sv-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;align-items:center;padding:13px 0;border-bottom:1px solid #e3ecf3}
.sv-item:last-child{border-bottom:0}
.sv-item .q{display:flex;gap:10px}
.sv-item .n{width:26px;height:26px;border-radius:8px;background:#eef5fc;color:#1a5fae;display:grid;place-items:center;font-size:13px;font-weight:700;flex:none}
.sv-scale{display:flex;gap:6px}
.sv-scale input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.sv-scale label{width:44px;height:44px;border-radius:10px;border:1px solid #cbdbe8;display:grid;place-items:center;cursor:pointer;font-weight:700;background:#fff;color:#33506b;margin:0}
.sv-scale label:hover{border-color:#2B86E5}
.sv-scale input:checked+label{background:#1669C9;border-color:#1669C9;color:#fff}
.sv-scale input:focus-visible+label{outline:2px solid #2B86E5;outline-offset:2px}
.sv-summary{position:sticky;top:12px;display:flex;flex-direction:column;gap:12px}
.sv-big{display:flex;align-items:baseline;gap:8px}.sv-big b{font-size:38px;line-height:1;color:#163e67;font-variant-numeric:tabular-nums}
.sv-bar{height:8px;border-radius:99px;background:#eef3f8;overflow:hidden}.sv-bar i{display:block;height:100%;background:#1669C9;border-radius:99px;transition:width .2s}
.sv-kv{display:flex;justify-content:space-between;gap:10px;font-size:14.5px;padding:6px 0;border-bottom:1px dashed #dbe6ef}.sv-kv:last-child{border-bottom:0}
.sv-prov{font-size:12.5px;font-weight:700;color:#9a4b08;background:#fff1dc;border-radius:6px;padding:2px 8px}
.lv{font-weight:700}.lv-ดีเยี่ยม,.lv-ดีมาก{color:#187E6B}.lv-ดี{color:#1a5fae}.lv-พอใช้{color:#9a4b08}.lv-ควรพัฒนา,.lv-ปรับปรุง{color:#a8333c}
.sv-hint{font-size:13px;color:#607991;margin:0}
/* results */
.sv-res{border:1px solid #d5e2ed;border-radius:14px;background:#fff;overflow:hidden}
.sv-res.focus{box-shadow:0 0 0 2px #2B86E5}
.sv-res-head{display:flex;justify-content:space-between;gap:14px;padding:16px;flex-wrap:wrap;border-bottom:1px solid #e3ecf3}
.sv-res-head h2{margin:0;font-size:18px;color:#163e67}
.sv-res-score{text-align:right}.sv-res-score b{font-size:28px;line-height:1;color:#163e67;font-variant-numeric:tabular-nums}
.sv-res-body{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px;padding:16px}
.sv-sc{display:grid;grid-template-columns:minmax(0,1fr) 108px 22px;gap:10px;align-items:center;font-size:14px;padding:5px 0}
.sv-dots{display:flex;gap:4px}.sv-dots i{width:16px;height:8px;border-radius:3px;background:#eef3f8;border:1px solid #d5e2ed}.sv-dots i.on{background:#1669C9;border-color:#1669C9}
.sv-sugg{background:#f6f9fc;border-radius:10px;padding:12px 14px;font-size:14.5px;white-space:pre-wrap;overflow-wrap:anywhere}
.sv-res-foot{font-size:13px;color:#607991;padding:10px 16px;border-top:1px solid #e3ecf3;background:#f8fbfd;display:flex;gap:16px;flex-wrap:wrap}
/* modal */
.sv-overlay{position:fixed;inset:0;background:rgba(18,30,44,.45);z-index:50;display:grid;place-items:center;padding:16px}
.sv-modal{background:#fff;border-radius:16px;width:min(540px,100%);max-height:100%;overflow:auto;box-shadow:0 24px 70px rgba(27,44,64,.25)}
.sv-modal header{padding:18px 20px 4px}.sv-modal header h2{margin:0;font-size:19px;color:#163e67}
.sv-modal .body{padding:10px 20px 4px;display:flex;flex-direction:column;gap:14px}
.sv-modal footer{padding:14px 20px 18px;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.sv-dl{display:grid;grid-template-columns:110px minmax(0,1fr);gap:6px 12px;font-size:14.5px;background:#f6f9fc;border-radius:10px;padding:12px 14px;margin:0}
.sv-dl dt{color:#607991}.sv-dl dd{margin:0;overflow-wrap:anywhere}
.sv-types{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sv-types input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.sv-types label{display:block;border:1px solid #cbdbe8;border-radius:10px;padding:10px 12px;cursor:pointer;margin:0}
.sv-types label small{display:block;color:#607991;font-size:12.5px;font-weight:400}
.sv-types input:checked+label{border-color:#1669C9;background:#eef5fc}
.sv-types input:focus-visible+label{outline:2px solid #2B86E5;outline-offset:2px}
.sv-field{display:grid;gap:5px;font-size:14.5px;font-weight:600;color:#33506b}
.sv-field input,.sv-field select,.sv-field textarea{font-weight:400}
.sv-field textarea{min-height:84px;resize:vertical}
.sv-grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sv-toasts{position:fixed;right:16px;bottom:16px;z-index:60;display:flex;flex-direction:column;gap:8px;max-width:min(380px,calc(100vw - 32px))}
.sv-toast{background:#1C2A39;color:#fff;border-radius:10px;padding:11px 14px;font-size:14.5px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.sv-toast.err{background:#b84d55}
@media(max-width:1000px){.sv-eval,.sv-res-body{grid-template-columns:minmax(0,1fr)}.sv-summary{position:static}}
@media(max-width:760px){.sv-page{padding:14px}.sv-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.sv-row{grid-template-columns:minmax(0,1fr)}.sv-row .acts{justify-content:flex-start}.sv-item{grid-template-columns:minmax(0,1fr)}.sv-types,.sv-grid2{grid-template-columns:1fr}.sv-weekbar .meta{margin-left:0;flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.sv-bar i{transition:none}}
.sv-pill.sv-overdue{background:#fdecea;color:#b23b30}
.sv-act{color:#187E6B;font-weight:600}

/* หลักฐานแทนการนิเทศ (คลิป + ภาพ) */
.sv-pill.sv-ev{background:#f3ecfd;color:#6a3fb5}
.sv-pill.sv-ev.done{background:#e3f4ec;color:#187E6B}
.sv-evidence{margin-top:12px;padding:12px 14px;border:1px solid #e0d4f5;background:#faf7ff;border-radius:12px;display:flex;flex-direction:column;gap:8px;overflow-wrap:anywhere}
.sv-ev-head{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#4b2a86}
.sv-ev-head small{color:#7d6a9e}
.sv-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin-top:6px}
.sv-thumb{position:relative;margin:0;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1px solid #d5e2ed;background:#f3f6f9}
.sv-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sv-thumb-del{position:absolute;top:4px;right:4px;width:28px;height:28px;min-height:0;padding:0;border:0;border-radius:99px;background:rgba(20,30,45,.7);color:#fff;font-size:18px;line-height:28px;cursor:pointer}
.sv-thumb.loading{display:flex;align-items:center;justify-content:center;font-size:12px;color:#607991}

/* ช่วงชั้น: อนุบาล เขียว · ป.1–3 ฟ้า · ป.4–6 ม่วง */
.sv-band{display:inline-block;font-size:12px;font-weight:700;border-radius:99px;padding:1px 9px;white-space:nowrap;border:1px solid transparent}
.sv-band.b-k{background:#e3f6e8;color:#1f7a3d;border-color:#9fdab1}
.sv-band.b-p13{background:#e2f2fd;color:#11649b;border-color:#94cdf2}
.sv-band.b-p46{background:#efe7fb;color:#6338a8;border-color:#c5aef0}
.sv-bdot{display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:middle}
.sv-bdot.b-k{background:#34a853}.sv-bdot.b-p13{background:#2b9be8}.sv-bdot.b-p46{background:#8a5cd6}
/* ช่วงชั้น: วงกลมสีมุมบนขวาของการ์ด (แทนแถบสีข้างการ์ด) */
.sv-slot.band-k,.sv-slot.band-p13,.sv-slot.band-p46{position:relative;padding-right:24px}
.sv-slot.band-k::after,.sv-slot.band-p13::after,.sv-slot.band-p46::after{content:"";position:absolute;top:8px;right:8px;width:10px;height:10px;border-radius:50%}
.sv-slot.band-k::after{background:#34a853}.sv-slot.band-p13::after{background:#2b9be8}.sv-slot.band-p46::after{background:#8a5cd6}
.sv-slot .sv-bdots{display:flex;gap:3px;margin-top:2px}
.sv-slot .sv-bdots .sv-bdot{width:8px;height:8px}
.sv-slot small.sv-bname{display:flex;align-items:center;gap:4px}

.sv-done{font-size:12.5px;font-weight:700;color:#a8333c;white-space:nowrap}.sv-done.on{color:#187E6B}
.sv-scale.two label{width:auto;padding:0 12px}
.sv-res-foot .sv-btn{margin-left:auto}
/* คาบที่มีหลายช่วงชั้นลงทับกัน: จุดสีครบทุกช่วงชั้นที่มุมขวาบน */
.sv-slot.multi-band::after{display:none}
.sv-slot .sv-cdots{position:absolute;top:8px;right:8px;display:flex;gap:3px}
.sv-slot.multi-band{padding-right:calc(14px + 13px * 2)}
/* ปิดรับลงทะเบียนชั่วคราว: ชั้นสีเทาโปร่ง 20% ทับตาราง */
.sv-wrap{position:relative;display:inline-block;min-width:100%;vertical-align:top}
.sv-wrap.sv-closed::after{content:"";position:absolute;inset:0;z-index:5;background:rgba(110,120,132,.2);pointer-events:none}
.sv-slot.locked{cursor:not-allowed;border-style:dashed}
.sv-slot.locked .cta{color:#607991}

/* ตารางนัดนิเทศรวม: ความกว้างคอลัมน์ตามเนื้อหา กันข้อความซ้อนกัน (เลื่อนซ้ายขวาในกรอบ) */
table.sv-grid.sv-sched{table-layout:auto;min-width:760px}
.sv-sched th,.sv-sched td{white-space:nowrap;vertical-align:middle}
.sv-sched td:nth-child(5){white-space:normal;min-width:140px}
.sv-sched .sv-btn.sm{white-space:nowrap}

.sv-sched .s-lb{display:none}
/* มือถือ: ตารางนัดนิเทศรวมเป็นการ์ด ไม่ต้องเลื่อนซ้ายขวา */
@media(max-width:720px){
 table.sv-grid.sv-sched{min-width:0;width:100%;display:block;border:0}
 .sv-sched thead{display:none}
 .sv-sched tbody{display:grid;gap:8px}
 .sv-sched tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:12px;border:1px solid #dbe6f0;border-radius:14px;background:#fff}
 .sv-sched td{display:block;border:0!important;padding:0!important;white-space:normal!important;min-width:0!important;font-size:13.5px;background:none!important}
 .sv-sched .s-no{display:none}
 .sv-sched .s-date{grid-column:1}.sv-sched .s-date .sv-btn{min-height:36px;padding:6px 12px}
 .sv-sched .s-st{grid-column:2;grid-row:1;align-self:center;text-align:right}
 .sv-sched .s-teach{grid-column:1/-1;font-weight:700;font-size:15px;margin-top:2px}
 .sv-sched .s-subj{grid-column:1/-1;color:#4b5d6e}
 .sv-sched .s-per,.sv-sched .s-room{grid-column:auto;display:inline-block;justify-self:start;padding:2px 9px!important;border-radius:99px;background:#eef4fb!important;color:#24587d;font-size:12px}
 .sv-sched .s-sup{grid-column:1/-1;font-size:12.5px;color:#64798c}
 .sv-sched .s-lb{display:inline}
 .sv-scroll:has(.sv-sched){overflow:visible;border:0;background:none}
}

/* ภาพการนิเทศของผู้นิเทศ (ไม่เกิน 2 ภาพ) */
.sv-visit-photos{margin-top:10px}
.sv-visit-photos .sv-thumbs{grid-template-columns:repeat(auto-fill,minmax(110px,140px))}
.sv-vp-add{display:flex;align-items:center;justify-content:center;cursor:pointer;border:1.5px dashed #9fbdd6;background:#f5f9fd;color:#1e5fc0;text-align:center}
.sv-vp-add span{display:flex;flex-direction:column;align-items:center;font-size:26px;line-height:1}
.sv-vp-add small{font-size:12px;margin-top:4px}
.sv-vp-add.loading{pointer-events:none;color:#607991}.sv-vp-add.loading span{font-size:12px}
