:root {
  --green: #c41e3a;
  --green-2: #9b1230;
  --green-3: #7a0e26;
  --leaf: #ff2d4a;
  --gold: #ffcc00;
  --gold-2: #ffe566;
  --cream: #111111;
  --paper: #1a1a1a;
  --ink: #fff8e7;
  --muted: #c4b8a0;
  --line: #3a3a3a;
  --terra: #e10600;
  --danger: #ff4d4d;
  --ok: #3ddc84;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 22px;
  --font: "Outfit", system-ui, sans-serif;
  --serif: "Bebas Neue", "Oswald", Impact, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: #000;
  color: #fff;
  border-bottom: 2px solid #c41e3a;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #fff; }
.brand .ttl { font-family: var(--serif); font-size: 15px; line-height: 1.1; }
.brand small { display: block; font-family: var(--font); opacity: .75; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border: 0; border-radius: 14px;
  background: rgba(255,255,255,.1); color: #fff; position: relative;
}
.badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; border-radius: 99px;
  background: var(--gold); color: var(--green); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}

.page { width: min(1120px, 100%); margin: 0 auto; padding: 18px 16px 110px; flex: 1; }

.hero {
  position: relative; overflow: hidden; border-radius: 28px;
  min-height: 280px; color: #fff;
  background:
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.78)),
    url("../assets/alitas-buffalo.jpg") center/cover;
  padding: 28px 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--shadow);
}
.hero .kicker { letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: var(--gold-2); }
.hero h1 { font-family: var(--serif); font-size: clamp(28px, 5vw, 46px); font-weight: 500; margin: 6px 0 8px; }
.hero p { max-width: 520px; opacity: .92; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  padding: 7px 12px; border-radius: 999px; font-size: 13px;
}

.section-h { display: flex; justify-content: space-between; align-items: end; margin: 26px 0 14px; }
.section-h h2 { font-family: var(--serif); font-size: 26px; font-weight: 500; }
.section-h span { color: var(--muted); font-size: 13px; }

