﻿/* =========================================================
   KBank Event Registration - Kasikornbank green theme
   ========================================================= */
:root {
  --kb-green: #00A950;
  --kb-green-dark: #00753A;
  --kb-green-deep: #005C2E;
  --kb-green-light: #E6F6EC;
  --kb-green-soft: #C6EFCE;
  --kb-gold: #FFC000;
  --kb-yellow: #FFE07A;
  --kb-yellow-soft: #FFF4CC;
  --kb-grey: #E7E6E6;
  --kb-grey-dark: #8C8C8C;
  --kb-red: #D93025;
  --text: #1F2D24;
  --muted: #5F6F66;
  --border: #D9E3DC;
  --bg: #F3F7F4;
  --card: #FFFFFF;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,80,40,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Sarabun", "Kanit", Tahoma, "Segoe UI", sans-serif;
  font-size: 15px; color: var(--text); background: var(--bg); line-height: 1.5;
}
a { color: var(--kb-green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: "Kanit", "Sarabun", Tahoma, sans-serif; font-weight: 500; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(90deg, var(--kb-green-deep), var(--kb-green-dark) 45%, var(--kb-green));
  color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topbar-inner { max-width: 1500px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: "Kanit", sans-serif; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--kb-green); font-weight: 700; font-size: 20px; }
.brand-text b { display: block; font-size: 1.05rem; font-weight: 500; line-height: 1.1; }
.brand-text small { opacity: .85; font-size: .78rem; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: #fff; padding: 8px 14px; border-radius: 8px; font-family: "Kanit", sans-serif; font-size: .95rem; position: relative; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.nav a.active { background: #fff; color: var(--kb-green-dark); }
.badge-noti { position: absolute; top: 0; right: 0; background: var(--kb-gold); color: #3a2a00; border-radius: 10px; font-size: .7rem; padding: 0 6px; font-weight: 700; min-width: 18px; text-align: center; }
.badge-noti.hidden { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; margin-left: auto; }

.page { max-width: 1500px; margin: 0 auto; padding: 22px 20px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; color: var(--kb-green-deep); }
.page-head .sub { color: var(--muted); font-size: .9rem; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; border: 1px solid #EAF1EC; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title h2 { margin: 0; color: var(--kb-green-deep); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* KPI */
.kpi { display: block; background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border-left: 6px solid var(--kb-green); color: var(--text); transition: transform .12s; }
.kpi:hover { transform: translateY(-2px); text-decoration: none; }
.kpi .lbl { color: var(--muted); font-size: .9rem; }
.kpi .val { font-family: "Kanit", sans-serif; font-size: 2.2rem; color: var(--kb-green-deep); line-height: 1.15; }
.kpi .val small { font-size: 1rem; color: var(--muted); }
.kpi.gold { border-left-color: var(--kb-gold); }
.kpi.grey { border-left-color: var(--kb-grey-dark); }
.kpi.dark { border-left-color: var(--kb-green-deep); }
.progress { height: 8px; background: var(--kb-green-light); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--kb-green); border-radius: 6px; }

/* Function cards */
.func-card { display: block; border-radius: var(--radius); padding: 16px; background: linear-gradient(135deg, var(--kb-green-dark), var(--kb-green)); color: #fff; box-shadow: var(--shadow); }
.func-card:hover { text-decoration: none; filter: brightness(1.05); }
.func-card .t { font-family: "Kanit", sans-serif; font-size: 1.05rem; }
.func-card .n { font-family: "Kanit", sans-serif; font-size: 2rem; }
.func-card .n small { font-size: 1rem; opacity: .85; }
.func-card .links a { color: #fff; opacity: .9; font-size: .85rem; margin-right: 12px; text-decoration: underline; }
.func-card .progress { background: rgba(255,255,255,.25); }
.func-card .progress > span { background: #fff; }
.func-card.f2 { background: linear-gradient(135deg, #0B6B3A, #2BB673); }
.func-card.f3 { background: linear-gradient(135deg, #8A6D00, #E0A800); }
.func-card.f0 { background: linear-gradient(135deg, #5f6f66, #8c9b92); }

/* Table tiles */
.table-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: block; border-radius: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--border); color: var(--text); position: relative; }
.tile:hover { border-color: var(--kb-green); text-decoration: none; box-shadow: var(--shadow); }
.tile .tn { font-family: "Kanit", sans-serif; color: var(--kb-green-deep); }
.tile .tc { font-family: "Kanit", sans-serif; font-size: 1.6rem; }
.tile .tc small { font-size: .95rem; color: var(--muted); }
.tile .ta { font-size: .8rem; color: var(--muted); }
.tile.full { background: var(--kb-green-light); border-color: var(--kb-green); }
.tile .mod-dot { position: absolute; top: 10px; right: 10px; background: var(--kb-gold); color: #3a2a00; font-size: .7rem; border-radius: 8px; padding: 0 6px; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.data th { background: var(--kb-green); color: #fff; font-weight: 500; text-align: left; padding: 9px 10px; white-space: nowrap; position: sticky; top: 0; font-family: "Kanit", sans-serif; }
table.data th.grp-guest { background: var(--kb-green-dark); text-align: center; }
table.data th.grp-food { background: var(--kb-gold); color: #3a2a00; text-align: center; }
table.data td { padding: 8px 10px; border-top: 1px solid #EEF2EF; vertical-align: top; }
table.data tr:hover td { background: #F7FBF8; }
table.data tr.row-in td { background: #F0FAF3; }
table.data tr.row-mod td { background: var(--kb-yellow-soft); }
table.data td.num, table.data th.num { text-align: right; }
table.data td.c, table.data th.c { text-align: center; }
table.data a.num-link { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* ---------- Pills & buttons ---------- */
.pill { display: inline-block; padding: 1px 10px; border-radius: 20px; font-size: .78rem; white-space: nowrap; }
.pill-in { background: var(--kb-green-soft); color: #0b5a2c; }
.pill-out { background: var(--kb-grey); color: #555; }
.pill-mod { background: var(--kb-yellow); color: #5a4300; }
.pill-func { background: var(--kb-green-light); color: var(--kb-green-deep); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; background: var(--kb-green); color: #fff; font-family: "Kanit", sans-serif; font-size: .92rem; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--kb-green-dark); text-decoration: none; color: #fff; }
.btn-outline { background: #fff; color: var(--kb-green-dark); border-color: var(--kb-green); }
.btn-outline:hover { background: var(--kb-green-light); color: var(--kb-green-dark); }
.btn-gold { background: var(--kb-gold); color: #3a2a00; }
.btn-gold:hover { background: #E6AC00; color: #3a2a00; }
.btn-grey { background: #fff; color: #555; border-color: #ccc; }
.btn-grey:hover { background: #f2f2f2; color: #333; }
.btn-danger { background: #fff; color: var(--kb-red); border-color: #f1b5b0; }
.btn-danger:hover { background: #fdecea; color: var(--kb-red); }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.btn-lg { padding: 14px 26px; font-size: 1.1rem; border-radius: 10px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
.fld label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.fld label .req { color: var(--kb-red); }
.inp, select.inp, textarea.inp { width: 100%; padding: 9px 11px; border: 1px solid #CBD8CF; border-radius: 8px; font: inherit; background: #fff; color: var(--text); }
.inp:focus { outline: none; border-color: var(--kb-green); box-shadow: 0 0 0 3px rgba(0,169,80,.15); }
.section-title { font-family: "Kanit", sans-serif; color: #fff; background: var(--kb-green-dark); padding: 6px 14px; border-radius: 8px; margin: 6px 0 14px; font-size: .95rem; }
.section-title.food { background: var(--kb-gold); color: #3a2a00; }
.section-title.seat { background: var(--kb-green); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .fld { min-width: 150px; }
.filters .fld.grow { flex: 1 1 260px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }
.chk input { width: 18px; height: 18px; accent-color: var(--kb-green); }

.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; }
.msg-ok { background: var(--kb-green-light); border: 1px solid var(--kb-green-soft); color: #0b5a2c; }
.msg-err { background: #fdecea; border: 1px solid #f5c2bd; color: #8a1f17; }
.msg-warn { background: var(--kb-yellow-soft); border: 1px solid var(--kb-yellow); color: #5a4300; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- Check-in ---------- */
.ci-search { display: flex; gap: 10px; }
.ci-search .inp { font-size: 1.25rem; padding: 14px 16px; border-radius: 10px; }
.ci-hint { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.ci-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ci-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.ci-card.is-in { border-color: var(--kb-green); background: #F4FBF6; }
.ci-card.is-mod { border-color: var(--kb-gold); }
.ci-name { font-family: "Kanit", sans-serif; font-size: 1.2rem; color: var(--kb-green-deep); }
.ci-name-th { color: var(--muted); }
.ci-seat { display: flex; gap: 8px; margin: 4px 0; }
.ci-seat .box { background: var(--kb-green-light); border-radius: 8px; padding: 6px 12px; text-align: center; }
.ci-seat .box b { display: block; font-family: "Kanit", sans-serif; font-size: 1.4rem; color: var(--kb-green-deep); line-height: 1.1; }
.ci-seat .box span { font-size: .75rem; color: var(--muted); }
.ci-meta { font-size: .88rem; color: var(--muted); }
.ci-actions { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }
.ci-success { background: linear-gradient(135deg, var(--kb-green-dark), var(--kb-green)); color: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ci-success .big { font-family: "Kanit", sans-serif; font-size: 2.2rem; line-height: 1; }
.ci-success .who { font-family: "Kanit", sans-serif; font-size: 1.3rem; }

/* ---------- Seating plan ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 18px; height: 14px; border-radius: 3px; vertical-align: middle; margin-right: 6px; border: 1px solid rgba(0,0,0,.15); }
.lg-wait { background: var(--kb-grey); } .lg-in { background: #92D050; } .lg-mod { background: var(--kb-gold); } .lg-empty { background: #fff; border-style: dashed !important; }
.seat-plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.seat-plan.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.tbl-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; border: 1px solid #EAF1EC; }
.tbl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-family: "Kanit", sans-serif; }
.tbl-head a { color: var(--kb-green-deep); font-size: 1.05rem; }
.tbl-count { background: var(--kb-green-light); color: var(--kb-green-deep); border-radius: 20px; padding: 1px 12px; font-weight: 600; }
.tbl-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.tbl-center { display: flex; align-items: center; justify-content: center; color: #fff; font-family: "Kanit", sans-serif; font-size: 1.35rem; font-weight: 600; border: .5px solid #222; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.seat { position: relative; min-height: 78px; padding: 6px 6px 6px; border: .5px solid #222; text-align: center; font-size: .74rem; line-height: 1.25; display: flex; flex-direction: column; justify-content: center; cursor: pointer; color: #111; overflow: hidden; }
.seat:hover { outline: 3px solid var(--kb-green-dark); outline-offset: -3px; z-index: 2; text-decoration: none; }
.s-wait { background: var(--kb-grey); }
.s-in { background: #92D050; }
.s-mod { background: var(--kb-gold); }
.s-empty { background: #fff; color: #aaa; border-style: dashed; }
.seat-no { position: absolute; top: 2px; left: 4px; font-size: .66rem; color: rgba(0,0,0,.55); font-weight: 700; }
.seat-check { position: absolute; top: 2px; right: 4px; font-size: .8rem; color: #0b5a2c; font-weight: 700; }
.s-mod.is-in .seat-check { background: #2e9e4f; color: #fff; border-radius: 50%; width: 16px; height: 16px; line-height: 16px; font-size: .65rem; }
.seat-name { font-weight: 600; display: block; }
.seat-comp, .seat-menu { display: block; }
.seat-menu { color: #333; }
.seat-empty-txt { font-size: .8rem; }
.tbl-card.large .seat { min-height: 110px; font-size: .9rem; }
.tbl-card.large .tbl-center { font-size: 2rem; }
.tbl-noseat { margin-top: 8px; font-size: .8rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--kb-green-light); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 8px 8px 0 0; color: var(--muted); font-family: "Kanit", sans-serif; }
.tabs a.on { background: var(--kb-green); color: #fff; }
.floor-placeholder { border: 2px dashed var(--kb-green); border-radius: var(--radius); background: repeating-linear-gradient(45deg, #fff, #fff 12px, var(--kb-green-light) 12px, var(--kb-green-light) 24px); min-height: 320px; display: grid; place-items: center; text-align: center; color: var(--kb-green-deep); padding: 30px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,30,15,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-bg.show { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 440px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal-head { background: var(--kb-green); color: #fff; padding: 14px 18px; font-family: "Kanit", sans-serif; display: flex; justify-content: space-between; align-items: center; }
.modal-head button { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }
.modal-body { padding: 16px 18px; }
.modal-body dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 0; }
.modal-body dt { color: var(--muted); font-size: .88rem; }
.modal-body dd { margin: 0; }
.modal-foot { padding: 12px 18px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* Notifications */
.noti-item { display: flex; gap: 14px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: #fff; margin-bottom: 10px; }
.noti-item.unread { border-left: 6px solid var(--kb-gold); background: #FFFDF5; }
.noti-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 40px; font-weight: 700; color: #fff; background: var(--kb-green); font-family: "Kanit", sans-serif; }
.noti-icon.EDIT { background: var(--kb-gold); color: #3a2a00; }
.noti-icon.DELETE { background: var(--kb-red); }
.noti-main { flex: 1; min-width: 0; }
.noti-main .who { font-family: "Kanit", sans-serif; color: var(--kb-green-deep); }
.noti-main .meta { color: var(--muted); font-size: .82rem; }
.noti-changes { margin: 6px 0 0; padding: 0; list-style: none; font-size: .88rem; }
.noti-changes li { padding: 2px 0; }
.noti-changes li.key b { background: var(--kb-yellow); padding: 0 6px; border-radius: 4px; }
.noti-changes .old { color: #a33; text-decoration: line-through; }
.noti-changes .new { color: #0b5a2c; font-weight: 600; }

/* Toasts */
#toastBox { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast { background: #fff; border-left: 6px solid var(--kb-gold); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 12px 14px; font-size: .88rem; animation: tin .25s ease-out; }
.toast b { font-family: "Kanit", sans-serif; color: var(--kb-green-deep); display: block; }
.toast .x { float: right; cursor: pointer; color: #999; margin-left: 8px; }
.toast a { font-size: .82rem; }
@keyframes tin { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }
.muted { color: var(--muted); }
.mt { margin-top: 14px; }
.right { text-align: right; }
.hidden-btn { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--kb-green-dark); flex-direction: column; align-items: stretch; padding: 8px; }
  .nav.open { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .seat-plan { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page { padding: 16px 12px 40px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .ci-results { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .seat { font-size: .66rem; min-height: 70px; }
}
@media print {
  .topbar, .no-print, #toastBox { display: none !important; }
  body { background: #fff; }
  .tbl-card { box-shadow: none; break-inside: avoid; }
}

/* ---------- Floor plan (table positions & colours from venue plan) ---------- */
.tdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.25); }
.fp-toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.fp-wrap { overflow-x: auto; }
.fp-room { position: relative; width: 100%; min-width: 640px; aspect-ratio: 882 / 614; container-type: inline-size; border-radius: var(--radius);
  background: #FAFCFA; border: 1px solid var(--border); overflow: hidden; }
.fp-room.with-img { background: #fff url("floorplan.jpg") center / 100% 100% no-repeat; }
.fp-room.with-img .fp-stage { display: none; }
.fp-stage { position: absolute; left: 2%; top: 80%; width: 46%; height: 9%; background: #3d3d3d; color: #fff; display: grid; place-items: center; font-family: "Kanit", sans-serif; border-radius: 6px; font-size: 2cqw; }
.fp-table { position: absolute; transform: translate(-50%, -50%); width: 9.5cqw; height: 9.5cqw; display: block; --fp-r: 3.9cqw; text-decoration: none !important; }
.fp-circle { position: absolute; left: 50%; top: 50%; width: 5.6cqw; height: 5.6cqw; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; font-family: "Kanit", sans-serif; font-weight: 600; font-size: 1.9cqw; border: .25cqw solid rgba(0,0,0,.55);
  box-shadow: 0 2px 6px rgba(0,0,0,.3); z-index: 2; transition: transform .12s; }
.fp-table:hover .fp-circle { transform: translate(-50%, -50%) scale(1.12); }
.fp-dot { position: absolute; left: 50%; top: 50%; width: 1.7cqw; height: 1.7cqw; margin: -.85cqw 0 0 -.85cqw; border-radius: 50%; border: .15cqw solid rgba(0,0,0,.5); z-index: 1; }
.fp-dot.w { background: var(--kb-grey); }
.fp-dot.i { background: #2DB34A; }
.fp-dot.m { background: var(--kb-gold); }
.fp-dot.e { background: #fff; border-style: dashed; }
.fp-circle { flex-direction: column; line-height: 1; gap: .2cqw; display: flex; align-items: center; justify-content: center; }
.fp-count { font-size: 1.05cqw; font-weight: 600; background: rgba(255,255,255,.92); color: var(--kb-green-deep); border-radius: 1cqw; padding: .1cqw .5cqw; }
.fp-table.has-mod .fp-count { background: var(--kb-yellow); color: #3a2a00; }
.fp-legend-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }
.fp-legend-tables a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-size: .88rem; }
.fp-legend-tables a:hover { border-color: var(--kb-green); text-decoration: none; }
.fp-legend-tables b { margin-left: auto; color: var(--kb-green-deep); }
.tile { border-left-width: 6px; }

/* ---------- Round table seat plan ---------- */
.rt-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; container-type: inline-size; }
.rt-table { position: absolute; left: 50%; top: 50%; width: 40cqw; height: 40cqw; transform: translate(-50%, -50%); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw;
  border: .6cqw solid rgba(0,0,0,.35); box-shadow: 0 .8cqw 2.4cqw rgba(0,0,0,.18), inset 0 0 0 1.4cqw rgba(255,255,255,.18); font-family: "Kanit", sans-serif; }
.rt-table b { font-size: 6cqw; font-weight: 600; line-height: 1; }
.rt-table span { font-size: 3.4cqw; font-weight: 600; background: rgba(255,255,255,.92); color: var(--kb-green-deep); border-radius: 3cqw; padding: .2cqw 2.2cqw; }
.rt-wrap .seat, .tbl-card.large .rt-wrap .seat { position: absolute; transform: translate(-50%, -50%); width: 23cqw; height: 16.5cqw; min-height: 0;
  padding: 1.2cqw 1cqw .8cqw; border: 1px solid rgba(0,0,0,.35); border-radius: 2.2cqw; font-size: 2.05cqw; line-height: 1.2;
  box-shadow: 0 .4cqw 1cqw rgba(0,0,0,.12); }
.rt-wrap .seat:hover { outline: none; box-shadow: 0 0 0 .7cqw var(--kb-green-dark); z-index: 3; }
.rt-wrap .s-empty { border-style: dashed; background: rgba(255,255,255,.85); }
.rt-wrap .seat-name { font-size: 2.3cqw; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rt-wrap .seat-comp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rt-wrap .seat-menu { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-wrap .seat-no { top: .6cqw; left: 1.2cqw; font-size: 1.9cqw; }
.rt-wrap .seat-check { top: .5cqw; right: 1.2cqw; font-size: 2.2cqw; }
.rt-wrap .seat-empty-txt { font-size: 2.4cqw; }
.seat-plan { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
.seat-plan.single { grid-template-columns: minmax(0, 820px); }
@media (max-width: 560px) { .seat-plan { grid-template-columns: 1fr; } .rt-wrap .seat { font-size: 2.4cqw; } }

/* ---------- Combined seating map (all round tables at real positions) ---------- */
a.rt-table { text-decoration: none !important; cursor: pointer; }
.map-card { padding: 12px; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 10px; }
.map-zoom { display: flex; gap: 6px; align-items: center; }
.map-zoom-lbl { min-width: 48px; text-align: center; font-weight: 600; color: var(--kb-green-deep); }
.map-hint { font-size: .82rem; }
.map-viewport { position: relative; overflow: auto; height: calc(100vh - 250px); min-height: 480px; border: 1px solid var(--border); border-radius: 10px;
  background: #F6F8F7; cursor: grab; user-select: none; }
.map-viewport.dragging { cursor: grabbing; }
.map-sizer { position: relative; }
.map-canvas { position: absolute; left: 0; top: 0; width: 4144px; height: 3235px; transform-origin: 0 0; background: #FAFCFA; }
/* canvas = crop x 10-84%, y 14-97% of the 5600x3898 room image (see SeatMap.MapX0..MapY1) */
.map-canvas::before { content: ""; position: absolute; inset: 0; background: url("floorplan.jpg") -560px -546px / 5600px 3898px no-repeat; opacity: 0; pointer-events: none; }
.map-canvas.with-img::before { opacity: .45; }
.map-stage { position: absolute; left: 0; top: 79.5%; width: 51%; height: 10.8%; background: #3d3d3d; color: #fff; display: grid; place-items: center;
  font: 600 90px "Kanit", sans-serif; border-radius: 30px; opacity: .85; }
.map-canvas.with-img .map-stage { display: none; }
.map-table { position: absolute; transform: translate(-50%, -50%); }
.map-table .rt-wrap .seat { box-shadow: 0 2px 6px rgba(0,0,0,.18); }
@media print {
  .map-viewport { height: auto; overflow: visible; border: 0; }
}

/* ---------- Branding: logo + event banner ---------- */
.brand-logo { overflow: hidden; padding: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text b { letter-spacing: .3px; }
.hero { position: relative; display: flex; align-items: stretch; justify-content: center; border-radius: var(--radius); overflow: hidden; margin-bottom: 18px;
  min-height: 200px; box-shadow: var(--shadow);
  background: linear-gradient(180deg, #0E7270 0%, #2D8E83 26%, #85AC99 52%, #D7D6BA 82%, #B0A898 100%); }
.hero-banner { height: 220px; width: auto; max-width: 60%; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
.hero-side { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 0 28px; color: #fff; text-decoration: none !important; }
.hero-left { left: 0; }
.hero-left img { width: 64px; height: 64px; background: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hero-left b { display: block; font-family: "Kanit", sans-serif; font-size: 1.1rem; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-left small { opacity: .9; letter-spacing: 2px; text-transform: uppercase; font-size: .75rem; }
.hero-right { right: 0; flex-direction: column; justify-content: center; gap: 0; }
.hero-right .lbl { font-family: "Kanit", sans-serif; font-size: .95rem; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-right .big { font-family: "Kanit", sans-serif; font-size: 3rem; line-height: 1; font-weight: 600; background: rgba(255,255,255,.92); color: var(--kb-green-deep);
  border-radius: 14px; padding: 6px 18px; margin-top: 6px; }
.hero-right .big small { font-size: 1.1rem; color: var(--muted); }
@media (max-width: 1000px) { .hero-side { display: none; } .hero-banner { max-width: 100%; height: auto; max-height: 220px; } }
@media print { .hero { display: none; } }

/* ---------- Scrollable data table: horizontal scrollbar always visible, sticky header + action column ---------- */
.tbl-scroll { max-height: calc(100vh - 210px); min-height: 320px; overflow: auto; overscroll-behavior: contain; }
.tbl-scroll::-webkit-scrollbar { width: 14px; height: 14px; }
.tbl-scroll::-webkit-scrollbar-track { background: var(--kb-green-light); }
.tbl-scroll::-webkit-scrollbar-thumb { background: var(--kb-green); border-radius: 8px; border: 3px solid var(--kb-green-light); }
.tbl-scroll::-webkit-scrollbar-thumb:hover { background: var(--kb-green-dark); }
.tbl-scroll { scrollbar-color: var(--kb-green) var(--kb-green-light); }
table.data th { z-index: 2; }
table.data.two-head thead tr:first-child th { top: 0; height: 34px; padding-top: 6px; padding-bottom: 6px; }
table.data.two-head thead tr:nth-child(2) th { top: 34px; }
table.data .sticky-r { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -6px 0 8px -6px rgba(0,0,0,.25); }
table.data th.sticky-r { z-index: 3; background: var(--kb-green-dark); }
table.data tr.row-in td.sticky-r { background: #F0FAF3; }
table.data tr.row-mod td.sticky-r { background: var(--kb-yellow-soft); }
table.data tr:hover td.sticky-r { background: #F7FBF8; }
.scroll-hint { font-size: .8rem; color: var(--muted); margin: 0 0 6px; }
@media print { .tbl-scroll { max-height: none; overflow: visible; } table.data .sticky-r { position: static; box-shadow: none; } }

/* changes list in seat modal */
.m-changes { white-space: pre-line; background: var(--kb-yellow-soft); border-left: 4px solid var(--kb-gold); border-radius: 6px; padding: 6px 10px; font-size: .85rem; max-height: 180px; overflow: auto; }
