@font-face {
    font-family: "LINE Seed Sans TH";
    src: url("../fonts/LINESeedSansTH_W_Rg.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "LINE Seed Sans TH";
    src: url("../fonts/LINESeedSansTH_W_Bd.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "LINE Seed Sans TH";
    src: url("../fonts/LINESeedSansTH_W_XBd.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #151515;
    --ink-soft: #2d2d2d;
    --muted: #6e7076;
    --line: #e7e7e7;
    --bg: #f7f7f5;
    --panel: #ffffff;
    --brand: #f2c230;
    --brand-dark: #111111;
    --brand-warm: #fff4c4;
    --danger: #b42318;
    --warning: #9a6700;
    --success: #16764f;
    --shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "LINE Seed Sans TH", Arial, Tahoma, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--brand-dark);
}

.page {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-weight: 800;
    font-size: 18px;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    font-weight: 700;
}

.admin-page {
    background:
        linear-gradient(180deg, rgba(242, 194, 48, 0.1) 0, rgba(242, 194, 48, 0) 220px),
        #f7f7f5;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
}

.admin-topbar .topbar-inner {
    width: min(1280px, calc(100% - 28px));
    min-height: 74px;
    align-items: center;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 11px;
    color: var(--ink);
}

.admin-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 38px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--brand);
    font-size: 15px;
    font-weight: 800;
}

.admin-brand strong,
.admin-brand small {
    display: block;
}

.admin-brand strong {
    font-size: 18px;
    line-height: 1;
}

.admin-brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    flex-wrap: nowrap;
}

.admin-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 14px;
    white-space: nowrap;
}

.admin-nav a:hover {
    background: #f2f2ee;
}

.admin-nav a.active {
    border-color: rgba(242, 194, 48, 0.75);
    background: var(--brand);
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(242, 194, 48, 0.22);
}

.admin-nav .logout-link {
    margin-left: 4px;
    border-color: #242424;
    background: #111;
    color: #fff;
}

.admin-page .page {
    width: min(1280px, calc(100% - 32px));
    padding-top: 30px;
}

.hero,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.hero {
    display: grid;
    gap: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stack {
    display: grid;
    gap: 16px;
}

.muted {
    color: var(--muted);
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--brand-warm);
    color: var(--warning);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.status.ready {
    background: #e8f7ef;
    color: var(--success);
}

.status.warn {
    background: var(--brand-warm);
    color: var(--warning);
}

.status.danger {
    background: #fee4e2;
    color: var(--danger);
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--brand-dark);
    border-radius: 6px;
    padding: 8px 14px;
    background: var(--brand-dark);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    background: #fff;
    color: var(--brand-dark);
}

button:disabled,
input[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: 0;
    margin: 0;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(242, 194, 48, 0.28);
    border-color: var(--brand);
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.check-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid #ddddda;
    border-radius: 8px;
    background: #fafaf8;
}

.check-grid label {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-soft);
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.check-grid input[type="checkbox"] {
    appearance: none;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border: 2px solid #b8b8b2;
    border-radius: 6px;
    background: #fff;
    display: inline-grid;
    place-items: center;
}

.check-grid input[type="checkbox"]::before {
    content: "";
    width: 11px;
    height: 7px;
    border-left: 3px solid #111;
    border-bottom: 3px solid #111;
    transform: rotate(-45deg) scale(0);
    transform-origin: center;
}

.check-grid input[type="checkbox"]:checked {
    border-color: var(--brand);
    background: var(--brand);
}

.check-grid input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) scale(1);
}

.check-grid label:has(input[type="checkbox"]:checked) {
    border-color: rgba(242, 194, 48, 0.9);
    background: #fffaf0;
    box-shadow: 0 0 0 2px rgba(242, 194, 48, 0.14);
}

.wide-field {
    grid-column: 1 / -1;
}

code {
    white-space: pre-wrap;
    word-break: break-word;
}

.command-flow {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.flow-preview {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    align-items: stretch;
}

.flow-preview .flow-arrow {
    display: none;
}

.flow-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.flow-step strong,
.flow-step small {
    display: block;
}

.flow-step small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.flow-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.flow-step.ok {
    border-color: #bfe8d3;
    background: #f2fbf6;
}

.flow-step.ok .flow-icon {
    background: #16764f;
    color: #fff;
}

.flow-step.ok .flow-icon::before {
    content: "✓";
}

.flow-step.wait {
    border-color: #f0df9c;
    background: #fffaf0;
}

.flow-step.wait .flow-icon {
    background: var(--brand);
    color: #111;
}

.flow-step.wait .flow-icon::before {
    content: "…";
}

.flow-step.error {
    border-color: #f5b7b1;
    background: #fff5f4;
}

.flow-step.error .flow-icon {
    background: var(--danger);
    color: #fff;
}

.flow-step.error .flow-icon::before {
    content: "!";
}

.flow-arrow {
    color: var(--muted);
    font-weight: 800;
    text-align: center;
    line-height: 1;
}

.compact-flow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.compact-node {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.compact-node .flow-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
}

.compact-node small {
    color: var(--ink-soft);
    font-weight: 800;
    font-size: 12px;
}

.compact-node.ok {
    border-color: #bfe8d3;
    background: #f2fbf6;
}

.compact-node.ok .flow-icon {
    background: #16764f;
    color: #fff;
}

.compact-node.ok .flow-icon::before {
    content: "✓";
}

.compact-node.wait {
    border-color: #f0df9c;
    background: #fffaf0;
}

.compact-node.wait .flow-icon {
    background: var(--brand);
    color: #111;
}

.compact-node.wait .flow-icon::before {
    content: "…";
}

.compact-node.error {
    border-color: #f5b7b1;
    background: #fff5f4;
}

.compact-node.error .flow-icon {
    background: var(--danger);
    color: #fff;
}

.compact-node.error .flow-icon::before {
    content: "!";
}

.compact-arrow {
    color: #9a9a93;
    font-weight: 800;
}

.command-details {
    min-width: 320px;
}

.command-details summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.command-details summary::-webkit-details-marker {
    display: none;
}

.summary-arrow {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
}

.summary-arrow::before {
    content: "›";
    font-weight: 800;
    transition: transform 160ms ease;
}

.command-details[open] .summary-arrow::before {
    transform: rotate(90deg);
}

.command-detail-panel {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.06);
}

