:root{--navy:#173957;--blue:#24619a;--blue-deep:#144a79;--pale:#eaf2f9;--surface:#fff;--bg:#f3f6f9;--line:#dae3eb;--text:#233749;--muted:#67798a;--success:#11785f;--danger:#ae3c48;--shadow:0 6px 22px rgba(29,60,91,.045)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.58 "Noto Sans Thai","Leelawadee UI",Tahoma,Arial,sans-serif}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.48rem,2.6vw,1.95rem);line-height:1.32;margin-bottom:.4rem}h2{font-size:1.13rem;margin-bottom:1rem}h3{font-size:1.02rem}p{margin-bottom:1rem}small,.small{font-size:.82rem}.muted,.note,.eyebrow{color:var(--muted)}.note{font-size:.86rem;margin:15px 0 0}.topbar{background:var(--navy);color:#fff;box-shadow:0 2px 8px rgba(16,49,73,.18)}.topin{max-width:1340px;margin:auto;min-height:78px;padding:12px 26px;display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{display:flex;gap:13px;align-items:center;color:#fff}.brand:hover{text-decoration:none}.brand>span:last-child{display:flex;flex-direction:column;line-height:1.4}.brand strong{font-size:1.14rem}.brand small{color:#c6d8e7}.brandmark{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:12px;background:#e6f1fc;color:var(--blue-deep);font-weight:900;font-size:1rem;letter-spacing:.3px;flex:none}.userbox{display:flex;align-items:center;gap:16px;font-size:.87rem}.username{opacity:.86}.text-button{border:1px solid #6487a6;border-radius:8px;background:transparent;color:#fff;padding:7px 12px;cursor:pointer;font:inherit}.text-button:hover{background:#244f70}.shell{max-width:1340px;margin:auto;padding:0 26px}.nav{display:flex;gap:5px;overflow-x:auto;white-space:nowrap;padding:16px 0 12px;border-bottom:1px solid var(--line);scrollbar-width:thin}.nav a{padding:10px 13px;border-radius:9px;color:#536b7c;font-size:.94rem;font-weight:600}.nav a:hover,.nav a.active{background:#dcebf6;color:#155082;text-decoration:none}main{padding:26px 0 44px;min-height:70vh}.pagehead{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:22px}.pagehead p{font-size:.92rem;margin-bottom:0}.eyebrow{font-size:.84rem;margin-bottom:5px}.period{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.period label{display:flex;flex-direction:column;gap:4px;font-size:.76rem;color:var(--muted)}.period select,.period input{font:inherit;padding:10px 11px;border:1px solid var(--line);background:#fff;border-radius:8px;color:var(--text);min-height:42px}.period .year-field{width:105px}.button,button{font-family:inherit}.button{border-radius:9px;display:inline-flex;align-items:center;justify-content:center;font-weight:650;cursor:pointer;padding:10px 16px;border:1px solid var(--blue);min-height:42px;font-size:.92rem;text-decoration:none}.button:hover{text-decoration:none;filter:brightness(.96)}.button.primary{background:var(--blue);color:#fff}.button.outline{background:#fff;color:var(--blue)}.button.full{width:100%}.inline{display:inline}.inline button{background:transparent;cursor:pointer}.grid-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:19px}.tile,.panel{background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.tile{padding:21px}.tile-label{font-size:.89rem;color:var(--muted);margin-bottom:8px}.tile .big{font-size:2.25rem;letter-spacing:-1px;font-weight:780;line-height:1.2;color:var(--navy);margin-bottom:13px;white-space:nowrap}.tile .big span{font-size:.91rem;color:var(--muted);font-weight:500;letter-spacing:0}.tile p{font-size:.82rem;color:var(--muted);margin:0}.primary-tile{background:linear-gradient(130deg,#1c507c,#173a59);color:#fff;border:0}.primary-tile .big,.primary-tile .big span,.primary-tile .tile-label,.primary-tile p{color:#fff}.primary-tile .tile-label,.primary-tile p{opacity:.87}.meter,.bar{overflow:hidden;border-radius:99px;height:7px;background:#dce8f1}.meter{background:rgba(255,255,255,.22);margin-bottom:11px}.meter span{background:#9ec8f4;display:block;height:100%;border-radius:99px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:19px;margin-bottom:19px}.two-col.wide-left{grid-template-columns:minmax(0,1.55fr) minmax(320px,.8fr)}.panel{padding:23px;min-width:0;margin-bottom:19px}.two-col>.panel{margin-bottom:0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.section-heading h2{margin:0}.section-heading a{font-size:.85rem;font-weight:650}.line-metric{margin:18px 0 22px}.line-metric>div:first-child{display:flex;justify-content:space-between;gap:12px;margin-bottom:7px;font-size:.85rem}.line-metric span{color:var(--muted)}.line-metric .bar span{display:block;height:100%;border-radius:99px;background:#467fb0}.result-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e7edf2}.result-row:last-child{border:0}.status{border-radius:99px;padding:5px 9px;display:inline-flex;white-space:nowrap;font-size:.75rem;font-weight:700;background:#edf0f2;color:#606f7d}.status.yes{background:#e6f5ed;color:#20734d}.status.no{background:#ffeff0;color:#a43341}.callout{background:#ebf3fa;border-left:4px solid #3673a8;border-radius:8px;padding:17px 20px;color:#385b74}.callout p{margin:.4rem 0 0;font-size:.9rem}.field{display:flex;flex-direction:column;gap:6px;font-size:.88rem;font-weight:580;color:#344d62}.field input,.field select,.field textarea,.mini-form input{width:100%;border:1px solid #cbd9e5;background:#fff;border-radius:9px;padding:10px 12px;color:#253949;font:inherit;min-height:42px}.field textarea{resize:vertical;min-height:84px}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #b6d9f5;border-color:#4386b7}.stack{display:flex;flex-direction:column;gap:14px}.checkbox-label{display:flex;gap:9px;align-items:flex-start;color:#425e75;font-size:.86rem}.checkbox-label input{margin-top:5px;accent-color:var(--blue)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.required,.warning,.link-danger{color:var(--danger)!important}.table-wrap{overflow-x:auto;width:100%}table{width:100%;border-collapse:collapse;font-size:.87rem}th{background:#f0f5f9;color:#496075;font-weight:700;text-align:left;padding:12px 10px;white-space:nowrap}td{padding:13px 10px;vertical-align:top;border-bottom:1px solid #e6edf2}td small{display:block;color:var(--muted);margin-top:4px}td.actions{min-width:105px;font-size:.84rem}.actions>a,.actions>form{margin-right:10px}.link-danger{border:0;padding:0;text-decoration:underline;cursor:pointer}.nowrap{white-space:nowrap}.strong{font-weight:750}.empty{text-align:center;color:var(--muted);padding:30px 12px}.total-row{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:16px 3px 0;flex-wrap:wrap}.total-row b{color:var(--blue)}.notice{padding:14px 16px;background:#eaf6ef;border:1px solid #bde2cd;color:#206943;border-radius:9px;margin:0 0 18px}.notice.info{background:#eaf2fa;border-color:#cadce8;color:#285d88}.notice.error{background:#fff0f1;color:#a33140;border-color:#f2c4cb}.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:19px}.report-card{border:1px solid var(--line);background:#fff;border-radius:13px;padding:25px;box-shadow:var(--shadow);display:block;color:var(--text)}.report-card:hover{text-decoration:none;border-color:#8bb9db;transform:translateY(-1px)}.report-card strong{color:var(--blue)}.report-card p{color:var(--muted);font-size:.88rem;min-height:85px}.report-icon{display:inline-grid;place-items:center;width:51px;height:50px;background:#e7f1fa;color:#1c5686;border-radius:10px;font-size:1.13rem;font-weight:800;margin-bottom:14px}.prose{max-width:1020px}.prose ol{padding-left:24px}.prose li{margin:9px 0}footer{font-size:.8rem;color:#83929e;border-top:1px solid var(--line);padding:17px 0 30px;text-align:center}.auth-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 30%,#e3edf6,transparent 40%),#f1f5f8;padding:20px}.auth-card{width:min(490px,100%);background:#fff;border:1px solid #dbe5ed;border-radius:18px;padding:35px;box-shadow:0 18px 55px rgba(35,68,94,.10)}.auth-card h1{margin-bottom:16px}.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:25px;color:var(--navy);font-size:1rem}.mini-form{padding:9px 0}.paper-body{background:#ecf0f4}.paper{background:white;max-width:210mm;min-height:297mm;margin:25px auto 50px;padding:20mm 19mm;box-shadow:0 4px 25px #0002;font-family:"TH Sarabun New","TH SarabunPSK","Sarabun",Tahoma,serif;font-size:16pt;line-height:1.3;color:#141414}.paper h2{font-size:19pt;margin:6px 0}.paper h3{font-size:17pt;margin:13px 0 7px}.paper p{margin:7px 0 10px}.paper .center,.print-table .center{text-align:center}.print-label{text-align:right;font-weight:bold}.paper .small{font-size:11pt}.form-line{padding-left:15px}.signatures{display:grid;grid-template-columns:1fr;gap:20px;margin:35px 0 0 48%;font-size:14pt;page-break-inside:avoid}.printtools{position:sticky;top:0;background:#163b5b;padding:13px 16px;text-align:center;display:flex;gap:12px;justify-content:center}.printtools button{color:#163b5b;background:#fff;border:0;border-radius:8px;padding:9px 15px;font-weight:700;cursor:pointer}.print-table{font-size:13pt;margin:20px 0}.print-table td,.print-table th{border:1px solid #222;padding:7px;font-size:12pt}.print-table th{background:#f4f4f4;color:#111;white-space:normal}.print-table th:first-child{width:50px}
.eyebrow{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:8px;row-gap:2px}.period-range{font-weight:500;color:#50687e}.period-edit-link{font-size:.78rem;color:#276fa8;text-decoration:underline;text-underline-offset:2px}.period-edit-link:hover{color:#104e80}
@media(max-width:1150px){.grid-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.two-col.wide-left{grid-template-columns:1fr}.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.topin{padding:11px 15px;align-items:flex-start}.brand>span:last-child small{font-size:.7rem}.brand strong{font-size:.97rem}.brandmark{width:39px;height:39px;font-size:.85rem}.userbox{flex-direction:column;align-items:flex-end;gap:4px}.username{font-size:.72rem;max-width:95px;overflow:hidden;text-overflow:ellipsis}.text-button{padding:3px 6px;font-size:.75rem}.shell{padding:0 13px}.nav{margin:0 -13px;padding:10px 13px}.nav a{padding:8px 11px;font-size:.84rem}.pagehead{align-items:flex-start;flex-direction:column}.pagehead h1{font-size:1.55rem}.period{width:100%;align-items:flex-end}.period label{flex:1}.period select,.period .year-field{width:100%}.period .button{flex:none}.grid-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{padding:15px}.tile .big{font-size:1.65rem}.tile .big span{font-size:.75rem}.tile p{font-size:.73rem}.two-col,.two-col.wide-left,.report-grid{grid-template-columns:1fr;gap:0}.panel{padding:18px}.form-grid{grid-template-columns:1fr}.report-card p{min-height:unset}.result-row{align-items:flex-start}.status{white-space:normal;text-align:center}.paper{margin:0;padding:15mm 10mm;font-size:13pt}.signatures{margin-left:25%;font-size:12pt}}
@media(max-width:390px){.grid-cards{grid-template-columns:1fr}.tile .big{font-size:2rem}}
@page{size:A4;margin:12mm 10mm}
@media print{body.paper-body{background:#fff}.printtools{display:none}.paper{box-shadow:none;margin:0;max-width:none;min-height:0;padding:0;font-size:15pt}.paper h2{font-size:18pt}.print-table{font-size:12pt}.signatures{break-inside:avoid}}

/* Academic calendar summary and import preview */
.semester-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#eef5fb;border:1px solid #cbddeb;border-radius:12px;padding:16px 19px;margin-bottom:17px;color:#244e70}.semester-summary-dates{display:flex;flex-wrap:wrap;gap:10px 26px;margin-top:7px;font-size:.88rem}.semester-summary-dates span{display:inline-block}.semester-summary a{font-weight:700;font-size:.85rem}.calendar-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:18px}.calendar-buttons form{margin:0}
@media(max-width:760px){.semester-summary{align-items:flex-start;flex-direction:column}.semester-summary-dates{flex-direction:column;gap:6px}.calendar-buttons form,.calendar-buttons button{width:100%}}

/* REG teaching import: mobile-scrollable review table. */
.reg-import-cta{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px;background:#ecf5fc;border:1px solid #c9dfef;border-radius:12px;padding:17px 22px}
.reg-import-cta strong{color:#1d507b;font-size:1rem}.reg-import-cta p{margin:5px 0 0;font-size:.86rem;color:#536c80}
.reg-import-cta .button{white-space:nowrap}.reg-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.reg-table{min-width:1470px}.reg-table th,.reg-table td{padding:9px 6px;white-space:normal;vertical-align:middle}
.reg-input{font-family:inherit;font-size:.82rem;border:1px solid #bed0dd;border-radius:7px;padding:7px;max-width:100%;background:white;min-height:36px}
.reg-table tr.reg-review{background:#fff6ea}.reg-remove{border:0;background:transparent;color:#ac3440;text-decoration:underline;cursor:pointer}
.reg-rate{font-weight:650;color:#1f598a;white-space:nowrap}.reg-table input[type=checkbox]{accent-color:#2869a2}
@media(max-width:760px){.reg-import-cta{flex-direction:column;align-items:stretch}.reg-import-cta .button{width:100%}.reg-tools .button{width:100%}}

/* Teaching REG import: keep horizontal scrolling in long validation table. */
.reg-table {min-width:1500px;} .reg-table td {vertical-align:top;}
.reg-table select {max-width:210px;} .reg-rate {white-space:nowrap;font-weight:700;}
@media(max-width:700px){.reg-tools{flex-wrap:wrap;} .reg-table{min-width:1460px;}}

/* Clipboard/screenshot REG import (v1.8). */
.reg-image-zone{margin:10px 0;border:2px dashed #8daac5;border-radius:12px;padding:17px 19px;background:#f5faff;color:#244d70;display:flex;flex-direction:column;gap:7px;min-height:110px;cursor:copy;outline-offset:3px;white-space:normal}
.reg-image-zone strong{font-weight:750;font-size:1rem}
.reg-image-zone span{font-size:.88rem;color:#4b6a83}
.reg-image-zone:focus,.reg-image-zone.drag-over{border-color:#1166a5;background:#e5f3ff;box-shadow:0 0 0 3px #d2eafc}
.reg-image-zone.has-image{border-style:solid}
.reg-image-visual{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:6px;padding:9px;border-radius:9px;background:#fff;border:1px solid #d7e3ef}
.reg-image-visual[hidden]{display:none}
.reg-image-visual img{max-width:280px;max-height:200px;height:auto;object-fit:contain;border-radius:6px;border:1px solid #e1e8ef}
.reg-image-visual span{overflow-wrap:anywhere}
@media(max-width:700px){.reg-image-visual img{max-width:100%}.reg-image-zone{padding:12px}}

/* Criteria-first teaching workload flow (v2.1) */
.criteria-overview{margin-bottom:18px}
.criteria-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0 12px}
.criteria-card{border:1px solid #d6e3ee;background:#f7fafd;border-radius:12px;padding:13px;min-width:0}
.criteria-card-head{font-size:.75rem;color:#52728d;font-weight:750;margin-bottom:4px}
.criteria-card>strong{display:block;font-size:.88rem;line-height:1.45;min-height:2.5em}
.criteria-card-metric{font-size:1.65rem;color:#164f7d;font-weight:800;margin:12px 0 7px}
.criteria-card-metric small{font-size:.69rem;color:#587187;font-weight:400;display:block}
.criteria-card-foot{font-size:.73rem;color:#536c81}
.criteria-subhead{margin:22px 0 9px}
.criteria-table{width:100%;font-size:.88rem}.criteria-table th,.criteria-table td{padding:9px 12px}
.criteria-first{margin-bottom:18px}.criteria-first h2{margin-bottom:12px}
.criteria-first .table-wrap{margin:15px 0}
.criteria-fieldset{border:0;padding:0;margin:5px 0 0;min-width:0}
.criteria-fieldset legend{font-weight:700;margin-bottom:12px}
.criteria-choice-form{margin-top:12px}
.criteria-choice{display:flex;align-items:flex-start;gap:12px;padding:13px 14px;background:#f7fafc;border:1px solid #d7e3ed;border-radius:10px;cursor:pointer}
.criteria-choice:has(input:checked){border-color:#2275ae;background:#eaf4fc;box-shadow:0 0 0 1px #2275ae}
.criteria-choice input,.criteria-confirm input{width:18px;height:18px;margin:3px 0 0;flex-shrink:0;accent-color:#24619a}
.criteria-choice span{display:flex;flex-direction:column;gap:3px}
.criteria-choice strong{font-size:.92rem}
.criteria-choice small{color:#64788a}
.criteria-confirm{display:flex;align-items:flex-start;gap:10px;font-size:.88rem;font-weight:550}
.criteria-choice-form .button{align-self:flex-start}
.reg-selection-banner{background:#e9f5ee;border:1px solid #badbc9;color:#1a604b;border-radius:10px;padding:12px 16px;margin-bottom:15px}
.reg-selection-banner a{margin-left:14px;font-weight:700}
@media(max-width:1100px){.criteria-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:660px){.criteria-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.criteria-choice-form .button{width:100%}.criteria-card{padding:10px}.criteria-card-metric{font-size:1.35rem}}

/* Category-first workflow: five navigable workload groups (v2.2). */
.workload-category-nav .category-tab{display:block;text-decoration:none;transition:border-color .15s,background .15s,box-shadow .15s}
.workload-category-nav .category-tab:hover{border-color:#7cb1d9;background:#eff7fd;text-decoration:none}
.workload-category-nav .category-tab.selected{border:2px solid #286fa5;background:#e9f4fd;box-shadow:0 0 0 1px #bedbed}
.workload-category-nav .category-tab:focus-visible,.criterion-pick:focus-visible{outline:3px solid #7baad2;outline-offset:3px}
.chosen-criterion{background:#edf7f3}
.criterion-pick{display:inline-block;text-decoration:none;font-weight:700;color:#1a5c90;border:1px solid #b5d1e7;padding:6px 10px;border-radius:7px;white-space:nowrap;background:#fff}
.chosen-criterion .criterion-pick{border-color:#75b79d;color:#17654a;background:#e2f4ec}
.activity-edit-panel{scroll-margin-top:20px;margin-bottom:18px}
.readonly-rate{min-height:44px;border:1px solid #d3dfeb;background:#f5f9fb;border-radius:8px;padding:11px 12px;font-weight:700;color:#1b5c87}
@media(max-width:700px){.workload-category-nav{grid-template-columns:1fr 1fr}.criteria-table{min-width:700px}.category-tab>strong{min-height:0}}
@media(max-width:420px){.workload-category-nav{grid-template-columns:1fr}}

/* Row-level Word/PDF intake (v2.3): a document belongs to one selected criterion. */
.criteria-table .criterion-upload {display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:240px}
.criteria-table .criterion-file-label {display:block;min-width:150px;flex:1 1 150px}
.criteria-table .criterion-file-label input[type=file] {width:100%;font:inherit;font-size:.77rem;max-width:260px;color:#36566b}
.criteria-table .criterion-upload-btn {background:#e9f4fc;color:#155d94;border:1px solid #9dc4e1;
 border-radius:7px;padding:7px 10px;font-size:.83rem;font-weight:700;cursor:pointer;white-space:nowrap}
.criteria-table .criterion-upload-btn:hover {background:#d8ecfc}
.criteria-table .criterion-upload-btn:focus-visible {outline:3px solid #7aaed4;outline-offset:2px}
.criteria-table td:last-child {min-width:260px}
.sr-only {position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){.criteria-table{min-width:1050px}}
.criterion-cancel{margin:-4px 0 17px}
.criterion-cancel-btn{border:1px solid #d1dfe8;border-radius:8px;padding:7px 12px;background:#fff;color:#365a75;font-weight:650;cursor:pointer}

/* A single capped-total card on the dashboard, retaining its original size. */
.grid-cards.single-summary{display:block;max-width:440px}

/* Versioned committee-announcement import and criteria review */
.criteria-actions{margin:12px 0 16px;display:flex;gap:12px;flex-wrap:wrap}
.criteria-version-label{border-left:3px solid #7baed5;padding-left:12px}
.criteria-document-info{border-left:4px solid #2c729e}
.criteria-history{min-width:690px}
.criteria-history td:last-child{white-space:nowrap}
.criteria-history td:last-child a{margin-right:10px;display:inline-block}
.criteria-editor-table{min-width:800px;table-layout:fixed;font-size:.86rem}
.criteria-editor-table th:nth-child(1){width:65px}
.criteria-editor-table th:nth-child(2){width:40%}
.criteria-editor-table th:nth-child(3){width:150px}
.criteria-editor-table th:nth-child(4){width:29%}
.criteria-editor-table th:nth-child(5){width:60px}
.criteria-editor-table input[type=text],.criteria-editor-table input[type=number],.criteria-editor-table textarea{
 width:100%;min-height:39px;box-sizing:border-box;border:1px solid #c6d6e3;
 border-radius:7px;background:#fff;color:#1d3c56;padding:7px;font:inherit
}
.criteria-editor-table textarea{min-height:50px;resize:vertical}
.criteria-editor-table input[type=checkbox]{width:17px;height:17px;accent-color:#1a6298}
.criteria-add-box{padding:16px;background:#f0f7fc;border:1px solid #d3e4f2;border-radius:10px}
.criteria-activate-form{margin-top:18px;padding:17px 19px;border:1px solid #b6cedd;border-radius:11px}
.criteria-activate-form .checkbox-label{font-weight:650;margin:0 0 12px;display:flex;align-items:flex-start;gap:9px}
.criteria-activate-form .button{margin-top:10px}
@media(max-width:720px){.criteria-actions .button{width:100%;text-align:center}.criteria-activate-form{padding:13px}}
