@font-face {
    font-family: "SlipThai";
    src: url("fonts/THSarabunNew.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "SlipThai";
    src: url("fonts/THSarabunNew-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "SlipThai", "TH Sarabun New", sans-serif;
    font-size: 22px;
    color: #1c1917;
    background: #f6f3ee;
}
a { color: #1f4d3a; }
.top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 10px 24px;
    background: #1f3a2e;
    color: #fff;
}
.top a { color: #fff; text-decoration: none; margin-right: 14px; }
.brand { font-size: 26px; }
.who { opacity: 0.85; margin-right: 14px; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.card {
    background: #fff;
    border: 1px solid #e7e0d6;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
h1 { font-size: 34px; margin: 0 0 8px; font-weight: 400; }
h2 { font-size: 28px; margin: 18px 0 8px; font-weight: 400; }
label { display: block; margin: 10px 0; }
input, select, button {
    font: inherit;
    font-size: 22px;
}
input, select {
    border: 1px solid #cabbab;
    border-radius: 6px;
    padding: 4px 8px;
    width: 100%;
    max-width: 420px;
}
button, .btn {
    display: inline-block;
    background: #1f3a2e;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 4px 14px;
    text-decoration: none;
    cursor: pointer;
}
.btn.secondary, button.secondary { background: #5c534c; }
.danger, button.danger { background: #8f2d2d; }
.tiny { font-size: 20px; padding: 1px 8px; }
.flash { padding: 8px 12px; border-radius: 6px; }
.flash.ok { background: #e7f5ec; }
.flash.err { background: #fde8e8; }
.muted { color: #6b625b; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eee4d8; vertical-align: top; }
th { color: #5c534c; font-weight: 400; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form, form.inline { display: inline; }
.search, .inline-form, .period-row, .stack { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.login-card { max-width: 460px; margin: 40px auto; text-align: center; }
.login-card .forgot { display: inline-block; margin-top: 14px; }
.login-logo { width: 96px; height: auto; }
.line {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    max-width: 640px;
    align-items: center;
}
.line input { max-width: none; text-align: right; }
.live { font-size: 26px; }
.live.net { font-size: 30px; }
.bad { color: #8f2d2d; }
.custom-row {
    display: grid;
    grid-template-columns: 140px 1fr 160px auto;
    gap: 8px;
    margin-bottom: 8px;
    max-width: 760px;
}
.custom-row input, .custom-row select { max-width: none; }
.reset input { width: 140px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input, .file input { width: auto; max-width: none; }
.table-wrap { overflow-x: auto; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.tag-ok { color: #1f4d3a; }
.tag-skip { color: #8a5a12; }
.tag-err { color: #8f2d2d; }
@media (max-width: 700px) {
    .line, .custom-row { grid-template-columns: 1fr; }
    .top { flex-direction: column; align-items: flex-start; }
}
