/* PA 1/ส site additions on top of style.css (a copy of the salary site's copy of the ID Plan theme). */
.sl-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.sl-nav a{display:inline-flex;align-items:center;min-height:40px;padding:6px 16px;border-radius:999px;border:1px solid #e3d5e8;background:#fff;color:#51255e;text-decoration:none;font-size:14px}
.sl-nav a:hover{background:#f6eff9}.sl-nav a.active{background:#51255e;border-color:#51255e;color:#fff;box-shadow:inset 0 -3px #e2b84f}
.notice.warn{background:#fdf6e3;border-color:#f0dfa8;color:#6e5413}.notice.bad{background:#fbeeee;border-color:#ecc9c9;color:#a33a3a}.notice.good{background:#eef6f0;border-color:#cfe3d5;color:#2f6b45}
.btn-danger-outline{background:#fff;color:#a33a3a;border:1px solid #e0b9b9}
#toast.show{opacity:1;transform:translate(-50%,0)}
.sl-check{display:flex;gap:8px;align-items:center}
.sl-check input{width:auto;min-height:0}

/* Status tags */
.pa-st{white-space:nowrap}
.pa-st-none{background:#eee6f0;color:#807184}.pa-st-draft{background:#fdf6e3;color:#6e5413}.pa-st-submitted{background:#e8eefb;color:#2c4f9e}
.pa-st-approved{background:#eef6f0;color:#2f6b45}.pa-st-returned{background:#fbeeee;color:#a33a3a}

/* Home card */
.pa-year-card{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.pa-year-card h2{margin:4px 0}
.pa-feedback{white-space:pre-wrap;background:#fbeeee;border:1px solid #ecc9c9;color:#7a2a2a;border-radius:12px;padding:12px 16px;margin-top:12px}
.pa-missing{margin:8px 0 0;padding-left:20px;color:#6e5413}
.pa-history{margin:0;padding-left:20px}.pa-history li{margin:2px 0}

/* Editor */
.pa-form .panel h2{margin-top:0}
.pa-form textarea{min-height:110px;line-height:1.6}
.pa-form .field small{display:block;margin-top:4px}
.pa-help{font-size:14px;color:#6d5a74;background:#f8f3fa;border-radius:10px;padding:10px 14px;margin:0 0 12px;white-space:pre-line}
.pa-level{font-size:15px;color:#51255e;background:#f6eff9;border-left:4px solid #e2b84f;border-radius:8px;padding:10px 14px;margin:0 0 12px}
.pa-rows{display:grid;gap:8px}
.pa-row{display:grid;grid-template-columns:1fr 120px 40px;gap:8px;align-items:center}
.pa-row button{min-height:40px;padding:0}
.pa-hours{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:12px}
.pa-classrooms{display:grid;gap:6px}
.pa-domain{border:1px solid #eee3f1;border-radius:14px;padding:14px 16px;margin-top:12px}
.pa-domain h3{margin:0 0 4px}
.pa-domain .pa-help{margin-bottom:10px}
.pa-savebar{position:sticky;bottom:0;z-index:5;display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;background:#fffffff2;border-top:1px solid #eee3f1;padding:12px 16px;margin:16px -4px 0;border-radius:14px 14px 0 0;box-shadow:0 -6px 20px #30003114}
.pa-savebar .muted{font-size:14px}

/* Decision box */
.pa-decide textarea{min-height:90px}
.pa-decide .sl-check{margin:6px 0}

/* Form pages: the PA 1/ส layout from the ก.ค.ศ. manual, A4 at 96 dpi (794 x 1122 px; 1123 would spill a sliver onto a second PDF page), TH SarabunPSK 16pt.
   Margins top 2 cm, bottom 1.6 cm (60 px), left 3 cm, right 2 cm. The same pages are shown on screen and turned into the PDF. */
@font-face{font-family:PASarabun;src:url(assets/fonts/THSarabunPSK-400.ttf) format('truetype');font-weight:400;font-display:block}
@font-face{font-family:PASarabun;src:url(assets/fonts/THSarabunPSK-700.ttf) format('truetype');font-weight:700;font-display:block}
.pa-pages{display:grid;gap:14px;justify-items:center;background:#eee6f0;border-radius:12px;padding:14px;overflow:hidden}
.pa-fit{width:100%;max-width:794px;overflow:hidden}
.pa-fit>.pa-page{transform-origin:top left;box-shadow:0 4px 18px #30003118}
.pa-page{position:relative;box-sizing:border-box;width:794px;height:1122px;padding:76px 76px 60px 113px;background:#fff;color:#000;font:400 21.33px/1.18 PASarabun,'TH SarabunPSK',Tahoma,sans-serif;text-align:left;overflow:hidden}
.pa-page *{letter-spacing:0;text-transform:none}
.pa-top{position:absolute;top:34px;left:113px;right:76px;height:28px;display:flex;justify-content:center;align-items:center}
.pa-top .pa-code{position:absolute;right:0;top:0;border:1.3px solid #000;padding:0 10px;font-weight:700}
.pa-top .pa-draft{position:absolute;left:0;top:0;color:#a33a3a;border:1.3px solid #a33a3a;border-radius:4px;padding:0 8px;font-size:18px}
.pa-body{height:100%;overflow:hidden}
.pa-page p{margin:0;font:inherit;color:inherit}
.pa-page .c{text-align:center}.pa-page .b{font-weight:700}.pa-page .u{text-decoration:underline}
.pa-page .ind{text-indent:48px}.pa-page .in1{padding-left:24px}.pa-page .in2{padding-left:48px}.pa-page .in3{padding-left:72px}
.pa-page .gap{margin-top:12px}
.pa-page .tx{white-space:pre-wrap;word-break:break-word;text-indent:48px}
.pa-page .tx.flat{text-indent:0}
.pa-page .fill{font-weight:400;padding:0 6px}
.pa-page .dots{letter-spacing:1px;color:#000}
.pa-box{display:inline-block;width:15px;height:15px;border:1.3px solid #000;vertical-align:-1px;margin-right:8px;position:relative}
.pa-box svg{position:absolute;left:-1px;top:-5px;width:20px;height:20px}
.pa-page table{width:100%;border-collapse:collapse;table-layout:fixed;font:inherit;color:inherit;background:#fff}
.pa-page th,.pa-page td{border:1.3px solid #000;padding:4px 6px;vertical-align:top;font-weight:400;background:#fff;color:#000;line-height:1.18}
.pa-page thead th{text-align:center;vertical-align:middle;font-weight:700;font-size:19px}
.pa-page td{white-space:pre-wrap;word-break:break-word}
.pa-page td .b{white-space:pre-wrap}
.pa-page .pa-cont{font-size:17px;color:#444}
.pa-sign{margin-left:300px;text-align:center;margin-top:18px}
.pa-sign .sig{height:46px;position:relative}
.pa-sign .sig img{position:absolute;left:50%;bottom:-14px;transform:translateX(-50%);max-height:64px;max-width:190px}
.pa-decision p{margin:6px 0 0}
#pdf-stage{position:absolute;left:-12000px;top:0;pointer-events:none}
@media (max-width:760px){.pa-row{grid-template-columns:1fr 84px 36px}.pa-pages{padding:6px}}

/* Editor built around the teacher's Word file (24 Nov 2026): big file button, traffic-light banner, read-first cards. */
.pa-edit-head{margin:4px 0 14px}.pa-edit-head h1{margin:2px 0 0;font-size:clamp(26px,5vw,36px);color:#300031}
.pa-import{text-align:center;padding:28px 20px}
.pa-import h2{margin:0 0 6px}
.pa-bigbtn{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;max-width:520px;margin:18px auto 10px;min-height:72px;padding:14px 20px;border-radius:18px;background:#51255e;color:#fff;font-size:20px;font-weight:700;cursor:pointer;box-shadow:inset 0 -4px #e2b84f,0 8px 22px #51255e33}
.pa-bigbtn:hover{background:#3f1a4a}.pa-bigbtn svg{color:#51255e;flex:none}
.pa-tip{font-size:14px;color:#6d5a74;max-width:520px;margin:0 auto}
.pa-alt{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center;margin-top:18px;color:#807184}
.pa-reupload{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;background:#fff;border:1px solid #eee3f1;border-radius:14px;padding:10px 14px;margin-bottom:12px}
.pa-reupload .btn{display:inline-flex;gap:6px;align-items:center;cursor:pointer}
.pa-light{display:grid;grid-template-columns:1fr auto;gap:2px 14px;align-items:center;border-radius:16px;padding:14px 18px;margin-bottom:14px;position:sticky;top:8px;z-index:4;box-shadow:0 6px 18px #30003114}
.pa-light strong{font-size:20px}.pa-light span{grid-column:1;font-size:14px}.pa-light .btn{grid-column:2;grid-row:1/3}
.pa-green{background:#e9f6ed;border:1px solid #bfe0c9;color:#235c37}.pa-yellow{background:#fff6dc;border:1px solid #f0d98f;color:#6e5413}
.pa1-card .pa1-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:6px}
.pa1-card .pa1-card-head h2{margin:2px 0 0}.pa1-card .pa1-card-head .btn{flex:none;min-height:44px}
.pa1-card.editing{border:2px solid #51255e}
.pa-item{padding:10px 0;border-top:1px solid #f1e9f4}.pa-item:first-of-type{border-top:0}
.pa-item h4{margin:0 0 4px;font-size:15px;color:#51255e}
.pa-text{font-size:16px;line-height:1.65;color:#2b2030}.pa-text.pre{white-space:pre-wrap}
.pa-gap{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;background:#fff6dc;border:1.5px dashed #e2b84f;border-radius:12px;padding:10px 12px;color:#6e5413}
.pa-gap .btn{min-height:42px}
.pa-flash{animation:paflash 1.6s ease}
@keyframes paflash{0%,60%{background:#fff0b8;box-shadow:0 0 0 4px #e2b84f}100%{background:transparent;box-shadow:none}}
.pa1-chips{display:flex;flex-wrap:wrap;gap:6px}.pa1-chips span{background:#f3eaf6;color:#51255e;border-radius:999px;padding:4px 12px;font-size:14px}
.pa-who{margin:0 0 6px}
.pa-load{list-style:none;margin:0;padding:0}.pa-load li{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dotted #e7dcea}
.pa-load strong{white-space:nowrap}.pa-miss{color:#a37a12;font-style:normal}
.pa-total{margin:10px 0 0;text-align:right;color:#51255e}.pa-total strong{font-size:22px}
.pa-tick{display:flex;gap:10px;align-items:center;min-height:44px;padding:4px 10px;border:1px solid #eee3f1;border-radius:10px;background:#fff}
.pa-tick input{width:22px;height:22px;min-height:0;accent-color:#51255e}
.pa-help-details{margin-bottom:10px}.pa-help-details summary{cursor:pointer;color:#51255e;font-size:14px}
.pa-returned{border:2px solid #ecc9c9;background:#fffafa}
.pa-savebar .btn{min-height:46px}
.pa-sheet{border:0;border-radius:18px;padding:16px;width:min(680px,96vw);max-height:88vh}
.pa-sheet::backdrop{background:#30003166}
.pa-sheet-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.pa-sheet-head h2{margin:2px 0 0;font-size:20px}
.pa-pieces{display:grid;gap:10px;margin-top:10px}
.pa-piece{display:grid;gap:4px;text-align:left;border:1px solid #e3d5e8;border-radius:14px;background:#fff;padding:12px 14px;cursor:pointer;font:inherit;color:inherit}
.pa-piece:hover,.pa-piece:focus{border-color:#51255e;background:#f9f4fb}
.pa-piece strong{color:#51255e}.pa-piece span{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;font-size:15px}
.pa-piece em{font-style:normal;color:#fff;background:#51255e;border-radius:999px;justify-self:start;padding:3px 12px;font-size:14px}
@media (max-width:600px){.pa-light{grid-template-columns:1fr}.pa-light .btn{grid-column:1;grid-row:auto;margin-top:8px}.pa1-card .pa1-card-head{flex-direction:column}.pa-savebar{flex-direction:column;align-items:stretch}.pa-savebar .table-actions{display:grid;grid-template-columns:1fr 1fr}}
.pa1-card-head>div,.pa-edit-head{min-width:0}
.pa1-card-head .sc-eyebrow,.pa-edit-head .sc-eyebrow,.pa-sheet .sc-eyebrow{white-space:normal;overflow-wrap:anywhere}
/* System drafts (24 Nov 2026) */
.pa-generated{border:2px solid #e2b84f;background:#fffcf2}.pa-generated h2{margin:2px 0 6px}
.pa-generated .pa-alt{justify-content:flex-start}.pa-generated .btn{display:inline-flex;gap:6px;align-items:center;cursor:pointer}
.pa-generate{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;border:2px dashed #e2b84f}
.pa-generate h2{margin:2px 0 4px}.pa-generate>div{flex:1 1 320px}
.pa-duties{margin-top:10px}.pa-duties summary{cursor:pointer;color:#51255e;font-size:14px}.pa-duties .pa-text{font-size:15px;margin-top:6px}
