:root {
  --brand: #ff6b2c;
  --accent: #18d6a3;
  --panel: #111827;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e0ea;
  --soft: #f4f7fb;
  --card: #ffffff;
  --danger: #e11d48;
  --warn: #f59e0b;
  --ok: #16a34a;
  --blue: #2563eb;
  --shadow: 0 22px 70px rgba(15, 23, 42, .10);
  --shadow-strong: 0 30px 90px rgba(15, 23, 42, .20);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 107, 44, .14), transparent 30%),
    radial-gradient(circle at top right, rgba(24, 214, 163, .15), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
small { color: var(--muted); }

.app-shell { min-height: 100vh; }
.container { max-width: 1220px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 34px); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 52px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(217, 224, 234, .85);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 32px rgba(15, 23, 42, .05);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand strong { display: block; font-size: 18px; line-height: 1.05; letter-spacing: -.035em; }
.brand small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.brand-mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #ffaf45);
  box-shadow: 0 16px 34px rgba(255, 107, 44, .25);
}
.brand-mark:before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 9px 15px 9px 15px;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, .92);
}
.brand-mark i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 14px 7px 0 rgba(17, 24, 39, .88), -9px 15px 0 rgba(255, 255, 255, .8);
}
.topnav, .panel-nav, .actions, .tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topnav a, .panel-nav a, .tabs a, .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  white-space: nowrap;
}
.topnav a:hover, .panel-nav a:hover, .tabs a:hover, .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, .16);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
}
.btn-primary, .tabs a.active {
  background: linear-gradient(135deg, var(--brand), #ff9e3d);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 34px rgba(255, 107, 44, .24);
}
.btn-accent { background: linear-gradient(135deg, var(--accent), #75f3cf); border-color: transparent; color: #062016; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-dark, .panel-nav a.active { background: var(--panel); border-color: var(--panel); color: #fff; }
.btn-small { min-height: 32px; padding: 7px 11px; font-size: 12px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 24px; align-items: stretch; padding: 28px 0 24px; }
.hero-card, .card, .stat, .order-card, .checkout-card, .login-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(217, 224, 234, .90);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card { position: relative; overflow: hidden; padding: clamp(26px, 4vw, 44px); }
.hero-card:after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(24, 214, 163, .28), transparent 68%);
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 107, 44, .12);
  color: #c2410c;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 { margin: 18px 0 16px; max-width: 880px; font-size: clamp(38px, 6vw, 76px); line-height: .92; letter-spacing: -.075em; }
.hero p { margin: 0 0 22px; max-width: 720px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-side { display: grid; gap: 14px; padding: 24px; }
.mini-metric { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.mini-metric strong { display: block; margin-top: 4px; font-size: 26px; line-height: 1; letter-spacing: -.04em; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 24px; }
.card h2, .card h3 { margin: 0 0 12px; letter-spacing: -.04em; }
.card p { line-height: 1.65; }
.muted { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.empty { padding: 28px; border: 1px dashed #cbd5e1; border-radius: 20px; text-align: center; color: var(--muted); background: #fff; }

.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.category-section { margin-bottom: 26px; }
.category-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; letter-spacing: -.04em; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.menu-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 15px;
  padding: 15px;
  border: 1px solid rgba(217, 224, 234, .92);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .055);
}
.menu-item h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.025em; }
.menu-item p { margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.price { font-weight: 950; }

.food-icon { width: 76px; height: 76px; position: relative; overflow: hidden; border-radius: 24px; background: linear-gradient(145deg, var(--brand), #ffd166); box-shadow: inset 0 -12px 22px rgba(0, 0, 0, .10); }
.food-icon:before, .food-icon:after { content: ""; position: absolute; }
.food-icon.pizza:before { width: 56px; height: 56px; left: 10px; top: 8px; border-radius: 8px; clip-path: polygon(50% 0,100% 100%,0 100%); background: #ffe8a3; }
.food-icon.pizza:after { width: 8px; height: 8px; left: 32px; top: 40px; border-radius: 50%; background: #d62828; box-shadow: 13px 8px 0 #d62828, -11px 7px 0 #16a34a, 2px -13px 0 #d62828; }
.food-icon.burger:before { width: 52px; height: 26px; left: 12px; top: 15px; border-radius: 32px 32px 8px 8px; background: #f4a261; box-shadow: 0 18px 0 #7f4f24, 0 29px 0 #ffd166; }
.food-icon.burger:after { width: 44px; height: 6px; left: 16px; top: 45px; border-radius: 10px; background: #2a9d8f; }
.food-icon.chips:before { width: 46px; height: 38px; left: 15px; top: 27px; clip-path: polygon(0 0,100% 0,84% 100%,16% 100%); background: #ef4444; }
.food-icon.chips:after { width: 7px; height: 44px; left: 25px; top: 8px; background: #ffd166; box-shadow: 10px 4px 0 #ffd166, 20px -2px 0 #ffd166, 30px 5px 0 #ffd166; }
.food-icon.drink:before { width: 36px; height: 50px; left: 20px; top: 15px; clip-path: polygon(0 0,100% 0,83% 100%,17% 100%); background: #38bdf8; opacity: .92; }
.food-icon.drink:after { width: 30px; height: 5px; left: 23px; top: 24px; background: #fff; box-shadow: 6px -15px 0 0 #111827; transform: rotate(-10deg); }
.food-icon.dessert:before { width: 50px; height: 32px; left: 13px; top: 32px; border-radius: 8px 8px 18px 18px; background: #fff; box-shadow: inset 0 -12px 0 #f472b6; }
.food-icon.dessert:after { width: 44px; height: 22px; left: 16px; top: 19px; border-radius: 50%; background: #7c2d12; }
.food-icon.kebab:before { width: 12px; height: 58px; left: 32px; top: 8px; border-radius: 9px; background: #7c2d12; box-shadow: -13px 9px 0 #f59e0b, 13px 17px 0 #ef4444; }
.food-icon.curry:before { width: 54px; height: 38px; left: 11px; top: 26px; border-radius: 8px 8px 25px 25px; background: #f97316; box-shadow: inset 0 8px 0 rgba(255,255,255,.25); }
.food-icon.salad:before { width: 56px; height: 40px; left: 10px; top: 23px; border-radius: 40% 60% 50% 50%; background: #22c55e; box-shadow: inset 12px -8px 0 #84cc16; }
.food-icon.default:before { width: 48px; height: 48px; left: 14px; top: 14px; border-radius: 18px; background: #fff; box-shadow: inset 0 -12px 0 rgba(0,0,0,.08); }

.basket { position: sticky; top: 94px; padding: 22px; }
.basket h2 { margin-top: 0; }
.basket-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.basket-line small { display: block; margin-top: 3px; }
.totals { display: grid; gap: 8px; margin: 18px 0; }
.total-row { display: flex; justify-content: space-between; gap: 12px; }
.total-row.big { font-size: 22px; font-weight: 950; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field label { font-weight: 900; font-size: 13px; letter-spacing: -.01em; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: #101828;
  outline: none;
  transition: box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.field input[type="color"] { min-height: 50px; padding: 5px; cursor: pointer; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(24, 214, 163, .18); }
label:has(input[type="checkbox"]) { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); }

.flash { padding: 14px 16px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; font-weight: 700; }
.flash-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.flash-danger { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
.panel-nav { margin: 0 0 20px; }
.tabs { margin: 20px 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat { padding: 22px; }
.stat span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 800; }
.stat strong { display: block; font-size: 32px; line-height: 1; letter-spacing: -.055em; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
tr:last-child td { border-bottom: 0; }

.status { display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 11px; font-weight: 950; letter-spacing: .04em; }
.status-new { background: #fff7ed; color: #c2410c; }
.status-accepted { background: #ecfeff; color: #0e7490; }
.status-preparing { background: #fef3c7; color: #92400e; }
.status-ready { background: #dcfce7; color: #166534; }
.status-out_for_delivery { background: #e0f2fe; color: #075985; }
.status-delivered { background: #dcfce7; color: #14532d; }
.status-cancelled, .status-refunded { background: #ffe4e6; color: #9f1239; }

.order-board { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.board-col { min-height: 300px; padding: 15px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 255, .72); }
.board-col h3 { margin: 4px 0 14px; letter-spacing: -.035em; }
.order-card { padding: 16px; margin-bottom: 13px; box-shadow: 0 14px 38px rgba(15, 23, 42, .08); }
.order-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-card ul { margin: 13px 0; padding-left: 18px; }
.order-card li { margin: 5px 0; }
.timeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 24px 0; }
.timeline-step { padding: 15px 10px; border: 1px solid var(--line); border-radius: 17px; background: #fff; text-align: center; font-size: 12px; font-weight: 900; }
.timeline-step.done { background: linear-gradient(135deg, var(--accent), #bbf7d0); color: #06351f; border-color: transparent; }

.driver-panel { padding: 24px; border-radius: 28px; background: linear-gradient(145deg, #0b1220, #111827); color: #fff; box-shadow: var(--shadow-strong); }
.driver-panel .muted { color: #aab3c2; }
.receipt { max-width: 420px; margin: 28px auto; padding: 26px; border: 1px dashed #9ca3af; background: #fff; }
.receipt h1 { text-align: center; font-size: 22px; }
.print-only { display: none; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(470px, 100%); padding: 30px; }
.login-card h2 { margin: 0 0 18px; font-size: 24px; letter-spacing: -.04em; }

.install-page {
  color: #f8fafc;
  background:
    radial-gradient(circle at 82% 12%, rgba(24, 214, 163, .32), transparent 28%),
    radial-gradient(circle at 8% 2%, rgba(255, 107, 44, .28), transparent 32%),
    linear-gradient(145deg, #070b14 0%, #101827 55%, #182033 100%);
}
.install-page .container { max-width: 1280px; padding-top: clamp(18px, 4vh, 42px); padding-bottom: clamp(18px, 4vh, 42px); }
.install-page .hero { min-height: calc(100vh - 60px); grid-template-columns: minmax(0, 1.15fr) minmax(420px, 520px); align-items: center; gap: 28px; padding: 0; }
.install-page .hero-card {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)),
    radial-gradient(circle at 84% 8%, rgba(24, 214, 163, .33), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(24, 33, 50, .88));
  border-color: rgba(255, 255, 255, .15);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .28);
}
.install-page .hero-card:after {
  right: -110px;
  top: -120px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(24, 214, 163, .38), transparent 65%);
}
.install-page .eyebrow { background: rgba(255, 255, 255, .12); color: #ffbf9b; border: 1px solid rgba(255, 255, 255, .12); }
.install-page .hero h1 { max-width: 760px; color: #fff; text-shadow: 0 12px 38px rgba(0,0,0,.24); }
.install-page .hero p { max-width: 760px; color: #c7d2e3; }
.install-page .login-card {
  color: #101828;
  background: rgba(255, 255, 255, .97);
  border-color: rgba(255, 255, 255, .85);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .30);
}
.install-page .login-card .muted { color: var(--muted); }
.install-steps { display: grid; gap: 11px; margin-top: 24px; }
.check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .09);
  color: #eef2ff;
}
.check span { font-weight: 850; color: #eef2ff; }
.check strong { padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.10); }
.ok { color: #22c55e; font-weight: 950; }
.bad { color: #fb7185; font-weight: 950; }
.install-page .login-card .field input { background: #f8fafc; }
.install-page .login-card .field input:focus { background: #fff; }

@media (max-width: 1040px) {
  .hero, .install-page .hero, .menu-layout, .grid-2, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .install-page .hero { min-height: auto; }
  .install-page .hero-card { min-height: auto; }
  .menu-grid { grid-template-columns: 1fr; }
  .basket { position: static; }
  .order-board { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topnav a, .panel-nav a, .tabs a, .btn { width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-card, .card, .checkout-card, .login-card { border-radius: 20px; }
  .hero-card { padding: 24px; }
  .hero h1 { font-size: clamp(36px, 13vw, 58px); }
  .order-board { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .menu-item { grid-template-columns: 62px 1fr; }
  .food-icon { width: 62px; height: 62px; border-radius: 19px; }
  .install-page .container { padding: 14px; }
}
@media print {
  .topbar, .panel-nav, .actions, .btn, .no-print { display: none !important; }
  .print-only { display: block; }
  .receipt { max-width: none; margin: 0; border: 0; box-shadow: none; }
  body { background: #fff; }
}
