:root {
  color-scheme: light;
  font-family: Tahoma, "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  color: #17201c;
  background: #f4f7f5;
}

body { margin: 0; }
a { color: #124f36; }
header, main, nav { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: center; padding-block: 28px 16px; }
.eyebrow { margin: 0; color: #52645b; font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
h1, h2 { margin: .2rem 0; }
.view-tabs { display: flex; gap: 8px; overflow-x: auto; padding-block: 12px; }
button { min-height: 44px; border: 1px solid #b7c4bd; border-radius: 10px; padding: 0 16px; background: #fff; color: inherit; font: inherit; font-weight: 750; cursor: pointer; }
button[aria-pressed="true"], form button { border-color: #153e2d; background: #153e2d; color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #1f72d0; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .45; }
section { margin-block: 20px; padding: 20px; border: 1px solid #d8e0dc; border-radius: 16px; background: #fff; }
.workshop-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.qr-link { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.qr-link img { width: 96px; height: 96px; border-radius: 8px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.summary-card { display: grid; gap: 4px; padding: 16px; border: 1px solid; border-radius: 10px; background: #f8faf9; }
.summary-card strong { font-size: 2rem; }
.status-pass { border-color: #198754; }
.status-running { border-color: #a66b00; }
.status-waiting { border-color: #53606b; }
.status-fail { border-color: #c3313b; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid; border-radius: 999px; padding: 5px 9px; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.status-pill.status-pass { border-color: #198754; background: #e6f5ec; color: #075b34; }
.status-pill.status-running { border-color: #a66b00; background: #fff1c9; color: #694300; }
.status-pill.status-waiting, .status-pill.status-neutral { border-color: #6b7780; background: #edf0f2; color: #344049; }
.status-pill.status-fail { border-color: #c3313b; background: #fdebed; color: #8d1822; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid #e1e7e4; text-align: left; vertical-align: top; }
th { color: #52645b; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.empty-state { padding: 36px; color: #52645b; text-align: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.admin-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #d8e0dc; }
.admin-actions label { flex: 1 1 240px; }
label { display: grid; gap: 6px; font-weight: 700; }
input { min-height: 42px; box-sizing: border-box; border: 1px solid #9facA5; border-radius: 8px; padding: 8px 10px; font: inherit; }
.connection { padding: 8px 12px; border-radius: 999px; background: #fff1c9; color: #694300; font-weight: 800; }
.connection[data-tone="live"] { background: #e6f5ec; color: #075b34; }
.connection[data-tone="offline"] { background: #fdebed; color: #8d1822; }
.start-shell { width: min(760px, calc(100% - 32px)); padding-block: 32px; }
.command-card { display: grid; gap: 12px; }
.command-card code { overflow-wrap: anywhere; border-radius: 8px; padding: 14px; background: #17201c; color: #fff; line-height: 1.6; }
.command-card button { justify-self: start; }
.platform { margin: 0; color: #52645b; font-weight: 800; }

@media (max-width: 720px) {
  .summary-grid, form { grid-template-columns: 1fr; }
  header { align-items: flex-start; }
  .workshop-banner { align-items: flex-start; }
  .qr-link { flex-direction: column; align-items: flex-start; }
  section { padding: 16px; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody tr { border: 1px solid #d8e0dc; border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
  td { display: grid; grid-template-columns: 7.5rem 1fr; gap: 10px; border: 0; padding: 7px 0; }
  td::before { content: attr(data-label); color: #52645b; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  td.empty-state { display: block; }
}
