:root {
  --bg: #0a0a0c;
  --panel: #131316;
  --panel2: #1c1c21;
  --line: #2b2b32;
  --ink: #f7f7f8;
  --muted: #9b9ba4;
  --accent: #e5383b;
  --accent-soft: rgba(229, 56, 59, 0.16);
  --ok: #4cc48a;
  --ok-soft: rgba(76, 196, 138, 0.14);
  --info: #6fa5f7;
  --info-soft: rgba(111, 165, 247, 0.14);
  --warn: #e5b84b;
  --warn-soft: rgba(229, 184, 75, 0.14);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, 0.16);
  --sans: "Segoe UI", "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(229, 56, 59, 0.16), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
main.public { max-width: 44rem; gap: 1.4rem; padding-top: 2.2rem; }

/* ---------- topbar (หน้าแอดมิน) ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.14em; color: var(--muted); }
.brand b { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 0.6rem; }

/* ---------- hero (หน้าสาธารณะ) ---------- */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 0.8rem; }
.logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid rgba(229, 56, 59, 0.35);
  box-shadow: 0 8px 42px rgba(229, 56, 59, 0.45);
}
.brand-logo { width: 20px; height: 20px; border-radius: 6px; vertical-align: -4px; margin-right: 6px; }
.hero-title { margin: 0.5rem 0 0; font-size: clamp(1.6rem, 4vw, 2.15rem); font-weight: 750; letter-spacing: -0.02em; }
.hero-title b { color: var(--accent); }
.hero-title .thin { color: var(--muted); font-weight: 400; }
.hero-sub { color: var(--accent); font-weight: 750; letter-spacing: 0.02em; }
.hero-desc { margin: 0; color: var(--muted); max-width: 48ch; }
.pills { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }
.pill {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--ink);
}