.detail-note {
    margin: 0 0 12px;
    color: var(--ink-soft);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.detail-stage {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafaf8;
}

.detail-stage.ok {
    border-color: #bfe8d3;
    background: #f2fbf6;
}

.detail-stage.wait {
    border-color: #f0df9c;
    background: #fffaf0;
}

.detail-stage.error {
    border-color: #f5b7b1;
    background: #fff5f4;
}

.detail-stage h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 16px;
}

.detail-stage h3 .flow-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
}

.detail-stage.ok h3 .flow-icon {
    background: var(--success);
    color: #fff;
}

.detail-stage.ok h3 .flow-icon::before {
    content: "✓";
}

.detail-stage.wait h3 .flow-icon {
    background: var(--brand);
    color: #111;
}

.detail-stage.wait h3 .flow-icon::before {
    content: "…";
}

.detail-stage.error h3 .flow-icon {
    background: var(--danger);
    color: #fff;
}

.detail-stage.error h3 .flow-icon::before {
    content: "!";
}

.detail-stage dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.detail-stage dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.detail-stage dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
}

.payload-box {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed #c9c9c3;
    border-radius: 8px;
    background: #fbfbfa;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f1ef;
    font-size: 13px;
}

.qr-box {
    min-height: 150px;
    display: grid;
    place-items: center;
    border: 2px dashed var(--line);
    border-radius: 8px;
    text-align: center;
    font-weight: 800;
    word-break: break-word;
    padding: 16px;
    background: #fbfcfd;
}

.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.metric strong {
    display: block;
    font-size: 24px;
}

.metric small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
}

.mobile-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.mini-chart {
    min-height: 210px;
    display: flex;
    align-items: end;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 4px 4px;
}

.chart-bar {
    flex: 0 0 48px;
    min-height: 160px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    justify-items: center;
    gap: 6px;
}

.chart-bar::before {
    content: "";
    width: 100%;
    height: var(--bar-height);
    min-height: 6px;
    border-radius: 6px 6px 2px 2px;
    background: var(--brand);
    box-shadow: inset 0 -10px 18px rgba(17, 17, 17, 0.08);
}

.chart-bar span,
.chart-bar b {
    font-size: 12px;
    white-space: nowrap;
}

.owner-detail {
    padding: 0;
    overflow: hidden;
}

.owner-detail summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    font-weight: 900;
}

.owner-detail summary::-webkit-details-marker {
    display: none;
}

.owner-detail summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
}

.owner-detail[open] summary::after {
    content: "-";
}

.owner-detail summary span {
    font-size: 20px;
}

.owner-detail summary b {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
}

.owner-detail > :not(summary) {
    margin-left: 18px;
    margin-right: 18px;
}

.owner-detail > :last-child {
    margin-bottom: 18px;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.insight-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    background: #fff8df;
    border: 1px solid rgba(242, 194, 48, 0.55);
}

.insight-card span {
    color: var(--ink-soft);
    font-weight: 800;
}

.hourly-chart {
    min-height: 210px;
    display: flex;
    align-items: end;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 4px 6px;
}

.hour-bar {
    flex: 0 0 42px;
    min-height: 160px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    justify-items: center;
    gap: 6px;
}

.hour-bar::before {
    content: "";
    width: 100%;
    height: var(--bar-height);
    min-height: 4px;
    border-radius: 6px 6px 2px 2px;
    background: var(--ink);
}

.hour-bar span,
.hour-bar b {
    font-size: 12px;
    white-space: nowrap;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 38px minmax(120px, 1fr) repeat(3, minmax(70px, auto));
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.rank-no {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
    font-weight: 900;
}

.rank-row strong,
.rank-row small,
.rank-metrics b,
.rank-metrics small {
    display: block;
}

.rank-row small,
.rank-metrics small {
    color: var(--muted);
    font-weight: 800;
}

.rank-metrics {
    text-align: right;
}

.rank-metrics b {
    font-size: 20px;
}

.machine-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.machine-card,
.error-row {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.machine-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.machine-card span,
.error-row span {
    color: var(--muted);
    font-weight: 800;
}

.responsive-table {
    overflow-x: auto;
}

.old-price {
    display: block;
    color: var(--muted);
    font-size: 13px;
    text-decoration: line-through;
}

.customer-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(242, 194, 48, 0.16) 0, rgba(242, 194, 48, 0) 280px),
        #f8f8f6;
}

