@font-face { font-family: 'Outfit'; src: url('/fonts/Outfit-VariableFont_wght.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Noto Sans Thai'; src: url('/fonts/NotoSansThai-VariableFont_wdth_wght.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
:root {
  --or: #ff582d; --or2: #fe6d00; --gold: #ffab24; --ch: #2d2b2b; --wh: #f7f7f7;
  --grad: linear-gradient(135deg, #ff582d 0%, #fe6d00 50%, #ffab24 100%);
  --fg: #2d2b2b; --fg2: rgba(45,43,43,.72); --fg3: rgba(45,43,43,.52);
  --bg: #f7f7f7; --card: #fff; --inset: #efeeec; --line: rgba(45,43,43,.10); --line2: rgba(45,43,43,.18);
  --ok: #1f9d55; --ok-bg: #e7f6ee; --warn: #b26a00; --warn-bg: #fff4e0; --bad: #d23a1f; --bad-bg: #fdecea;
  --r: 14px; --shadow: 0 1px 2px rgba(45,43,43,.05), 0 6px 24px rgba(45,43,43,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Outfit', 'Noto Sans Thai', system-ui, sans-serif; font-weight: 300; color: var(--fg); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 500; margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 4vw, 38px); } h2 { font-size: 22px; } h3 { font-size: 17px; }
b, strong { font-weight: 500; }
a { color: var(--or2); }
p { margin: 0 0 .8em; }
.muted { color: var(--fg2); } .small { font-size: 13px; } .tiny { font-size: 12px; color: var(--fg3); }

.top { background: var(--ch); color: #fff; position: relative; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.top img { height: 26px; display: block; }
.top .tag { margin-left: auto; font-size: 13px; color: rgba(255,255,255,.7); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.narrow { max-width: 760px; }

.hero { background: var(--grad); color: #fff; border-radius: 22px; padding: 34px 32px; margin-bottom: 22px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero p { color: rgba(255,255,255,.92); max-width: 620px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.grid { display: grid; gap: 14px; }
.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)); }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .hero { padding: 26px 20px; } }

label { display: block; font-size: 14px; font-weight: 400; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; font-weight: 300; color: var(--fg); background: #fff; border: 1px solid var(--line2); border-radius: 10px; padding: 11px 13px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--or2); box-shadow: 0 0 0 3px rgba(254,109,0,.14); }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 500; font-size: 15px; border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .15s, opacity .15s; background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(254,109,0,.28); }
.btn:hover { transform: translateY(-1px); } .btn:active { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: #fff; color: var(--fg); border: 1px solid var(--line2); box-shadow: none; }
.btn.dark { background: var(--ch); box-shadow: none; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid rgba(210,58,31,.35); box-shadow: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; padding: 3px 10px; border-radius: 999px; background: var(--inset); color: var(--fg2); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.or { background: #fff0e8; color: var(--or); }

.alert { border-radius: 12px; padding: 14px 16px; margin: 12px 0; font-size: 14px; border: 1px solid; display: flex; gap: 12px; align-items: flex-start; }
.alert .ic { font-size: 18px; line-height: 1.2; }
.alert.warn { background: var(--warn-bg); border-color: rgba(178,106,0,.25); color: #6b4300; }
.alert.bad { background: var(--bad-bg); border-color: rgba(210,58,31,.25); color: #8a2210; }
.alert.ok { background: var(--ok-bg); border-color: rgba(31,157,85,.25); color: #135c33; }
.alert.info { background: #fff; border-color: var(--line2); color: var(--fg2); }

.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 16px; }
.step .n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 500; }
.step.done .n { background: var(--ok); }

.seg { display: inline-flex; background: var(--inset); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { font: inherit; font-size: 14px; border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--fg2); }
.seg button.on { background: #fff; color: var(--fg); font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 400; color: var(--fg3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: #fffaf6; }
.tablewrap { overflow-x: auto; }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .v { font-size: 28px; font-weight: 500; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--fg2); }

.bar { height: 8px; border-radius: 99px; background: var(--inset); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ch); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; z-index: 99; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.hide { display: none !important; }
code, .mono { font-family: ui-monospace, Menlo, monospace; font-size: .92em; }
.code-big { font-family: ui-monospace, Menlo, monospace; font-size: 30px; letter-spacing: .18em; font-weight: 500; background: var(--inset); padding: 8px 18px; border-radius: 12px; display: inline-block; }
