/* 商家后台 · 页面样式：外壳、登录、工作台、接单台、订单、菜单、流水、设置 */

/* ================= 外壳 ================= */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.side { background: var(--ink); color: #EADFD2; display: flex; flex-direction: column; padding: 22px 0 18px 14px; min-height: 0; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 2px 14px 26px 6px; }
.brand-mark { width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.brand-text { min-width: 0; }
.brand-text b { display: block; font-size: 17px; color: #FFF7EE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 12px; color: var(--ink-3); letter-spacing: 0.12em; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-i { position: relative; display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; border-radius: 18px 0 0 18px; color: #CFC4B8; font-size: 16px; font-weight: 600; transition: background 0.15s, color 0.15s; }
.nav-i:hover:not(.on) { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-i.on { background: var(--bg); color: var(--ink); }
.nav-i.on::before, .nav-i.on::after { content: ""; position: absolute; right: 0; width: 18px; height: 18px; pointer-events: none; }
.nav-i.on::before { top: -18px; background: radial-gradient(circle at 0 0, transparent 17.5px, var(--bg) 18px); }
.nav-i.on::after { bottom: -18px; background: radial-gradient(circle at 0 100%, transparent 17.5px, var(--bg) 18px); }
.nav-i.on .ico { color: var(--accent); }
.nav-badge { margin-left: auto; margin-right: 14px; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--accent); color: #fff; font-style: normal; font-size: 14px; display: grid; place-items: center; animation: badge-pop 0.4s ease-out; }
.side-foot { margin-top: auto; padding: 0 6px; }
.side-foot .eyebrow { color: #5E554D; }
@keyframes badge-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

.main { min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.topbar { flex: none; display: flex; align-items: center; gap: 18px; height: 76px; padding: 0 28px; }
.tb-title h1 { font-size: 24px; font-weight: 800; letter-spacing: 0.01em; margin-top: 4px; }
.tb-clock { font-size: 15px; color: var(--ink-2); padding-left: 18px; border-left: 2px solid var(--line-2); white-space: nowrap; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-alert { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px dashed var(--line-2); background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: all 0.18s; }
.tb-alert:hover { border-color: var(--brand); color: var(--brand); }
.tb-alert.on { background: var(--ok-soft); border: 1.5px solid #B8D2BE; color: var(--ok); }
.tb-alert.warn { background: var(--warn-soft); border: 1.5px solid #E8CB86; color: #8A5A0C; }
.tb-offline { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--price-soft); color: var(--price); font-weight: 600; font-size: 14px; }
.tb-shop { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.tb-shop .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.tb-shop-t { font-weight: 700; min-width: 48px; }
.tb-shop.closed .dot { background: var(--ink-3); box-shadow: 0 0 0 4px var(--bg-deep); }
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 6px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.acct-menu { position: absolute; right: 0; top: 52px; z-index: 50; min-width: 168px; padding: 6px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.acct-menu button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 0; background: transparent; border-radius: 10px; font-weight: 600; text-align: left; }
.acct-menu button:hover { background: var(--brand-soft); }

.content { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 28px 0; }
.page { min-height: 100%; padding-bottom: 40px; }
.page.p-board { height: 100%; min-height: 0; padding-bottom: 0; }
.content:has(.p-board) { padding-bottom: 20px; overflow: hidden; }

/* ================= 登录 ================= */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.login-art { position: relative; overflow: hidden; background: var(--ink); color: #FFF7EE; padding: 64px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-art::before { content: ""; position: absolute; width: 520px; height: 520px; right: -200px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(229, 103, 31, 0.32), transparent 66%); }
.login-brand h1 { font-size: 46px; font-weight: 800; letter-spacing: 0.04em; margin: 14px 0 14px; }
.login-brand p { color: #BFB3A6; font-size: 17px; max-width: 360px; line-height: 1.7; }
.login-ticket { position: relative; align-self: flex-start; width: 330px; padding: 18px 20px 14px; background: #fff; color: var(--ink); border-radius: 16px 16px 0 0; border-top: 5px solid var(--accent); transform: rotate(-3deg); filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35)); margin-bottom: 18px; }
.login-ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='9' viewBox='0 0 18 9'%3E%3Cpath d='M0 0h18L9 9z' fill='%23fff'/%3E%3C/svg%3E") repeat-x; background-size: 18px 9px; }
.lt-top { display: flex; align-items: center; justify-content: space-between; }
.lt-no { font-size: 44px; font-weight: 800; line-height: 1; }
.lt-tag { padding: 4px 10px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13px; }
.lt-hr { border-top: 2px dashed var(--line-2); margin: 14px 0; }
.lt-row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.lt-row b { color: var(--accent); font-size: 18px; }
.lt-remark { margin-top: 12px; padding: 8px 10px; background: var(--warn-soft); border-left: 4px solid var(--accent); border-radius: 8px; font-weight: 700; font-size: 14px; color: #7A3A0C; }
.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-card h2 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.login-notice { padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: #7A5410; font-weight: 600; }
.login-hint { font-size: 14px; color: var(--ink-2); line-height: 1.6; padding: 12px 14px; border-radius: 12px; background: var(--bg-deep); }
.login-card .btn-block { margin-top: 4px; }

/* ================= 工作台 ================= */
.dash { display: flex; flex-direction: column; gap: 16px; }
.kpi-row { display: grid; grid-template-columns: 1.55fr 1fr 1.15fr 1fr; gap: 16px; }
.kpi { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kpi-hero { background: var(--ink); color: #FFF7EE; position: relative; overflow: hidden; }
.kpi-hero::after { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; border: 26px solid rgba(229, 103, 31, 0.2); }
.kpi-big { font-size: 58px; line-height: 1.05; font-weight: 700; display: flex; align-items: baseline; }
.kpi-big .yen { font-size: 28px; color: var(--accent); margin-right: 4px; font-weight: 600; }
.kpi-num { font-size: 42px; line-height: 1.1; font-weight: 700; display: flex; align-items: baseline; }
.kpi-num .yen { font-size: 22px; color: var(--price); margin-right: 3px; font-weight: 600; }
.kpi-num small, .kpi-split small { font-size: 15px; color: var(--ink-2); margin-left: 5px; font-weight: 500; font-family: var(--font); }
.kpi-sub { font-size: 14px; color: var(--ink-2); margin-top: auto; }
.kpi-hero .kpi-sub { color: #CFC4B8; }
.kpi-hero .kpi-sub b { color: #FFF7EE; font-weight: 600; }
.kpi-split { display: flex; gap: 22px; font-size: 38px; line-height: 1.1; font-weight: 700; }
.kpi-split > div { display: flex; align-items: baseline; }
.split-bar { height: 8px; border-radius: 4px; background: var(--slate-soft); overflow: hidden; margin-top: auto; }
.split-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }

.queue { padding-bottom: 20px; }
.queue-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 14px 22px 0; }
.q-tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.q-tile:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: var(--shadow); }
.q-n { grid-row: span 2; font-size: 44px; font-weight: 700; line-height: 1; color: var(--c); min-width: 44px; }
.q-l { font-weight: 700; font-size: 16px; align-self: end; }
.q-h { font-size: 12.5px; color: var(--ink-2); align-self: start; }
.q-accent { --c: var(--accent); }
.q-brand { --c: var(--brand); }
.q-ok { --c: var(--ok); }
.q-slate { --c: var(--slate); }
.q-tile.hot { background: var(--accent-soft); border-color: var(--accent); animation: hot-ring 2s ease-out infinite; }
@keyframes hot-ring { 0% { box-shadow: 0 0 0 0 rgba(229, 103, 31, 0.4); } 70%, 100% { box-shadow: 0 0 0 12px rgba(229, 103, 31, 0); } }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; }
.chart-card, .top-card { padding-bottom: 18px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #D3BFA9; }
.lg-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--accent); }
.chart-card { display: flex; flex-direction: column; }
.chart-wrap { position: relative; padding: 8px 14px 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .grid line.base { stroke: var(--line-2); }
.chart .ax { font: 12px var(--num); fill: var(--ink-3); }
.chart .ax-o { fill: var(--accent); }
.chart .ax-x { font-size: 12.5px; }
.chart .ax-x.today { fill: var(--ink); font-weight: 700; }
.chart .bar { fill: #D3BFA9; transition: fill 0.15s; }
.chart .bar.today { fill: var(--brand); }
.chart .hov { fill: rgba(138, 106, 79, 0.1); rx: 8; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot-o { fill: #fff; stroke: var(--accent); stroke-width: 2.5; transition: r 0.12s; }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: var(--ink); color: #FFF7EE; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 4px; z-index: 5; margin-left: 0; }
.chart-tip b { font-size: 14px; }
.chart-tip .lg-bar, .chart-tip .lg-line { margin-right: 6px; vertical-align: middle; }
.chart-empty { position: absolute; left: 0; right: 0; top: 42%; text-align: center; color: var(--ink-3); font-weight: 500; pointer-events: none; }

.top-list { list-style: none; margin: 0; padding: 12px 22px 0; display: flex; flex-direction: column; gap: 16px; }
.top-list li { display: flex; gap: 14px; }
.top-rank { width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--bg-deep); color: var(--ink-2); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.top-list li:nth-child(1) .top-rank { background: var(--accent); color: #fff; }
.top-list li:nth-child(2) .top-rank, .top-list li:nth-child(3) .top-rank { background: var(--brand-soft); color: var(--brand); }
.top-main { flex: 1; min-width: 0; }
.top-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.top-name { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-q { color: var(--ink); font-weight: 700; }
.top-bar { height: 6px; border-radius: 3px; background: var(--bg); margin: 6px 0 4px; overflow: hidden; }
.top-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.top-amt { font-size: 12.5px; color: var(--ink-3); }

/* ================= 接单台 ================= */
.board-page { height: 100%; display: flex; flex-direction: column; }
.board-bar { flex: none; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 2px 0 12px; }
.bb-left { display: flex; align-items: center; gap: 12px; }
.bb-tip { font-size: 13.5px; color: var(--ink-2); }
.btn.spin .ico { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bb-alert { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--warn-soft); color: #7A5410; font-weight: 600; font-size: 14px; }
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.col { --c: var(--accent); display: flex; flex-direction: column; min-height: 0; background: var(--bg-deep); border-radius: 22px; padding: 14px 10px 0; }
.col.c-brand { --c: var(--brand); }
.col.c-ok { --c: var(--ok); }
.col-h { display: flex; align-items: center; gap: 10px; padding: 0 10px 12px; flex: none; }
.col-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.col-h h3 { font-size: 18px; font-weight: 800; white-space: nowrap; }
.col-n { min-width: 30px; height: 28px; padding: 0 9px; border-radius: 14px; background: var(--c); color: #fff; font-size: 16px; display: grid; place-items: center; }
.col-hint { margin-left: auto; font-size: 12.5px; color: var(--ink-2); text-align: right; line-height: 1.3; }
.col.pulse .col-h { animation: col-pulse 0.8s ease-out 3; }
@keyframes col-pulse { 0%, 100% { transform: none; } 40% { transform: translateX(4px); } 70% { transform: translateX(-3px); } }
.col-list { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 6px 6px 24px; display: flex; flex-direction: column; gap: 22px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.col-empty { margin: 4px 14px 24px; padding: 28px 16px; border: 2px dashed var(--line-2); border-radius: 16px; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.col-more { flex: none; margin: 0 10px 12px; padding: 10px; text-align: center; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; }
.board-move { transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* 小票：顶部彩条 + 锯齿底边 + 虚线撕口 */
.ticket { --c: var(--accent); position: relative; background: #fff; border-radius: 18px 18px 0 0; border-top: 6px solid var(--c); padding: 14px 16px 16px; filter: drop-shadow(0 3px 8px rgba(74, 52, 34, 0.12)); flex: none; }
.col.c-brand .ticket { --c: var(--brand); }
.col.c-ok .ticket { --c: var(--ok); }
.ticket.w-hot { border-top-color: var(--price); }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='9' viewBox='0 0 18 9'%3E%3Cpath d='M0 0h18L9 9z' fill='%23fff'/%3E%3C/svg%3E") repeat-x; background-size: 18px 9px; }
.ticket.fresh::before { content: ""; position: absolute; inset: -5px; border: 2.5px solid var(--accent); border-radius: 22px 22px 4px 4px; pointer-events: none; animation: ticket-ring 1.4s ease-out 4; }
@keyframes ticket-ring { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }
.tk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.tk-no { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: 0.01em; flex: none; }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
.tk-ago { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tk-ago small { font-size: 13px; color: var(--ink-3); margin-left: 3px; }
.tk-ago.warm { color: #C2560F; font-weight: 700; }
.tk-ago.hot { color: var(--price); font-weight: 800; }
.tk-perf { position: relative; margin: 12px -16px 14px; border-top: 2px dashed var(--line-2); }
.tk-perf::before, .tk-perf::after { content: ""; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-deep); }
.tk-perf::before { left: -8px; }
.tk-perf::after { right: -8px; }
.tk-addr { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--slate-soft); color: #33485C; font-size: 14.5px; font-weight: 500; line-height: 1.45; }
.tk-addr > div { display: flex; gap: 8px; align-items: flex-start; }
.tk-addr .ico { margin-top: 2px; color: var(--slate); }
.tk-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ti-main { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ti-name { font-size: 18px; font-weight: 700; line-height: 1.35; }
.ti-x { font-size: 22px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.ti-spec { font-size: 14px; color: var(--ink-2); margin-top: 1px; }
.tk-remark { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); border-left: 5px solid var(--accent); color: #7A3A0C; font-weight: 800; font-size: 16.5px; line-height: 1.4; }
.tk-remark .ico { margin-top: 2px; flex: none; }
.tk-ware { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.tk-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tk-amt b { font-size: 26px; color: var(--price); font-weight: 700; }
.tk-foot small { color: var(--ink-3); font-size: 13.5px; }
.tk-go { flex: none; height: 50px; min-width: 96px; padding: 0 22px; font-size: 19px; letter-spacing: 0.14em; text-indent: 0.14em; box-shadow: 0 4px 12px rgba(31, 26, 23, 0.16); }
.tk-tools { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 10px; }
.mini { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; padding: 0 10px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.mini:hover { background: var(--brand-soft); color: var(--brand); }
.mini-danger:hover { background: var(--price-soft); color: var(--price); }

/* ================= 全部订单 ================= */
.orders-page { display: flex; flex-direction: column; gap: 16px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 16px 20px; }
.fl-status { width: 150px; }
.fl-mode { width: 150px; }
.fl-date { }
.date-row { display: flex; align-items: center; gap: 8px; }
.date-row .input { width: 150px; }
.fl-kw { flex: 1; min-width: 220px; }
.fl-reset { align-self: flex-end; }
.table-card { overflow: hidden; }
.pk { font-size: 22px; font-weight: 800; }
.ord-brief { font-weight: 600; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-go { display: inline-flex; align-items: center; gap: 2px; color: var(--brand); font-weight: 600; }

/* 订单详情抽屉 */
.od-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 4px 4px 8px; }
.od-no { font-size: 60px; line-height: 1; font-weight: 800; margin-top: 6px; }
.od-head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.od-where { font-weight: 700; color: var(--brand); }
.od-orderno { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 2px 4px 14px; color: var(--ink-3); font-size: 13px; }
.od-orderno:hover { color: var(--brand); }
.od-card { background: var(--surface); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.od-card h4 { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-bottom: 12px; letter-spacing: 0.04em; }
.od-kv { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; font-weight: 500; }
.od-kv .ico { margin-top: 3px; color: var(--ink-3); }
.remark-hl { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); border-left: 5px solid var(--accent); color: #7A3A0C; font-weight: 800; font-size: 16.5px; }
.od-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.od-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--bg-deep); flex: none; }
.od-item-main { flex: 1; min-width: 0; }
.od-item-name { font-weight: 700; }
.od-item-spec { font-size: 13px; color: var(--ink-2); }
.od-item-q { font-weight: 700; color: var(--accent); font-size: 17px; }
.od-item-a { min-width: 64px; text-align: right; font-weight: 600; }
.od-sum { padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.od-sum > div { display: flex; justify-content: space-between; color: var(--ink-2); }
.od-sum .od-total { color: var(--ink); font-weight: 800; font-size: 19px; margin-top: 4px; }
.od-sum .od-total .num { color: var(--price); }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl li { position: relative; padding: 0 0 18px 24px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: 0; width: 2px; background: var(--line-2); }
.tl li.last::before { display: none; }
.tl li.last { padding-bottom: 0; }
.tl li i { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 3px var(--surface); }
.tl li.last i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-t { font-weight: 600; }
.tl-at { font-size: 13px; color: var(--ink-3); }

/* 退款弹窗 */
.rf-order { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; background: var(--surface-2); }
.rf-no { font-size: 34px; font-weight: 800; line-height: 1; }
.rf-meta { flex: 1; font-weight: 500; font-size: 14px; }
.rf-amt { font-size: 24px; font-weight: 700; color: var(--price); }
.rf-confirm { text-align: center; padding: 18px 0 8px; }
.rf-big { font-size: 56px; font-weight: 800; color: var(--price); line-height: 1.1; margin: 6px 0; }
.rf-reason { color: var(--ink-2); font-weight: 500; word-break: break-all; }
.rf-warn { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--price-soft); color: var(--price); font-weight: 600; }
.rf-note { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: #7A5410; font-size: 14px; }

/* ================= 菜单管理 ================= */
.menu-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.menu-tools { display: flex; align-items: center; gap: 12px; }
.menu-tools .search-box { width: 240px; }
.menu-body { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 16px; align-items: start; }
.cat-panel { position: sticky; top: 0; padding-bottom: 14px; }
.cat-panel .card-h { padding-bottom: 8px; }
.cat-i { display: flex; align-items: center; gap: 8px; min-height: 46px; margin: 3px 10px; padding: 0 8px 0 14px; border-radius: 12px; border: 0; background: transparent; width: calc(100% - 20px); text-align: left; cursor: pointer; transition: background 0.15s; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.cat-i:hover { background: var(--surface-2); }
.cat-i.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.cat-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-i em { font-style: normal; font-size: 13.5px; color: var(--ink-3); min-width: 24px; text-align: right; }
.cat-i.on em { color: var(--brand); }
.cat-tools { display: none; }
.cat-i:hover .cat-tools, .cat-i:focus-within .cat-tools { display: flex; }
.cat-i:hover em, .cat-i:focus-within em { display: none; }
.cat-i.all { width: calc(100% - 20px); }
.cat-edit { display: flex; align-items: center; gap: 4px; width: 100%; padding: 4px 0; }
.cat-edit .input { height: 36px; }
.cat-none { margin: 8px 20px; font-size: 13.5px; color: var(--ink-3); }
.cat-add { display: flex; gap: 8px; padding: 12px 14px 0; border-top: 1px dashed var(--line-2); margin-top: 10px; }
.cat-add .input { height: 38px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform 0.18s, box-shadow 0.18s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(74, 52, 34, 0.14); }
.pc-img { position: relative; aspect-ratio: 4 / 3; background: var(--bg-deep); display: grid; place-items: center; color: var(--ink-3); overflow: hidden; }
.pc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard.off .pc-img img { filter: grayscale(0.9); opacity: 0.6; }
.pcard.sold .pc-img img { filter: grayscale(0.5); }
.badge { position: absolute; display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.b-off { left: 10px; top: 10px; background: rgba(31, 26, 23, 0.82); color: #fff; }
.b-sold { left: 10px; top: 10px; background: var(--price); color: #fff; }
.b-rec { right: 10px; top: 10px; background: var(--accent); color: #fff; }
.pc-body { padding: 14px 16px 6px; flex: 1; }
.pc-body h4 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.pc-cat { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.pc-price { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.pc-price b { font-size: 22px; color: var(--price); }
.pc-price s { color: var(--ink-3); font-size: 14px; }
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pc-tags span { height: 22px; padding: 0 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; }
.pc-sales { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.pc-sales b { color: var(--ink); }
.pc-ctl { display: flex; align-items: center; gap: 8px; padding: 12px 12px 14px; border-top: 1px solid var(--line); margin-top: 10px; flex-wrap: wrap; }
.pc-ctl label { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pc-ctl .sw { width: 38px; height: 22px; }
.pc-ctl .sw i { width: 16px; height: 16px; top: 3px; left: 3px; }
.pc-ctl .sw.on i { transform: translateX(16px); }
.rec-btn { margin-left: auto; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-3); font-weight: 600; font-size: 13.5px; transition: all 0.15s; }
.rec-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.rec-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 商品编辑抽屉 */
.pe { display: flex; flex-direction: column; gap: 18px; }
.pe-sec { display: flex; gap: 18px; align-items: flex-start; }
.pe-sec.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pe-img { flex: none; width: 150px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pe-img-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.pe-main { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.upload { position: relative; width: 150px; height: 150px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--surface); overflow: hidden; display: grid; place-items: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.upload:hover, .upload.over { border-color: var(--brand); background: var(--brand-soft); }
.upload.has { border-style: solid; border-color: var(--line); }
.upload img { width: 100%; height: 100%; object-fit: cover; }
.upload-tip { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-3); text-align: center; padding: 8px; font-size: 13.5px; }
.upload-tip small { font-size: 12px; }
.upload-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, 0.82); font-weight: 700; color: var(--brand); }
.tag-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 8px; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); }
.tag-edit:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(138, 106, 79, 0.15); }
.tag-edit input { flex: 1; min-width: 120px; height: 30px; border: 0; outline: none; background: transparent; padding: 0 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 14px; }
.tag-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--brand); }
.tag-chip button:hover { background: rgba(138, 106, 79, 0.2); }
.spec-ed { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.spec-h { display: flex; justify-content: space-between; }
.spec-g { border-radius: 14px; background: var(--surface-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.spec-g-h { display: flex; align-items: center; gap: 8px; }
.spec-g-h .input { font-weight: 700; }
.mv { display: flex; flex: none; }
.spec-o { display: flex; align-items: center; gap: 8px; }
.spec-def { flex: none; width: 36px; font-size: 12px; font-weight: 700; color: var(--ok); text-align: center; }
.spec-def.none { visibility: hidden; }
.spec-o > .input { flex: 1; min-width: 0; height: 38px; }
.plus { display: flex; align-items: center; gap: 4px; flex: none; font-size: 13px; color: var(--ink-2); }
.plus .input { width: 76px; height: 38px; padding: 0 8px; text-align: right; }
.spec-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spec-quick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.pe-switches { display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); overflow: hidden; }
.pe-switches label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pe-switches label:last-child { border-bottom: 0; }
.pe-switches b { display: block; font-size: 15px; }
.pe-switches small { color: var(--ink-3); font-size: 13px; }
.pe-foot-err { flex-basis: 100%; color: var(--price); font-size: 14px; font-weight: 600; text-align: left; }
.drawer-f { flex-wrap: wrap; }

/* ================= 收款流水 ================= */
.bills-page { display: flex; flex-direction: column; gap: 16px; }
.bills-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 14px 20px; }
.date-pair { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.date-pair .input { width: 144px; }
.bills-bar .select { width: 150px; }
.date-pair.off { opacity: 0.55; }
.sum-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 16px; }
/* 查询失败或日期不合法时，汇总数字是上一次的旧结果，变灰提醒不要当真 */
.sum-row.stale { opacity: 0.38; transition: opacity 0.2s; }
.sum { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; }
.sum-hero { background: var(--ink); color: #FFF7EE; }
.sum-big { font-size: 46px; font-weight: 700; line-height: 1.1; display: flex; align-items: baseline; }
.sum-big .yen { font-size: 24px; color: var(--accent); margin-right: 3px; }
.sum-num { font-size: 34px; font-weight: 700; line-height: 1.1; display: flex; align-items: baseline; }
.sum-num .yen { font-size: 18px; margin-right: 2px; color: var(--ink-2); }
.sum-num.neg .yen { color: var(--price); }
.sum-num small { font-size: 15px; color: var(--ink-2); margin-left: 4px; font-family: var(--font); font-weight: 500; }
.sum-sub { font-size: 14px; color: var(--ink-2); }
.sum-hero .sum-sub { color: #CFC4B8; }

/* ================= 门店设置 ================= */
.settings-page { padding-bottom: 8px; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.set-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-card { padding-bottom: 20px; }
.set-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 22px 0; }
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-box { position: relative; width: 76px; height: 76px; border-radius: 20px; border: 2px dashed var(--line-2); background: var(--surface-2); color: var(--ink-3); display: grid; place-items: center; overflow: hidden; padding: 0; }
.logo-box.has { border-style: solid; border-color: var(--line); }
.logo-box:hover { border-color: var(--brand); }
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.logo-tip { display: flex; flex-direction: column; align-items: flex-start; }
.logo-tip small { color: var(--ink-3); font-size: 13px; }
.time-row { display: flex; align-items: center; gap: 10px; }
.time-row .input { width: 140px; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.sw-row b { display: block; font-size: 15px; }
.sw-row small { color: var(--ink-3); font-size: 13px; line-height: 1.45; display: block; }
.table-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 190px; overflow-y: auto; padding: 2px; }
.tbl-chip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px 0 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 15px; }
.tbl-chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--brand); }
.tbl-chip button:hover { background: rgba(138, 106, 79, 0.22); }
.table-gen { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.table-gen .input { width: 64px; height: 38px; text-align: center; padding: 0 6px; }
.bn { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.bn-img { position: relative; flex: none; width: 128px; height: 72px; border-radius: 10px; border: 2px dashed var(--line-2); background: var(--surface); color: var(--ink-3); overflow: hidden; display: grid; place-items: center; padding: 0; font-size: 13px; }
.bn-img.has { border-style: solid; border-color: var(--line); }
.bn-img:hover { border-color: var(--brand); }
.bn-img img { width: 100%; height: 100%; object-fit: cover; }
.bn-img span:not(.upload-busy) { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bn-form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bn-form .input { height: 36px; }
.bn-mv { display: flex; flex-direction: column; }
.pay-now { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pay-desc { color: var(--ink-2); flex: 1; min-width: 200px; }
.pay-how { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); line-height: 1.8; }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px 12px 22px; border-radius: 18px; background: var(--surface); box-shadow: 0 -2px 24px rgba(74, 52, 34, 0.16); }
.savebar.dirty { box-shadow: 0 -2px 24px rgba(229, 103, 31, 0.28); outline: 2px solid var(--accent); }
.sb-msg { margin-right: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.sb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: dot-blink 1.4s ease-in-out infinite; }
.sb-err { color: var(--price); }
@keyframes dot-blink { 50% { opacity: 0.35; } }

/* ================= 1024 宽度：侧栏收成图标条，内容更紧凑 ================= */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 78px minmax(0, 1fr); }
  .side { padding-left: 10px; }
  .side-brand { padding: 2px 4px 22px 4px; justify-content: center; }
  .brand-text, .nav-l, .side-foot { display: none; }
  .nav-i { justify-content: center; padding: 0; }
  .nav-i.on::before, .nav-i.on::after { width: 18px; }
  .nav-badge { position: absolute; top: 3px; right: 6px; margin: 0; min-width: 22px; height: 20px; font-size: 12px; padding: 0 5px; }
  .topbar { padding: 0 20px; gap: 12px; }
  .content { padding: 4px 20px 0; }
  .tb-clock { display: none; }
  .tb-alert span { display: none; }
  .tb-alert { padding: 0 12px; }
  .acct-n { display: none; }
  .kpi-big { font-size: 46px; }
  .kpi-num { font-size: 36px; }
  .kpi-split { font-size: 32px; gap: 14px; }
  .dash-grid { grid-template-columns: 1fr; }
  .queue-grid { grid-template-columns: repeat(2, 1fr); }
  .col-hint { display: none; }
  .tk-no { font-size: 40px; }
  .menu-body { grid-template-columns: 220px minmax(0, 1fr); }
  .set-grid { grid-template-columns: 1fr; }
  .sum-row { grid-template-columns: 1fr 1fr; }
  .login { grid-template-columns: minmax(340px, 40%) 1fr; }
  .login-art { padding: 48px 36px; }
  .login-brand h1 { font-size: 38px; }
  .login-ticket { width: 290px; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 1180px) and (min-width: 1000px) {
  /* 1024 宽：设置页仍然保持两列，更省滚动 */
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .dash-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .queue-grid { grid-template-columns: repeat(4, 1fr); }
  .q-tile { padding: 12px 12px; column-gap: 10px; }
  .q-n { font-size: 36px; min-width: 36px; }
  .q-h { display: none; }
  .q-l { grid-row: span 2; align-self: center; }
  .sum-row { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .sum-big { font-size: 38px; }
  .sum-num { font-size: 28px; }
}