/* ---------- cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
h2 { margin: 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 0.85rem; }

/* ---------- forms ---------- */
textarea, input, select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
}
textarea { resize: vertical; min-height: 6.5rem; font-family: var(--mono); font-size: 0.92rem; line-height: 1.7; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
label.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.grid { display: grid; gap: 0.8rem; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-4 { grid-template-columns: 2fr 1fr 1fr 2fr; }
@media (max-width: 40rem) { .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- form card (สาธารณะ) ---------- */
.form-card { gap: 0.6rem; }
.mode-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem;
}
@media (max-width: 30rem) {
  .mode-tabs { grid-template-columns: 1fr; }
}
.mode-tabs button {
  border: none; background: transparent; color: var(--muted);
  font-family: var(--sans); font-size: 0.9rem; font-weight: 650;
  padding: 0.6rem; border-radius: 9px; cursor: pointer;
}
.mode-tabs button.active { background: var(--panel); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.input-head { margin-top: 0.2rem; }
.input-label { font-weight: 700; }
.counter b { color: var(--accent); }
.check { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.check input { width: auto; }
.dedup { cursor: default; margin-top: 0.15rem; }
.big-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.95rem;
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
  font-family: var(--sans);
  cursor: pointer;
  background: linear-gradient(135deg, #ff5a5f, #c1121f);
  box-shadow: 0 6px 26px rgba(229, 56, 59, 0.35);
  margin-top: 0.4rem;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.big-btn:hover { filter: brightness(1.08); }
.big-btn:active { transform: translateY(1px); }
.big-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.privacy { margin: 0.5rem 0 0; }

/* ---------- buttons (ทั่วไป) ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 650; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.small { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn.danger { color: var(--bad); }
.row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row.end { justify-content: flex-end; }

/* ---------- การ์ดสถานะงาน ---------- */
.status-card {
  background: var(--panel);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 0 36px rgba(229, 56, 59, 0.15);
}
.status-card.done { border-color: rgba(76, 196, 138, 0.55); box-shadow: 0 0 36px rgba(76, 196, 138, 0.12); }
.status-card.failed { border-color: rgba(255, 107, 107, 0.5); }
.sc-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.sc-title { color: var(--accent); font-weight: 750; font-size: 0.95rem; }
.status-card.done .sc-title { color: var(--ok); }
.status-card.failed .sc-title { color: var(--bad); }
.sc-jobid { color: var(--muted); font-size: 0.9rem; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel2);
  color: var(--ink); cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { border-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.stat {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}
.stat .num { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
.stat.hot { border-color: rgba(229, 56, 59, 0.55); }
.stat.hot .num { color: var(--accent); }
.stat.ok .num { color: var(--ok); }
.stat.bad .num { color: var(--bad); }
@media (max-width: 34rem) { .stats { grid-template-columns: repeat(2, 1fr); } }

.progress-block {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pb-head { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.88rem; font-weight: 600; }
.pb-right { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #ff5a5f, #ffb3b5); transition: width 0.6s ease; }
.bar.done .fill { background: linear-gradient(90deg, #2f9e63, #6fe0a4); }
.bar.failed .fill { background: linear-gradient(90deg, #c1121f, #ff7b7b); }
.bar.striped .fill {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, #ff5a5f, #c1121f);
  background-size: 28px 28px, 100% 100%;
  animation: stripes 1s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0, 0 0; } }
.bar.indet .fill { width: 38% !important; animation: slide 1.3s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: 0; } to { margin-left: 62%; } }
.pb-foot { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; }
.pb-hint { color: var(--accent); font-weight: 650; }
.status-card.done .pb-hint { color: var(--ok); }

.acc-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.acc-head {
  display: flex; justify-content: space-between;
  background: var(--panel2);
  padding: 0.5rem 0.8rem;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.acc-row {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.acc-name { font-weight: 700; font-family: var(--mono); font-size: 0.95rem; }
.acc-sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }

.done-box {
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}
.done-box.ok { background: rgba(76, 196, 138, 0.1); border: 1px solid rgba(76, 196, 138, 0.45); color: var(--ok); }
.done-box.warn { background: rgba(229, 184, 75, 0.08); border: 1px solid rgba(229, 184, 75, 0.4); color: var(--warn); }
.done-box.fail { background: rgba(255, 107, 107, 0.08); border: 1px solid rgba(255, 107, 107, 0.4); color: var(--bad); }
.done-box .t1 { font-weight: 750; font-size: 1rem; }
.done-box .t2 { font-size: 0.88rem; color: var(--muted); max-width: 54ch; }

/* ---------- แจ้งชื่อไม่พบ ---------- */
.missrow { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.miss {
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.83rem;
}

/* ---------- toasts (มุมขวาล่าง หน้าสาธารณะ) ---------- */
#toasts {
  position: fixed; right: 1rem; bottom: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  z-index: 60;
  max-width: min(90vw, 24rem);
}
.toast-item {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: pop 0.25s ease;
}
.toast-item.ok { border-left-color: var(--ok); }
.toast-item.bad { border-left-color: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* toast กลางล่าง (หน้าแอดมิน) */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line);
  color: var(--ink); border-radius: 8px; padding: 0.6rem 1rem;
  font-size: 0.9rem; max-width: 90vw; z-index: 50;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.toast.bad { border-color: rgba(255, 107, 107, 0.55); color: var(--bad); }
.toast.ok { border-color: rgba(76, 196, 138, 0.55); color: var(--ok); }

.rec-title { color: var(--accent); }
.btn.red-outline { color: var(--bad); border-color: rgba(255, 107, 107, 0.5); background: transparent; }
.btn.red-outline:hover { background: var(--bad-soft); }
.btn.armed { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 650; }
.combo-list { display: flex; flex-direction: column; }
.combo-row {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--line);
}
.combo-row:last-child { border-bottom: none; }
.combo-row input[type="checkbox"] { width: auto; flex: none; margin-top: 0.25rem; }
.combo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.combo-text {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent);
  cursor: copy;
}
.combo-text:hover { filter: brightness(1.25); }
.combo-meta {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; color: var(--muted);
}
.num-badge {
  font-family: var(--mono);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.68rem;
}

/* ---------- tables ---------- */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { text-align: left; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: var(--panel2); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td.mono, .mono { font-family: var(--mono); font-size: 0.85rem; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem; border-radius: 5px; white-space: nowrap;
}
.badge.pending { color: var(--warn); background: var(--warn-soft); }
.badge.processing { color: var(--info); background: var(--info-soft); }
.badge.completed { color: var(--ok); background: var(--ok-soft); }
.badge.failed { color: var(--bad); background: var(--bad-soft); }
.badge.error { color: var(--bad); background: var(--bad-soft); }
.badge.notfound { color: var(--muted); background: rgba(152, 155, 164, 0.12); }
.badge.ok-text { color: var(--ok); background: var(--ok-soft); }
.badge.bad-text { color: var(--bad); background: var(--bad-soft); }
.badge.warn-text { color: var(--warn); background: var(--warn-soft); }

.spin {
  display: inline-block; width: 0.85em; height: 0.85em;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.8rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

.hidden { display: none !important; }

/* ---------- tabs (หน้าแอดมิน) ---------- */
.tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font-family: var(--sans); font-size: 0.95rem;
  padding: 0.5rem 0.9rem; cursor: pointer;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 0.4rem 0; }

/* ชนิดงาน (หลังบ้าน) */
.badge.k-cap { color: var(--info); background: var(--info-soft); }
.badge.k-lock { color: var(--warn); background: var(--warn-soft); }
.badge.k-gc { color: #8a5cf6; background: rgba(138, 92, 246, 0.13); }
.badge.k-face { color: #db2777; background: rgba(219, 39, 119, 0.12); }
.badge.k-lm { color: #0d9488; background: rgba(13, 148, 136, 0.13); }
.badge.k-cc { color: var(--muted); background: rgba(107, 114, 128, 0.13); }

/* แบนเนอร์ปิดปรับปรุง (หน้าบ้าน) */
.maint-banner {
  max-width: 46rem;
  margin: 0 auto 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(241, 102, 92, 0.45);
  border-radius: 12px;
  background: rgba(241, 102, 92, 0.12);
  color: #f1665c;
  font-weight: 700;
  font-size: 1.02rem;
  text-align: center;
  animation: maint-pulse 2.4s ease-in-out infinite;
}
@keyframes maint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
.mode-tabs button.off {
  opacity: 0.45;
  text-decoration: line-through;
}
button.big-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.6);
  opacity: 0.7;
}

/* ปุ่มเปิด-ปิดบริการ (หลังบ้าน) */
.toggle-btn.off { filter: grayscale(0.4); opacity: 0.75; border-color: rgba(241, 102, 92, 0.5); }

/* คิวสแกนหน้า (หลังบ้าน) */
.face-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }
.face-row {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem;
}
.face-row.done { opacity: 0.55; }
.face-row .fcombo {
  flex: 1; min-width: 240px; font-family: var(--mono); font-size: 0.78rem;
  background: var(--panel-2, rgba(128,128,128,0.08)); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.45rem 0.6rem; cursor: pointer;
  overflow-wrap: anywhere; max-height: 5.2em; overflow-y: auto;
}
.face-row .fname { font-weight: 600; min-width: 120px; }
.face-row .ftime { color: var(--muted); font-size: 0.78rem; }

/* บัญชีลูกค้า: แถบล็อกอิน + กระดิ่ง + modal */
.authbar { max-width: 46rem; margin: 0 auto 1rem; position: relative; text-align: right; }
.auth-loggedout, .auth-loggedin { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.bell { position: relative; background: none; border: 1px solid var(--line, rgba(128,128,128,0.3)); border-radius: 8px; padding: 0.35rem 0.55rem; cursor: pointer; font-size: 1.05rem; }
.bell-badge {
  position: absolute; top: -6px; right: -6px;
  background: #f1665c; color: #fff; font-size: 0.68rem; font-weight: 700;
  border-radius: 999px; padding: 0.05rem 0.35rem; min-width: 1.1em; text-align: center;
}
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  width: min(24rem, 92vw); max-height: 22rem; overflow-y: auto;
  background: var(--panel, #1a1d22); border: 1px solid var(--line, rgba(128,128,128,0.3));
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.35); text-align: left;
}
.bell-head { padding: 0.55rem 0.8rem; font-weight: 700; border-bottom: 1px solid var(--line, rgba(128,128,128,0.2)); }
.notif-item { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line, rgba(128,128,128,0.15)); font-size: 0.9rem; }
.notif-item.unread { background: rgba(251, 139, 40, 0.09); }
.notif-item .ntime { display: block; color: var(--muted, #8a8f98); font-size: 0.74rem; margin-top: 0.2rem; }
.notif-empty { padding: 1rem 0.8rem; color: var(--muted, #8a8f98); font-size: 0.88rem; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-card {
  position: relative; width: min(24rem, 100%);
  background: var(--panel, #1a1d22); border: 1px solid var(--line, rgba(128,128,128,0.3));
  border-radius: 12px; padding: 1.2rem;
}
.modal-x { position: absolute; top: 0.5rem; right: 0.6rem; background: none; border: none; color: inherit; font-size: 1rem; cursor: pointer; }
.auth-form { display: flex; flex-direction: column; gap: 0.7rem; }
.auth-err { color: #f1665c; font-size: 0.86rem; }
.hidden { display: none !important; }

/* กระเป๋าเงิน */
.topup-ok { color: #4cc48a; font-weight: 700; font-size: 0.92rem; }
.topup-list { max-height: 11rem; overflow-y: auto; margin-top: 0.4rem; }
.topup-row { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line, rgba(128,128,128,0.15)); font-size: 0.86rem; }
.topup-row .tamount { color: #4cc48a; font-weight: 700; white-space: nowrap; }

/* ปุ่มช่วยเหลือ + คู่มือการใช้งาน */
.help-row { max-width: 46rem; margin: 0 auto 0.6rem; text-align: right; }
.help-panel {
  max-width: 46rem; margin: 0 auto 1rem;
  border: 1px solid var(--line, rgba(128,128,128,0.25));
  border-radius: 12px; background: var(--panel, #1a1d22);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem;
}
.help-card {
  border: 1px solid var(--line, rgba(128,128,128,0.2));
  border-radius: 10px; padding: 0.8rem 1rem; background: var(--panel-2, rgba(128,128,128,0.06));
}
.help-title { font-weight: 700; margin-bottom: 0.3rem; }
.help-body { font-size: 0.92rem; line-height: 1.65; color: var(--ink-muted, #aaa); }
.help-note { margin-top: 0.7rem; font-size: 0.85rem; color: var(--muted, #8a8f98); }

/* ---------- ดึงคุ้กกี้ (getcookie) ---------- */
.gc-terminal {
  margin-top: 0.8rem;
  background: #070b07;
  border: 1px solid rgba(53, 208, 127, 0.25);
  border-radius: 12px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Courier New', monospace;
}
.gc-term-head {
  background: rgba(53, 208, 127, 0.08);
  border-bottom: 1px solid rgba(53, 208, 127, 0.2);
  text-align: center;
  padding: 0.65rem 1rem;
}
.gc-term-title {
  display: block;
  color: #35d07f;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.gc-term-sub {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}
.gc-term-body {
  height: 300px;
  overflow-y: auto;
  padding: 0.8rem 1rem;
  font-size: 0.78rem;
  line-height: 1.9;
  color: #b8c4b8;
}
.gc-term-body::-webkit-scrollbar { width: 8px; }
.gc-term-body::-webkit-scrollbar-thumb { background: rgba(53, 208, 127, 0.25); border-radius: 4px; }
.gc-line { display: flex; gap: 0.7rem; align-items: baseline; }
.gc-line .gc-t { color: rgba(255, 255, 255, 0.28); flex: none; }
.gc-line .gc-n { color: #35d07f; font-weight: 700; flex: none; min-width: 9.5em; }
.gc-line .gc-m { word-break: break-word; color: #b8c4b8; }
.gc-line.lv-sys .gc-n { color: #e8e8e8; }
.gc-line.lv-sys .gc-m { color: #e8e8e8; }
.gc-line.lv-ok .gc-m { color: #35d07f; }
.gc-line.lv-bad .gc-m { color: #ff5d5d; }
.gc-term-foot {
  display: flex;
  justify-content: space-between;
  background: rgba(53, 208, 127, 0.05);
  border-top: 1px solid rgba(53, 208, 127, 0.2);
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}
.gc-term-foot .live { color: #35d07f; }
@keyframes gcPulse { 50% { opacity: 0.3; } }
.gc-term-foot .live::before { content: '● '; animation: gcPulse 1.2s infinite; }
.gc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}
@media (max-width: 640px) {
  .gc-stats { grid-template-columns: repeat(2, 1fr); }
}
.gc-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 0.6rem;
  text-align: center;
}
.gc-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary, #7c6cff);
}
.gc-num.ok { color: #35d07f; }
.gc-num.bad { color: #ff5d5d; }
.gc-num.cost { color: #f0b429; }
.gc-label {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}
.gc-charge {
  text-align: center;
  margin: 0.4rem 0 0.8rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}
.gc-charge b {
  color: #35d07f;
  background: rgba(53, 208, 127, 0.12);
  padding: 0.2rem 0.7rem;
  border-radius: 8px;
  margin-left: 0.3rem;
}
.gc-file-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  margin-top: 0.6rem;
}
.gc-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(53, 208, 127, 0.12);
  color: #35d07f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex: none;
}
.gc-file-icon.bad {
  background: rgba(255, 93, 93, 0.12);
  color: #ff5d5d;
}
.gc-file-info { flex: 1; min-width: 0; }
