/* Admin panel — page-specific styles (shared tokens live in ../assets/css/lebabak.css) */

.side-brand { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; }
.side-brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.side-foot { margin-top: auto; padding: 14px; border-radius: var(--r-md); background: var(--blush-2); display: flex; align-items: center; gap: 10px; }
.side-foot b { display: block; font-size: 13px; }
.side-foot span { font-size: 12px; color: var(--muted); }

.topbar .date-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.topbar .date-chip svg { width: 16px; height: 16px; color: var(--muted); }
.top-user { display: flex; align-items: center; gap: 10px; }
.top-user b { display: block; font-size: 13px; line-height: 1.2; }
.top-user span { font-size: 12px; color: var(--muted); }

/* ---------- kpi row ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1280px) { .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi .spark { height: 30px; width: 100%; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1180px) { .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; } }

/* ---------- charts ---------- */
.chart { width: 100%; height: 260px; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-wrap svg { width: 150px; height: 150px; flex: none; }
.donut-list { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.donut-list div { display: flex; align-items: center; gap: 8px; }
.donut-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-list b { margin-inline-start: auto; }

/* ---------- alerts ---------- */
.alert-list { display: flex; flex-direction: column; }
.alert { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.alert:last-child { border-bottom: 0; }
.alert-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.alert-ico svg { width: 19px; height: 19px; }
.alert-ico.warn { background: var(--warn-bg); color: var(--warn); }
.alert-ico.bad { background: var(--bad-bg); color: var(--bad); }
.alert-ico.info { background: var(--info-bg); color: var(--info); }
.alert b { font-size: 14px; display: block; }
.alert span { font-size: 12px; color: var(--muted); }

.rank { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rank-row:last-child { border-bottom: 0; }
.rank-row .bar { width: 90px; flex: none; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.filters .select, .filters .input { height: 40px; width: auto; min-width: 150px; font-size: 13px; }
.filters .input-icon { flex: 1; min-width: 220px; }
.filters .input-icon .input { width: 100%; }

.cell-main b { display: block; font-size: 14px; }
.cell-main span { font-size: 12px; color: var(--muted); }
.pay-ico { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pay-ico svg { width: 16px; height: 16px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg { width: 16px; height: 16px; }

/* ---------- drawer content ---------- */
.drawer-box.wide { width: min(560px, 100%); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
.sub-order { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sub-order-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--petal); border-bottom: 1px solid var(--line); }
.sub-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sub-item:last-child { border-bottom: 0; }
.section-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.route-steps { display: flex; flex-direction: column; gap: 0; }
.route-step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; position: relative; padding-bottom: 14px; }
.route-step:last-child { padding-bottom: 0; }
.route-step::before { content: ''; position: absolute; inset-inline-start: 11px; top: 24px; bottom: 0; border-inline-start: 2px dashed var(--line-2); }
.route-step:last-child::before { display: none; }
.route-step .rs-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--blush); color: var(--pink); font-size: 11px; font-weight: 700; z-index: 1; }
.route-step .rs-dot.home { background: var(--pink); color: #fff; }
.route-step .rs-dot svg { width: 13px; height: 13px; }

/* ---------- dispatch / map ---------- */
.dispatch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
@media (max-width: 1180px) { .dispatch { grid-template-columns: 1fr; } }
.map.big { aspect-ratio: 1000 / 640; height: auto; }
.map-legend { position: absolute; bottom: 14px; inset-inline-start: 14px; display: flex; gap: 14px; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .92); box-shadow: var(--sh-1); font-size: 12px; z-index: 3; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; }
.map-stats { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; gap: 8px; z-index: 3; flex-wrap: wrap; }
.map-stats .chip { background: rgba(255, 255, 255, .95); }
.drv-pin { position: absolute; translate: -50% -50%; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: var(--sh-2); z-index: 2; cursor: pointer; }
.drv-pin svg { width: 16px; height: 16px; }
.drv-pin.online { background: var(--ok); }
.drv-pin.busy { background: var(--grape); }
.ord-pin { position: absolute; translate: -50% -100%; z-index: 2; }
.ord-pin .pin-dot { width: 32px; height: 32px; }
.ord-pin .pin-dot > * { width: 15px; height: 15px; }
.ord-pin .ord-label { position: absolute; top: -26px; left: 50%; translate: -50% 0; white-space: nowrap; padding: 2px 8px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; direction: ltr; }
.queue { display: flex; flex-direction: column; }
.q-item { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.q-item:last-child { border-bottom: 0; }
.wait { font-size: 12px; font-weight: 600; color: var(--bad); display: inline-flex; align-items: center; gap: 4px; }
.wait svg { width: 14px; height: 14px; }
.drv-option { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.drv-option:hover { border-color: #F7B5CF; }
.drv-option.sel { border-color: var(--pink); background: var(--blush-2); }
.drv-option input { accent-color: var(--pink); }

/* ---------- zones ---------- */
.zone-layout { display: flex; flex-direction: column; gap: 20px; }
.zone-strip { padding: 2px 2px 6px; }
.zone-strip .zone-item { width: 250px; flex: none; border: 1.5px solid #F6E8EF; border-radius: var(--r-md); background: #fff; box-shadow: var(--sh-1); }
.zone-strip .zone-item.active { border-color: var(--pink); background: var(--blush-2); box-shadow: none; }
.zone-strip .zone-add { width: 180px; flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); color: var(--pink); font-weight: 600; font-size: 14px; }
.zone-strip .zone-add svg { width: 18px; height: 18px; }
.zone-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-align: start; width: 100%; transition: background .15s; }
.zone-item:hover { background: var(--petal); }
.zone-item.active { background: var(--blush-2); box-shadow: inset -3px 0 0 var(--pink); }
.zone-item b { display: block; font-size: 14px; }
.zone-item span { font-size: 12px; color: var(--muted); }
.zone-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blush); color: var(--pink); flex: none; }
.zone-ico svg { width: 18px; height: 18px; }
.zone-ico.off { background: var(--idle-bg); color: var(--idle); }
.zone-editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1200px) { .zone-editor { grid-template-columns: 1fr; } .calc { position: static; } }
.map.editor { height: 380px; }
.map-tools { position: absolute; top: 14px; inset-inline-end: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.map-tools .icon-btn { box-shadow: var(--sh-1); }
.map-hint { position: absolute; bottom: 14px; left: 50%; translate: -50% 0; z-index: 3; padding: 6px 14px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; }
.form-group { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.form-group:last-child { border-bottom: 0; }
.form-group h4 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.form-group h4 svg { width: 17px; height: 17px; color: var(--pink); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.unit-input { position: relative; }
.unit-input .input { direction: ltr; text-align: right; padding-left: 58px; padding-right: 12px; }
.unit-input em { position: absolute; left: 12px; top: 50%; translate: 0 -50%; font-style: normal; font-size: 12px; color: var(--muted); pointer-events: none; }

.calc { position: sticky; top: 92px; overflow: hidden; }
.calc-head { padding: 18px 20px; background: linear-gradient(140deg, #FFF0F6, #FFE2EE); border-bottom: 1px solid var(--line); }
.calc-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.calc-head h3 svg { width: 18px; height: 18px; color: var(--pink); }
.calc-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.calc-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.calc-inputs .field label { font-size: 11.5px; }
.calc-inputs .input { height: 40px; padding: 0 10px; direction: ltr; text-align: center; }
.calc-block { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.calc-block:last-child { border-bottom: 0; }
.calc-block h5 { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.calc .sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 0; }
.calc .sum-row.total { font-size: 15px; font-weight: 700; padding-top: 8px; }
.calc-margin { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--ink); color: #fff; }
.calc-margin b { font-size: 22px; }
.calc-margin .price small { color: #CDBFD2; }
.calc-margin.neg { background: var(--bad); }
.free-note { font-size: 12px; color: var(--ok); font-weight: 600; }
.mini-split { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-top: 10px; background: var(--line); }
.mini-split i { display: block; height: 100%; }

/* ---------- approvals ---------- */
.approval { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.approval:last-child { border-bottom: 0; }
.docs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.doc { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line); background: #fff; }
.doc svg { width: 14px; height: 14px; }
.doc.ok svg { color: var(--ok); }
.doc.miss { color: var(--bad); border-color: #FBC9D4; background: var(--bad-bg); }
@media (max-width: 760px) { .approval { grid-template-columns: 1fr; } }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.prod-card { display: flex; flex-direction: column; overflow: hidden; }
.prod-cover { height: 140px; display: grid; place-items: center; background: linear-gradient(150deg, #FFF2F7, #FFDDEA); position: relative; }
.prod-cover .badge { position: absolute; top: 12px; inset-inline-start: 12px; }
.prod-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod-body b { font-size: 15px; }
.prod-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.prod-meta > span { display: flex; flex-direction: column; align-items: flex-start; }
.prod-meta small { color: var(--muted); }
.prod-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.prod-actions .btn { flex: 1; }

/* ---------- finance ---------- */
.fin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.commission-row { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.commission-row:last-child { border-bottom: 0; }
.commission-row .unit-input { width: 120px; }
.commission-row .unit-input .input { height: 40px; }

/* ---------- promos ---------- */
.code-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; border: 1.5px dashed #F4A9C8; background: var(--blush-2); color: var(--pink-700); font-weight: 700; font-size: 13px; direction: ltr; letter-spacing: .03em; }
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.banner-prev { height: 130px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; gap: 12px; overflow: hidden; }
.banner-prev b { font-size: 18px; line-height: 1.3; }
.banner-prev p { font-size: 12px; opacity: .85; margin-top: 4px; }
.feat-row { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.feat-row:last-child { border-bottom: 0; }
.drag { color: var(--muted); cursor: grab; }
.drag svg { width: 18px; height: 18px; }

/* ---------- notifications composer ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .composer { grid-template-columns: 1fr; } }
.audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aud-opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); cursor: pointer; }
.aud-opt.sel { border-color: var(--pink); background: var(--blush-2); }
.aud-opt svg { width: 20px; height: 20px; color: var(--pink); flex: none; margin-top: 2px; }
.aud-opt b { display: block; font-size: 14px; }
.aud-opt span { font-size: 12px; color: var(--muted); }
.mini-phone { width: 280px; height: 520px; margin-inline: auto; border-radius: 40px; padding: 10px; background: #1C1420; box-shadow: var(--sh-3); }
.mini-screen { height: 100%; border-radius: 32px; overflow: hidden; background: linear-gradient(170deg, #6B2A57 0%, #2A1630 60%, #1B1020 100%); color: #fff; padding: 44px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.lock-time { text-align: center; font-size: 54px; font-weight: 300; line-height: 1; direction: ltr; }
.lock-date { text-align: center; font-size: 13px; opacity: .8; margin-top: -4px; }
.push { margin-top: 18px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .88); color: var(--ink); backdrop-filter: blur(8px); display: flex; gap: 10px; }
.push-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--pink); color: #fff; display: grid; place-items: center; flex: none; }
.push-ico svg { width: 18px; height: 22px; }
.push b { display: block; font-size: 13px; }
.push p { font-size: 12px; color: var(--ink-2); line-height: 1.45; word-break: break-word; }
.push small { font-size: 10.5px; color: var(--muted); }

/* ---------- settings ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 14px; }
.set-row span.muted { font-size: 12.5px; }
.set-row .ctrl { flex: none; display: flex; align-items: center; gap: 10px; }
.set-row .ctrl .input, .set-row .ctrl .select { width: 200px; height: 40px; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pay-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pay-card.off { opacity: .55; }
.pay-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--blush-2); color: var(--pink); flex: none; }
.pay-logo svg { width: 22px; height: 22px; }
.pay-card.off .pay-logo { background: var(--idle-bg); color: var(--idle); }
.mode-seg button { height: 28px; padding: 0 12px; font-size: 12px; }

/* ---------- roles ---------- */
.perm-table th, .perm-table td { text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: start; }
.perm-table input { width: 18px; height: 18px; accent-color: var(--pink); }
.role-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; border: 1.5px solid transparent; }
.role-card.sel { border-color: var(--pink); }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid #fff; margin-inline-start: -8px; }
.avatars .avatar:first-child { margin-inline-start: 0; }

/* hash links share ids with views: keep the page head visible below the sticky topbar */
.view { scroll-margin-top: 600px; }

/* summary rows (fee breakdowns) */
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; padding: 5px 0; }
.sum-row.total { font-size: 17px; font-weight: 700; padding-top: 8px; }
.drawer.open ~ .proto-back, .modal.open ~ .proto-back { display: none; }

/* phone widths */
@media (max-width: 700px) {
  .topbar .date-chip, .topbar > .grow { display: none; }
  .topbar .search { flex: 1; min-width: 0; width: auto; }
  .topbar .search .input { min-width: 0; }
  .page-head h1 { font-size: 22px; }
  .filters .select, .filters .input { min-width: 0; flex: 1; }
  .filters .input-icon { min-width: 100%; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut-wrap svg { align-self: center; }
  .set-row { flex-direction: column; align-items: stretch; }
  .set-row .ctrl .input, .set-row .ctrl .select, .set-row .ctrl .unit-input { width: 100% !important; }
  .form-grid, .calc-inputs, .audience { grid-template-columns: 1fr 1fr; }
}

/* ---------- real maps (Leaflet) ---------- */
.map-wrap { position: relative; }
.map-wrap .map-stats, .map-wrap .map-legend, .map-wrap .map-hint { z-index: 5; }
.disp-map { height: 640px; border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.zone-map { height: 440px; }
.ord-map { height: 220px; border: 1px solid var(--line); }
@media (max-width: 760px) { .disp-map { height: 480px; } .zone-map { height: 360px; } }
.q-item.clickable { cursor: pointer; transition: background .15s; }
.q-item.clickable:hover { background: var(--petal); }
.zone-tip { background: rgba(255, 255, 255, .92); border: 0; border-radius: 8px; box-shadow: var(--sh-1); font: 600 12px/1.5 var(--font); color: var(--ink); padding: 2px 8px; }
.zone-tip::before { display: none; }
.vtx { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); box-shadow: 0 2px 6px rgba(178, 19, 79, .35); cursor: grab; }
.vtx.mid { width: 14px; height: 14px; border-width: 2px; background: var(--blush); opacity: .9; cursor: copy; }
.vtx.mid:hover { background: var(--pink); }
.vtx.center { width: 22px; height: 22px; background: var(--pink); border-color: #fff; cursor: move; }
.cur-sym::before { content: ''; }
.rate-box { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; flex-wrap: wrap; }
.rate-box .input { width: 200px; height: 54px; font-size: 22px; font-weight: 700; direction: ltr; text-align: center; }

.both { display: inline-flex; flex-direction: column; align-items: flex-end; text-align: left; line-height: 1.3; }