.customer-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.customer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 32px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--brand);
    font-size: 14px;
    line-height: 1;
}

.customer-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.customer-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
    gap: 22px;
    align-items: start;
}

.branch-picker {
    display: grid;
    gap: 18px;
}

.branch-picker-head {
    padding: 26px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
}

.branch-picker-head h1 {
    margin: 8px 0 10px;
    font-size: clamp(34px, 7vw, 64px);
    line-height: 1;
}

.branch-picker-head .muted {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.74);
}

.customer-machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.customer-machine-tile {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.customer-machine-tile:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(17, 17, 17, 0.12);
}

.customer-machine-tile.is-unavailable {
    opacity: 0.72;
}

.machine-tile-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: var(--brand);
    color: var(--ink);
    font-weight: 900;
}

.machine-tile-main strong,
.machine-tile-main small {
    display: block;
}

.machine-tile-main strong {
    font-size: 30px;
    line-height: 1;
}

.machine-tile-main small {
    margin-top: 6px;
    color: var(--muted);
    font-weight: 800;
}

.customer-machine-tile .status {
    grid-column: 1 / -1;
    justify-self: start;
}

.hero-copy {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 34px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-copy::after {
    content: "";
    width: min(220px, 42vw);
    aspect-ratio: 1;
    border-radius: 999px;
    border: 28px solid var(--brand);
    align-self: flex-end;
    opacity: 0.92;
}

.eyebrow {
    margin: 0;
    color: var(--brand);
    font-weight: 800;
}

.hero-copy h1 {
    margin: 12px 0 16px;
    max-width: 11ch;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.95;
}

.machine-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.order-card,
.payment-card,
.empty-state {
    background: var(--panel);
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.order-card {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading span {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    font-size: 24px;
}

.program-list {
    display: grid;
    gap: 12px;
}

.program-option {
    display: block;
    cursor: pointer;
}

.program-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.program-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.program-content strong,
.program-content small,
.program-content b {
    display: block;
}

.program-content strong {
    font-size: 18px;
}

.program-content small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.program-content b {
    min-width: 86px;
    text-align: right;
    font-size: 22px;
}

.program-option input:checked + .program-content {
    border-color: var(--brand);
    background: #fffaf0;
    box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.18);
}

.line-field {
    color: var(--ink-soft);
}

.line-field span {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.line-field em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.pay-button {
    min-height: 54px;
    border-color: var(--brand);
    background: var(--brand);
    color: var(--ink);
    font-size: 17px;
    box-shadow: 0 10px 24px rgba(242, 194, 48, 0.26);
}

.payment-card {
    margin-top: 22px;
    padding: 24px;
}

.payment-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: center;
    margin-top: 18px;
}

.qr-frame {
    padding: 12px;
    border-radius: 8px;
    background: var(--ink);
}

.customer-page .qr-box {
    min-height: 216px;
    border-color: rgba(242, 194, 48, 0.65);
    background: #fff;
}

.payment-detail {
    display: grid;
    gap: 12px;
}

.empty-state {
    max-width: 560px;
    margin: 72px auto;
    padding: 38px;
    text-align: center;
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    margin-bottom: 14px;
    background: var(--brand);
    font-weight: 800;
}

@media (max-width: 860px) {
    .admin-topbar .topbar-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
    }

    .admin-nav {
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .customer-hero,
    .payment-layout,
    .flow-preview {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        min-height: 60px;
    }

    .customer-main {
        width: min(100% - 24px, 1120px);
        padding-top: 18px;
    }

    .customer-hero {
        gap: 14px;
    }

    .hero-copy,
    .order-card,
    .branch-picker-head,
    .payment-card {
        padding: 18px;
    }

    .customer-machine-grid {
        grid-template-columns: 1fr 1fr;
    }

    .customer-machine-tile {
        grid-template-columns: 44px 1fr;
        min-height: 112px;
        padding: 12px;
    }

    .machine-tile-icon {
        width: 44px;
        height: 44px;
    }

    .machine-tile-main strong {
        font-size: 24px;
    }

    .hero-copy h1 {
        font-size: 44px;
    }

    .hero-copy::after {
        width: 130px;
        border-width: 18px;
    }

    .program-content {
        min-height: 72px;
        padding: 14px;
    }

    .program-content b {
        min-width: 76px;
        font-size: 20px;
    }

    .owner-detail summary {
        align-items: flex-start;
    }

    .owner-detail summary b {
        display: none;
    }

    .rank-row {
        grid-template-columns: 34px 1fr;
    }

    .rank-metrics {
        grid-column: 2;
        display: flex;
        justify-content: space-between;
        text-align: left;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
