/* หน้าผู้ให้บริการ — ใช้ตัวแปรสีและคลาสพื้นฐานจาก /css/app.css */
.adm { max-width: 1240px; margin: 0 auto; padding: 20px 24px 60px; }
.adm-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.adm-top h1 { font-size: 22px; margin: 0; }
.adm-top .spacer { flex: 1; }
.adm-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.adm-tabs button { height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; }
.adm-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.adm-login { max-width: 380px; margin: 12vh auto; }
.adm-filters { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.adm-filters input { max-width: 280px; }
.adm table td.mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.adm .over { color: var(--danger); font-weight: 600; }
.adm .soon { color: var(--warning); font-weight: 600; }
.adm .kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; margin: 8px 0 14px; }
.adm .kv div:nth-child(odd) { color: var(--muted, #5b6b67); }
.adm .result { background: var(--primary-soft); border-radius: 12px; padding: 14px 16px; margin: 8px 0; white-space: pre-line; line-height: 1.7; }
.adm .result b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; }
.adm .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .adm .grid2 { grid-template-columns: 1fr; } .adm .kv { grid-template-columns: 1fr; } }
.adm-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 30, 28, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.adm-modal { background: var(--surface); border-radius: 16px; width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.adm-modal h3 { margin: 0 0 12px; }
.adm .actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.adm .small-table td, .adm .small-table th { padding: 6px 10px; font-size: 14px; }
.adm-filters select { max-width: 200px; }

/* ภาพรวม */
.dash { display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font: inherit; color: inherit; }
.tile span { color: var(--muted, #5b6b67); font-size: 14px; }
.tile b { font-size: 28px; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted, #5b6b67); }
.tile.action { cursor: pointer; }
.tile.hot { border-color: var(--warning); }
.tile.hot b { color: var(--warning); }
.chart-card h3 { margin: 0 0 10px; font-size: 16px; }
.bars { --h: 180px; }
.bars-plot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; height: var(--h); align-items: end; border-bottom: 1px solid var(--border); }
.bar-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.bar { width: min(70%, 34px); background: var(--primary); border-radius: 4px 4px 0 0; }
.bar-col:hover .bar { filter: brightness(1.12); }
.bar-tip { position: absolute; bottom: calc(100% - 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 2; pointer-events: none; }
.bars-axis { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; font-size: 12px; color: var(--muted, #5b6b67); text-align: center; margin-top: 4px; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; }
.seg button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.adm .slip { max-width: 100%; max-height: 70vh; border-radius: 10px; border: 1px solid var(--border); }
.record-pay { background: var(--surface-2, #f6f8f7); border-radius: 12px; padding: 4px 14px; margin-bottom: 8px; }
.row-inline { display: flex; gap: 6px; align-items: center; }
.row-inline input { max-width: 80px; }
.settings-adm { display: grid; gap: 16px; }
.settings-adm fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.adm table td input, .adm table td select { min-width: 0; height: 32px; }
.adm-top { flex-wrap: wrap; }
.adm-top h1 { white-space: nowrap; }
.adm-tabs { flex-wrap: wrap; }
.adm-tabs button { white-space: nowrap; }
.adm-filters { flex-wrap: wrap; }
@media (max-width: 640px) { .adm { padding: 12px 12px 40px; } .adm-top .spacer { display: none; } }
.bar-tip.l { left: 0; transform: none; }
.bar-tip.r { left: auto; right: 0; transform: none; }
.adm-brand { display: flex; align-items: center; gap: 10px; }
.adm-brand img { width: 32px; height: 32px; flex: none; }

/* ยืนยันตัวตน 2 ชั้น */
.btn.warn { border-color: #f59e0b; color: #b45309; }
.codes { white-space: pre; background: #f6f8f7; border: 1px dashed #cbd5d1; border-radius: 10px; padding: 12px 16px; font-size: 17px; line-height: 1.7; columns: 2; margin: 10px 0; }
.qr-box { display: grid; place-items: center; padding: 8px; }
.qr-box canvas { width: 220px; height: 220px; image-rendering: pixelated; }
.steps { padding-left: 20px; margin: 8px 0; }
