@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn.woff2") format("woff2-variations"),
       url("/static/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fbf5ee;
  --surface: #ffffff;
  --surface-2: #f6ece1;
  --ink: #2a1c12;
  --muted: #8b7768;
  --line: #eadccd;
  --brand: #d4402a;
  --brand-dark: #a92f1d;
  --brand-ink: #ffffff;
  --cheese: #f3b23a;
  --ok: #23955a;
  --ok-soft: #e3f4ea;
  --warn: #d9821c;
  --warn-soft: #fdf0dc;
  --danger: #c2352b;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(70, 35, 10, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  direction: rtl;
  line-height: 1.7;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ------------------------------------------------ دکمه‌ها و فرم */
.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer;
  font-weight: 700; background: var(--surface-2); transition: transform .08s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.warn { background: var(--warn); color: #fff; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid currentColor; }
.btn.light { background: #fff; color: var(--brand); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.block { display: block; width: 100%; }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 16px 20px; font-size: 18px; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 8px 0; font-weight: 600; }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
input[inputmode="tel"], input[inputmode="numeric"] { direction: ltr; text-align: right; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.err { color: var(--danger); font-weight: 600; }
.notice {
  background: var(--warn-soft); color: #7a4a0d; border-radius: var(--radius);
  padding: 14px 16px; font-weight: 600; margin-bottom: 16px;
}
label.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.seg { display: flex; gap: 8px; margin-bottom: 12px; }
.seg button {
  flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; cursor: pointer; font-weight: 600;
}
.seg button.on { border-color: var(--brand); background: #fdeae6; color: var(--brand-dark); }

/* ------------------------------------------------ صفحه مشتری */
.hero {
  background: var(--brand); color: #fff; padding: 22px 16px 46px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::after { /* لبه دندانه‌دار شبیه برش */
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 22px;
  background: linear-gradient(135deg, var(--bg) 25%, transparent 25%) -11px 0 / 22px 22px,
              linear-gradient(225deg, var(--bg) 25%, transparent 25%) -11px 0 / 22px 22px;
}
.logo { font-size: 34px; font-weight: 900; letter-spacing: -.5px; }
.logo .tri { display: inline-block; width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--cheese); margin-inline-start: 6px; vertical-align: 4px; }
.tag { opacity: .9; font-size: 15px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 120px; }
.sec { font-size: 18px; margin: 22px 0 10px; }
.cat { font-size: 15px; color: var(--muted); margin: 18px 4px 8px; font-weight: 700; }
.hint { color: var(--muted); font-size: 14px; margin: -4px 0 10px; }

.banner {
  display: block; margin-top: -24px; margin-bottom: 14px; position: relative; z-index: 2;
  background: var(--ok); color: #fff; text-decoration: none; padding: 12px 16px; border-radius: var(--radius);
  font-weight: 700; box-shadow: var(--shadow);
}
.menu { display: grid; gap: 10px; margin-top: -10px; position: relative; z-index: 1; }
.item {
  display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.item.off { opacity: .55; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-weight: 800; font-size: 17px; }
.item-desc { color: var(--muted); font-size: 13px; }
.item-price { font-weight: 700; color: var(--brand-dark); margin-top: 2px; }
.qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--brand); color: #fff;
  font-size: 22px; font-weight: 700; cursor: pointer; display: grid; place-items: center; line-height: 1;
}
.qty button.minus { background: var(--surface-2); color: var(--ink); }
.qty .n { min-width: 22px; text-align: center; font-weight: 800; font-size: 18px; }
.qty .add { width: auto; border-radius: 12px; padding: 0 14px; font-size: 15px; }
.soldout { font-size: 13px; color: var(--danger); font-weight: 700; }

.cartbar {
  position: fixed; inset: auto 12px 12px 12px; max-width: 536px; margin: 0 auto;
  background: var(--ink); color: #fff; border-radius: 18px; padding: 12px 14px 12px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 10;
}
.cartbar small { opacity: .75; display: block; font-size: 13px; }

.summary-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.summary-row.total { border-top: 1.5px dashed var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 4px; cursor: pointer; text-align: center;
}
.slot b { display: block; font-size: 16px; }
.slot small { font-size: 12px; color: var(--ok); }
.slot.few small { color: var(--warn); }
.slot.full { opacity: .4; cursor: not-allowed; }
.slot.full small { color: var(--danger); }
.slot.on { border-color: var(--brand); background: #fdeae6; }

/* ------------------------------------------------ صفحه وضعیت */
.ticket { text-align: center; padding: 22px 16px; margin-top: -26px; position: relative; z-index: 2; }
.ticket .label { color: var(--muted); font-size: 14px; }
.ticket .num { font-size: 72px; font-weight: 900; line-height: 1.1; color: var(--brand); }
.state { border-radius: var(--radius); padding: 18px 16px; margin: 14px 0; text-align: center; }
.state h2 { margin: 0 0 4px; font-size: 22px; }
.state p { margin: 0; }
.state.pending { background: var(--warn-soft); color: #7a4a0d; }
.state.cooking { background: #fdeae6; color: var(--brand-dark); }
.state.ready { background: var(--ok); color: #fff; animation: pulse 1.4s ease-in-out infinite; }
.state.done { background: var(--surface-2); color: var(--muted); }
.countdown { font-size: 28px; font-weight: 900; direction: ltr; display: inline-block; }
@keyframes pulse { 50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(35,149,90,.18); } }

.steps { display: flex; justify-content: space-between; gap: 4px; margin: 6px 0 4px; }
.steps div { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; }
.steps div::before {
  content: ""; position: absolute; top: 4px; right: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%;
  background: var(--line);
}
.steps div.done::before { background: var(--ok); }
.steps div.now::before { background: var(--brand); box-shadow: 0 0 0 4px #fbd3cb; }
.steps div.now { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------ کارکنان */
.staff { background: #f3ede6; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap;
}
.topbar .logo { font-size: 22px; }
.topbar .stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; opacity: .9; flex: 1; }
.topbar .stats b { color: var(--cheese); }
.net { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.net.off { background: var(--danger); }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.switch .knob { width: 44px; height: 24px; border-radius: 12px; background: #6b5b4f; position: relative; transition: .2s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch.on .knob { background: var(--ok); }
.switch.on .knob::after { right: 23px; }

.tabs { display: flex; gap: 6px; padding: 10px 16px 0; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; padding: 10px 14px; border-radius: 12px 12px 0 0; cursor: pointer; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.tabs button.on { background: var(--surface); color: var(--ink); }
.tabs .count { background: var(--brand); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; margin-inline-start: 4px; }
.panel { background: var(--surface); margin: 0 16px 16px; border-radius: 0 0 var(--radius) var(--radius); padding: 16px; min-height: 60vh; }
.panel h3 { margin: 4px 0 12px; font-size: 16px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

.ocard { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.ocard .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ocard .no { font-size: 30px; font-weight: 900; color: var(--brand); line-height: 1; }
.ocard .meta { font-size: 13px; color: var(--muted); }
.ocard ul { margin: 0; padding: 0 18px 0 0; }
.ocard .total { font-weight: 800; }
.ocard .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ocard .actions .btn { flex: 1; }
.ocard.late { border-color: var(--danger); }
.ocard.ready { border-color: var(--ok); background: var(--ok-soft); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 8px; background: var(--surface-2); }
.badge.dinein { background: #e7e1fb; color: #4b3a99; }
.badge.counter { background: #e0eefb; color: #1d5a8c; }
.badge.timer { background: var(--warn-soft); color: #7a4a0d; }
.badge.returning { background: #fff1c9; color: #7a5200; }
.badge.newc { background: var(--ok-soft); color: #17663d; }
.cnote { background: #fff8e6; border-radius: 8px; padding: 4px 8px; color: #6b4a00; }
.topbar .stats b.bad { color: #ff8a80; }

.cust-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.cust-head .search { margin: 0; }
table.cust { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cust th { text-align: right; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.cust td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.cust td.num { white-space: nowrap; }
table.cust input[type=text] { margin: 0; padding: 6px 8px; font-size: 14px; min-width: 160px; }
table.cust input[type=checkbox] { width: 20px; height: 20px; margin: auto; accent-color: var(--ok); }
table.cust .nm { cursor: pointer; font-weight: 700; }
table.cust .nm::before { content: "◂ "; color: var(--muted); }
table.cust tr.open .nm::before { content: "▾ "; }
table.cust tr.hist td { background: var(--surface-2); font-size: 13px; }
table.cust tr.hist ul { margin: 0; padding-right: 18px; }
.cprof { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.cprof .k { color: var(--muted, #6e5b4c); margin-left: 6px; }
.cdel { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.search { max-width: 220px; display: inline-block; margin: 0 0 12px; }
details summary { cursor: pointer; color: var(--muted); font-weight: 700; margin: 16px 0 8px; }

.walk { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
@media (max-width: 860px) { .walk { grid-template-columns: 1fr; } }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pick button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 8px; cursor: pointer; text-align: center; font-weight: 700;
}
.pick button small { display: block; color: var(--muted); font-weight: 500; }
.pick button:active { background: #fdeae6; }
.pick button:disabled { opacity: .4; }
.cartlist .row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }

table.menu-edit { width: 100%; border-collapse: collapse; font-size: 14px; }
table.menu-edit th { text-align: right; color: var(--muted); font-weight: 600; padding: 6px; }
table.menu-edit td { padding: 4px; vertical-align: middle; }
table.menu-edit input { margin: 0; padding: 7px 8px; font-size: 14px; }
.settings-form { max-width: 520px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.overlay {
  position: fixed; inset: 0; background: rgba(42,28,18,.88); display: grid; place-items: center; z-index: 100; padding: 16px;
}
.login-card { width: 100%; max-width: 340px; text-align: center; }
.login-card .logo { color: var(--brand); margin-bottom: 12px; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 12px; z-index: 200; box-shadow: var(--shadow); max-width: 90vw;
}

/* ------------------------------------------------ آشپزخانه (تیره، روی گوشی) */
.kitchen { background: #17110c; color: #f5ece3; }
.kitchen .topbar { background: #000; }
.kitchen .kwrap { padding: 12px; display: grid; gap: 12px; }
.kcard { background: #2a1f17; border-radius: 16px; padding: 14px; border: 2px solid transparent; }
.kcard.new { border-color: var(--cheese); }
.kcard.late { border-color: var(--danger); }
.kcard .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kcard .no { font-size: 40px; font-weight: 900; color: var(--cheese); line-height: 1; }
.kcard .meta { font-size: 14px; opacity: .8; text-align: left; }
.kcard ul { list-style: none; padding: 0; margin: 10px 0; font-size: 20px; font-weight: 700; }
.kcard li { padding: 3px 0; border-bottom: 1px solid #3a2d23; display: flex; justify-content: space-between; }
.kcard li .q { color: var(--cheese); }
.kcard .note { background: #4a2f12; color: #ffd9a0; padding: 6px 10px; border-radius: 10px; margin-bottom: 10px; }
.kcard .btn { width: 100%; padding: 16px; font-size: 20px; }
.kready { padding: 0 12px 24px; }
.kready h3 { font-size: 15px; opacity: .7; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #1f4d33; color: #c8f2d7; border: 0; border-radius: 10px; padding: 8px 14px; font-size: 18px; font-weight: 800; cursor: pointer; }
.kitchen .empty { color: #a99686; padding: 60px 20px; font-size: 18px; }

/* ------------------------------------------------ تابلو */
.board { background: #120c08; color: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.board header { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; }
.board header .logo { font-size: 40px; color: var(--cheese); }
.board .cols { flex: 1; display: grid; grid-template-columns: 3fr 2fr; gap: 20px; padding: 0 28px 28px; }
.board .col { border-radius: 24px; padding: 20px; }
.board .col h2 { margin: 0 0 16px; font-size: 32px; }
.board .col.ready { background: #15432b; }
.board .col.cooking { background: #2a1f17; }
.board .nums { display: flex; flex-wrap: wrap; gap: 14px; }
.board .nums span { font-size: 64px; font-weight: 900; min-width: 120px; text-align: center; border-radius: 16px; padding: 4px 12px; }
.board .ready .nums span { background: #1f6b43; }
.board .cooking .nums span { font-size: 40px; min-width: 80px; background: #3a2d23; color: #d9c7b6; }
@media (max-width: 700px) { .board .cols { grid-template-columns: 1fr; } }

/* ------------------------------------------------ نسخه ۱.۷: نگه‌داشتن، پرداخت، انبار، گزارش */
.loadbar { display: flex; gap: 4px; align-items: stretch; padding: 6px 16px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.loadbar .lb-title { font-size: 12px; font-weight: 700; color: var(--muted); align-self: center; margin-inline-end: 6px; white-space: nowrap; }
.lb-cell { position: relative; min-width: 62px; flex: 0 0 auto; border-radius: 8px; background: var(--surface-2); padding: 3px 6px; text-align: center; overflow: hidden; }
.lb-cell i { position: absolute; inset-inline: 0; bottom: 0; background: #bfe5cf; z-index: 0; }
.lb-cell.high i { background: #f6d39a; }
.lb-cell.over i { background: #f2b3aa; }
.lb-cell b, .lb-cell small { position: relative; z-index: 1; display: block; line-height: 1.3; }
.lb-cell b { font-size: 13px; }
.lb-cell small { font-size: 11px; color: var(--ink); }
.lowbar { background: var(--warn-soft); color: #7a4a0d; padding: 6px 16px; font-size: 14px; font-weight: 600; }
.badge.pay { background: #e3eefc; color: #1d4f86; cursor: pointer; }
.card.flat { box-shadow: none; border: 1.5px solid var(--line); margin-bottom: 12px; }

.held { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff8e6; border: 1.5px dashed var(--cheese);
  border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; }
.held-title { font-weight: 700; color: #7a5200; }
.held-item { display: inline-flex; align-items: stretch; }
.held-chip { border: 1.5px solid var(--cheese); background: #fff; border-radius: 0 12px 12px 0; padding: 6px 12px; cursor: pointer; text-align: right; }
.held-chip small { display: block; color: var(--muted); font-size: 12px; }
.held-x { border: 1.5px solid var(--cheese); border-right: 0; background: #fff; border-radius: 12px 0 0 12px; padding: 0 10px; cursor: pointer; color: var(--danger); font-size: 18px; }

.pick-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.pick-head .search { margin: 0; max-width: 260px; }
.chips-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-nav { border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.chip-nav.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pick button { position: relative; }
.pick button em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.pick button em.lowq { color: var(--danger); font-weight: 700; }
.pick .inq { position: absolute; top: -8px; left: -8px; background: var(--brand); color: #fff; border-radius: 12px; min-width: 24px; height: 24px;
  display: grid; place-items: center; font-size: 13px; padding: 0 6px; }
.walk-cart { box-shadow: none; border: 1.5px solid var(--line); align-self: start; position: sticky; top: 64px; }
.walk-cart-head { display: flex; justify-content: space-between; align-items: center; }
.walk-cart-head h3 { margin: 0; }
.disc-row { align-items: center; }
.disc-row input { width: 130px; margin: 0; padding: 6px 10px; }
.hold-btn { margin: 10px 0 6px; border-color: var(--cheese); color: #7a5200; }
.walk-more summary { margin: 8px 0; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.pay-row .btn { padding: 14px 8px; font-size: 16px; }

.rep-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rep-presets { margin: 0; flex-wrap: wrap; }
.rep-presets button { flex: 0 0 auto; padding: 8px 14px; }
.rep-custom { display: flex; gap: 6px; align-items: center; }
.rep-custom input { width: 140px; margin: 0; padding: 8px 10px; }
.rep-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; }
.tile span { display: block; color: var(--muted); font-size: 13px; }
.tile b { font-size: 18px; }
.tile.big { background: var(--ink); color: #fff; border-color: var(--ink); }
.tile.big span { color: #d9c7b6; }
.tile.big b { color: var(--cheese); font-size: 22px; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .rep-grid { grid-template-columns: 1fr; } }
.bar-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 14px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--brand); border-radius: 6px; min-width: 2px; }
.bar-val { color: var(--muted); white-space: nowrap; font-size: 13px; }
.bar-row:hover .bar { background: var(--brand-dark); }

.stock-table tr.low td { background: #fdeceb; }
.pline { display: grid; grid-template-columns: 1.4fr 1fr 70px 1fr 36px; gap: 6px; margin-bottom: 6px; }
.pline input, .pline select { margin: 0; padding: 8px; font-size: 14px; }
.pline .hidden { display: block !important; visibility: hidden; }
@media (max-width: 600px) { .pline { grid-template-columns: 1fr 1fr; } }
.easy-report { background: var(--surface-2); border-radius: 12px; padding: 12px; white-space: pre-wrap; font-family: inherit; font-size: 14px; max-height: 360px; overflow: auto; }

/* منوی مشتری: پرش به گروه‌ها */
.catnav { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px; background: var(--bg); margin: 0 -2px; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav button { flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.catnav button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.item .left { font-size: 12px; color: var(--warn); font-weight: 700; }

/* پرسنل */
.me { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.me span { color: var(--cheese); font-weight: 700; }
.btn.ghost-dark { background: transparent; color: #fff; border: 1.5px solid #6b5b4f; }
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 6px; }
.areas label.check { margin: 0; }
.areas input:disabled + span, .areas label.check:has(input:disabled) { opacity: .75; }
.ucard { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: #fff; }
.ucard.off { opacity: .55; }
.ucard .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ucard .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ucard .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

/* ------------------------------------------------ نسخه گوشی صندوق (فقط صفحه‌های باریک؛ لپ‌تاپ بدون تغییر) */
.mobile-only, .walk-bar, .sheet-backdrop { display: none; }
@media (max-width: 700px) {
  .mobile-only { display: inline-block; }
  .staff .topbar { position: static; padding: 8px 10px; gap: 6px 10px; }
  .staff .topbar .logo { font-size: 17px; }
  .staff .topbar .stats { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: 14px; font-size: 12.5px; white-space: nowrap; scrollbar-width: none; }
  .staff .topbar .stats::-webkit-scrollbar { display: none; }
  .staff .switch { font-size: 12.5px; gap: 6px; }
  .staff .me { margin-inline-start: auto; font-size: 12.5px; gap: 6px; }
  .staff .me .btn { padding: 4px 8px; font-size: 12.5px; }
  .staff .lowbar { font-size: 13px; padding: 6px 10px; }
  .staff .tabs { position: sticky; top: 0; z-index: 25; background: #f3ede6; padding: 6px 6px 0; scrollbar-width: none; }
  .staff .tabs::-webkit-scrollbar { display: none; }
  .staff .tabs button { padding: 9px 12px; font-size: 14px; }
  .staff .panel { margin: 0 6px 12px; padding: 12px 10px; }
  .staff .grid { grid-template-columns: 1fr; }
  .staff .search { max-width: none; width: 100%; }
  .staff .ocard .actions .btn { padding: 12px 8px; }

  /* ثبت حضوری: سبد کشویی از پایین */
  .staff .walk { display: block; }
  .staff .pick-head .search { max-width: none; }
  .staff .pick { grid-template-columns: 1fr 1fr; }
  .staff .pick button { padding: 10px 6px; font-size: 14px; }
  #tab-walk { padding-bottom: 96px; }
  .walk-bar { display: flex; position: fixed; inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px; z-index: 30;
    background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 12px; align-items: center; justify-content: space-between;
    gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .walk-bar small { display: block; opacity: .75; font-size: 12px; }
  .walk-bar.empty { display: none; }
  .staff .walk-cart { position: fixed; inset: auto 0 0 0; top: auto; z-index: 40; max-height: 88vh; overflow-y: auto; margin: 0;
    border-radius: 18px 18px 0 0; border: 0; background: #fff; box-shadow: 0 -8px 24px rgba(0,0,0,.2);
    transform: translateY(105%); transition: transform .22s ease; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .staff .walk-cart.open { transform: none; }
  .sheet-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(42,28,18,.45); z-index: 35; }
  .staff .held { padding: 8px; }

  /* گزارش، انبار، پرسنل */
  .staff .rep-head, .staff .rep-actions { flex-direction: column; align-items: stretch; }
  .staff .rep-custom { flex-wrap: wrap; }
  .staff .rep-custom input { flex: 1 1 40%; width: auto; }
  .staff .tiles { grid-template-columns: 1fr 1fr; }
  .staff .tile b { font-size: 15px; }
  .staff .tile.big b { font-size: 18px; }
  .staff .rep-grid { grid-template-columns: minmax(0, 1fr); }
  .staff .rep-grid > * { min-width: 0; }
  .staff #repStaff { overflow-x: auto; }
  .staff .bar-row { grid-template-columns: 96px minmax(0, 1fr) auto; font-size: 13px; }
  .staff .bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .staff .row2, .staff .areas { grid-template-columns: 1fr; }
  .staff .toast { bottom: 96px; }
}

/* منوی مشتری: هر گروه جدا */
.catnav button .badge { display: inline-block; margin-inline-start: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.catnav button.on .badge { background: #fff; color: var(--brand); }
.catnav button .badge.hidden { display: none; }
.menu .next-cat { margin-top: 14px; font-weight: 700; }

/* تغییر سفارش توسط مشتری */
.badge.edited { background: #fde2dc; color: #a32a17; }
#editor .menu { margin-top: 4px; }
.edit-bar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.edit-bar .summary-row { margin-bottom: 8px; }
.catnav:not(.hidden) + .menu { margin-top: 4px; }
.edit-bar { z-index: 6; box-shadow: 0 -8px 16px -10px rgba(42,28,18,.25); }
.edit-bar .btns { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.edit-bar .btns .btn { margin: 0 !important; }

/* انتخاب‌گر تاریخ و ساعت */
.picker { position: absolute; z-index: 100; background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(42,28,18,.22); padding: 10px; width: 292px; font-size: 14px; user-select: none; }
.picker button { font: inherit; cursor: pointer; }
.pk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pk-head b { font-size: 15px; }
.pk-nav { border: 0; background: var(--surface-2, #f6efe8); width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; }
.pk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.pk-wd { color: var(--muted); font-size: 12px; padding: 4px 0; }
.pk-day, .pk-cell { border: 0; background: transparent; border-radius: 9px; padding: 7px 0; }
.pk-day:hover, .pk-cell:hover:not(:disabled) { background: var(--surface-2, #f6efe8); }
.pk-day.fri { color: var(--brand); }
.pk-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.pk-day.on, .pk-cell.on { background: var(--brand); color: #fff; }
.pk-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.pk-title { color: var(--muted); font-size: 12.5px; margin: 4px 2px; }
.pk-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pk-mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pk-cell { border: 1px solid var(--line); }
.pk-cell:disabled { opacity: .35; cursor: default; }
input.picking { border-color: var(--brand); }

/* عکس اقلام منو */
.item.has-ph { gap: 12px; }
.item-ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: 0 0 72px; background: #f3ece4; cursor: zoom-in; }
.item.off .item-ph { filter: grayscale(1); opacity: .6; }
.photo-view { position: fixed; inset: 0; z-index: 200; background: rgba(20,12,6,.88); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 16px; color: #fff; text-align: center; }
.photo-view img { max-width: 100%; max-height: 68vh; border-radius: 16px; object-fit: contain; }
.photo-view .cap { margin-top: 14px; display: grid; gap: 4px; max-width: 520px; }
.photo-view .cap b { font-size: 19px; }
.photo-view .cap small { opacity: .8; }
.photo-view .close { margin-top: 18px; font-size: 13px; opacity: .6; }
.ph-box { position: relative; width: 56px; height: 56px; }
.ph-pick { width: 56px; height: 56px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; padding: 0; overflow: hidden;
  cursor: pointer; font: inherit; font-size: 11.5px; color: var(--muted); }
.ph-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-rm { position: absolute; top: -7px; left: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--brand);
  color: #fff; font-size: 14px; line-height: 22px; padding: 0; cursor: pointer; }

/* کارت نصب روی گوشی */
.install-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 12px; margin: 14px 0; box-shadow: var(--shadow); }
.install-card img { width: 48px; height: 48px; border-radius: 12px; flex: 0 0 48px; }
.install-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.install-text span { font-size: 13px; color: var(--muted); line-height: 1.7; }
.install-acts { display: grid; gap: 6px; }

/* ------------------------------------------------ تماس و پیامک سریع */
.contact { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.contact .btn { padding: 4px 10px; font-size: 13px; text-decoration: none; color: inherit; }
.dlg { border: 0; border-radius: 18px; padding: 20px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); direction: rtl; }
.dlg::backdrop { background: rgba(42, 28, 18, .45); }
.dlg h3 { margin: 0 0 12px; }
.dlg textarea { width: 100%; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tpl { text-align: right; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 14px; }
.tpl:hover { border-color: var(--brand); }
.table-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }

/* ۱.۱۴: نام قلم دکمه‌ای است که برگه جزئیات را باز می‌کند */
button.item-name { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 800; color: inherit; text-align: right; cursor: pointer; }
button.item-name:hover { color: var(--brand-dark); }
.fav-dot { color: var(--brand); font-size: .9em; }
.item-ph { cursor: zoom-in; }

/* برگه جزئیات محصول */
.sheet-ov { position: fixed; inset: 0; z-index: 210; background: rgba(20, 12, 6, .55); display: flex; align-items: flex-end; justify-content: center; animation: ovIn .2s ease both; }
.sheet-ov.out { animation: ovOut .2s ease both; }
@keyframes ovIn { from { background: rgba(20, 12, 6, 0); } }
@keyframes ovOut { to { background: rgba(20, 12, 6, 0); opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: shIn .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes shIn { from { transform: translateY(40%); opacity: .4; } }
.sheet-x { position: absolute; top: 12px; left: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.sheet-ph { aspect-ratio: 4 / 3; background: #f6efe6; display: grid; place-items: center; overflow: hidden; border-radius: 22px 22px 0 0; }
.sheet-ph img { width: 100%; height: 100%; object-fit: cover; }
.sheet-ph img.ill { width: 78%; height: auto; object-fit: contain; }
.sheet-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 20px; line-height: 1.5; }
.sheet-fav { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #ece2d6; background: #fff; cursor: pointer; display: grid; place-items: center; }
.sheet-fav svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.sheet-fav.on { border-color: var(--brand); }
.sheet-fav.on svg { fill: var(--brand); stroke: var(--brand); }
.sheet-sold { margin: 0; font-size: 13px; font-weight: 700; color: #8a4a1e; }
.sheet-desc { margin: 0; font-size: 14.5px; color: #5a4636; line-height: 1.9; }
.sheet-price { margin: 4px 0 0; font-size: 19px; font-weight: 900; }
.sheet-acts { display: flex; gap: 8px; margin-top: 8px; }
.sheet-acts .btn.primary { flex: 1; }
@media (min-width: 640px) { .sheet-ov { align-items: center; } .sheet { border-radius: 22px; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-ov { animation: none; } }

/* کارت معرفی سازنده سامانه، پایین منو */
.dev-card { display: flex; flex-direction: column; gap: 2px; margin: 22px 0 8px; padding: 14px 16px; border-radius: 14px; border: 1.5px dashed #e3d4c2; text-decoration: none; color: inherit; background: #fffaf3; }
.dev-card b { font-size: 14px; }
.dev-card span { font-size: 12.5px; color: #7a6555; }
.dev-card:hover { border-color: var(--brand); }
.next-num { margin: 6px 0 0; font-size: 14px; } .next-num b { color: var(--ink); font-size: 16px; }
.sr-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 560px; border: 0; border-radius: 14px; background: #eceff2; }
.meta.refund { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: #eef7f0; } .meta.refund.need { background: #fdecea; color: #a12c1f; font-weight: 700; }
.pay-msg { background: #fdecea; color: #a12c1f; border-radius: 10px; padding: 8px 12px; font-weight: 700; margin-bottom: 8px; }
.pay-ok { background: #e7f6ec; color: #1f6b3a; border-radius: 10px; padding: 8px 12px; font-weight: 700; margin-bottom: 8px; }
.legal-links a { color: inherit; }

/* ۱.۱۸: سفارش‌های «بعداً» در آشپزخانه */
.later-title { margin: 18px 4px 4px; font-size: 14px; color: #cdb9a5; font-weight: 800; }
.kcard.later { opacity: .6; border-style: dashed; border-color: #5a4636; }
.kcard.later .no { color: #cdb9a5; }
.ocard.later { opacity: .75; border-style: dashed; }

/* ۱.۱۹: امتیاز ستاره‌ای مشتری */
#fbBox { text-align: center; }
.fb-stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0 4px; direction: ltr; }
.fb-stars button { background: none; border: 0; padding: 2px 4px; font-size: 40px; line-height: 1; color: #e3d8cb; cursor: pointer; transition: transform .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.fb-stars button.on { color: var(--cheese); }
.fb-stars button:active { transform: scale(1.2); }
.fb-stars.fixed { margin: 2px 0 6px; } .fb-stars.fixed i { font-style: normal; font-size: 30px; color: #e3d8cb; } .fb-stars.fixed i.on { color: var(--cheese); }
.fb-word { font-weight: 800; color: var(--ink-2, #5a4636); min-height: 24px; margin-bottom: 8px; }
#fbText { width: 100%; border: 1.5px solid var(--line, #ece2d6); border-radius: 12px; padding: 10px 12px; font: inherit; margin-bottom: 10px; resize: vertical; background: #fff; }
.fb-done { padding: 4px 0 2px; }

/* ۱.۱۹: کارت مشتری، وفاداری، نظرها، تبلیغات، برگه رمزینه */
body.noscroll { overflow: hidden; }
.qr-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.qr-links .muted { flex: 1 1 220px; }
.stars { display: inline-flex; direction: ltr; gap: 1px; }
.stars i { font-style: normal; color: #e3d8cb; font-size: 18px; line-height: 1; } .stars i.on { color: var(--cheese); }
.stars.big i { font-size: 28px; }

.ccard-ov { position: fixed; inset: 0; z-index: 60; background: rgba(32, 20, 12, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.ccard { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fffdf9; color: var(--ink, #20140c); border-radius: 22px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); animation: ccIn .22s ease-out; overscroll-behavior: contain; }
@keyframes ccIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.cc-load { padding: 40px 20px; text-align: center; color: #7a6555; }
.cc-head { position: relative; display: flex; align-items: center; gap: 14px; padding: 22px 20px 18px; color: #fff; background: linear-gradient(135deg, #d4402a, #a92f1d); border-radius: 22px 22px 0 0; }
.cc-x { position: absolute; top: 10px; left: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 16px; cursor: pointer; }
.cc-av { flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #f3b23a; color: #20140c; font-size: 28px; font-weight: 900; box-shadow: 0 0 0 4px rgba(255, 255, 255, .28); }
.cc-who { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cc-who h2 { font-size: 21px; font-weight: 900; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cc-ph { opacity: .9; font-size: 15px; letter-spacing: .5px; }
.cc-level { margin-top: 4px; font-size: 12.5px; font-weight: 800; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #20140c; }
.cc-level.vip { background: #f3b23a; } .cc-level.back { background: #d9f2e2; color: #1e6b3e; } .cc-level.new { background: #fff2cf; color: #8a5208; } .cc-level.away { background: #ffd9d3; color: #a92f1d; }
.cc-act { padding: 12px 16px 4px; } .cc-act .contact { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 16px; }
.cc-kpi { background: #f6efe6; border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-kpi b { font-size: 16.5px; font-weight: 900; line-height: 1.4; } .cc-kpi span { font-size: 11.5px; color: #5a4636; font-weight: 700; } .cc-kpi small { font-size: 10.5px; color: #7a6555; }
.cc-sec { padding: 10px 16px 14px; border-top: 1px solid #ece2d6; }
.cc-sec h3 { font-size: 14px; font-weight: 900; margin-bottom: 8px; color: #5a4636; }
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.cc-grid > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed #ece2d6; } .cc-grid span { color: #7a6555; } .cc-grid b { font-weight: 800; text-align: left; }
.cc-sub { font-size: 12.5px; color: #7a6555; margin: 10px 0 6px; font-weight: 700; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; } .cc-chip { background: #ffe9b0; color: #6b4300; font-weight: 800; font-size: 13px; padding: 4px 12px; border-radius: 99px; }
.cc-fb { padding: 8px 0; border-bottom: 1px dashed #ece2d6; } .cc-fb small { margin-inline-start: 8px; color: #7a6555; } .cc-fb p { margin-top: 4px; font-size: 14px; line-height: 1.8; }
.cc-sec input[type=text] { width: 100%; margin: 0 0 8px; }
.cc-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; } .cc-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ok, #2f7a4d); }
.cc-orders { list-style: none; padding: 0; margin: 0; }
.cc-orders li { padding: 8px 0; border-bottom: 1px solid #f1e9de; }
.cc-orders .o-top { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; } .cc-orders .o-top span { color: #7a6555; flex: 1; } .cc-orders .o-top em { font-style: normal; font-weight: 800; }
.cc-orders .o-items { font-size: 12.5px; color: #5a4636; margin-top: 2px; line-height: 1.7; }
@media (max-width: 560px) {
  .ccard-ov { padding: 0; align-items: flex-end; } .ccard { max-height: 94vh; border-radius: 22px 22px 0 0; animation: ccUp .25s ease-out; }
  @keyframes ccUp { from { transform: translateY(100%); } to { transform: none; } }
  .cc-kpis { grid-template-columns: 1fr 1fr; } .cc-grid { grid-template-columns: 1fr; }
}

.insights { margin-bottom: 14px; }
.ins-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ins-tile { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: inset 0 0 0 1.5px var(--line, #ece2d6); display: flex; flex-direction: column; gap: 2px; }
.ins-tile span { font-size: 12.5px; color: #7a6555; font-weight: 700; } .ins-tile b { font-size: 26px; font-weight: 900; line-height: 1.3; } .ins-tile small { font-size: 12px; color: #7a6555; }
.ins-tile.good b { color: #2f7a4d; }
.ins-note { margin: 10px 2px 0; font-size: 12.5px; color: #8a5208; background: #fff4dc; border-radius: 10px; padding: 8px 12px; line-height: 1.8; }
.ins-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin-top: 10px; }
.ins-card h3 { margin-bottom: 6px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.bar-row i { display: block; height: 10px; background: #f1e9de; border-radius: 99px; overflow: hidden; }
.bar-row i s { display: block; height: 100%; background: linear-gradient(90deg, #f3b23a, #d4402a); border-radius: 99px; }
.bar-row b { text-align: left; } .bar-row small { grid-column: 2 / 4; color: #7a6555; font-size: 11.5px; margin-top: -4px; }
.person { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; width: 100%; text-align: right; background: none; border: 0; border-bottom: 1px solid #f1e9de; padding: 8px 2px; font: inherit; cursor: pointer; }
.person:hover { background: #fbf6ee; } .person .pn { font-weight: 800; } .person .pm { grid-column: 1; font-size: 12.5px; color: #7a6555; } .person .pl { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 12px; color: #a92f1d; font-weight: 700; }
.fb-list { margin-top: 8px; max-height: 320px; overflow-y: auto; } .fb-item { padding: 8px 0; border-bottom: 1px solid #f1e9de; } .fb-item small { display: block; color: #7a6555; margin: 2px 0; } .fb-item p { font-size: 14px; line-height: 1.8; margin-bottom: 4px; }

.camp { margin-top: 12px; }
.camp-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; } .camp-form input, .camp-form select { margin: 0; flex: 1 1 140px; min-width: 0; }
.camp-card { border: 1.5px solid var(--line, #ece2d6); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.camp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; } .camp-top div { display: flex; flex-direction: column; } .camp-top small { color: #7a6555; }
.camp-warn { background: #fff4dc; color: #8a5208; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; margin: 8px 0 0; }
.camp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.camp-kpi { background: #f6efe6; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; } .camp-kpi span { font-size: 12px; color: #7a6555; font-weight: 700; } .camp-kpi b { font-size: 16px; font-weight: 900; } .camp-kpi small { font-size: 11.5px; color: #7a6555; }
.camp-kpi.up b { color: #2f7a4d; } .camp-kpi.down b { color: #b32d1f; }
.camp-chart { margin: 8px 0 4px; } .spark { width: 100%; height: 64px; display: block; } .spark rect { fill: #e3d8cb; } .spark rect.in { fill: #d4402a; }
.ins-card.wide { grid-column: 1 / -1; }
.ins-card.wide .fb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 18px; max-height: 360px; }