.cats { display: flex; gap: 8px; overflow: auto; padding-bottom: 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 14px; border-radius: 999px; white-space: nowrap; font-weight: 500;
}
.cat.on { background: var(--green); color: #fff; border-color: var(--green); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  background: #1c1c1c; border: 1px solid #3a3a3a; border-radius: var(--radius); color: #fff;
  overflow: hidden; box-shadow: 0 8px 24px rgba(22,53,40,.06);
}
.card .photo { height: 160px; background: #ddd center/cover no-repeat; position: relative; }
.card .photo .tag {
  position: absolute; left: 10px; top: 10px;
  background: var(--gold); color: var(--green); font-weight: 700; font-size: 11px;
  padding: 4px 8px; border-radius: 999px;
}
.card .body { padding: 14px; }
.card h3 { font-size: 17px; margin-bottom: 4px; }
.card .desc { color: var(--muted); font-size: 13px; min-height: 38px; }
.card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.price { font-weight: 700; color: var(--green-2); }
.btn {
  border: 0; border-radius: 14px; padding: 13px 16px; font-weight: 650;
  background: var(--green); color: #fff; min-height: 44px;
}
.btn.gold { background: var(--gold); color: var(--green); }
.btn.ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(0,0,0,.94); border-top: 1px solid #c41e3a;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
}
.tab {
  border: 0; background: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600;
}
.tab.on { color: var(--green); }
.tab svg { width: 22px; height: 22px; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(18,14,10,.55); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: #141414; width: min(640px, 100%); color: #fff;
  border-radius: 28px 28px 0 0; max-height: 92vh; overflow: auto;
  padding: 8px 18px 28px;
}
.handle { width: 48px; height: 5px; background: #ddd; border-radius: 99px; margin: 8px auto 14px; }
.sheet h2 { font-family: var(--serif); font-weight: 500; }
.sheet .hero-img { height: 200px; border-radius: 18px; background: #ddd center/cover; margin-bottom: 12px; }
.mod { margin: 16px 0; }
.mod h4 { font-size: 14px; margin-bottom: 8px; }
.opt {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px;
}
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }

.form { display: grid; gap: 10px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; background: #111; color: #fff;
}
.auth-wrap { max-width: 460px; margin: 24px auto; background: #1c1c1c; border: 1px solid #3a3a3a; border-radius: 28px; padding: 28px; }
.auth-wrap h1 { font-family: var(--serif); font-weight: 500; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.alert { padding: 10px 12px; border-radius: 12px; background: #fde7e3; color: var(--danger); font-size: 13px; }
.okbox { padding: 10px 12px; border-radius: 12px; background: #e5f6ec; color: var(--ok); font-size: 13px; }

.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item img, .thumb { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: #eee; }
.totals { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-top: 16px; }
.totals div { display: flex; justify-content: space-between; margin: 6px 0; }
.totals .grand { font-weight: 800; font-size: 18px; border-top: 1px dashed var(--line); padding-top: 10px; }

.order {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px;
}
.status {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
}
.s-nuevo { background: #fff3cd; color: #7a5a00; }
.s-preparacion { background: #d7ecff; color: #0b4a78; }
.s-listo { background: #e5f6ec; color: #1b7f4a; }
.s-camino { background: #eee4ff; color: #4c1d95; }
.s-entregado { background: #ececec; color: #444; }
.s-cancelado { background: #fde7e3; color: #b42318; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.kpi b { display: block; font-size: 26px; font-family: var(--serif); }
.kpi span { color: var(--muted); font-size: 13px; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.table th { background: var(--green); color: #fff; }

.notice-banner {
  position: fixed; right: 16px; bottom: 86px; z-index: 70;
  background: var(--green); color: #fff; border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow); max-width: 320px; display: none;
}
.notice-banner.show { display: block; animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } }

.hidden { display: none !important; }
.split { display: grid; gap: 10px; }
@media (min-width: 720px) {
  .split-2 { grid-template-columns: 1fr 1fr; }
  .modal-bg { align-items: center; }
  .sheet { border-radius: 28px; }
}

.ops-row { background:#1c1c1c; border:1px solid #3a3a3a; border-radius:18px; padding:14px; margin-top:14px; }
.wait-lab { display:block; margin:12px 0 8px; font-weight:700; color:#ffcc00; }
.wait-row { display:flex; flex-wrap:wrap; gap:8px; }
.card-block { background:#1c1c1c; border:1px solid #3a3a3a; border-radius:18px; padding:16px; margin:14px 0; }
.card-block h3 { font-family:var(--serif); letter-spacing:.04em; margin-bottom:10px; }
.bars { display:grid; gap:8px; }
.bar-row { display:grid; grid-template-columns: 92px 1fr 90px; gap:8px; align-items:center; font-size:13px; }
.bar-lab { color:#c4b8a0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-track { height:12px; background:#2a2a2a; border-radius:99px; overflow:hidden; }
.bar-fill { height:100%; background:linear-gradient(90deg,#c41e3a,#ffcc00); border-radius:99px; }
.bar-val { text-align:right; font-weight:700; }
.order, .totals, .kpi { background:#1c1c1c; color:#fff8e7; }
.table { background:#141414; color:#fff8e7; }
.table th { background:#c41e3a; }
.qty button { background:#111; color:#fff; border-color:#444; }
.cat { background:#1c1c1c; color:#fff; }
@media (prefers-color-scheme: dark) {
  body { background:#0b0b0b; color:#fff8e7; }
}
.order { background:#1b1b1b !important; color:#fff8e7 !important; border:1px solid #3a3a3a; border-radius:16px; padding:14px; margin:10px 0; }
.order .hint { color:#c4b8a0; }
.kpi b { font-size:22px; }
.auth-wrap { color:#fff8e7; }

details.fold {
  background: #161616;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 4px 12px 10px;
  margin: 12px 0;
  color: #fff8e7;
}
details.fold > summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 4px;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; opacity: .7; }
details.fold:not([open]) > summary::after { content: "▸"; }

.pos-wrap { display:grid; grid-template-columns: 1.4fr .9fr; gap:12px; align-items:start; }
@media (max-width: 800px) { .pos-wrap { grid-template-columns: 1fr; } }
.pos-channels, .pos-fams { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.pos-fam { background:#222; color:#fff8e7; border:1px solid #444; border-radius:12px; padding:10px 12px; }
.pos-fam.on { background:#c41e3a; border-color:#c41e3a; }
.pos-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap:8px; }
.pos-item { background:#1c1c1c; color:#fff8e7; border:1px solid #333; border-radius:14px; padding:8px; text-align:left; }
.pos-pic { display:block; height:78px; border-radius:10px; background:#111 center/cover no-repeat; margin-bottom:6px; }
.pos-ticket { background:#141414; border:1px solid #333; border-radius:16px; padding:12px; position:sticky; top:8px; }
.pos-line { display:grid; grid-template-columns: 1fr auto auto; gap:8px; align-items:center; padding:8px 0; border-bottom:1px solid #2a2a2a; }
.pos-total { font-size:22px; font-weight:800; margin:12px 0; color:#ffcc00; }
.pos-name { width:100%; background:#1c1c1c; color:#fff8e7; border:1px solid #333; border-radius:12px; padding:10px 12px; margin-bottom:8px; }

.pos-change{color:#ffcc00;font-weight:800;font-size:18px;margin:8px 0 12px}
.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0; }
.toolbar .btn { min-height:44px; }
.cal-wrap { background:#1c1c1c; color:#fff8e7; }
.cal-week, .cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.cal-week { margin:10px 0 6px; font-size:11px; color:#b7a48a; text-align:center; }
.cal-day {
  border:1px solid #333; background:#141414; color:#fff8e7; border-radius:10px;
  min-height:52px; padding:6px 4px; display:flex; flex-direction:column; align-items:center; gap:2px;
}
.cal-day small { font-size:9px; color:#ffcc00; }
.cal-day.has { border-color:#c41e3a; }
.cal-day.on { background:#c41e3a; border-color:#c41e3a; }
.cal-empty { min-height:52px; }
