/* ต้นแบบระบบหลังบ้าน – ระบบจองห้องประชุม สกบ.
 * ใช้แนวทางเดียวกับระบบ CMS: Sarabun, เมนูข้างแบบพับได้, น้ำเงินตำรวจ/ทอง
 */
:root {
  --blue: #003087; --blue-dark: #001d54; --blue-600: #1d4ed8; --gold: #C9A227; --gold-soft: #f3e6b5;
  --psoft: #e8eefb; --bg: #f1f5f9;
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8; --s500: #64748b; --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.06);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Sarabun', 'Leelawadee UI', Tahoma, sans-serif; font-size: 14px; line-height: 1.5; color: var(--s800); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--s500); }
.small { font-size: 12px; }
.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ico { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }

/* ---------- โครงหน้า ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 260px; flex: none; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--s200); overflow-y: auto; z-index: 40; }
.logo { display: flex; align-items: center; gap: 10px; height: 60px; flex: none; padding: 0 16px; border-bottom: 1px solid var(--s200); text-decoration: none; color: inherit; }
.logo:hover { background: var(--s50); }
.logo-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--blue); color: var(--gold); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.logo-t { font-size: 13.5px; font-weight: 700; line-height: 1.25; color: var(--s900); }
.logo-s { font-size: 11px; color: var(--s500); line-height: 1.3; }
.nav { flex: 1; padding: 4px 0; }
.nav-mod { border-bottom: 1px solid rgba(226,232,240,.6); }
.nav-mod-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--s800); background: none; border: 0; cursor: pointer; text-align: left; user-select: none; transition: background .15s; }
.nav-mod-head:hover { background: var(--s100); }
.nav-mod-head.active { background: var(--psoft); color: var(--blue); }
.nav-mod-head .arrow { margin-left: auto; width: 12px; height: 12px; opacity: .6; transition: transform .2s; }
.nav-mod.open .nav-mod-head .arrow { transform: rotate(90deg); }
.nav-sub { max-height: 0; overflow: hidden; transition: max-height .25s ease; background: var(--s50); }
.nav-mod.open .nav-sub { max-height: 400px; }
.nav-sub-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px 8px 42px; font-size: 12.5px; color: var(--s500); border-left: 3px solid transparent; text-decoration: none; transition: background .15s, color .15s; }
.nav-sub-item:hover { background: var(--psoft); color: var(--blue); }
.nav-sub-item.active { background: var(--psoft); color: var(--blue); border-left-color: var(--blue); font-weight: 600; }
.nav-badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.side-proto { margin: 10px 12px 6px; padding: 10px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; font-size: 11.5px; color: #92400e; line-height: 1.45; }
.side-foot { border-top: 1px solid var(--s200); padding: 10px 16px; font-size: 11px; color: var(--s400); }
.backdrop { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--blue-dark); color: #fff; border-bottom: 3px solid var(--gold); }
.topbar .burger { display: none; }
.top-title { font-size: 14px; font-weight: 600; opacity: .9; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-btn { position: relative; height: 38px; min-width: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; border-radius: 8px; background: transparent; border: 1px solid transparent; color: #fff; cursor: pointer; }
.tb-btn:hover { background: rgba(255,255,255,.1); }
.tb-btn .ico { width: 18px; height: 18px; }
.tb-dot { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #dc2626; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--blue-dark); }
.role-sw { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px dashed rgba(201,162,39,.7); }
.role-sw label { font-size: 11.5px; color: var(--gold-soft); white-space: nowrap; }
.role-sw select { height: 30px; border-radius: 6px; border: 0; background: #fff; color: var(--s800); padding: 0 8px; font-size: 13px; cursor: pointer; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 8px; cursor: pointer; background: none; border: 0; color: #fff; }
.me:hover { background: rgba(255,255,255,.1); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--blue-dark); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.me-t { text-align: left; line-height: 1.25; }
.me-n { font-size: 13px; font-weight: 600; }
.me-r { font-size: 11px; color: #b8c4e0; }
.dropdown { position: absolute; top: 54px; right: 12px; width: 340px; background: #fff; color: var(--s800); border-radius: 12px; box-shadow: 0 18px 50px rgba(15,23,42,.25); border: 1px solid var(--s200); z-index: 60; overflow: hidden; }
.dd-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--s100); font-weight: 700; font-size: 13.5px; }
.dd-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--s100); font-size: 13px; cursor: pointer; }
.dd-item:hover { background: var(--s50); }
.dd-item .ico { margin-top: 2px; }
.dd-item small { display: block; color: var(--s400); font-size: 11.5px; }
.dd-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; font-size: 13px; background: none; border: 0; cursor: pointer; text-align: left; }
.dd-link:hover { background: var(--s50); }
.content { flex: 1; overflow-y: auto; padding: 20px 24px 48px; }

/* ---------- หัวหน้า ---------- */
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-t { font-size: 17px; font-weight: 700; color: var(--s800); line-height: 1.3; }
.crumb { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--s400); margin-top: 2px; }
.crumb .ico { width: 12px; height: 12px; }
.page-a { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- องค์ประกอบพื้นฐาน ---------- */
.card { background: #fff; border: 1px solid var(--s200); border-radius: 12px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.stats > .card, .dash .card, .rooms-now > *, .book > * > .card { margin-top: 0; }
.card-t { white-space: nowrap; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--s100); }
.card-t { font-size: 14px; font-weight: 700; color: var(--s700); display: flex; align-items: center; gap: 8px; }
.card-t .ico { color: var(--blue); }
.card-b { padding: 16px 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #00266b; }
.btn-secondary { background: #fff; color: var(--s700); border-color: var(--s300); }
.btn-secondary:hover:not(:disabled) { background: var(--s50); border-color: var(--s400); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover:not(:disabled) { background: #15803d; }
.btn-ghost { background: transparent; color: var(--s600); }
.btn-ghost:hover:not(:disabled) { background: var(--s100); }
.btn-gold { background: var(--gold); color: var(--blue-dark); }
.btn-gold:hover:not(:disabled) { background: #b8921f; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--s400); cursor: pointer; }
.icon-btn:hover { background: var(--s100); color: var(--s700); }
.icon-btn.ok:hover { background: #dcfce7; color: #16a34a; }
.icon-btn.no:hover, .icon-btn.del:hover { background: #fee2e2; color: #dc2626; }
.icon-btn.edit:hover { background: var(--psoft); color: var(--blue); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--s600); margin-bottom: 4px; }
.req { color: #ef4444; margin-left: 2px; }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--s300); border-radius: 8px; background: #fff; font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 76px; padding: 8px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.input.err, .select.err, .textarea.err { border-color: #f87171; }
.input:disabled, .select:disabled { background: var(--s100); color: var(--s500); }
.ferr { font-size: 12px; color: #ef4444; margin-top: 3px; min-height: 0; }
.ferr:empty { display: none; }
.hint { font-size: 12px; color: var(--s400); margin-top: 3px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--s300); border-radius: 999px; font-size: 13px; cursor: pointer; user-select: none; background: #fff; }
.chip-check input { display: none; }
.chip-check:has(input:checked) { background: var(--psoft); border-color: var(--blue-600); color: var(--blue); font-weight: 600; }
.chip-check.off { opacity: .45; cursor: not-allowed; }
.grid { display: grid; gap: 14px 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
.sec-t { font-size: 13px; font-weight: 700; color: var(--blue); padding-bottom: 6px; border-bottom: 1px solid var(--s100); margin: 4px 0 2px; display: flex; align-items: center; gap: 8px; }

/* ---------- ป้ายสถานะ ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.badge .ico { width: 12px; height: 12px; }
.b-green { background: #dcfce7; color: #15803d; }
.b-amber { background: #fef3c7; color: #b45309; }
.b-red { background: #fee2e2; color: #b91c1c; }
.b-blue { background: #dbeafe; color: #1d4ed8; }
.b-purple { background: #f3e8ff; color: #7e22ce; }
.b-slate { background: var(--s100); color: var(--s600); }
.b-gray { background: var(--s100); color: var(--s400); text-decoration: line-through; }
.b-navy { background: var(--psoft); color: var(--blue); }
.b-gold { background: #fdf6dd; color: #8a6d0b; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- ตัวกรอง ---------- */
.filter .card-h { padding: 10px 20px; }
.filter .card-b { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; align-items: end; }
.filter .card-b.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--s200); margin-bottom: 14px; }
.tab { padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--s500); border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; }
.tab:hover { color: var(--s800); }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab .cnt { background: var(--s100); color: var(--s600); border-radius: 999px; padding: 0 8px; font-size: 11.5px; }
.tab.on .cnt { background: var(--blue); color: #fff; }

/* ---------- ตาราง (ไม่มี scroll แนวนอน) ---------- */
.tbl { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13.5px; }
.tbl th { background: var(--s50); color: var(--s600); font-size: 12.5px; font-weight: 700; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--s200); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--blue); }
.tbl th .ico { width: 12px; height: 12px; vertical-align: -1px; margin-left: 2px; opacity: .45; }
.tbl th.sorted .ico { opacity: 1; color: var(--blue); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--s100); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody tr:hover { background: rgba(248,250,252,.9); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.sel { background: #eff6ff; }
.tbl .c { text-align: center; }
.tbl .r { text-align: right; }
.tbl .t1 { font-weight: 600; color: var(--s800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .t2 { font-size: 12px; color: var(--s500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .acts { display: flex; justify-content: center; gap: 2px; }
.tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.empty-row td { text-align: center; padding: 40px 12px; color: var(--s400); }
.empty-row .ico { width: 36px; height: 36px; stroke-width: 1.5; display: block; margin: 0 auto 8px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 12.5px; color: var(--s500); flex-wrap: wrap; }
.pager-r { display: flex; align-items: center; gap: 6px; }
.pager select { height: 30px; border: 1px solid var(--s300); border-radius: 6px; padding: 0 6px; font-size: 12.5px; }
.pg { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--s200); background: #fff; font-size: 12.5px; cursor: pointer; display: inline-grid; place-items: center; }
.pg:hover:not(:disabled) { border-color: var(--blue-600); color: var(--blue); }
.pg.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.pg:disabled { opacity: .4; cursor: not-allowed; }
.pg .ico { width: 14px; height: 14px; }
.bulk { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #eff6ff; border-bottom: 1px solid #bfdbfe; font-size: 13px; color: var(--blue); font-weight: 600; }

/* ---------- Modal / Popup / Toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(15,23,42,.35); width: 100%; max-width: 460px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .18s ease; }
.modal.lg { max-width: 760px; } .modal.xl { max-width: 960px; } .modal.sm { max-width: 400px; }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--s100); }
.modal-h h3 { font-size: 15px; font-weight: 700; color: var(--s800); }
.modal-h p { font-size: 12.5px; color: var(--s500); margin-top: 2px; }
.modal-b { padding: 16px 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--s100); flex-wrap: wrap; }
.modal-f .left { margin-right: auto; }
.confirm { display: flex; gap: 14px; }
.confirm-ic { width: 42px; height: 42px; border-radius: 50%; background: #fee2e2; color: #dc2626; display: grid; place-items: center; flex: none; }
.confirm-ic.warn { background: #fef3c7; color: #d97706; }
.confirm-ic .ico { width: 20px; height: 20px; }
.confirm h4 { font-size: 14.5px; font-weight: 700; }
.confirm p { font-size: 13.5px; color: var(--s600); margin-top: 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; top: 72px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(15,23,42,.15); animation: slidein .2s ease; }
.toast .ico { width: 18px; height: 18px; margin-top: 1px; }
.toast.ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.toast.ok .ico { color: #16a34a; }
.toast.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast.err .ico { color: #dc2626; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .25s; }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }

/* ---------- กล่องแจ้งเตือนในฟอร์ม ---------- */
.note { display: flex; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.note .ico { width: 18px; height: 18px; margin-top: 1px; }
.note.ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.note.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.note.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.note.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.note ul { padding-left: 18px; margin-top: 2px; }

/* ---------- ฟอร์มผู้ใช้งาน ---------- */
.uf { display: flex; flex-direction: column; gap: 20px; }
.uf-sec { display: flex; flex-direction: column; gap: 10px; }
.uf-sec > .sec-t { margin: 0 0 2px; }
.uf-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--s200); border-radius: 10px; background: var(--s50); }
.uf-who .avatar { width: 42px; height: 42px; font-size: 16px; background: var(--psoft); color: var(--blue); }
.uf-who-t { flex: 1; min-width: 0; }
.uf-who-n { font-size: 15px; font-weight: 700; color: var(--s800); }
.uf-who-s { font-size: 12.5px; color: var(--s500); }
.uf-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.uf-role { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--s300); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.uf-role:hover { border-color: var(--s400); }
.uf-role input { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.uf-role-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uf-role-t b { font-size: 13.5px; color: var(--s800); }
.uf-role-t small { font-size: 12px; line-height: 1.45; color: var(--s500); }
.uf-role:has(input:checked) { border-color: var(--blue-600); background: var(--psoft); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.uf-role:has(input:checked) b { color: var(--blue); }
.uf-role:has(input:focus-visible) { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.uf-find { display: flex; flex-direction: column; gap: 6px; }
.uf-find .label { margin-bottom: 0; }
.uf-hits { display: flex; flex-direction: column; max-height: 264px; overflow-y: auto; border: 1px solid var(--s200); border-radius: 10px; background: #fff; }
.uf-hit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--s100); background: none; text-align: left; cursor: pointer; }
.uf-hit:last-child { border-bottom: 0; }
.uf-hit:hover:not(:disabled), .uf-hit:focus-visible { background: var(--psoft); outline: none; }
.uf-hit:disabled { cursor: default; opacity: .6; }
.uf-hit .avatar { width: 32px; height: 32px; font-size: 12px; background: var(--psoft); color: var(--blue); }
.uf-hit-t { flex: 1; min-width: 0; }
.uf-hit-n { font-size: 13.5px; font-weight: 600; color: var(--s800); }
.uf-hit-s { font-size: 12px; color: var(--s500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uf-hit-msg { padding: 12px 14px; font-size: 13px; color: var(--s500); }
.uf-hit-msg.err { color: #b91c1c; }
.us-sync { margin: -6px 0 12px; }
@media (max-width: 640px) {
  .uf-roles { grid-template-columns: minmax(0, 1fr); }
  .uf .g2 { grid-template-columns: minmax(0, 1fr); }
  .uf-who { flex-wrap: wrap; }
}

/* ---------- แดชบอร์ด ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-radius: 12px; margin-bottom: 16px; color: #fff; background: linear-gradient(120deg, var(--blue-dark), var(--blue) 70%, #1e4aa8); position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(201,162,39,.12); }
.welcome h2 { font-size: 19px; font-weight: 700; }
.welcome p { font-size: 13px; color: #c7d3ee; margin-top: 2px; }
.welcome .btn { position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 14px 18px; display: flex; align-items: center; gap: 14px; border-left: 4px solid var(--c, var(--blue)); }
.stat-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--cb, var(--psoft)); color: var(--c, var(--blue)); flex: none; }
.stat-ic .ico { width: 20px; height: 20px; }
.stat-v { font-size: 24px; font-weight: 800; color: var(--s800); line-height: 1.1; }
.stat-l { font-size: 12.5px; font-weight: 600; color: var(--s600); }
.stat-s { font-size: 11.5px; color: var(--s400); }
.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash > div > .card + .card, .dash > div > .card { margin-top: 0; }
.dash > div { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.show-md { display: none; }
.rooms-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rn { border: 1px solid var(--s200); border-left: 4px solid var(--c); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; background: #fff; }
.rn-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rn-n { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.rn-l { font-size: 11.5px; color: var(--s400); }
.rn-m { font-size: 12.5px; color: var(--s600); margin-top: 4px; min-height: 36px; }
.rn-m b { color: var(--s800); }
.rn .btn { align-self: flex-start; margin-top: 4px; }
.up-item { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--s100); cursor: pointer; }
.up-item:last-child { border-bottom: 0; }
.up-item:hover { background: var(--s50); }
.up-date { width: 48px; flex: none; text-align: center; border-radius: 8px; background: var(--psoft); color: var(--blue); padding: 4px 0; line-height: 1.15; }
.up-date b { display: block; font-size: 18px; }
.up-date small { font-size: 11px; }
.up-body { min-width: 0; flex: 1; }
.up-t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-s { font-size: 12px; color: var(--s500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-box { padding: 28px 16px; text-align: center; color: var(--s400); font-size: 13px; }
.empty-box .ico { width: 34px; height: 34px; stroke-width: 1.5; display: block; margin: 0 auto 6px; }

/* ---------- ไทม์ไลน์ย่อ (gantt) ---------- */
.gantt { display: grid; grid-template-columns: 170px 1fr; row-gap: 6px; align-items: center; font-size: 12.5px; }
.gantt .gh { position: relative; height: 18px; font-size: 11px; color: var(--s400); }
.gantt .gh span { position: absolute; transform: translateX(-50%); }
.gantt .gn { font-weight: 600; color: var(--s700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; display: flex; align-items: center; gap: 8px; }
.gantt .gt { position: relative; height: 24px; border-radius: 6px; background-color: var(--s100); background-image: linear-gradient(90deg, rgba(148,163,184,.25) 1px, transparent 1px); background-size: calc(100% / 12) 100%; }
.gantt .gb { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: var(--blue-600); cursor: pointer; }
.gantt .gb.pend { background: repeating-linear-gradient(135deg, #fbbf24 0 5px, #fde68a 5px 10px); }
.gantt .gb.past { background: var(--s300); }
.gantt .gb.closed { left: 0; right: 0; background: repeating-linear-gradient(135deg, #cbd5e1 0 6px, #e2e8f0 6px 12px); cursor: default; }
.gantt .gnow { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #dc2626; z-index: 2; }

/* ---------- ปฏิทิน ---------- */
.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.seg { display: inline-flex; border: 1px solid var(--s300); border-radius: 8px; overflow: hidden; }
.seg button { height: 34px; padding: 0 14px; border: 0; background: #fff; font-size: 13px; font-weight: 600; color: var(--s600); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--s300); }
.seg button.on { background: var(--blue); color: #fff; }
.cal-date { font-size: 15px; font-weight: 700; color: var(--s800); min-width: 0; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--s500); margin-left: auto; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lgd { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-wrap { border-top: 1px solid var(--s200); }
.cal-head, .cal-body { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--s200); background: var(--s50); position: sticky; top: 0; z-index: 3; }
.cal-head > div { padding: 8px 8px; border-left: 1px solid var(--s200); min-width: 0; }
.cal-head > div:first-child { border-left: 0; }
.ch-n { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.ch-s { font-size: 11.5px; color: var(--s400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-today .ch-n { color: var(--blue); }
.cal-body { position: relative; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--s400); }
.cal-col { position: relative; border-left: 1px solid var(--s200); cursor: copy;
  background-image: linear-gradient(var(--s200) 1px, transparent 1px), linear-gradient(rgba(226,232,240,.5) 1px, transparent 1px);
  background-size: 100% var(--hh), 100% calc(var(--hh) / 2); }
.cal-col.off { background-color: var(--s50); }
.cal-col.closed { cursor: not-allowed; background-color: #f8fafc; background-image: repeating-linear-gradient(135deg, rgba(148,163,184,.14) 0 10px, transparent 10px 20px); }
.cal-col.closed::after { content: attr(data-label); position: absolute; top: 40%; left: 8px; right: 8px; text-align: center; font-size: 12px; font-weight: 600; color: var(--s400); }
.cal-col .lunch { position: absolute; left: 0; right: 0; background: rgba(241,245,249,.7); pointer-events: none; }
.ev { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 4px 7px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; background: #dbeafe; border: 1px solid #93c5fd; border-left: 4px solid var(--blue-600); color: #1e3a8a; z-index: 1; transition: box-shadow .15s; }
.ev:hover { box-shadow: 0 4px 14px rgba(15,23,42,.18); z-index: 2; }
.ev b { font-size: 11.5px; }
.ev .et { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev .eu { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.pend { background: #fffbeb; border: 1px dashed #f59e0b; border-left: 4px solid #f59e0b; color: #78350f; }
.ev.past { background: var(--s100); border-color: var(--s200); border-left-color: var(--s400); color: var(--s500); }
.ev.mine { box-shadow: inset 0 0 0 2px var(--gold); }
.ev .ico { width: 11px; height: 11px; vertical-align: -1px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #dc2626; z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #dc2626; }
.cal-list { display: none; }
.day-banner { margin: 0 16px 12px; }

/* ---------- ค้นหาห้องว่าง ---------- */
.book { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.book .filter { position: sticky; top: 0; }
.book .filter .card-b { grid-template-columns: 1fr 1fr; }
.res-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.res-h b { font-size: 15px; }
.rc { display: grid; grid-template-columns: 150px minmax(0, 1fr) 180px; gap: 0; overflow: hidden; }
.rc + .rc { margin-top: 12px; }
.rc-img { position: relative; min-height: 150px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; background: linear-gradient(160deg, var(--c), #0f172a); }
.rc-img .ico { position: absolute; top: 14px; left: 12px; width: 30px; height: 30px; opacity: .45; stroke-width: 1.5; }
.rc-img b { font-size: 26px; line-height: 1; }
.rc-img small { font-size: 11.5px; opacity: .85; }
.rc-mid { padding: 14px 16px; min-width: 0; }
.rc-n { font-size: 15px; font-weight: 700; }
.rc-l { font-size: 12.5px; color: var(--s500); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.rc-l span { display: inline-flex; align-items: center; gap: 4px; }
.rc-l .ico { width: 13px; height: 13px; }
.eqs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.eq { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--s100); color: var(--s600); }
.eq .ico { width: 13px; height: 13px; }
.eq.miss { background: #fee2e2; color: #b91c1c; }
.avail { margin-top: 12px; }
.avail-bar { position: relative; height: 18px; border-radius: 5px; background-color: var(--s100); background-image: linear-gradient(90deg, rgba(148,163,184,.3) 1px, transparent 1px); background-size: calc(100% / 12) 100%; }
.avail-bar i { position: absolute; top: 0; bottom: 0; background: #94a3b8; border-radius: 3px; }
.avail-bar i.pend { background: repeating-linear-gradient(135deg, #f59e0b 0 4px, #fcd34d 4px 8px); }
.avail-bar em { position: absolute; top: -3px; bottom: -3px; border: 2px solid #16a34a; background: rgba(22,163,74,.18); border-radius: 5px; }
.avail-bar em.bad { border-color: #dc2626; background: rgba(220,38,38,.18); }
.avail-ax { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--s400); margin-top: 2px; }
.rc-r { padding: 14px 16px; border-left: 1px solid var(--s100); display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.rc-st { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rc-st.ok { color: #16a34a; } .rc-st.bad { color: #dc2626; } .rc-st.warn { color: #d97706; }
.rc-why { font-size: 12px; color: var(--s500); }
.rc.unavail .rc-img { filter: grayscale(.8); opacity: .75; }

/* ---------- รายละเอียดการจอง ---------- */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; }
.dl dt { color: var(--s500); }
.dl dd { color: var(--s800); min-width: 0; overflow-wrap: anywhere; }
.tl { list-style: none; position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--s200); }
.tl li { position: relative; padding-bottom: 12px; font-size: 13px; }
.tl li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--s300)); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c, var(--s300)); }
.tl small { display: block; color: var(--s400); font-size: 12px; }
.det-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }

/* ---------- รายงาน ---------- */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row .bn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--s700); font-weight: 600; }
.bar-track { height: 14px; border-radius: 4px; background: var(--s100); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 4px; background: var(--blue-600); }
.bar-row .bv { text-align: right; font-weight: 700; color: var(--s700); }
.heat { display: grid; grid-template-columns: 50px repeat(10, minmax(0, 1fr)); gap: 3px; font-size: 11.5px; }
.heat div { height: 28px; border-radius: 4px; display: grid; place-items: center; }
.heat .hl { color: var(--s500); font-weight: 600; justify-content: start; }
.heat .hh { color: var(--s400); height: 18px; }
.stack { display: flex; height: 16px; border-radius: 6px; overflow: hidden; }
.stack i { display: block; height: 100%; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 12px; color: var(--s600); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.perm { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.perm th, .perm td { padding: 8px 10px; border-bottom: 1px solid var(--s100); text-align: center; }
.perm th:first-child, .perm td:first-child { text-align: left; }
.perm th { background: var(--s50); font-size: 12.5px; color: var(--s600); }
.perm .y { color: #16a34a; font-weight: 700; } .perm .n { color: var(--s300); }
.pair { display: flex; gap: 8px; justify-content: center; margin: 6px 0 4px; }
.pair span { width: 44px; height: 54px; border-radius: 8px; background: var(--blue-dark); color: var(--gold); font-size: 28px; font-weight: 800; display: grid; place-items: center; }
.ticker-prev { display: flex; align-items: center; height: 40px; border-radius: 8px; overflow: hidden; background: #0b1a3a; color: #dbe3f2; font-size: 14px; }
.ticker-prev b { background: var(--gold); color: #1c1500; height: 100%; display: flex; align-items: center; padding: 0 12px; flex: none; }
.ticker-prev span { padding: 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-prev.urgent b { background: #dc2626; color: #fff; }
.form-foot { position: sticky; bottom: -48px; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 0 0; background: linear-gradient(180deg, rgba(241,245,249,0), var(--bg) 30%); }

/* ---------- รูปแบบทางการ: ไม่ใช้ไอคอนตกแต่ง ---------- */
.stat-ic:empty, .confirm-ic:empty { display: none; }
.welcome::after { display: none; }
.welcome { background: var(--blue-dark); }
.logo { padding: 0 20px; }
.logo-t { font-size: 14.5px; }
.lnk { background: none; border: 0; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--blue); cursor: pointer; white-space: nowrap; }
.lnk:hover:not(:disabled) { background: var(--psoft); text-decoration: underline; }
.lnk.ok { color: #15803d; }
.lnk.danger { color: #b91c1c; }
.lnk:disabled { color: var(--s300); cursor: not-allowed; }
.tbl .acts { gap: 4px; flex-wrap: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--s600); border: 1px solid var(--s300); border-radius: 4px; padding: 0 5px; margin-right: 6px; line-height: 1.5; vertical-align: 1px; }
.tb-btn { font-size: 13px; font-weight: 600; }
.tb-cnt { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.rc-img { background: var(--s50); color: var(--s800); border-right: 1px solid var(--s100); border-left: 5px solid var(--c); justify-content: center; align-items: center; text-align: center; }
.rc-img small { color: var(--s500); }
.empty-box, .empty-row td { font-size: 13.5px; }
.scope-list { margin-top: 8px; border: 1px solid var(--s200); border-radius: 10px; max-height: 280px; overflow-y: auto; transition: opacity .15s; }
.scope-list.off { opacity: .45; pointer-events: none; }
.scope-b { padding: 10px 14px; border-bottom: 1px solid var(--s100); }
.scope-b:last-child { border-bottom: 0; }
.scope-d { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 8px 0 0 24px; }
.scope-d .check { font-size: 13px; min-width: 0; }
.scope-modes { display: flex; gap: 8px 24px; flex-wrap: wrap; }


/* ---------- ปรับรูปแบบ: เรียบแบบระบบงานราชการ ไม่ใช้แถบสีข้างการ์ด/ไล่สี/กล่องไอคอนตกแต่ง ---------- */
.card { border-radius: 8px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.modal { border-radius: 10px; }
.topbar { border-bottom-width: 2px; }
.welcome { background: #fff; color: var(--s800); border: 1px solid var(--s200); border-radius: 8px; padding: 16px 20px; }
.welcome h2 { font-size: 18px; color: var(--s900); }
.welcome p { color: var(--s500); }
.stat { border-left: 1px solid var(--s200); padding: 14px 18px; display: block; }
.stat > div { display: flex; flex-direction: column; }
.stat-l { order: -1; font-size: 13px; color: var(--s500); font-weight: 600; margin-bottom: 4px; }
.stat-v { font-size: 26px; }
.stat-s { margin-top: 2px; }
.rn { border-left: 1px solid var(--s200); border-radius: 8px; }
.rn-n { display: flex; align-items: center; gap: 8px; }
.rc-img { border-left: 0; background: var(--s50); }
.rc { border-radius: 8px; }
.ev { border-left-width: 1px; }
.ev.pend { border-left-width: 1px; }
.tb-dot { border-color: var(--blue-dark); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }


/* ---------- แดชบอร์ด: เพิ่มสีสันแบบพื้นสีอ่อนทั้งใบ (ไม่ใช้แถบสีข้างการ์ด) ---------- */
.welcome.hero { background: var(--blue); color: #fff; border-color: var(--blue); }
.welcome.hero h2 { color: #fff; }
.welcome.hero p { color: #c7d3ee; }
.stat.tint { background: var(--cb); border-color: color-mix(in srgb, var(--c) 22%, #fff); }
.stat.tint .stat-v { color: var(--c); }
.stat.tint .stat-l { color: var(--s700); }
.stat-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--c) 15%, #fff); margin-top: 10px; overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.rn.tint { background: var(--cb); border-color: color-mix(in srgb, var(--c) 25%, #fff); }
.rn.tint .btn-secondary { background: #fff; }
.badge.solid { color: #fff; }
.card-h.amber { background: #fffbeb; border-bottom-color: #fde68a; border-radius: 8px 8px 0 0; }
.gantt .gb { background: var(--rc, var(--blue-600)); }
.gantt .gb.past { background: var(--rc); opacity: .35; }
.gantt .gb.now { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--rc); }
.up-date.s-approved { background: #eff6ff; color: #1d4ed8; }
.up-date.s-pending { background: #fffbeb; color: #b45309; }
.up-date.s-inuse { background: #f0fdf4; color: #15803d; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .hide-lg { display: none; }
  .rooms-now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc { grid-template-columns: 120px minmax(0, 1fr) 160px; }
}
@media (max-width: 1023px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash, .det-grid { grid-template-columns: minmax(0, 1fr); }
  .filter .card-b, .filter .card-b.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book { grid-template-columns: minmax(0, 1fr); }
  .book .filter { position: static; }
  .book .filter .card-b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-t, .role-sw label { display: none; }
}
@media (max-width: 767px) {
  .hide-md { display: none; }
  .show-md { display: block; margin-top: 3px; }
  .tbl th, .tbl td { padding: 10px 8px; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.open { transform: none; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 30; }
  .topbar { padding: 0 10px; }
  .topbar .burger { display: inline-flex; }
  .top-title { display: none; }
  .content { padding: 14px 12px 40px; }
  .stats, .rooms-now, .g2, .g3, .g4, .filter .card-b, .filter .card-b.c3, .book .filter .card-b, .book { grid-template-columns: minmax(0, 1fr); }
  .role-sw { padding: 2px; }
  .role-sw select { max-width: 130px; }
  .me .ico { display: none; }
  .page-a .btn { flex: 1; }
  .span2, .span3 { grid-column: auto; }
  .rc { grid-template-columns: 1fr; }
  .rc-img { min-height: 70px; flex-direction: row; align-items: center; gap: 10px; }
  .rc-r { border-left: 0; border-top: 1px solid var(--s100); flex-direction: row; align-items: center; }
  .cal-wrap.day-view { display: none; }
  .cal-list { display: block; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .btn, .icon-btn { min-height: 40px; }
  .icon-btn { width: 40px; }
  .gantt { grid-template-columns: 110px 1fr; }
  .scope-d { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 110px minmax(0, 1fr) 48px; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .dropdown { right: 8px; left: 8px; width: auto; }
}

/* พิมพ์รายงาน (ปุ่ม PDF ในหน้าสถิติการใช้ห้องประชุม): ซ่อนเมนูข้าง แถบบน และปุ่ม/ตัวกรอง แล้วพิมพ์การ์ดเต็มความกว้าง */
@media print {
  .sidebar, .topbar, .page-a, .filter, .toasts { display: none !important; }
  .app { display: block; height: auto; overflow: visible; }
  .main, .content { display: block; overflow: visible; padding: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .card { break-inside: avoid; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
