.login-username {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

html { overflow-x: hidden; }
.admin-body { --admin-sidebar: 224px; background: #f7f7f5; color: #252824; overflow-x: hidden; }
.admin-body button, .admin-body input, .admin-body select, .admin-body textarea { font-family: var(--sans); }
.admin-body .primary-button, .admin-body .secondary-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.admin-body .primary-button svg, .admin-body .secondary-button svg { width: 17px; height: 17px; }
.login-view { min-height: 100dvh; display: grid; place-items: center; padding: 28px; background: #f5f5f2; }
.login-card { width: min(100%, 460px); padding: 42px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(31,38,32,.08); }
.login-card > img { display: block; margin-bottom: 25px; border-radius: 12px; }
.login-card h1 { margin: 8px 0 14px; font-size: 33px; line-height: 1.35; letter-spacing: -.02em; }
.login-card > p:not(.section-kicker) { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.login-card form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 650; }
.pin-row { display: flex; gap: 9px; }
.pin-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 0 13px; }
#loginError { display: block; min-height: 28px; padding-top: 8px; color: var(--coral); font-size: 11px; }
.login-card > a { color: var(--muted); font-size: 12px; }
.admin-view { min-height: 100dvh; display: grid; grid-template-columns: var(--admin-sidebar) minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100dvh; padding: 25px 16px 18px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); z-index: 20; }
.admin-brand { padding: 0 8px 25px; border-bottom: 1px solid var(--line); }
.admin-brand strong { font-size: 17px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 5px; margin-top: 22px; }
.admin-sidebar nav button { position: relative; width: 100%; min-height: 45px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; background: transparent; color: #5f665f; text-align: left; font-size: 13px; font-weight: 600; }
.admin-sidebar nav button svg { width: 18px; height: 18px; }
.admin-sidebar nav button:hover { background: #f5f6f3; color: var(--ink); }
.admin-sidebar nav button.active { background: var(--coral-soft); color: var(--coral); }
.admin-sidebar nav button b { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; background: var(--coral); color: white; font-size: 10px; }
.sidebar-bottom { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 12px; }
.sidebar-bottom a { color: var(--green); }
.sidebar-bottom button { padding: 0; border: 0; background: none; color: var(--muted); text-align: left; }
.admin-main { width: 100%; max-width: 1560px; min-width: 0; margin: 0 auto; padding: 32px clamp(22px, 3.2vw, 48px) 60px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-header h1 { font-size: 30px; letter-spacing: -.02em; }
.admin-header #pageDescription { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.admin-header-actions { display: flex; align-items: center; gap: 16px; }
.admin-header-actions .secondary-button { padding: 0 17px; }
.voice-toggle { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid #bfd4c5; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; }
.voice-toggle svg { width: 16px; height: 16px; }
.voice-toggle.off { border-color: var(--line); background: #f0f0ec; color: var(--muted); }
.sync-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: #4c9a70; }
.admin-tab { animation: admin-tab-in .18s ease-out; }
@keyframes admin-tab-in { from { opacity: .4; } to { opacity: 1; } }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 23px; }
.stat-card { min-height: 114px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.stat-card small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.stat-card strong { font-size: 29px; letter-spacing: -.03em; }
.stat-card strong .currency { margin-right: 2px; font-size: 15px; font-weight: 650; }
.stat-card span { color: var(--muted); font-size: 10px; margin-left: 4px; }
.stat-card.coral { border-top: 3px solid var(--coral); padding-top: 18px; }
.stat-card.coral strong { color: var(--coral); }
.stat-card.green strong { color: var(--green); }
.stat-card em { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; font-style: normal; }
.order-filters { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 2px; }
.order-filters button { flex: 0 0 auto; border: 1px solid #ddd9d0; background: white; border-radius: 999px; padding: 9px 14px; font-size: 11px; color: var(--muted); }
.order-filters button.active { background: var(--ink); color: white; border-color: var(--ink); }
.admin-order-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; align-items: start; }
.admin-order-card { background: white; border: 1px solid #dfdbd1; border-radius: 13px; overflow: hidden; }
.admin-order-card.priority { border-color: #dcad94; box-shadow: 0 5px 20px rgba(198,74,51,.06); }
.admin-order-head { padding: 15px 16px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); }
.admin-order-head > div { display: flex; flex-direction: column; gap: 5px; }
.admin-order-head strong { font-size: 14px; }
.admin-order-head small { color: var(--muted); font-size: 10px; }
.admin-order-meta { padding: 13px 16px 5px; display: flex; gap: 8px; flex-wrap: wrap; }
.meta-pill { border-radius: 6px; background: var(--paper); padding: 6px 8px; font-size: 10px; color: var(--muted); }
.meta-pill strong { color: var(--ink); }
.admin-order-items { padding: 7px 16px 12px; }
.admin-order-item { padding: 7px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.admin-order-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.admin-order-note { margin: 0 16px 12px; padding: 10px; border-radius: 8px; background: #f8f0e2; color: #765c37; font-size: 10px; line-height: 1.6; }
.admin-order-customer { padding: 0 16px 12px; color: var(--muted); font-size: 10px; }
.admin-order-total { padding: 12px 16px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; font-size: 11px; }
.admin-order-total strong { color: var(--coral); font-size: 17px; }
.admin-order-actions { padding: 12px 16px 15px; display: flex; gap: 8px; }
.admin-order-actions button { flex: 1; min-height: 40px; font-size: 11px; padding: 0 10px; }
.admin-order-actions .cancel-action { flex: 0 0 auto; border: 0; background: none; color: var(--muted); padding: 0 6px; font-size: 10px; }
.empty-admin { grid-column: 1/-1; background: white; border: 1px dashed #cbc5b9; border-radius: 13px; text-align: center; padding: 65px 20px; color: var(--muted); }
.empty-admin h3 { font-family: var(--serif); font-size: 22px; color: var(--ink); margin: 0 0 8px; }
.empty-admin p { font-size: 12px; }
.tab-intro { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.tab-intro h2 { font-size: 23px; margin-bottom: 8px; }
.tab-intro p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.intro-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.intro-actions button { padding: 0 15px; }
.admin-table-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.admin-table-card { background: white; border: 1px solid #ddd9d0; border-radius: 12px; padding: 18px; }
.admin-table-card.occupied { border-color: #dcb19f; background: #fffaf6; }
.admin-table-card > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.admin-table-card h3 { margin: 0; font-size: 20px; }
.admin-table-card p { color: var(--muted); font-size: 11px; line-height: 1.8; min-height: 40px; }
.admin-table-card button { width: 100%; }
.panel { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading h2, .settings-heading h2 { font-size: 17px; margin: 0; }
.panel-heading p, .settings-heading p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.panel-heading > strong { color: var(--coral); font-size: 18px; white-space: nowrap; }
.stats-note { margin: -10px 0 20px; color: var(--muted); font-size: 11px; }
.analytics-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .85fr); gap: 15px; }
.trend-chart { height: 256px; padding: 18px 8px 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: clamp(5px, 1.5vw, 18px); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 54px, #f0f0ec 55px); }
.trend-day { min-width: 0; height: 100%; display: grid; grid-template-rows: 22px minmax(0, 1fr) 42px; gap: 5px; text-align: center; }
.trend-value { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; }
.trend-bar-wrap { display: flex; align-items: flex-end; justify-content: center; }
.trend-bar { width: min(36px, 75%); min-height: 4px; border-radius: 5px 5px 0 0; background: #bb4539; transition: height .25s ease; }
.trend-day.today .trend-bar { background: var(--green); }
.trend-label { color: var(--muted); font-size: 10px; line-height: 1.65; }
.trend-label strong { display: block; color: var(--ink); font-size: 10px; }
.channel-stats { display: grid; gap: 10px; }
.channel-card { padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f7f7f4; border-radius: 9px; }
.channel-card span { color: var(--muted); font-size: 11px; }
.channel-card strong { display: block; margin-top: 4px; font-size: 17px; }
.channel-card b { color: var(--coral); font-size: 18px; }
.status-stats { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.status-stat { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.status-stat strong { color: var(--ink); }
.hot-panel { margin-top: 15px; }
.hot-dish-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.hot-dish { min-width: 0; padding: 11px 0; display: grid; grid-template-columns: 24px 46px minmax(0,1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.hot-rank { color: var(--muted); font-size: 12px; text-align: center; }
.hot-dish:nth-child(-n+3) .hot-rank { color: var(--coral); font-weight: 800; }
.hot-dish img, .hot-no-image { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #f0f0ec; }
.hot-no-image { display: grid; place-items: center; color: #aaa; font-size: 9px; }
.hot-dish h3 { margin: 0 0 4px; font-family: var(--sans); font-size: 12px; }
.hot-dish p { margin: 0; color: var(--muted); font-size: 10px; }
.hot-dish > strong { color: var(--coral); font-size: 12px; white-space: nowrap; }
.dish-toolbar { margin-bottom: 16px; padding: 14px 16px; display: flex; align-items: end; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.dish-toolbar label, .settings-form label, .dish-fields label { display: flex; flex-direction: column; gap: 7px; color: #555c55; font-size: 11px; }
.dish-toolbar .search-field { flex: 1; }
.dish-toolbar select { min-width: 150px; }
.dish-toolbar input, .dish-toolbar select { min-height: 40px; }
input, select, textarea { border: 1px solid #dcded8; border-radius: 8px; background: white; color: var(--ink); padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #ae6e63; box-shadow: 0 0 0 3px rgba(181,50,40,.07); }
textarea { resize: vertical; }
.dish-admin-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dish-admin-card { min-width: 0; padding: 13px; display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: 14px; align-items: center; background: white; border: 1px solid #ddd9d0; border-radius: 12px; }
.dish-admin-card.unavailable { background: #fafaf8; }
.dish-admin-image { position: relative; width: 92px; height: 92px; overflow: hidden; border-radius: 9px; background: #efefeb; }
.dish-admin-image img { width: 100%; height: 100%; object-fit: cover; }
.dish-admin-image span { width: 100%; height: 100%; display: grid; place-items: center; color: #aaa; font-size: 10px; }
.dish-admin-copy { min-width: 0; }
.dish-admin-copy h3 { margin: 0 0 5px; font-family: var(--sans); font-size: 14px; }
.dish-admin-copy h3 .featured-label { margin-left: 5px; padding: 2px 4px; border-radius: 4px; background: var(--coral-soft); color: var(--coral); font-size: 8px; vertical-align: middle; }
.dish-admin-copy p { margin: 0 0 7px; color: var(--muted); font-size: 10px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-admin-copy small { color: var(--muted); font-size: 10px; }
.dish-admin-copy .dish-price-line { display: block; margin-bottom: 5px; color: var(--coral); font-size: 18px; }
.dish-admin-actions { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.dish-admin-actions button { min-height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: white; color: #555c55; font-size: 10px; white-space: nowrap; }
.dish-admin-actions button:hover { border-color: #b8bcb4; }
.dish-admin-actions .switch-button { background: var(--green-soft); color: var(--green); border-color: transparent; }
.dish-admin-actions .switch-button.off { background: #eaeae5; color: var(--muted); }
.dish-admin-actions .delete-dish { color: #a5453a; }
.qr-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); gap: 20px; align-items: start; }
.qr-options { display: grid; gap: 10px; }
.qr-type { width: 100%; padding: 17px; display: flex; align-items: center; gap: 13px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 11px; }
.qr-type.active { border: 2px solid var(--coral); padding: 16px; background: #fffafa; }
.qr-type-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #f0f1ed; color: var(--green); }
.qr-type.active .qr-type-icon { background: var(--coral-soft); color: var(--coral); }
.qr-type strong { display: block; margin-bottom: 5px; font-size: 14px; }
.qr-type small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.table-qr-select { padding: 14px; display: flex; align-items: center; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; }
.table-qr-select select { flex: 1; }
.qr-preview { max-width: 560px; width: 100%; justify-self: center; }
.qr-paper { padding: 24px 22px; border: 1px dashed #cfd2ca; border-radius: 10px; background: #fff; text-align: center; }
.qr-paper.entrance-poster { padding: 34px 25px; border: 2px solid var(--coral); border-radius: 20px; }
.entrance-poster h2 { margin: 12px 0; color: var(--coral); font-size: 38px; }
.entrance-poster .qr-scan-hint { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--coral); color: white; }
.print-all-tables { width: 100%; min-height: 43px; }
.qr-paper h2 { font-size: 25px; margin-bottom: 8px; }
.qr-paper > p:not(.section-kicker) { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.qr-code { width: min(100%, 310px); aspect-ratio: 1; margin: 0 auto 16px; display: grid; place-items: center; background: #f5f5f2; }
.qr-code svg { width: 100%; height: 100%; display: block; stroke: none; }
.qr-code > span { color: var(--muted); font-size: 12px; }
.qr-scan-hint { font-size: 13px; letter-spacing: .08em; }
.qr-link { margin: 16px 0; text-align: left; }
.qr-link span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.qr-link code { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 11px; background: #f5f5f2; border-radius: 7px; color: #555c55; font-size: 10px; }
.qr-actions { display: flex; justify-content: center; gap: 8px; }
.qr-actions button { padding: 0 13px; font-size: 11px; }
.settings-form { display: grid; gap: 15px; max-width: 960px; }
.settings-section { padding: 24px; }
.settings-heading { margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.form-grid .span-2 { grid-column: span 2; }
.settings-form input { min-height: 42px; }
.field-help { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.cover-settings { display: grid; grid-template-columns: minmax(230px, .9fr) 1fr; gap: 23px; align-items: center; }
.image-preview { overflow: hidden; display: grid; place-items: center; background: #f0f0ec; border-radius: 10px; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview span { padding: 20px; color: #999; font-size: 11px; text-align: center; }
.cover-preview { width: 100%; aspect-ratio: 16/9; }
.upload-button { width: fit-content; min-height: 40px; padding: 10px 14px; display: inline-flex !important; align-items: center; justify-content: center; border: 1px solid #cfd2ca; border-radius: 8px; background: white; color: var(--ink) !important; cursor: pointer; }
.cover-label-field { margin-top: 13px; }
.text-danger { margin-top: 12px; padding: 0; border: 0; background: none; color: #a5453a; font-size: 10px; }
.settings-save-bar { position: sticky; bottom: 14px; z-index: 5; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 10px 30px rgba(30,35,30,.09); }
.settings-save-bar span { color: var(--muted); font-size: 11px; }
.settings-save-bar button { padding: 0 20px; }
.admin-dialog { width: min(720px, calc(100% - 30px)); max-height: 92dvh; padding: 0; border: 0; border-radius: 16px; background: white; color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
.admin-dialog::backdrop { background: rgba(24,29,25,.45); backdrop-filter: blur(3px); }
.dialog-header { position: sticky; top: 0; z-index: 2; padding: 20px 23px; display: flex; align-items: flex-start; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 21px; }
.dialog-header .icon-button { border: 0; background: #f2f2ee; }
.dish-editor-body { padding: 22px; display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 23px; }
.dish-edit-preview { width: 190px; height: 170px; margin-bottom: 12px; }
.dish-image-editor > p { color: var(--muted); font-size: 9px; line-height: 1.6; }
.dish-fields { gap: 13px; }
.dish-fields input, .dish-fields select { min-height: 40px; }
.check-options { display: flex; flex-wrap: wrap; gap: 12px 17px; }
.check-options label { flex-direction: row; align-items: center; gap: 6px; }
.check-options input { accent-color: var(--coral); }
.dialog-footer { position: sticky; bottom: 0; padding: 14px 22px; display: flex; justify-content: flex-end; gap: 9px; background: white; border-top: 1px solid var(--line); }
.dialog-footer button { padding: 0 20px; }
.category-dialog { width: min(560px, calc(100% - 30px)); }
.category-body { padding: 20px 22px 24px; }
.category-add { display: flex; gap: 9px; margin-bottom: 17px; }
.category-add input { flex: 1; min-width: 0; }
.category-admin-row { padding: 10px 0; display: flex; gap: 9px; border-bottom: 1px solid var(--line); }
.category-admin-row input { flex: 1; min-width: 0; }
.category-admin-row button { padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 10px; }
.category-admin-row small { align-self: center; color: var(--muted); white-space: nowrap; font-size: 9px; }
.category-admin-row .delete-category { color: #a5453a; }
@media (max-width: 1180px) {
  .admin-order-list { grid-template-columns: repeat(2,1fr); }
  .admin-table-grid { grid-template-columns: repeat(3,1fr); }
  .dish-admin-list { grid-template-columns: 1fr; }
  .analytics-layout { grid-template-columns: 1fr; }
  .hot-dish-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-card { padding: 30px 24px; }
  .login-card h1 { font-size: 28px; }
  .pin-row { flex-direction: column; }
  .pin-row input { min-height: 46px; }
  .admin-view { display: block; padding-bottom: 76px; }
  .admin-sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 70px; padding: 6px 8px max(6px,env(safe-area-inset-bottom)); display: block; border: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .admin-sidebar .brand, .sidebar-bottom { display: none; }
  .admin-sidebar nav { margin: 0; display: flex; flex-direction: row; gap: 4px; min-width: 530px; }
  .admin-sidebar nav button { min-height: 56px; padding: 5px 7px; flex: 1; flex-direction: column; justify-content: center; gap: 3px; font-size: 9px; text-align: center; }
  .admin-sidebar nav button svg { width: 17px; height: 17px; }
  .admin-sidebar nav button b { position: absolute; top: 1px; right: 8px; min-width: 16px; height: 16px; font-size: 8px; }
  .admin-main { padding: 21px 15px 30px; }
  .admin-header { margin-bottom: 22px; }
  .admin-header h1 { font-size: 26px; }
  .admin-header #pageDescription { font-size: 10px; }
  .sync-state { display: none; }
  .admin-header { gap: 8px; }
  .admin-header-actions { gap: 6px; }
  .voice-toggle { padding: 0 9px; }
  .voice-toggle span { display: none; }
  .admin-header-actions #refreshAdmin { padding: 0 10px; }
  .admin-header-actions .secondary-button { min-height: 38px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 9px; }
  .stat-card { min-height: 102px; padding: 15px; }
  .stat-card strong { font-size: 24px; }
  .admin-order-list { grid-template-columns: 1fr; }
  .tab-intro { align-items: flex-start; flex-direction: column; }
  .intro-actions { width: 100%; }
  .intro-actions button { flex: 1; }
  .admin-table-grid { grid-template-columns: repeat(2,1fr); gap: 9px; }
  .admin-table-card { padding: 14px; }
  .panel { padding: 16px; }
  .trend-chart { height: 225px; padding-left: 0; padding-right: 0; gap: 4px; }
  .trend-value { font-size: 8px; }
  .hot-dish { grid-template-columns: 20px 42px minmax(0,1fr) auto; gap: 8px; }
  .dish-toolbar { align-items: stretch; flex-direction: column; }
  .dish-toolbar select { width: 100%; }
  .dish-admin-card { grid-template-columns: 75px minmax(0,1fr); gap: 11px; }
  .dish-admin-image { width: 75px; height: 80px; }
  .dish-admin-actions { grid-column: 1/-1; flex-direction: row; }
  .dish-admin-actions button { flex: 1; min-height: 35px; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-preview { padding: 13px; }
  .qr-paper { padding: 20px 13px; }
  .qr-code { width: min(100%, 280px); }
  .qr-actions { flex-wrap: wrap; }
  .qr-actions button { flex: 1; min-width: 105px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .cover-settings { grid-template-columns: 1fr; }
  .settings-save-bar { bottom: 78px; }
  .settings-save-bar span { display: none; }
  .settings-save-bar button { width: 100%; }
  .dish-editor-body { grid-template-columns: 1fr; padding: 17px; }
  .dish-image-editor { text-align: center; }
  .dish-edit-preview { width: 100%; height: 180px; }
  .dish-image-editor .upload-button { margin: 0 auto; }
  .check-options { flex-direction: column; }
  .category-admin-row { flex-wrap: wrap; }
  .category-admin-row input { flex-basis: 100%; }
}
@media (max-width: 370px) {
  .admin-main { padding-left: 11px; padding-right: 11px; }
  .stat-card { padding: 12px; }
  .admin-table-grid { grid-template-columns: 1fr; }
  .qr-actions button { min-width: 90px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .admin-tab { animation: none; } .trend-bar { transition: none; } }

/* 外卖地址与店内桌位开关 */
.admin-order-address { margin: 8px 16px 4px; padding: 11px 12px; border: 1px solid #eadfc9; border-radius: 9px; background: #fffcf5; display: flex; align-items: flex-start; gap: 12px; font-size: 11px; line-height: 1.65; }
.admin-order-address strong { flex: 0 0 auto; color: #765c37; }
.admin-order-address span { min-width: 0; overflow-wrap: anywhere; }
.admin-table-card.closed { border-style: dashed; background: #f6f5f2; border-color: #cbc7bd; }
.admin-table-card p { overflow-wrap: anywhere; }

/* 地址导航与二维码微信分享 */
.admin-address-actions { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.admin-address-actions a, .admin-address-actions button { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e1d5bc; border-radius: 7px; background: #fff; color: #765c37; font-size: 10px; font-weight: 700; white-space: nowrap; }
.admin-address-actions a:hover, .admin-address-actions button:hover { border-color: #b89560; background: #fff8e9; }
.qr-share-note { margin: 13px 5px 0; color: var(--muted); font-size: 10px; line-height: 1.65; text-align: center; }
.qr-share-dialog { width: min(94vw, 490px); }
.qr-share-body { padding: 0 24px 24px; text-align: center; }
.share-guide { margin: 0 0 16px; padding: 12px 14px; border-radius: 9px; background: var(--green-soft); color: var(--green); text-align: left; }
.share-guide strong, .share-guide span { display: block; }
.share-guide strong { margin-bottom: 4px; font-size: 12px; }
.share-guide span { font-size: 10px; line-height: 1.6; }
.share-qr-image { width: min(100%, 310px); height: auto; display: block; margin: 0 auto 14px; border: 1px solid var(--line); background: #fff; }
.qr-share-body h3 { margin: 0 0 7px; font-size: 15px; }
.qr-share-body > p:not(.share-guide) { margin: 0 0 13px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.qr-share-body > code { display: block; padding: 9px 10px; border-radius: 7px; background: #f5f5f2; color: var(--muted); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; word-break: break-all; }
.qr-share-body .dialog-footer { margin-top: 18px; }
@media (max-width: 699px) {
  .admin-order-address { flex-wrap: wrap; }
  .admin-order-address > span { flex: 1; }
  .admin-address-actions { width: 100%; margin: 2px 0 0; justify-content: flex-end; }
  .qr-share-body { padding: 0 16px 18px; }
  .share-qr-image { width: min(100%, 280px); }
}

/* 商家收款：两种渠道清晰分区，待核对款项在订单中优先提示。 */
.payment-settings-form { display: grid; gap: 16px; }
.payment-intro { margin-bottom: 2px; }
.payment-safe-note { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #cfe0d2; border-radius: 999px; background: #f3f8f3; color: #366443; font-size: 11px; font-weight: 700; }
.payment-master { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.payment-master .settings-heading { max-width: 620px; }
.payment-master-toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.payment-master-toggle > span { display: grid; gap: 4px; text-align: right; }
.payment-master-toggle strong { font-size: 13px; }
.payment-master-toggle small { color: var(--muted); font-size: 10px; }
.payment-master-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.payment-master-toggle i { position: relative; width: 48px; height: 28px; flex: 0 0 auto; border-radius: 20px; background: #d9ddd8; transition: background .2s; }
.payment-master-toggle i::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .2s; }
.payment-master-toggle input:checked + i { background: #278552; }
.payment-master-toggle input:checked + i::after { transform: translateX(20px); }
.payment-master-toggle input:focus-visible + i { outline: 3px solid rgba(181,50,40,.25); outline-offset: 3px; }
.payment-channel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.payment-channel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.payment-channel-heading > div { display: flex; align-items: center; gap: 11px; }
.payment-channel-title > div { display: grid; gap: 4px; }
.payment-channel-heading h2 { font-size: 17px; }
.payment-channel-heading p { color: var(--muted); font-size: 10px; }
.payment-channel-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: white; font-size: 17px; font-weight: 800; }
.wechat-channel .payment-channel-icon { background: #16a05d; }
.alipay-channel .payment-channel-icon { background: #1677ff; }
.channel-enable { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.channel-enable input { width: 16px; height: 16px; accent-color: #278552; }
.payment-qr-preview { min-height: 260px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cfd5cf; border-radius: 12px; background: #fafbf9; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.8; }
.payment-qr-preview img { display: block; width: 100%; height: 300px; object-fit: contain; background: white; }
.payment-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.payment-upload-actions .upload-button { flex: 1; text-align: center; }
.payment-flow-note { margin-top: 18px; padding: 18px 22px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border-left: 3px solid #d5a24a; background: #fffaf0; color: #695636; font-size: 11px; line-height: 1.7; }
.payment-flow-note strong { margin-right: 8px; color: #47391f; }
.payment-flow-note i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #e9d5ae; color: #5d492b; font-size: 9px; font-style: normal; }
.admin-payment-state { margin: 0 16px 12px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 9px; font-size: 11px; line-height: 1.6; }
.admin-payment-state strong { font-size: 11px; }
.admin-payment-state small { display: block; margin-top: 2px; font-size: 9px; opacity: .8; }
.admin-payment-state.awaiting { border: 1px solid #edc472; background: #fff7e4; color: #795511; }
.admin-payment-state.received { border: 1px solid #c9dfce; background: #f1f8f2; color: #376343; }
.admin-payment-state.unpaid { border: 1px solid var(--line); background: #f8f9f7; color: var(--muted); }
.admin-order-actions .confirm-payment { background: #a96a08; }
@media (max-width: 900px) {
  .payment-master { align-items: flex-start; flex-direction: column; }
  .payment-master-toggle { width: 100%; justify-content: space-between; }
  .payment-master-toggle > span { text-align: left; }
}
@media (max-width: 760px) {
  .admin-sidebar nav { min-width: 640px; }
  .payment-channel-grid { grid-template-columns: 1fr; }
  .payment-intro { gap: 12px; }
  .payment-safe-note { align-self: flex-start; }
  .payment-qr-preview { min-height: 230px; }
  .payment-qr-preview img { height: 280px; }
  .payment-flow-note { align-items: flex-start; }
  .payment-flow-note strong { width: 100%; }
}

/* 营业全流程：接单开关、订单服务、库存和收款对账。 */
.ordering-toggle { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid #bfd4c5; border-radius: 9px; background: #edf7ef; color: #287448; font-size: 11px; font-weight: 750; }
.ordering-toggle svg { width: 16px; height: 16px; }
.ordering-toggle.paused { border-color: #e6c0b8; background: #fff0ec; color: #a83f2e; }
.admin-order-card.overdue { border-color: #d8a343; box-shadow: inset 4px 0 0 #d8a343; }
.admin-order-card.customer-reminding { border-color: #cb6f4c; }
.order-alert { margin: 0 16px 12px; padding: 10px 12px; border-radius: 8px; font-size: 11px; line-height: 1.65; }
.order-alert.timeout { background: #fff6df; color: #805715; }
.order-alert.reminder { background: #fff0e8; color: #9c4525; font-weight: 700; }
.order-alert.payment { background: #fff7e4; color: #795511; }
.meta-pill.added { background: #eaf4eb; color: #347147; }
.admin-shop-reply, .admin-refund-list { margin: 0 16px 12px; padding: 11px 13px; display: grid; gap: 4px; border-radius: 9px; font-size: 11px; line-height: 1.6; }
.admin-shop-reply { background: #f0f7f1; color: #376343; }
.admin-shop-reply small, .admin-refund-list small { color: var(--muted); font-size: 9px; }
.admin-refund-list { background: #fff5f0; color: #874a3a; }
.order-service-buttons { padding: 0 16px 15px; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px dashed var(--line); padding-top: 12px; }
.order-service-buttons .secondary-button { min-height: 34px; padding: 0 11px; font-size: 10px; }
.dish-stock-editor { margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 10px; }
.dish-stock-editor label { display: inline-flex; align-items: center; gap: 5px; }
.dish-stock-editor input { width: 66px; height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.dish-stock-editor .secondary-button { min-height: 32px; padding: 0 9px; font-size: 10px; }
.dish-stock-editor b { color: var(--coral); }
.operation-switches { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.operation-switches > label { min-height: 82px; padding: 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; cursor: pointer; }
.operation-switches input { width: 18px; height: 18px; margin-top: 2px; accent-color: #278552; }
.operation-switches span { display: grid; gap: 5px; }
.operation-switches strong { font-size: 12px; }
.operation-switches small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.operation-fields { padding-top: 18px; border-top: 1px solid var(--line); }
.reconciliation-panel { margin-bottom: 20px; }
.payment-reconciliation { overflow-x: auto; }
.reconciliation-head, .reconciliation-row { min-width: 560px; display: grid; grid-template-columns: 1.4fr .7fr 1fr 1fr 1fr; gap: 12px; align-items: center; padding: 11px 8px; font-size: 11px; }
.reconciliation-head { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.reconciliation-row { border-bottom: 1px solid #efefeb; }
.reconciliation-row b { color: var(--green); }
.report-download { margin-top: 18px; padding-top: 18px; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); }
.report-download label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.report-download input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.report-download small { flex: 1 1 260px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.order-service-body { padding: 20px 24px; display: grid; gap: 15px; }
.order-service-body label { display: grid; gap: 7px; font-size: 12px; font-weight: 650; }
.order-service-body input, .order-service-body textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; font: inherit; resize: vertical; }
.service-dialog-description { color: var(--muted); font-size: 11px; line-height: 1.75; }
.service-dialog-order { padding: 10px 12px; border-radius: 8px; background: #f5f6f3; color: var(--ink); font-size: 12px; }
.business-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
@media (max-width: 1180px) {
  .business-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operation-switches { grid-template-columns: 1fr; }
  .admin-header-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 760px) {
  .admin-sidebar nav { min-width: 760px; }
  .admin-header-actions { gap: 7px; }
  .sync-state { display: none; }
  .ordering-toggle, .voice-toggle { padding: 0 8px; }
  .order-service-buttons { gap: 6px; }
  .report-download { align-items: stretch; flex-direction: column; }
  .report-download .primary-button { width: 100%; }
  .business-stats { gap: 9px; }
  .business-stats .stat-card { min-height: 106px; padding: 14px; }
  .business-stats .stat-card strong { font-size: 24px; }
}
