* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f6f7f9; color: #16202a; }
a { color: #0f6b5f; text-decoration: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.sidebar { background: #17212b; color: #fff; padding: 24px 16px; }
.brand { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.nav a { display: block; color: #e8edf2; padding: 10px 8px; border-radius: 6px; }
.nav a:hover { background: #223140; }
.main { padding: 28px; }
.panel, .auth-box { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 24px; max-width: 920px; }
.panel.wide { max-width: 1180px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.button.secondary { background: #e8edf2; color: #16202a; }
.button.danger { background: #8a1f1f; color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid #dde3ea; padding: 10px; text-align: left; vertical-align: middle; }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: #e8edf2; display: inline-grid; place-items: center; color: #657282; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; margin: 16px 0; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #344252; font-size: 12px; }
.badge.warn { background: #fff3d6; color: #755000; }
.badge.ok { background: #e8f7ee; color: #126b38; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-box { width: 100%; max-width: 440px; }
label { display: block; margin: 12px 0 6px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #c9d2dc; border-radius: 6px; }
textarea { min-height: 92px; resize: vertical; }
button, .button { display: inline-block; border: 0; border-radius: 6px; background: #0f6b5f; color: #fff; padding: 10px 14px; margin-top: 16px; cursor: pointer; }
.muted { color: #657282; }
.status { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #e9f7ef; color: #126b38; font-weight: 700; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: start; }
.subpanel { margin-top: 22px; padding-top: 18px; border-top: 1px solid #dde3ea; }
.metric { border: 1px solid #dde3ea; border-radius: 8px; padding: 14px; background: #fbfcfd; }
.metric strong { display: block; font-size: 20px; margin-bottom: 4px; }
.metric span { color: #657282; }
.inline-grid { display: grid; gap: 8px; min-width: 220px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin: 10px 0 16px; }
.checks label { margin: 0; font-weight: 400; }
.checks input { width: auto; margin-right: 6px; }
.table input[type="checkbox"] { width: auto; margin-right: 6px; }
.soon { border: 1px dashed #b9c4cf; border-radius: 8px; padding: 16px; background: #fbfcfd; }
.error { background: #fff0f0; color: #8a1f1f; padding: 10px; border-radius: 6px; }
.insights-head form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.insights-head select, .insights-head button { min-height: 40px; border: 1px solid #cbd7df; border-radius: 8px; padding: 8px 10px; background: #fff; }
.insights-grid { display: grid; gap: 14px; }
.insight-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.insight-card { border: 1px solid #d9e2e7; border-radius: 8px; padding: 12px; background: #fff; min-height: 100px; display: grid; gap: 4px; align-content: start; }
.insight-card span { color: #5b6873; font-weight: 700; }
.insight-card strong { font-size: 22px; }
.insight-card small { color: #6a7580; }
.panel table { width: 100%; border-collapse: collapse; }
.panel th, .panel td { border-bottom: 1px solid #e3e9ed; padding: 8px; text-align: left; }
@media (max-width: 680px) { .insights-head form { display: grid; } }
@media (max-width: 760px) { .shell, .split { grid-template-columns: 1fr; } .sidebar { position: static; } .main { padding: 18px; } .table { display: block; overflow-x: auto; } }
.waiter-screen { background: #eef3f5; }
.waiter-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; background: #17212b; color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.waiter-top strong { display: block; font-size: 19px; }
.waiter-top span { display: block; color: #b8c5cf; font-size: 13px; margin-top: 2px; }
.waiter-top nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.waiter-top a { color: #fff; background: #223140; padding: 9px 11px; border-radius: 6px; }
.waiter-app { display: grid; grid-template-columns: minmax(220px, 280px) minmax(300px, 1fr) minmax(260px, 360px); gap: 12px; padding: 12px; min-height: calc(100vh - 59px); }
.waiter-pane, .waiter-empty { background: #fff; border: 1px solid #d9e2e7; border-radius: 8px; padding: 14px; min-width: 0; }
.waiter-pane-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.waiter-pane-head h1, .waiter-pane-head h2 { margin: 0; font-size: 20px; }
.waiter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.waiter-tabs button, .waiter-pane button { min-height: 42px; margin-top: 0; }
.waiter-tabs button { background: #e8edf2; color: #16202a; white-space: nowrap; }
.waiter-tabs button.active { background: #0f6b5f; color: #fff; }
.waiter-table-list, .waiter-product-list, .waiter-cart-list { display: grid; gap: 8px; }
.waiter-table, .waiter-product { width: 100%; text-align: left; background: #f9fbfc; color: #16202a; border: 1px solid #d9e2e7; border-radius: 8px; padding: 12px; min-height: 76px; }
.waiter-table.active { border-color: #0f6b5f; box-shadow: inset 4px 0 0 #0f6b5f; }
.waiter-table strong, .waiter-table span, .waiter-table small, .waiter-product strong, .waiter-product span, .waiter-product small { display: block; }
.waiter-table small, .waiter-product small { color: #657282; margin-top: 4px; }
.waiter-product:disabled { opacity: .56; cursor: not-allowed; }
.waiter-cart { position: sticky; top: 71px; align-self: start; }
.waiter-cart-item, .waiter-order-row { display: flex; justify-content: space-between; gap: 10px; align-items: start; padding: 10px; border: 1px solid #dde3ea; border-radius: 8px; background: #fbfcfd; }
.waiter-cart-item button { background: #e8edf2; color: #16202a; padding: 7px 9px; min-height: 34px; }
#waiter-status { min-height: 22px; color: #8a1f1f; font-weight: 700; }
#waiter-status.ok { color: #126b38; }
.waiter-composer[hidden] { display: none; }
.waiter-composer { position: fixed; inset: 0; z-index: 20; background: rgba(22,32,42,.42); display: grid; place-items: end center; padding: 16px; }
.waiter-composer-panel { width: min(680px, 100%); max-height: min(760px, calc(100vh - 32px)); overflow: auto; background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.waiter-composer fieldset { border: 1px solid #dde3ea; border-radius: 8px; margin: 12px 0; padding: 10px; }
.waiter-composer legend { font-weight: 700; padding: 0 4px; }
.waiter-choice { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-weight: 400; }
.waiter-choice input { width: auto; flex: 0 0 auto; }
.waiter-choice span { line-height: 1.25; }
.waiter-nested { margin-left: 20px; padding-left: 10px; border-left: 2px solid #e8edf2; }
@media (max-width: 980px) {
  .waiter-app { grid-template-columns: 1fr; }
  .waiter-cart { position: static; }
}
@media (max-width: 520px) {
  .waiter-top { align-items: flex-start; }
  .waiter-top a { padding: 8px; }
  .waiter-app { padding: 8px; gap: 8px; }
  .waiter-pane { padding: 10px; }
  .waiter-pane-head { align-items: flex-start; }
  .waiter-composer { padding: 8px; }
  .waiter-composer-panel { max-height: calc(100vh - 16px); }
}
.superadmin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef3f5; }
.superadmin-shell { min-height: 100vh; padding: 18px; background: #eef3f5; }
.superadmin-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; max-width: 1180px; margin: 0 auto 14px; padding: 14px; background: #17212b; color: #fff; border-radius: 8px; }
.superadmin-top strong { display: block; font-size: 20px; }
.superadmin-top span { display: block; color: #b8c5cf; font-size: 13px; margin-top: 2px; }
.superadmin-panel { max-width: 1180px; margin: 0 auto 14px; padding: 16px; background: #fff; border: 1px solid #d9e2e7; border-radius: 8px; }
.superadmin-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.superadmin-heading h1, .superadmin-panel h2 { margin: 0 0 4px; }
.superadmin-heading p { margin: 0; color: #657282; }
.superadmin-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px; }
.superadmin-panel dl { margin: 0; display: grid; gap: 8px; }
.superadmin-panel dt { color: #657282; font-size: 12px; text-transform: uppercase; }
.superadmin-panel dd { margin: 0 0 4px; }
.superadmin-inline { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
.superadmin-badge { display: inline-block; padding: 5px 8px; background: #e8f7ee; color: #126b38; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.superadmin-table-wrap { overflow-x: auto; }
.superadmin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.superadmin-table th, .superadmin-table td { padding: 10px; border-bottom: 1px solid #dde3ea; text-align: left; vertical-align: top; }
.superadmin-table th { color: #344252; font-size: 12px; text-transform: uppercase; background: #f8fafb; }
.superadmin-table span { color: #657282; font-size: 13px; }
@media (max-width: 760px) {
  .superadmin-shell { padding: 8px; }
  .superadmin-top, .superadmin-heading { align-items: flex-start; flex-direction: column; }
  .superadmin-grid, .superadmin-inline { grid-template-columns: 1fr; }
  .superadmin-panel { padding: 12px; }
  .superadmin-table { min-width: 680px; }
}
.setup-guidance-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f4f7f8; color: #16202a; }
.setup-guidance { width: min(760px, 100%); }
.setup-guidance-kicker { margin: 0 0 8px; color: #657282; font-size: 13px; text-transform: uppercase; }
.setup-guidance h1 { margin: 0 0 16px; font-size: 30px; line-height: 1.16; }
.setup-guidance-box, .setup-guidance-card { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 22px; }
.setup-guidance-box h2, .setup-guidance-card h2 { margin: 0 0 8px; font-size: 18px; }
.setup-guidance-box p, .setup-guidance-card p { margin: 0 0 14px; color: #334151; line-height: 1.5; }
.setup-guidance-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.setup-guidance-actions .button { margin-top: 0; }
