@font-face { font-family:"Sarabun"; src:url("fonts/Sarabun-Regular.ttf"); font-display:swap; }
@font-face { font-family:"Sarabun"; font-weight:bold; src:url("fonts/Sarabun-Bold.ttf"); font-display:swap; }
.warn-list { background:#fff6e5; color:#8a5300; padding:10px 10px 10px 28px; border-radius:6px; }
:root { --ink:#1f2a24; --muted:#5f6b64; --line:#d8ddd9; --bg:#f6f7f5; --card:#fff; --brand:#2f6b3f; --warn:#a33; }
* { box-sizing: border-box; }
body { margin:0; font-family: "Sarabun","Loma",system-ui,sans-serif; color:var(--ink); background:var(--bg); font-size:16px; }
header { background:var(--brand); color:#fff; padding:10px 16px; display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
header a, header button { color:#fff; }
main { max-width:1000px; margin:0 auto; padding:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px; margin-bottom:16px; }
h1 { font-size:1.4rem; } h2 { font-size:1.15rem; margin-top:0; }
label { display:block; margin:8px 0 4px; font-weight:600; }
input[type=text], input[type=password], input[type=number], input[type=file], textarea {
  width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:6px; font:inherit; }
textarea { min-height:80px; }
button, .btn { background:var(--brand); color:#fff; border:0; border-radius:6px; padding:8px 14px; font:inherit; cursor:pointer; text-decoration:none; display:inline-block; }
.btn.light, button.light { background:#e8efe9; color:var(--brand); }
button.danger { background:var(--warn); }
.linkbtn { background:none; border:0; text-decoration:underline; padding:0; }
.error { background:#fdecec; color:var(--warn); padding:10px; border-radius:6px; }
.ok { background:#e8f4ea; color:var(--brand); padding:10px; border-radius:6px; }
.muted { color:var(--muted); font-size:.9rem; }
.table-wrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
th, td { border:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:top; }
th { background:#eef2ef; }
td.c, th.c { text-align:center; }
.grid-form td.c input { width:20px; height:20px; }
.opts { display:flex; flex-wrap:wrap; gap:6px 16px; }
.opts label { font-weight:400; display:flex; align-items:center; gap:6px; margin:0; }
.row { display:flex; gap:12px; flex-wrap:wrap; } .row > * { flex:1 1 200px; }
.actions { position:sticky; bottom:0; background:var(--bg); padding:10px 0; display:flex; gap:8px; }
details summary { cursor:pointer; font-weight:600; }
.tag { font-size:.8rem; padding:2px 8px; border-radius:99px; background:#eef2ef; }
.m-only { display:none; }
@media (max-width:600px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display:block; width:100%; }
  table.stack tr:first-child { display:none; }
  table.stack tr { border:1px solid var(--line); border-radius:8px; padding:6px; margin-bottom:8px; }
  table.stack td { border:0; padding:4px; }
  table.stack td.c { text-align:left; }
  .m-only { display:inline; }
}
