:root{--navy:#123566;--brand:#1b4b8f;--gold:#c9a227;--bg:#f3f6fb;--line:#dce3ee;--ink:#18243a;--muted:#58667c;--soft:#e9f0fa;--red:#a72d3c;--green:#18684e}*{box-sizing:border-box}body{margin:0;font-family:"Leelawadee UI","Noto Sans Thai",Tahoma,sans-serif;color:var(--ink);background:var(--bg);font-size:16px;line-height:1.7}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button,a{cursor:pointer}a{color:var(--brand);text-decoration:none}a:hover{text-decoration:underline}button{border:1px solid var(--line);background:#fff;color:var(--ink);padding:9px 16px;border-radius:8px;min-height:44px}button:hover{background:var(--soft)}button.primary,.primary-link{background:var(--brand);border-color:var(--brand);color:#fff}button.danger{color:var(--red)}button:disabled{opacity:.55;cursor:wait}input,select,textarea{width:100%;padding:10px 12px;border:1px solid #b7c4d7;border-radius:7px;background:#fff;color:var(--ink);min-height:46px}textarea{min-height:108px;resize:vertical}label{display:block;font-weight:600;margin-bottom:16px}label small{font-weight:400;display:block;color:var(--muted)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.65rem,3vw,2.3rem);line-height:1.45;margin-bottom:8px}h2{font-size:1.35rem}h3{font-size:1.1rem}p{margin-bottom:14px}small,.muted{color:var(--muted)}small{font-size:.875rem}:focus-visible{outline:3px solid var(--gold);outline-offset:3px}.skip{position:absolute;top:-80px;left:20px;background:white;padding:10px;z-index:100}.skip:focus{top:8px}.wrap{max-width:1240px;margin:auto;padding:0 28px}.topline{background:var(--navy);color:#e0e8f5;font-size:.875rem;padding:8px 0}.topline .wrap{display:flex;justify-content:space-between;gap:12px}.public-head{background:white;border-bottom:1px solid var(--line)}.public-head .wrap{display:flex;align-items:center;justify-content:space-between;padding-top:18px;padding-bottom:18px;gap:20px}.brand{display:flex;align-items:center;gap:12px;color:var(--navy);font-weight:700;font-size:1.15rem}.brand img{width:44px;height:44px}.brand small{display:block;font-size:.75rem;letter-spacing:.08em}.nav{display:flex;gap:22px;align-items:center;flex-wrap:wrap}.nav a{color:var(--ink)}.primary-link{display:inline-block;padding:10px 18px;border-radius:7px}.nav a.primary-link{color:white}.hero{min-height:360px;display:flex;align-items:center;background:linear-gradient(90deg,rgba(9,26,52,.9),rgba(9,26,52,.3)),url('/school.jpg') center/cover;color:white}.hero .wrap{width:100%;padding-top:58px;padding-bottom:58px}.hero p{max-width:610px;color:#e2eaf7}.hero h1{font-size:clamp(2rem,5vw,3.2rem)}.eyebrow{font-size:.875rem;letter-spacing:.05em;font-weight:700;color:var(--muted)}.hero .eyebrow{color:#e9cc76}.public-body{padding-top:30px;padding-bottom:50px}.public-tabs{display:flex;overflow:auto;gap:8px;padding-bottom:18px}.public-tabs button{white-space:nowrap}.public-tabs .active{background:var(--navy);color:white}.public-grid{display:grid;grid-template-columns:2fr 1fr;gap:24px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card,.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:24px;box-shadow:0 3px 12px #12356605}.card img{width:100%;height:180px;object-fit:cover;border-radius:8px;margin-bottom:16px}.card .body,.pre{white-space:pre-wrap;overflow-wrap:anywhere}.card h3{margin-bottom:8px}.card p{color:var(--muted)}.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.section-title h2{margin:0}.quick{display:grid;gap:10px}.quick a{display:block;padding:14px;background:var(--soft);border-radius:8px}.footer{border-top:1px solid var(--line);background:white;padding:24px 0;color:var(--muted)}.notice{padding:12px 16px;background:#fffae7;border:1px solid #e9d898;border-radius:8px;margin-bottom:20px;color:#675018;font-size:.9rem}.error{background:#fff1f2;color:#962433;border:1px solid #efbfc6;border-radius:7px;padding:12px;margin-bottom:16px}.hidden{display:none!important}.login-wrap{min-height:80vh;display:grid;place-items:center;padding:30px}.login-card{width:min(100%,460px);padding:34px}.login-card .brand{margin-bottom:28px}.shell{display:grid;grid-template-columns:254px 1fr;min-height:100vh}.sidebar{background:var(--navy);color:#dce7f8;padding:28px 18px;display:flex;flex-direction:column;gap:26px}.sidebar .brand{color:white}.sidebar small{color:#b6c8e5}.side-nav{display:grid;gap:6px}.side-nav a{color:#d6e2f3;border-radius:8px;padding:12px 14px}.side-nav a.active,.side-nav a:hover{background:#ffffff18;color:white;text-decoration:none}.side-label{font-size:.8rem;letter-spacing:.04em;color:#aec1e0;margin:4px 12px}.side-bottom{margin-top:auto;border-top:1px solid #ffffff25;padding-top:20px}.side-bottom a{color:#e2eafa}.workspace{min-width:0}.office-head{min-height:78px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:16px 34px;gap:18px}.office-head strong{display:block}.office-head .account{text-align:right;font-size:.9rem}.main{padding:30px 34px;max-width:1500px;margin:auto}.page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.page-head p{margin:0;color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:26px}.stat{background:white;padding:19px 22px;border:1px solid var(--line);border-radius:10px;border-top:3px solid var(--brand)}.stat strong{display:block;font-size:2rem;line-height:1.4;margin-top:8px}.stat.alert{border-top-color:#b75239}.stat.done{border-top-color:var(--green)}.filters{display:flex;gap:12px;margin-bottom:20px}.filters input{flex:2}.filters select{flex:1}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left}th{color:var(--muted);font-size:.875rem;font-weight:600;background:#f7f9fc}td,th{padding:15px 14px;border-bottom:1px solid var(--line);vertical-align:top}td:first-child{min-width:220px}td small{display:block}td a{font-weight:600}.badge{display:inline-block;border-radius:6px;background:var(--soft);color:var(--brand);padding:3px 9px;white-space:nowrap;font-size:.875rem}.badge.revision,.badge.overdue{background:#fff0eb;color:#a24628}.badge.closed,.badge.approved{background:#e6f4ed;color:var(--green)}.badge.submitted{background:#f0eaff;color:#69449c}.empty{text-align:center;padding:45px 20px;color:var(--muted)}.empty strong{display:block;color:var(--ink);font-size:1.15rem;margin-bottom:8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.span2{grid-column:1/-1}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.details-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:22px}.stack{display:grid;gap:20px;align-content:start}.meta{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.meta div{overflow-wrap:anywhere}.meta small{display:block}.timeline{list-style:none;margin:0;padding:0}.timeline li{border-left:2px solid #d8e2f1;padding:0 0 20px 18px;position:relative}.timeline li:before{content:'';position:absolute;left:-5px;top:8px;width:8px;height:8px;background:var(--brand);border-radius:50%}.timeline small{display:block}.timeline p{margin:4px 0;font-size:.9rem;white-space:pre-wrap;overflow-wrap:anywhere}.file-row{padding:14px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.file-row .actions{margin-top:8px}.file-row small{display:block}.comment{padding:12px 0;border-bottom:1px solid var(--line)}.comment p{margin:5px 0}.checkbox{display:flex;align-items:center;gap:10px}.checkbox input{width:20px;min-height:20px}#toast{position:fixed;bottom:24px;right:24px;max-width:min(90vw,500px);background:var(--navy);color:#fff;padding:14px 22px;border-radius:10px;box-shadow:0 4px 24px #0003;z-index:120;display:none}#toast.show{display:block}.pdf-overlay{position:fixed;inset:0;background:#edf1f8;z-index:90;display:flex;flex-direction:column}.pdf-top{background:white;border-bottom:1px solid var(--line);padding:14px 24px}.pdf-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.pdf-tools label{margin:0;max-width:240px;font-size:.875rem}.pdf-tools input,.pdf-tools select{min-height:42px}.pdf-stage{flex:1;overflow:auto;padding:25px;text-align:center}.pdf-stage canvas{max-width:100%;height:auto;box-shadow:0 4px 24px #0002;touch-action:none;background:white;cursor:crosshair}.pdf-footer{padding:10px 24px;background:white;display:flex;gap:12px;justify-content:center;align-items:center}.pdf-top p{font-size:.875rem;margin:8px 0 0}.outline{border-left:4px solid var(--gold);padding-left:16px}details summary{cursor:pointer;min-height:44px;padding:8px 0;font-weight:600}.login-card button{width:100%;margin-top:8px}@media(max-width:1100px){.shell{grid-template-columns:214px 1fr}.main{padding:24px}.sidebar{padding:22px 12px}.office-head{padding:16px 24px}.details-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}.public-head .wrap{flex-wrap:wrap}.nav{gap:14px}}@media(max-width:700px){.wrap{padding-left:18px;padding-right:18px}.topline .wrap{display:block}.topline .wrap span:last-child{display:none}.public-head .wrap{padding:14px 18px}.nav{font-size:.9rem;gap:12px}.hero{min-height:310px}.hero .wrap{padding-top:35px;padding-bottom:35px}.public-grid,.cards{grid-template-columns:1fr}.shell{display:block}.sidebar{padding:14px 18px;gap:14px}.sidebar .brand img{width:32px;height:32px}.sidebar .brand small,.side-label,.side-bottom{display:none}.side-nav{display:flex;overflow-x:auto;gap:4px}.side-nav a{white-space:nowrap;padding:8px 12px}.office-head{padding:12px 18px;min-height:66px}.office-head>div:first-child{font-size:.9rem}.office-head .account{font-size:.8rem}.main{padding:22px 16px}.page-head{align-items:flex-start;flex-wrap:wrap;gap:12px}.stats{gap:10px}.stat{padding:14px}.stat span{font-size:.875rem}.stat strong{font-size:1.7rem}.panel,.card{padding:18px}.filters{flex-direction:column}.form-grid,.meta{grid-template-columns:1fr}.span2{grid-column:auto}.pdf-top{padding:10px 14px}.pdf-tools{gap:8px}.pdf-tools label{max-width:180px}.pdf-stage{padding:12px}.pdf-footer{flex-wrap:wrap;padding:8px}.pdf-top p{max-height:68px;overflow:auto}.login-wrap{padding:18px}.login-card{padding:24px}}

/* ============================================================
   เว็บไซต์สาธารณะ — หน้าตาตามต้นแบบ school-home.html
   ทุกกฎในบล็อกนี้อยู่ใต้ .site เท่านั้น จึงไม่กระทบหน้าระบบภายใน
   ============================================================ */
.site{--r:12px}
.site a{text-decoration:none}
.site a:hover{text-decoration:none}
.site svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.site .sp{margin-left:auto}

/* ---- แถบติดต่อด้านบน ---- */
.site-top{background:var(--navy);color:#cfddf2;font-size:.875rem}
.site-top .wrap{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding-top:7px;padding-bottom:7px}
.site-top .ti{display:flex;align-items:center;gap:8px}
.site-top svg{width:15px;height:15px;stroke-width:1.7}

/* ---- หัวเว็บ ---- */
.site-head{position:sticky;top:0;z-index:60;background:#fff;border-bottom:1px solid var(--line)}
.site-head .wrap{display:flex;align-items:center;gap:18px;min-height:74px}
.site .mark{display:flex;align-items:center;gap:12px;flex:none}
.site .mark img{width:44px;height:44px}
.site .mark strong{display:block;font-size:1.2rem;font-weight:700;color:var(--brand);line-height:1.25;white-space:nowrap}
.site .mark small{display:block;font-size:.68rem;letter-spacing:.14em;color:var(--muted);font-weight:600;white-space:nowrap}
.site-nav{margin-left:auto;display:flex;align-items:center;gap:2px}
.site .nlink{display:inline-block;padding:10px 13px;border-radius:8px;font-size:.95rem;font-weight:500;color:var(--ink);white-space:nowrap}
.site .nlink:hover{background:var(--soft);color:var(--brand)}
.site .nlink.on{background:var(--soft);color:var(--brand);font-weight:700}
.site .ndrop{position:relative}
.site .dd{position:absolute;top:calc(100% + 4px);left:0;min-width:236px;background:#fff;border:1px solid var(--line);border-radius:var(--r);box-shadow:0 14px 34px #12356622;padding:6px;display:none;z-index:70}
.site .ndrop:hover .dd,.site .ndrop:focus-within .dd{display:block}
.site .dd a{display:block;padding:9px 12px;border-radius:7px;font-size:.92rem;color:var(--ink)}
.site .dd a:hover{background:var(--soft);color:var(--brand)}
.site .signin{background:var(--brand);color:#fff;padding:10px 20px;border-radius:999px;font-size:.92rem;font-weight:600;white-space:nowrap}
.site .signin:hover{background:#245ba8}
.site .burger{display:none;margin-left:auto;min-height:44px;padding:8px 14px;font-size:1.15rem}

/* ---- เมนูมือถือ ---- */
.site .mnav{display:none;background:#fff;border-bottom:1px solid var(--line);padding:6px 28px 16px}
.site .mnav.open{display:block}
.site .mnav a{display:block;padding:12px 4px;border-bottom:1px solid #eaeff7;font-weight:500;color:var(--ink)}

/* ---- ภาพหัวเรื่อง ---- */
.site-hero{position:relative;background:var(--navy) url('/school.jpg') center 42%/cover;overflow:hidden}
.site-hero .scrim{position:absolute;inset:0;background:linear-gradient(100deg,rgba(9,26,52,.9) 0%,rgba(9,26,52,.88) 34%,rgba(9,26,52,.18) 80%)}
.site-hero .wrap{position:relative;padding-top:58px;padding-bottom:58px}
.site-hero .hin{max-width:640px;color:#fff}
.site-hero .kick{font-size:.95rem;color:#e9cc76;margin-bottom:2px;font-weight:600}
.site-hero h1{font-size:clamp(2rem,5vw,3.1rem);color:#fff;margin-bottom:0;line-height:1.35}
.site-hero .lead{margin-top:14px;font-size:1.02rem;line-height:1.8;color:#e2eaf7;max-width:52ch}
.site-hero .hbtn{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.site-hero .hbtn a{padding:12px 24px;border-radius:8px;font-weight:600;min-height:44px;display:inline-flex;align-items:center}
.site-hero .b1{background:#fff;color:var(--navy)}
.site-hero .b2{border:1.5px solid #ffffff8c;color:#fff}
.site-hero .b2:hover{background:#ffffff1f}

/* ---- แถบ ITA / OIT ---- */
.site .ita{background:#fff;border-bottom:1px solid var(--line)}
.site .ita .wrap{padding-top:34px;padding-bottom:34px}
.site .ita-top{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.site .ita-top h2{margin:0;font-size:1.3rem}
.site .ita-top p{margin:3px 0 0;font-size:.88rem;color:var(--muted)}
.site .stamp{margin-left:auto;font-size:.8rem;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:6px 14px;background:#fafbfe}
.site .ita-grid{display:grid;grid-template-columns:330px minmax(0,1fr);gap:20px;align-items:stretch}
.site .bnr{position:relative;display:flex;flex-direction:column;border-radius:14px;padding:22px;color:#fff;min-height:186px;
  background:radial-gradient(120% 90% at 100% 0%,rgba(201,162,39,.32) 0%,rgba(201,162,39,0) 56%),linear-gradient(145deg,#173f79 0%,#0e2a55 55%,#0a1e3f 100%);
  box-shadow:0 14px 34px #12356626}
.site .bnr .seal{width:50px;height:50px;display:grid;place-items:center;border-radius:50%;background:#ffffff1a;border:1px solid #c9a22790;margin-bottom:12px}
.site .bnr .seal svg{width:26px;height:26px;stroke:var(--gold);stroke-width:1.7}
.site .bnr .big{font-size:2.3rem;font-weight:700;letter-spacing:.06em;line-height:1;display:block}
.site .bnr .yr{display:block;margin-top:6px;font-size:.82rem;font-weight:600;color:#e9cc76}
.site .bnr p{margin:10px 0 0;font-size:.9rem;line-height:1.7;color:#ffffffe0}
.site .bnr .cta{margin-top:auto;padding-top:14px;font-size:.88rem;font-weight:600;color:var(--gold)}
.site .oit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.site .oit a{display:flex;flex-direction:column;gap:5px;border:1px solid var(--line);border-radius:12px;padding:15px 16px;background:#fafbfe;color:var(--ink)}
.site .oit .rng{font-size:.75rem;font-weight:700;letter-spacing:.05em;color:var(--brand)}
.site .oit .ttl{font-size:.93rem;font-weight:600;line-height:1.45}
.site .oit a:hover{border-color:var(--brand);background:var(--soft)}

/* ---- เนื้อหาหลัก ---- */
.site-body{padding-top:30px;padding-bottom:46px}
.site .cols{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:26px;align-items:start}
.site .pnl{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 3px 12px #12356608}
.site .phead{display:flex;align-items:baseline;gap:14px;padding:20px 24px 0}
.site .phead h2{margin:0;font-size:1.22rem}
.site .phead .more{margin-left:auto;font-size:.88rem;font-weight:600;color:var(--brand)}
.site .phead2{display:flex;align-items:baseline;gap:14px;margin-bottom:16px}
.site .phead2 h2{margin:0}

/* ---- การ์ดข่าว ---- */
.site .news{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;padding:18px 24px 24px}
.site .news.wide{grid-template-columns:repeat(3,minmax(0,1fr));padding:0}
.site .ncard{display:flex;flex-direction:column;gap:9px;color:var(--ink)}
.site .ncard .thumb{aspect-ratio:16/10;border-radius:9px;overflow:hidden;background:#eaeff7;display:grid;place-items:center}
.site .ncard .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.site .ncard .thumb svg{width:34px;height:34px;stroke:#b5c3d8}
.site .ncard:hover .thumb img{transform:scale(1.04)}
.site .ncard .when{align-self:flex-start;background:var(--soft);color:var(--brand);font-size:.76rem;font-weight:600;padding:3px 9px;border-radius:5px}
.site .ncard h3{margin:0;font-size:.99rem;font-weight:600;line-height:1.5}
.site .ncard:hover h3{color:var(--brand)}
.site .ncard p{margin:0;font-size:.87rem;color:var(--muted);line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.site .news.wide .ncard{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}
.site .news.wide .ncard .thumb{margin-bottom:2px}

/* ---- ประกาศล่าสุด ---- */
.site .notices{border-top:1px solid #eaeff7;padding:16px 24px 20px}
.site .notices h3{margin:0 0 8px;font-size:.82rem;font-weight:700;letter-spacing:.07em;color:var(--muted)}
.site .notices ul{list-style:none;margin:0;padding:0}
.site .notices li{border-bottom:1px solid #eaeff7}
.site .notices li:last-child{border-bottom:0}
.site .notices a{display:flex;align-items:center;gap:12px;padding:11px 0;font-size:.92rem;color:var(--ink);min-height:44px}
.site .notices .tag{flex:none;font-size:.74rem;font-weight:600;padding:3px 9px;border-radius:5px;background:var(--soft);color:var(--brand)}
.site .notices .tag.gold{background:#f7f0d8;color:#7d6410}
.site .notices .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site .notices a:hover .t{color:var(--brand)}
.site .notices .d{margin-left:auto;flex:none;font-size:.82rem;color:var(--muted)}

/* ---- เมนูด่วน ---- */
.site .qgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 20px 20px}
.site .qbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;
  padding:18px 10px;border:1px solid var(--line);border-radius:11px;background:#fafbfe;min-height:112px;color:var(--ink);font-size:.86rem;font-weight:500;line-height:1.4}
.site .qbtn svg{width:25px;height:25px;stroke:var(--brand)}
.site .qbtn:hover{border-color:var(--brand);background:var(--soft)}
.site .side-bnr{display:block;margin:0 20px 20px;border-radius:12px;padding:16px 18px;color:#fff;
  background:linear-gradient(140deg,#173f79 0%,#0c2449 100%)}
.site .side-bnr .r{display:flex;align-items:center;gap:12px}
.site .side-bnr svg{width:26px;height:26px;stroke:var(--gold);stroke-width:1.7}
.site .side-bnr b{display:block;font-size:1.45rem;letter-spacing:.06em;line-height:1.1}
.site .side-bnr small{font-size:.72rem;color:#e9cc76;font-weight:600}
.site .side-bnr p{margin:10px 0 0;font-size:.83rem;color:#ffffffd9;line-height:1.6}

/* ---- วิสัยทัศน์ / พันธกิจ ---- */
.site .ident{display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:var(--navy);color:#fff;border-radius:14px;padding:28px 10px;margin-top:30px}
.site .icell{padding:4px 24px;border-left:1px solid #ffffff28}
.site .icell:first-child{border-left:0}
.site .icell .top{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.site .icell svg{width:22px;height:22px;stroke:var(--gold)}
.site .icell h3{margin:0;font-size:1rem;color:#fff}
.site .icell p{margin:0;font-size:.88rem;line-height:1.75;color:#ffffffd4}

/* ---- ท้ายเว็บ ---- */
.site-foot{background:#fff;border-top:1px solid var(--line);padding-top:36px;margin-top:10px}
.site .fgrid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1.2fr;gap:32px;padding-bottom:30px}
.site-foot h4{margin:0 0 12px;font-size:.82rem;font-weight:700;letter-spacing:.07em;color:var(--muted)}
.site-foot ul{list-style:none;margin:0;padding:0;display:grid;gap:9px}
.site-foot li a{font-size:.9rem;color:var(--ink)}
.site-foot li a:hover{color:var(--brand)}
.site-foot .mt{margin-top:14px}
.site .cline{display:flex;gap:9px;align-items:flex-start;font-size:.9rem;color:var(--ink);margin:0 0 8px}
.site .cline svg{width:16px;height:16px;margin-top:4px;stroke:var(--brand)}
.site .cbody{font-size:.89rem;color:var(--muted);line-height:1.75;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.site .complain{border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:9px;padding:14px 16px;background:#fafbfe}
.site .complain strong{display:block;font-size:.92rem;margin-bottom:5px}
.site .complain p{margin:0;font-size:.83rem;color:var(--muted);line-height:1.6}
.site .complain a{display:inline-block;margin-top:9px;font-size:.85rem;font-weight:600;color:var(--brand)}
.site .legal{border-top:1px solid var(--line);padding:15px 0;font-size:.82rem;color:var(--muted);display:flex;gap:16px;flex-wrap:wrap}
.site .empty{grid-column:1/-1;text-align:center;padding:40px 20px;color:var(--muted)}

/* ---- จอเล็ก ---- */
@media(max-width:1100px){
  .site .cols{grid-template-columns:1fr}
  .site .ita-grid{grid-template-columns:1fr}
  .site .bnr{min-height:0}
  .site .side-bnr{max-width:430px}
  .site .qgrid{grid-template-columns:repeat(4,1fr)}
  .site .news{grid-template-columns:repeat(2,minmax(0,1fr))}
  .site .news.wide{grid-template-columns:repeat(2,minmax(0,1fr))}
  .site .fgrid{grid-template-columns:1fr 1fr;gap:26px}
}
@media(max-width:940px){
  .site-nav{display:none}
  .site-head .signin{display:none}
  .site .burger{display:block}
  .site .ident{grid-template-columns:1fr 1fr;gap:22px 0}
  .site .icell{padding:0 20px}
  .site .icell:nth-child(odd){border-left:0;padding-left:0}
}
@media(max-width:700px){
  .site .mnav{padding-left:18px;padding-right:18px}
  .site-hero .scrim{background:linear-gradient(180deg,rgba(9,26,52,.92) 0%,rgba(9,26,52,.8) 100%)}
  .site-hero .wrap{padding-top:38px;padding-bottom:38px}
  .site .news,.site .news.wide{grid-template-columns:1fr;gap:20px}
  .site .news{padding-left:18px;padding-right:18px}
  .site .phead{padding-left:18px;padding-right:18px}
  .site .notices{padding-left:18px;padding-right:18px}
  .site .ncard{display:grid;grid-template-columns:104px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:14px;row-gap:6px;align-items:start}
  .site .ncard .thumb{grid-row:1/span 3;aspect-ratio:1/1}
  .site .ncard .when,.site .ncard h3,.site .ncard p{grid-column:2}
  .site .news.wide .ncard{padding:14px}
  .site .notices .d{display:none}
  .site .notices .t{white-space:normal}
  .site .notices a{align-items:flex-start}
  .site .oit{grid-template-columns:1fr 1fr}
  .site .qgrid{grid-template-columns:1fr 1fr}
  .site .ident{grid-template-columns:1fr;padding:22px 20px}
  .site .icell{border-left:0;padding:0}
  .site .fgrid{grid-template-columns:1fr}
  .site .stamp{margin-left:0}
}

/* ---- ลิงก์หน่วยงานในระบบภายใน ---- */
.orglinks{display:grid;gap:8px}
.orglink{display:flex;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#fafbfe;color:var(--ink);min-height:44px}
.orglink:hover{border-color:var(--brand);background:var(--soft);text-decoration:none}
.orglink .ic{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:8px;background:var(--soft);color:var(--brand);font-weight:700}
.orglink .tx{min-width:0;flex:1}
.orglink .tx strong{display:block;font-size:.93rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.orglink .tx small{display:block;color:var(--muted);font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.orglink .go{flex:none;color:var(--muted);font-size:1.35rem;line-height:1}
.orglink:hover .go{color:var(--brand)}

/* ---- หน้าเข้าสู่ระบบ My Office ---- */
.auth{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);min-height:100vh}
.auth-side{position:relative;overflow:hidden;color:#fff;padding:44px 46px;display:flex;flex-direction:column;
  background:radial-gradient(110% 80% at 100% 0%,rgba(201,162,39,.26) 0%,rgba(201,162,39,0) 58%),linear-gradient(150deg,#1a4682 0%,#0e2a55 52%,#091c3a 100%)}
.auth-side .rings2{position:absolute;left:-90px;bottom:-90px;width:340px;height:340px;opacity:.45}
.auth-side .rings2 circle{fill:none;stroke:#ffffff24;stroke-width:1.2}
.auth-side .top{display:flex;align-items:center;gap:13px;position:relative}
.auth-side .top img{width:44px;height:44px}
.auth-side .top strong{display:block;font-size:1.14rem;line-height:1.25}
.auth-side .top small{display:block;font-size:.66rem;letter-spacing:.14em;color:#ffffff99;font-weight:600}
.auth-side .mid{margin:auto 0;position:relative;padding:26px 0}
.auth-side .mid .sub{font-size:.78rem;font-weight:700;letter-spacing:.16em;color:#e9cc76;margin-bottom:6px}
.auth-side .mid h2{font-size:2.2rem;color:#fff;margin:0}
.auth-side .mid p{margin-top:14px;font-size:.94rem;line-height:1.8;color:#ffffffdb;max-width:44ch}
.auth-feats{list-style:none;margin:22px 0 0;padding:0;display:grid;gap:11px}
.auth-feats li{display:flex;gap:11px;align-items:flex-start;font-size:.9rem;color:#ffffffe6}
.auth-feats svg{width:17px;height:17px;flex:none;margin-top:4px;stroke:#e9cc76;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.auth-side .foot{position:relative;font-size:.8rem;color:#ffffff8c;margin:0}
.auth-main{display:flex;flex-direction:column;padding:26px 26px 40px;background:var(--bg)}
.auth-main .back{align-self:flex-start;font-size:.88rem;color:var(--muted);padding:8px 12px;border-radius:8px}
.auth-main .back:hover{background:var(--soft);color:var(--brand);text-decoration:none}
.auth-box{margin:auto;width:100%;max-width:400px;padding:24px 0}
.auth-box h1{font-size:1.6rem;margin-bottom:6px}
.auth-box .hint{font-size:.9rem;color:var(--muted);margin-bottom:24px}
.auth-box .rowline{display:flex;justify-content:space-between;align-items:center;margin:-6px 0 18px;font-size:.87rem}
.auth-box .btn-full{width:100%;justify-content:center;padding:13px;border-radius:9px;font-size:.96rem;font-weight:600}
.auth-box .sep{display:flex;align-items:center;gap:13px;margin:20px 0;font-size:.8rem;color:var(--muted)}
.auth-box .sep::before,.auth-box .sep::after{content:"";flex:1;height:1px;background:var(--line)}
.btn-google{width:100%;display:flex;align-items:center;justify-content:center;gap:11px;padding:12px;border-radius:9px;font-weight:600;font-size:.93rem}
.btn-google svg{width:19px;height:19px;flex:none}
.btn-google em{font-style:normal;font-size:.74rem;font-weight:600;color:var(--muted);background:var(--soft);padding:2px 8px;border-radius:5px}
.btn-google.soon{opacity:.72}
.auth-note{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);font-size:.8rem;color:var(--muted);line-height:1.7}
@media(max-width:900px){
  .auth{grid-template-columns:1fr;min-height:0}
  .auth-side{padding:24px}
  .auth-side .mid{margin:18px 0 0;padding:0}
  .auth-side .mid h2{font-size:1.6rem}
  .auth-side .mid p,.auth-feats,.auth-side .foot{display:none}
  .auth-main{padding:18px 22px 40px}
}

.badge.cancelled{background:#f0f0f0;color:#555}
#cancel-registration{border:1px solid #efbfc6;padding:16px;border-radius:8px;margin-bottom:20px}

/* Internal office palette: clear status colors with restrained blue and gold. */
.shell{background:linear-gradient(145deg,#edf3fc 0%,#f8faff 55%,#fff9ed 100%)}
.shell .sidebar{background:linear-gradient(165deg,#173e78 0%,#102e58 72%,#172b48 100%);box-shadow:3px 0 18px #12356612}
.shell .side-nav a.active{background:#ffffff20;border-left:4px solid #efca69;padding-left:10px;color:#fff}
.shell .side-nav a:hover{background:#ffffff16}
.shell .office-head{background:linear-gradient(110deg,#fff 15%,#e8f0ff 100%);border-bottom:3px solid #dbc16f}
.shell .office-head strong{color:#173e78}
.shell .page-head .eyebrow{color:#476bac}
.shell .panel{box-shadow:0 5px 20px #173e7808;border-color:#d8e3f2}
.shell .stat{border-top-width:4px;background:linear-gradient(135deg,#fff,#e8f0ff);border-top-color:#356ac3}
.shell .stat strong{color:#214e94}
.shell .stat:nth-child(2){background:linear-gradient(135deg,#fff,#f0eaff);border-top-color:#8062bf}
.shell .stat:nth-child(2) strong{color:#674399}
.shell .stat.alert{background:linear-gradient(135deg,#fff,#fff0df);border-top-color:#d68b32}
.shell .stat.alert strong{color:#965017}
.shell .stat.done{background:linear-gradient(135deg,#fff,#e5f5ee);border-top-color:#309775}
.shell .stat.done strong{color:#196548}
.shell th{background:#edf3fc;color:#36577f}
.shell tbody tr:hover{background:#f5f8ff}
.shell .primary-link,.shell button.primary{background:linear-gradient(120deg,#2458a3,#17417d);box-shadow:0 3px 8px #17417d22;color:#fff}
.shell button.primary:hover,.shell .primary-link:hover{background:#123566}
.shell .badge.registered{background:#e6efff;color:#245194}
.shell .badge.deputy_review{background:#f0e9ff;color:#644291}
.shell .badge.director_review{background:#fff0d9;color:#81520d}
.shell .badge.assigned{background:#e0f2fa;color:#185f7b}
.shell .badge.in_progress{background:#ddf3ef;color:#146655}
.shell .badge.submitted{background:#eee8fc;color:#60418f}
.shell .badge.revision,.shell .badge.overdue{background:#ffebe6;color:#a03828}
.shell .badge.approved,.shell .badge.closed{background:#def2e5;color:#17613e}
.shell .badge.cancelled{background:#edeef2;color:#515a6c}
.shell .timeline li:before{background:#d1a238;box-shadow:0 0 0 3px #fff5d9}
.shell #cancel-registration button.danger{background:#fff0ef;border-color:#e7b9b6;color:#982f29}
/* Public website editor */
.cms-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.cms-tabs a{padding:12px 18px;border:1px solid #d6dfec;border-radius:10px;background:#fff;color:#234b80}.cms-tabs a.active{background:#234b80;color:#fff}
.cms-settings-grid,.cms-content-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start}.cms-settings-grid .panel,.cms-content-grid .panel{min-width:0}.cms-settings-grid h2{border-bottom:2px solid #e6c46c;padding-bottom:12px}.cms-settings-grid label,.cms-content-grid label{margin-bottom:14px}.cms-content-grid{grid-template-columns:minmax(280px,.85fr) minmax(0,1.15fr)}
.asset-field{padding:16px;border:1px dashed #a9bddb;background:#f5f8fd;border-radius:12px;margin:18px 0}.asset-preview img{max-width:100%;max-height:180px;object-fit:contain;border-radius:8px}.asset-status{color:#245d45;font-size:14px}.file-button{display:inline-flex!important;gap:8px;flex-direction:column;background:#e6effd;border:1px solid #b7cbe8;border-radius:8px;padding:10px;color:#214b84;cursor:pointer;max-width:100%}.file-button input{font-size:14px;max-width:100%;width:100%}.actions{flex-wrap:wrap}.cms-save-bar{position:sticky;bottom:0;z-index:10;display:flex;gap:18px;align-items:center;justify-content:space-between;padding:16px;margin-top:20px;background:#fff;border:1px solid #d4dfed;box-shadow:0 -4px 20px #12345a12;border-radius:12px}
.link-editor{background:#f6f8fc;border:1px solid #dfe5ee;padding:16px;margin:14px 0;border-radius:10px}.link-add{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}.link-add small{color:var(--muted)}.panel-save{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:20px;padding-top:16px;border-top:2px solid #e3eaf6}.panel-save button{min-width:150px}.panel-save small{color:var(--muted);flex:1;min-width:170px}.cms-item{display:flex;width:100%;gap:12px;align-items:center;text-align:left;margin-top:12px;padding:14px;background:#fff;border:1px solid #d8e2ef;border-radius:10px}.cms-item:hover{background:#edf4ff}.cms-item img,.cms-item-icon{width:64px;height:64px;object-fit:cover;flex-shrink:0;border-radius:8px}.cms-item>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}.cms-item small{display:block;margin-top:6px}.cms-item>span:last-child{font-size:13px}.media-dialog{width:min(940px,94vw);max-height:88vh;overflow:auto;border:1px solid #cbd6e6;border-radius:16px;padding:24px;color:#243b55;background:#fff}.media-dialog::backdrop{background:#10243cb3}.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px;margin-top:20px}.media-choice{display:flex;flex-direction:column;text-align:left;gap:8px;border:1px solid #d7e1ee;background:#f7f9fd;border-radius:10px;padding:12px;overflow-wrap:anywhere;min-width:0}.media-choice img{width:100%;height:125px;object-fit:contain;background:#e9eef5}.file-icon{display:grid;place-items:center;height:100px;color:#28578e;background:#e4edf9}.gallery-editor{display:grid;grid-template-columns:80px 1fr auto;gap:10px;align-items:center;margin:12px 0}.gallery-editor img{width:80px;height:65px;object-fit:cover}.gallery-editor input{min-width:0}
.site .site-hero{position:relative;background-image:none;overflow:hidden}.site .hero-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.site .site-hero>.wrap{position:relative}.public-article{grid-column:1/-1;min-width:0;padding:24px;background:#fff;border-radius:12px;overflow-wrap:anywhere}.public-article h1{font-size:clamp(24px,4vw,36px);line-height:1.5}.article-cover{display:block;width:100%;max-height:550px;object-fit:contain;margin:24px 0}.album{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}.album figure{margin:0}.album img{width:100%;height:auto;border-radius:8px}.album figcaption{padding:8px 0;color:#54667a}.public-article .pre{white-space:pre-wrap;line-height:1.9}
@media(max-width:1000px){.cms-settings-grid,.cms-content-grid{grid-template-columns:1fr}}
@media(max-width:600px){.cms-tabs a{flex:1 1 100%;padding:12px}.cms-save-bar{position:static;flex-direction:column;align-items:stretch}.panel-save{flex-direction:column;align-items:stretch}.panel-save button{width:100%}.cms-item>span:last-child{display:none}.media-dialog{padding:16px}.gallery-editor{grid-template-columns:60px minmax(0,1fr)}.gallery-editor button{grid-column:2}.album{grid-template-columns:1fr}.public-article{padding:16px}.asset-field{padding:12px}}

.orglink .ic img{width:34px;height:34px;object-fit:contain}.footer-org{display:flex;align-items:center;gap:8px}.footer-org img{width:30px;height:30px;object-fit:contain}.site .mark strong{white-space:normal;overflow-wrap:anywhere}.cms-content-grid .filters{flex-wrap:wrap}.cms-content-grid .filters>*{min-width:120px}

.library-intro{background:#e7f0fd;border-left:4px solid #376db5;padding:20px;border-radius:10px;margin:20px 0}.library-intro p{margin:4px 0 0}.library-group{margin:26px 0}.folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}.folder-card{display:flex;flex-direction:column;gap:8px;padding:22px;border:1px solid #c9d8ed;border-radius:14px;background:#fff;box-shadow:0 4px 16px #17376208;transition:transform .15s}.folder-card:hover{transform:translateY(-3px);text-decoration:none}.folder-card.pa{border-top:5px solid #536bb8}.folder-card.timetable{border-top:5px solid #2f8b7d}.folder-symbol{font-size:32px;color:#c69a38;line-height:1}.folder-heading{padding:12px 18px;border-radius:10px;background:#eaf0fd;margin-bottom:16px}.folder-heading.timetable{background:#e5f3ee}.folder-heading a{font-size:13px}.folder-heading h2{font-size:18px;margin:3px 0}.folder-heading p{margin:0;font-size:13px;color:var(--muted)}.library-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:22px;align-items:start}.shared-file{padding:20px 0;border-bottom:1px solid #dce4ef}.shared-file-head{display:flex;gap:14px;align-items:center;margin-bottom:12px}.shared-file-head h3{margin:0;overflow-wrap:anywhere}.file-type{background:#e7eefb;color:#295d98;padding:12px;border-radius:9px;font-size:13px;font-weight:700;min-width:58px;text-align:center}.shared-file>.actions,.shared-version>.actions{margin-top:15px}.shared-file small,.shared-version p{overflow-wrap:anywhere}.shared-version{padding:18px 0;border-bottom:1px solid #dce4ef}.shared-version p{margin:6px 0}#shared-upload>button,#shared-replace>button{margin:18px 0}#shared-upload input[type=file]{font-size:14px}.library-layout .filters{flex-wrap:wrap}.library-layout .filters>*{min-width:140px}
@media(max-width:1100px){.library-layout{grid-template-columns:1fr}.library-layout>form{order:-1}}@media(max-width:600px){.folder-heading{padding:10px 14px}.folder-grid{grid-template-columns:1fr}.shared-file-head{align-items:flex-start}.shared-file .actions button{flex:1 1 auto}}

.folder-card.outgoing{border-top:5px solid #367caa}.folder-card.orders{border-top:5px solid #9564ad}.folder-card.memos{border-top:5px solid #bd7c39}.folder-card.certificates{border-top:5px solid #ad567b}.folder-heading.orders{background:#f1e9fa}.folder-heading.memos{background:#fff1df}.folder-heading.certificates{background:#fceaf1}

#folder-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:24px}#folder-groups .library-group{margin:0}#folder-groups .folder-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}@media(max-width:1000px){#folder-groups{grid-template-columns:1fr}}

/* Compact shared-folder index */
#folder-groups{display:block;margin:0 0 20px;border:1px solid #dce4ef;border-radius:10px;background:#fff;overflow:hidden}
.folder-row{display:flex;align-items:center;gap:16px;min-height:56px;padding:12px 18px;border-bottom:1px solid #e4eaf2;color:#234b80}
.folder-row:last-child{border-bottom:0}.folder-row:hover{background:#edf4ff;text-decoration:none}.folder-row strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:16px}.folder-count{flex-shrink:0;color:#58667c;font-size:14px}
@media(max-width:600px){.folder-row{padding:12px;gap:10px}.folder-row strong{font-size:15px}.folder-count{font-size:13px}}

.pdf-reading{width:min(1100px,96vw)}.pdf-reader{border:1px solid #cbd6e6;border-radius:10px;padding:16px;margin:20px 0;background:#f3f6fb}.pdf-reader .actions{justify-content:center}.reader-stage{background:#dfe5ed;max-height:65vh;overflow:auto;text-align:center;margin-top:12px}.reader-stage canvas{display:block;max-width:100%;height:auto;margin:auto;background:#fff}.reader-status{margin:10px 0;text-align:center}.pdf-reader label{margin-bottom:12px}@media(max-width:600px){.pdf-reader{padding:8px}.pdf-reader .actions{gap:8px}.pdf-reader button{padding:8px;font-size:14px}}

.library-files-heading{margin-bottom:16px;flex-wrap:wrap}.library-files-heading h2{margin:0}.library-files-heading button{min-width:110px;margin-left:auto}.library-files-panel .filters{flex-wrap:wrap}.library-files-panel #shared-upload-status:empty{display:none}

.shared-file.compact-file{display:flex;align-items:center;gap:12px;padding:12px 0}.compact-file .file-type{padding:9px;min-width:50px;font-size:12px}.file-summary{flex:1;min-width:0}.file-summary .file-name{display:block;text-align:left;max-width:100%;border:0;border-radius:4px;background:transparent;color:#2458a3;font-weight:600;font-size:16px;padding:3px 0;min-height:32px;overflow-wrap:anywhere;line-height:1.6}.file-summary .file-name:hover{text-decoration:underline;background:transparent}.file-summary small{display:block;font-size:13px;line-height:1.6}.file-menu{position:relative;flex:none}.file-menu>summary{display:grid;place-items:center;list-style:none;width:44px;height:44px;padding:0;border:1px solid #dce4ef;border-radius:8px;font-size:26px;line-height:1;cursor:pointer}.file-menu>summary::-webkit-details-marker{display:none}.file-menu[open]>summary{background:#e7effc}.file-menu-items{position:absolute;right:0;top:48px;z-index:20;width:210px;padding:6px;background:#fff;border:1px solid #dce4ef;border-radius:10px;box-shadow:0 8px 26px #18345626}.file-menu-items button{display:block;width:100%;border:0;text-align:left;white-space:nowrap;background:#fff}.file-menu-items button:hover{background:#edf4ff}@media(max-width:600px){.shared-file.compact-file{gap:8px}.compact-file .file-type{min-width:40px;padding:7px;font-size:10px}.file-summary .file-name{font-size:15px}.file-summary small{font-size:12px}}
/* School office: reference-inspired navy navigation and compact register. */
.shell{--brand:#0667ed;--navy:#0d3260;--line:#dce7f7;--soft:#eaf3ff;--muted:#627699;grid-template-columns:238px minmax(0,1fr);background:#f8fbff;color:#162c50}
.shell .sidebar{padding:0;gap:18px;background:linear-gradient(150deg,#123e70,#092b52);position:sticky;top:0;height:100vh;overflow:auto}
.office-school{padding:24px 16px 20px;background:#fff;border-radius:0 0 30px 0;color:#123566}.sidebar .office-school .brand{color:#0a3064;font-size:18px;gap:9px}.office-school .brand img{width:48px;height:56px;object-fit:contain}.office-school .brand small{color:#537399;font-size:10px;letter-spacing:0}.office-school p{font-size:12px;color:#547197;margin:8px 0 0;text-align:center}
.shell .side-nav{padding:0 10px;gap:5px}.shell .side-label{color:#fff;font-size:16px;font-weight:700;margin:4px 14px 12px}.shell .side-nav a{display:flex;align-items:center;gap:13px;padding:12px 14px;color:#f0f6ff;font-size:15px}.shell svg{width:22px;height:22px;flex-shrink:0}.shell .side-nav a.active{background:linear-gradient(90deg,#0965d7,#10509f);box-shadow:0 3px 12px #001b3e30}.shell .side-nav a:hover{background:#ffffff18}.office-scene{margin-top:auto}.office-scene img{display:block;width:100%;height:140px;object-fit:cover;opacity:.86;mask-image:linear-gradient(transparent,#000 20%,#000 85%,transparent)}.office-scene p{padding:10px 24px;color:#fff;font-size:17px;font-weight:600}.shell .side-bottom{margin:0 20px 20px;padding-top:12px;font-size:14px}
.shell .office-head{min-height:82px;padding:16px 28px;background:linear-gradient(110deg,#fff,#f1f6fd);box-shadow:0 2px 5px #18396015;gap:24px}.office-search{display:flex;align-items:center;max-width:520px;flex:1;position:relative}.office-search input{padding-right:50px;border:1px solid #dce7f7;border-radius:16px;min-height:44px;font-size:14px}.office-search button{position:absolute;right:5px;border:0;border-radius:50%;width:36px;min-height:36px;padding:7px;background:#eef5ff;color:#0065ed}.office-account{display:flex;align-items:center;gap:12px;font-size:14px;min-width:0}.office-account small{display:block}.office-avatar{width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#90d6ff,#1b83ee);color:#073567;display:grid;place-items:center;font-weight:700;font-size:22px}.office-logout{font-size:12px;margin-left:10px;white-space:nowrap}.shell .main{max-width:1700px;padding:18px 28px 32px}.office-date{text-align:right;color:#0864d4;font-size:13px;margin-bottom:16px}.register-heading{gap:16px;margin-bottom:24px}.heading-emblem{display:grid;place-items:center;width:70px;height:70px;flex:none;background:linear-gradient(135deg,#0d70ea,#31a7ef);border:7px solid #eaf3ff;border-radius:19px;color:white}.heading-emblem svg{width:32px;height:32px}.heading-copy{flex:1}.register-heading h1{font-size:29px;color:#082c65;margin:0 0 3px}.register-heading p{font-size:15px}.shell .primary-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#0667ed;box-shadow:0 3px 8px #0064ee15;white-space:nowrap}.shell .stats{gap:14px}.shell .stat{background:linear-gradient(130deg,#fff,#f0f6ff);border-top:3px solid #1686f2}.shell .stat:nth-child(3){border-top-color:#ed8b53}.shell .stat:nth-child(4){border-top-color:#4bb48f}
.register-tabs{display:flex;gap:8px;padding:7px;background:#f0f5fd;border:1px solid var(--line);border-radius:10px;margin-bottom:20px;overflow:auto}.register-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;flex:1;border:0;background:#ffffffb0;color:#173969;font-size:14px;padding:12px}.register-tabs button svg{width:18px;height:18px;color:#0078fa}.register-tabs button.active{background:#0667ed;color:#fff;box-shadow:0 3px 7px #0667ed20}.register-tabs button.active svg{color:#fff}.register-tabs button span{font-size:12px}.register-filters{display:grid;grid-template-columns:110px 1fr 1fr 1.6fr;gap:12px;align-items:end;margin-bottom:10px}.register-filters label{margin:0;font-size:13px;font-weight:500}.register-filters input,.register-filters select{min-height:43px;padding:8px 10px;border-color:#ccdaf0;font-size:14px}.register-filters button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:43px}.register-access{font-size:12px;margin:10px 0 16px}.register-panel>.table-wrap,#rows>.table-wrap{border:1px solid var(--line);border-radius:10px;background:#fff}.register-table{font-size:14px;min-width:1000px;line-height:1.5}.register-table th{background:linear-gradient(#eaf3ff,#e3efff);color:#143467;font-size:13px;padding:14px 10px;white-space:nowrap}.register-table td{padding:13px 10px}.register-table td,.register-table th{border-right:1px solid var(--line);vertical-align:middle}.register-table td:last-child,.register-table th:last-child{border-right:0}.register-table tr:last-child td{border-bottom:0}.register-table td:first-child{min-width:95px;width:95px}.register-table td:nth-child(4){min-width:210px;max-width:330px}.register-table td:nth-child(3){max-width:200px}.register-table td:nth-child(2){max-width:160px;overflow-wrap:anywhere}.register-table td:nth-child(7),.register-table td:nth-child(8){white-space:nowrap}.register-table tbody tr:nth-child(even){background:#fbfdff}.register-table tbody tr:hover{background:#f1f7ff}.register-table td small{font-size:12px;margin-top:5px}.register-table .badge{font-size:12px;padding:6px 9px}.shell .badge.registered,.shell .badge.deputy_review,.shell .badge.director_review{background:#fff3cf;color:#996300}.shell .badge.assigned,.shell .badge.in_progress{background:#dfedff;color:#0754bc}.table-action{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--line);border-radius:8px;color:#10346c;background:#fff}.table-action:hover{background:#e7f1ff}.register-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:22px 0;font-size:13px;color:#526d97;flex-wrap:wrap}.register-footer label{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;font-weight:400}.register-footer select{width:auto;font-size:13px;min-height:40px}.register-pages{display:flex;align-items:center;gap:6px}.register-pages button{padding:4px 10px;min-height:38px;min-width:36px;color:#123566}.register-pages button.active{background:#0667ed;color:white;border-color:#0667ed}.register-pages button:disabled{cursor:default}.dashboard-links{margin-top:24px}.shell .panel{box-shadow:0 2px 10px #18396004}.shell a:focus-visible,.shell button:focus-visible{outline:3px solid #e9aa26;outline-offset:3px}
/* ---- ปฏิทินนัดหมายหน้าแรก ---- */
.calendar-panel{overflow:hidden}
.cal-head{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.cal-head h2{flex:1;margin:0;font-size:1.15rem;text-align:center}
.cal-nav{min-width:44px;padding:8px;font-size:1.1rem;line-height:1}
.cal-today{font-size:.8rem;padding:8px 12px}
.cal-table{width:100%;border-collapse:collapse;table-layout:fixed}
.cal-table th{padding:8px 4px;font-size:.8rem;text-align:center;color:var(--muted);background:none;border:0}
.cal-cell{border:1px solid var(--line);vertical-align:top;height:86px;padding:6px;font-size:.8rem;cursor:pointer;transition:background .15s}
.cal-cell:hover{background:var(--soft)}
.cal-cell.empty{cursor:default;background:#fafbfd}
.cal-cell.empty:hover{background:#fafbfd}
.cal-cell.is-today{background:#eaf3ff;border-color:var(--brand)}
.cal-cell.is-today .cal-num{color:var(--brand);font-weight:700}
.cal-cell.has-items{background:#fffaf0}
.cal-num{display:block;font-weight:600;margin-bottom:4px}
.cal-cell em{display:block;font-style:normal;background:var(--brand);color:#fff;border-radius:4px;padding:1px 5px;margin-bottom:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cal-cell small{display:block;color:var(--muted)}
.cal-hint{margin:14px 0 0;font-size:.85rem;text-align:center}
.appt-dialog{width:min(480px,94vw)}
.appt-list{list-style:none;margin:0 0 20px;padding:0}
.appt-list li{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e3e9f2}
.appt-list li:last-child{border-bottom:0}
.appt-list p{margin:4px 0 0;font-size:.9rem;white-space:pre-wrap;overflow-wrap:anywhere}
.appt-list small{display:block;margin-top:4px}
.appt-list button{min-height:38px;padding:6px 12px;font-size:.8rem;flex-shrink:0}
.time-select{display:flex;align-items:center;gap:8px}
.time-select select{width:auto;flex:1;min-width:0}
.time-select span{color:var(--muted);font-weight:700}
@media(max-width:700px){.cal-cell{height:60px;padding:4px;font-size:.72rem}.cal-head h2{font-size:1rem}.cal-cell em{padding:1px 3px}}
@media(min-width:1550px){.register-filters{grid-template-columns:95px 150px 170px minmax(180px,1fr) 150px 150px 100px 90px}}
@media(max-width:1100px){.shell{grid-template-columns:210px minmax(0,1fr)}.shell .main{padding:18px}.shell .office-head{padding:15px 18px}.office-account{gap:8px}.office-logout{margin-left:0}.register-heading{flex-wrap:wrap}.register-heading h1{font-size:25px}.register-heading .primary-link{margin-left:86px}.register-filters{grid-template-columns:1fr 1fr}.office-avatar{display:none}}
@media(max-width:700px){.shell{display:block}.shell .sidebar{position:relative;height:auto;overflow:visible;gap:8px}.office-school{border-radius:0;padding:12px 16px}.sidebar .office-school .brand{font-size:17px}.office-school p,.office-scene,.shell .side-label,.shell .side-bottom{display:none}.shell .side-nav{display:flex;overflow-x:auto;padding:4px 10px 12px}.shell .side-nav a{font-size:14px;gap:7px;padding:9px 12px;flex:none}.shell .office-head{flex-direction:column-reverse;align-items:stretch;gap:10px;padding:12px 16px}.office-account{font-size:13px}.office-account>div{flex:1}.office-account small{display:inline;margin-left:8px}.office-account strong{display:inline}.office-avatar{display:grid;width:32px;height:32px;font-size:18px}.office-search{max-width:none}.shell .main{padding:14px 14px 28px}.office-date{font-size:12px;margin-bottom:12px}.heading-emblem{width:50px;height:50px;border-width:4px;border-radius:14px}.heading-emblem svg{width:26px;height:26px}.register-heading{gap:10px}.register-heading h1{font-size:23px}.register-heading p{font-size:13px}.register-heading .primary-link{margin-left:0;width:100%}.register-tabs{gap:6px}.register-tabs button{flex:none;padding:10px;font-size:13px}.register-filters{gap:10px}.register-filters input,.register-filters select{min-width:0}.register-footer{align-items:flex-start;gap:16px}.register-pages{order:3;width:100%;justify-content:center}.register-footer label{margin-left:auto}.register-footer select{max-width:135px}.shell .stats{grid-template-columns:1fr 1fr}}


.shell .side-nav a.active{border-left:0;padding-left:14px}.shell .office-head{border-bottom:1px solid #dce7f7}.shell button.primary{background:#0667ed}.shell .register-table th{background:#e7f1ff;color:#143467}

/* ---- ชื่อเรื่องหนังสือในหน้ารายละเอียด ---- */
/* ชื่อหนังสือราชการมักยาวมาก จึงใช้ขนาดเล็กกว่าหัวข้อหน้าอื่น */
.page-head h1.doc-title{font-size:clamp(1.1rem,1.5vw,1.35rem);line-height:1.6;font-weight:700;margin-bottom:6px;max-width:80ch}
@media(max-width:700px){.page-head h1.doc-title{font-size:1.05rem;line-height:1.55}}

/* ---- แสดง PDF เต็มหน้า ---- */
/* ให้เห็น PDF ครบทั้งหน้าในครั้งเดียว โดยย่อให้พอดีความสูงจอแทนการเลื่อน */
.reader-stage{max-height:none;overflow:auto;padding:10px 0;display:flex;align-items:center;justify-content:center}
.reader-stage canvas{max-width:100%;max-height:78vh;width:auto;height:auto;box-shadow:0 2px 14px rgba(18,53,102,.18)}
@media(max-width:700px){.reader-stage canvas{max-height:68vh}}

/* ---- ปุ่มแว่นขยายและหน้าต่างภาพขยาย ---- */
.reader-stage{position:relative}
.reader-zoom-btn{position:absolute;top:10px;right:10px;z-index:5;width:38px;height:38px;min-height:38px;padding:0;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.94);box-shadow:0 2px 8px rgba(18,53,102,.16)}
.reader-zoom-btn svg{width:19px;height:19px;fill:none;stroke:var(--brand);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.reader-zoom-btn:hover{background:#fff;border-color:var(--brand)}

.reader-zoom{position:fixed;inset:0;z-index:200;background:rgba(9,20,38,.9);display:flex;flex-direction:column}
.reader-zoom-bar{flex:none;display:flex;align-items:center;gap:16px;justify-content:space-between;padding:12px 18px;color:#fff;font-size:.9rem}
.reader-zoom-close{min-height:40px;padding:8px 18px;border-radius:8px;border:1px solid rgba(255,255,255,.45);background:transparent;color:#fff;font-weight:600}
.reader-zoom-close:hover{background:rgba(255,255,255,.14)}
.reader-zoom-inner{flex:1;overflow:auto;padding:0 18px 22px;text-align:center}
.reader-zoom-inner canvas,.reader-zoom-inner img{display:block;margin:0 auto;max-width:none;background:#fff;border-radius:4px;box-shadow:0 8px 40px rgba(0,0,0,.5)}
.reader-zoom-tools{display:flex;gap:8px;flex-wrap:wrap}
.reader-zoom-tools button{min-height:40px;padding:8px 16px;border-radius:8px;border:1px solid rgba(255,255,255,.45);background:transparent;color:#fff;font-weight:600}
.reader-zoom-tools button:hover{background:rgba(255,255,255,.14)}
@media(max-width:700px){.reader-zoom-inner{padding:0 8px 16px}.reader-zoom-bar{font-size:.8rem;gap:8px}}

/* Workflow and role-scoped overview */
.workflow-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0}.workflow-summary .panel{display:flex;flex-direction:column;gap:8px}.workflow-summary strong{font-size:30px;color:#175c4b}.workflow-steps{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0}.workflow-steps li{padding:8px 12px;background:#f0f4f3;border-radius:8px;color:#52645c}.workflow-steps .current{background:#175c4b;color:white;font-weight:700}.workflow-panel form{display:grid;gap:14px;max-width:720px}.workflow-panel [hidden]{display:none!important}@media(max-width:800px){.workflow-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---- คำขอเข้าใช้งานด้วย Google ---- */
.google-request{border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:12px 0;background:#fbfdff}
.google-request-who{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.google-request-who img,.google-request-avatar{width:40px;height:40px;border-radius:50%;flex-shrink:0;object-fit:cover}
.google-request-avatar{display:grid;place-items:center;background:var(--soft);color:var(--muted);font-weight:700}
.google-request-who small{display:block}
.google-request-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px}
.google-request-fields label{margin-bottom:10px}
@media(max-width:800px){.google-request-fields{grid-template-columns:1fr}}

/* ---- แบนเนอร์หน้าแรก: กรอบสูงคงที่ แต่เห็นภาพครบทั้งใบ (ไม่ครอบตัด) ---- */
.site .site-hero{height:340px;min-height:0;background:#0e2748}
.site .site-hero .hero-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center}
.site .site-hero .scrim{display:none}
/* ---- แถบ OIT เมื่อย้ายลงมาอยู่ใต้ข่าวประชาสัมพันธ์ ---- */
.site .ita-inline{margin-top:34px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 3px 12px #12356608}
.site .ita-inline>.wrap{max-width:none;padding:26px 26px 30px}
@media(max-width:700px){.site .site-hero{height:190px}.site .ita-inline>.wrap{padding:20px 18px 24px}}
