:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #10131a;
  background: #f4f6fa;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 800; }
button:disabled { opacity: .55; cursor: wait; }
input { width: 100%; border: 1px solid #d7dbe5; border-radius: 12px; padding: 12px; background: #fff; }
select { width: 100%; border: 1px solid #d7dbe5; border-radius: 12px; padding: 12px; background: #fff; }
label { display: grid; gap: 7px; font-weight: 700; }
.eyebrow { margin: 0 0 6px; color: #ed1c24; font-size: .76rem; font-weight: 900; letter-spacing: .12em; }
.auth-card { width: min(480px, calc(100% - 32px)); margin: 8vh auto; background: #fff; border-radius: 24px; padding: 28px; box-shadow: 0 16px 50px rgba(18, 28, 45, .1); display: grid; gap: 16px; }
.auth-card h1, .topbar h1 { margin: 0; }
.primary { background: #ed1c24; color: #fff; }
.secondary { background: #fff; color: #151922; border: 1px solid #cfd4df; }
.link-button { background: transparent; color: #a60000; text-decoration: underline; }
.danger { background: #fff0f0; color: #a60000; border: 1px solid #f3b2b2; }
.topbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid #e3e6ed; padding: 14px max(18px, calc((100vw - 1180px) / 2)); display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.topbar p { margin: 3px 0; color: #626978; }
.app-nav { position: sticky; top: 91px; z-index: 9; display: flex; justify-content: center; gap: 5px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e3e6ed; overflow-x: auto; }
.app-nav button { white-space: nowrap; background: transparent; color: #555d6b; }
.app-nav button.active { background: #ed1c24; color: #fff; }
.content { width: min(1180px, calc(100% - 28px)); margin: 22px auto 80px; }
.content.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: #fff; border: 1px solid #e0e4ec; border-radius: 20px; padding: 20px; display: grid; gap: 14px; align-content: start; }
.panel h2 { margin: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head h2, .section-head p { margin: 0; }
.section-head p { margin-top: 5px; color: #626978; }
.form-grid { margin-bottom: 20px; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 22px; height: 22px; accent-color: #ed1c24; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.product-card { background: #fff; border: 1px solid #e0e4ec; border-radius: 18px; overflow: hidden; }
.product-card img, .image-placeholder { width: 100%; height: 180px; object-fit: cover; background: #eceff4; display: grid; place-items: center; color: #626978; }
.product-card > div:last-child { padding: 16px; }
.product-card h3 { margin: 0 0 8px; }
.store-logo { width: min(100%, 420px); height: 220px; object-fit: cover; border-radius: 16px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metrics article { background: #fff; border: 1px solid #e0e4ec; border-radius: 18px; padding: 20px; display: grid; gap: 8px; }
.metrics strong { font-size: 1.6rem; }
.dashboard { width: min(1180px, calc(100% - 28px)); margin: 22px auto 80px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 24px; }
.dashboard h2 { margin: 0 0 12px; }
.order-card { background: #fff; border: 1px solid #e0e4ec; border-radius: 20px; padding: 18px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(13, 25, 45, .04); }
.order-card.paid { border-color: #a8dec1; }
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.order-head h3 { margin: 4px 0 0; }
.order-id { font-size: .8rem; font-weight: 900; color: #727988; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.chips span { background: #f0f2f6; border-radius: 999px; padding: 5px 9px; font-size: .78rem; font-weight: 800; }
.items { padding-left: 22px; }
.order-item { padding: 5px 0; }
.options { margin: 4px 0; padding-left: 18px; color: #555d6b; }
.merchant-note { background: #fff6ce; border-left: 4px solid #f0bf00; padding: 9px 11px; border-radius: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.actions .credential-panel { flex-basis: 100%; }
.waiting-payment { flex-basis: 100%; display: grid; gap: 4px; background: #fff3f3; color: #8b0000; padding: 12px; border-radius: 12px; }
.credential-panel, .chat-box { margin-top: 12px; border-top: 1px solid #e5e7ed; padding-top: 12px; display: grid; gap: 10px; }
.credential-panel h4, .chat-box h4 { margin: 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { min-width: 0; }
.chat-messages { max-height: 180px; overflow: auto; background: #f7f8fb; border-radius: 12px; padding: 10px; }
.chat-messages p { margin: 5px 0; }
.notice { width: min(1180px, calc(100% - 28px)); margin: 14px auto 0; background: #eef5ff; border: 1px solid #b8cff0; color: #173a68; border-radius: 12px; padding: 12px; font-weight: 700; }
.notice--success { background: #e9f7ef; border-color: #b4dfc6; color: #185b35; }
.notice--error { background: #fff0f0; border-color: #f3b2b2; color: #8f1010; }
.store-settings { width: min(1180px, calc(100% - 28px)); margin: 18px auto 0; background: #fff; border: 1px solid #e0e4ec; border-radius: 20px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.store-settings h2, .store-settings p { margin: 0; }
.store-settings p { margin-top: 6px; color: #626978; }
.own-delivery-toggle { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.own-delivery-toggle input { width: 22px; height: 22px; accent-color: #ed1c24; }
.empty { background: #fff; border: 1px dashed #ccd2dd; border-radius: 16px; padding: 24px; color: #6b7280; }
.muted { color: #717887; font-size: .9rem; }
.busy { pointer-events: none; opacity: .78; }
#print-zone { display: none; }
.ticket { font-family: Arial, sans-serif; color: #000; }
.ticket h1, .ticket h2 { margin: 0 0 8px; }
.ticket-paid { font-weight: 900; border: 2px solid #000; padding: 6px; display: inline-block; }
.ticket ol { padding-left: 22px; }
.ticket li { margin-bottom: 10px; }
.ticket ul { padding-left: 18px; margin-top: 5px; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 12px 0; }
@media (max-width: 850px) {
  .dashboard { grid-template-columns: 1fr; }
  .topbar { position: static; }
  .inline-form { flex-direction: column; }
  .actions button { width: 100%; }
  .store-settings { align-items: flex-start; flex-direction: column; }
  .app-nav { top: 0; justify-content: flex-start; }
  .content.split, .metrics { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
}
@media print {
  body.printing #app { display: none !important; }
  body.printing #print-zone { display: block !important; }
  body.printing { background: #fff; }
  .ticket { width: 76mm; margin: 0 auto; font-size: 12pt; }
  .ticket h1 { font-size: 16pt; }
  .ticket h2 { font-size: 14pt; }
  @page { margin: 5mm; }
}

/* Federated login: no changes to the operational Seller screens. */
.auth-card {text-align:center; max-width:480px; padding:40px 28px; margin:6vh auto;}
.auth-brand {font-size:48px; font-weight:900; letter-spacing:-1px; color:#ef1f28; margin:0;}
.auth-role {font-size:24px; font-weight:700; margin:0 0 36px; color:#101426;}
.auth-card h1 {font-size:21px; margin-bottom:20px;}
.auth-card .federated {width:100%; min-height:56px; display:flex; align-items:center; justify-content:center; gap:14px; margin-top:16px; border:1px solid #cbd1df; border-radius:10px; background:white; color:#101426; font-size:18px; font-weight:600;}
.auth-card .apple {background:#000; color:#fff; border-color:#000;}
.federated:disabled {opacity:.55;} .federated:active {opacity:.7;}
.auth-legal {margin-top:64px; font-size:14px; color:#5e6572;}
.auth-legal-links {display:flex; justify-content:center; flex-wrap:wrap; gap:20px; font-size:14px;}
.auth-legal-links a {color:#008c9e; text-decoration:underline;}
