/* Кабинет АвтоFood: светлый рабочий фон, фиолетовая шапка в цветах экранов, жёлтые акценты у цен. */
:root {
  --p900: #1e0838; --p800: #2a0b4e; --p700: #3a1268; --p600: #4b1a85; --p500: #6a32b8; --p100: #efe8f9; --p50: #f7f3fc;
  --yellow: #ffd100; --red: #e3262e; --green: #23a55a; --lime: #9bd13a; --grey: #8b8496;
  --ink: #1d1530; --ink2: #5d5670; --line: #e6e0ef; --bg: #f4f1f8; --card: #fff;
  --r: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Manrope, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--p500); box-shadow: 0 0 0 3px rgba(106, 50, 184, .15); }
input[type=number] { width: 84px; }
h2 { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 22px; }
h3 { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 16px; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 800; font-size: 14px;
  background: var(--p100); color: var(--p700); white-space: nowrap; }
.btn:hover { background: #e4d8f5; }
.btn.pri { background: var(--p600); color: #fff; }
.btn.pri:hover { background: var(--p700); }
.btn.yel { background: var(--yellow); color: var(--p800); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink2); }
.btn.danger { background: transparent; color: var(--red); padding: 9px 8px; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px;
  font-weight: 700; font-size: 13px; color: var(--ink2); }
.chip.on { background: var(--p600); border-color: var(--p600); color: #fff; }
.chip.tag-hit.on { background: var(--red); border-color: var(--red); }
.chip.tag-new.on { background: var(--lime); border-color: var(--lime); color: #1b3300; }
.chip.tag-spicy.on { background: #ff7a1a; border-color: #ff7a1a; }
.chip.tag-veg.on { background: var(--green); border-color: var(--green); }
.chip.tag-kids.on { background: #00b5e2; border-color: #00b5e2; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lbl { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); margin-bottom: 6px; }
.hint { color: var(--ink2); font-size: 13px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(42, 11, 78, .05); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--grey); flex: none; }
.dot.ok { background: var(--green); } .dot.bad { background: var(--red); } .dot.wait { background: #f0b400; }

/* переключатель */
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink2); }
.sw input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px; background: #d9d2e4; border: 0; padding: 0; position: relative; transition: background .2s; flex: none; }
.sw input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.sw input:checked { background: var(--p600); }
.sw input:checked::after { transform: translateX(16px); }
.sw input:focus { box-shadow: none; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 600px at 15% 0%, #5a22a0, transparent 60%), linear-gradient(160deg, #320e5e, var(--p900)); }
.login-box { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-logo { width: 200px; margin: 0 auto 18px; }
.login-logo svg { width: 100%; height: auto; display: block; }
.login h1 { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 22px; text-align: center; }
.login .sub { text-align: center; color: var(--ink2); margin: 6px 0 20px; }
.login form { display: grid; gap: 10px; }
.login label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; color: var(--ink2); }
.login input { padding: 12px 14px; font-size: 16px; }
.login .btn.pri { justify-content: center; padding: 13px; font-size: 16px; margin-top: 4px; }
.login .err { color: var(--red); font-weight: 700; font-size: 14px; min-height: 18px; }
.quick { margin-top: 22px; padding-top: 18px; border-top: 1.5px dashed var(--line); }
.quick .btns { display: grid; gap: 8px; margin-top: 8px; }
.quick .btn { justify-content: space-between; padding: 11px 14px; white-space: normal; text-align: left; width: 100%; gap: 10px; }
.quick .btn small { font-weight: 600; color: var(--ink2); }

/* ---------- шапка и вкладки ---------- */
.hd { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 24px; color: #fff;
  background: linear-gradient(100deg, var(--p800), var(--p600)); }
.hd-logo { width: 120px; flex: none; }
.hd-logo svg { width: 100%; height: auto; display: block; }
.hd-t { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 17px; line-height: 1.2; }
.hd-t small { display: block; font-family: Manrope, sans-serif; font-weight: 600; font-size: 12px; opacity: .7; }
.hd-net { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12);
  font-weight: 700; font-size: 13px; border: 0; color: #fff; }
.hd-net.warn { background: rgba(227, 38, 46, .35); }
.hd-user { text-align: right; font-weight: 800; font-size: 14px; line-height: 1.2; }
.hd-user small { display: block; font-weight: 600; font-size: 12px; opacity: .7; }
.hd .btn { background: rgba(255, 255, 255, .14); color: #fff; }
.tabs { position: sticky; top: 62px; z-index: 19; display: flex; gap: 4px; padding: 0 24px; background: #fff; border-bottom: 1.5px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 14px 14px 12px; font-weight: 800; font-size: 14px; color: var(--ink2); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--p600); border-bottom-color: var(--p600); }
.tabs .cnt { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; margin-left: 4px; }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 24px; padding: 22px 24px 60px; max-width: 1760px; margin: 0 auto; align-items: start; }
.content { min-width: 0; display: grid; gap: 16px; }
.sec-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sec-h .hint { flex-basis: 100%; }
.sec-h .sp { flex: 1; }

/* ---------- превью справа ---------- */
.pv { position: sticky; top: 130px; display: grid; gap: 10px; padding: 14px; }
.pv-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-h b { font-family: Unbounded, sans-serif; font-size: 14px; flex-basis: 100%; }
.pv-h select { flex: 1; font-size: 13px; padding: 7px 8px; }
.pv-scr { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--p900); box-shadow: 0 0 0 6px #120520; margin: 6px; }
.pv-scr iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.pv-time { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pv-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink2); }
.pv-foot a { color: var(--p600); font-weight: 800; text-decoration: none; }

/* ---------- меню ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px; }
.toolbar input[type=search] { flex: 1; min-width: 180px; padding: 10px 12px; }
.cat { padding: 6px 0 4px; }
.cat-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px 8px; }
.cat-h input { font-family: Unbounded, sans-serif; font-size: 16px; border-color: transparent; background: transparent; padding: 6px 8px; margin-left: -8px; }
.cat-h input:hover { border-color: var(--line); }
.cat-h small { color: var(--ink2); font-weight: 700; }
.it { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 150px; gap: 16px; align-items: start; padding: 12px 18px; border-top: 1.5px solid var(--p50); }
.it.hidden-it { opacity: .5; }
.it-ph { width: 64px; height: 64px; border-radius: 14px; border: 1.5px dashed var(--line); background: var(--p50); display: grid; place-items: center; overflow: hidden; padding: 4px; }
.it-ph img { max-width: 100%; max-height: 100%; object-fit: contain; }
.it-ph span { font-size: 11px; font-weight: 700; color: var(--ink2); }
.it-main { display: grid; gap: 6px; }
.it-main > input { width: 100%; }
.it-act select { width: 100%; }
.it-nm { font-weight: 800; font-size: 15px; }
.it-ds { font-size: 13px; padding: 6px 10px; }
.it-tags { gap: 4px; align-items: center; }
.it-tags .chip { padding: 2px 8px; font-size: 12px; }
.it-tags .it-ds { padding: 3px 8px; font-size: 12px; }
.it-prices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pvar { display: grid; gap: 3px; }
.pvar .lab { width: 84px; font-size: 12px; padding: 4px 8px; }
.pvar .pr { display: flex; align-items: center; gap: 4px; font-weight: 800; }
.pvar .pr input { font-family: Unbounded, sans-serif; font-weight: 700; background: #fffbe0; border-color: #f5e08a; }
.it-act { display: grid; gap: 6px; justify-items: end; }

/* ---------- правила ---------- */
.rule { padding: 16px 18px; display: grid; gap: 14px; }
.rule.off { opacity: .6; }
.r-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.r-title { flex: 1; min-width: 200px; font-weight: 800; font-size: 16px; }
.r-now { padding: 4px 10px; border-radius: 999px; background: #e3f6ea; color: var(--green); font-weight: 800; font-size: 12px; }
.r-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.r-grid .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.r-grid input[type=time], .r-grid input[type=date] { padding: 6px 8px; }
.r-ex { padding: 10px 14px; border-radius: 10px; background: var(--p50); font-size: 14px; }
.r-ex b { font-family: Unbounded, sans-serif; }
.r-ex s { color: var(--grey); }
.tpl { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- точки ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-family: Unbounded, sans-serif; font-size: 26px; }
.stat span { color: var(--ink2); font-weight: 700; font-size: 13px; }
.stat.bad b { color: var(--red); }
.pt { padding: 0; overflow: hidden; }
.pt-h { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; }
.pt-h:hover { background: var(--p50); }
.pt-nm { font-weight: 800; }
.pt-nm small { display: block; color: var(--ink2); font-weight: 600; font-size: 13px; }
.pt-dots { display: flex; gap: 4px; }
.pt-grp { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--p100); color: var(--p700); }
.pt-body { border-top: 1.5px solid var(--line); padding: 16px 18px; display: grid; gap: 18px; background: #fcfbfe; }
.pt-fields { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr; gap: 10px; }
.pt-fields label { display: grid; gap: 4px; font-weight: 700; font-size: 12px; color: var(--ink2); }
.tv { display: grid; grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1.5px solid var(--p50); }
.tv-n { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 13px; color: var(--ink2); }
.tv-st { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.tv-st small { color: var(--ink2); font-weight: 600; display: block; }
.tv-act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ov { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 12px; align-items: center; padding: 6px 0; }
.ov .base { color: var(--grey); font-size: 13px; }

/* ---------- экраны ---------- */
.scr-card { padding: 16px 18px; display: grid; gap: 12px; }
.scr-h { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.scr-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--p600); color: #fff; font-family: Unbounded, sans-serif; font-weight: 800; }
.scr-h .t { font-weight: 800; font-size: 16px; }
.slide-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) 90px 90px; gap: 8px; align-items: center; padding: 6px 0; }
.brand textarea { width: 100%; min-height: 110px; resize: vertical; }

/* ---------- стоп-лист ---------- */
.stop-cat { padding: 14px 16px; }
.stop-cat h3 { margin-bottom: 10px; }
.stop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.stop-it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; text-align: left; font-weight: 800; }
.stop-it img { width: 40px; height: 40px; object-fit: contain; }
.stop-it span { flex: 1; }
.stop-it em { font-style: normal; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #e3f6ea; color: var(--green); }
.stop-it.sold { border-color: var(--red); background: #fff2f2; }
.stop-it.sold em { background: var(--red); color: #fff; }

/* ---------- журнал, сотрудники ---------- */
.log-row { display: grid; grid-template-columns: 110px 170px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1.5px solid var(--p50); font-size: 14px; }
.log-row time { color: var(--ink2); font-weight: 700; font-size: 13px; }
.log-row .who { font-weight: 800; }
.empty { padding: 30px; text-align: center; color: var(--ink2); }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 170px; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1.5px solid var(--p50); }
.role { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--p100); color: var(--p700); justify-self: start; }
.roles { padding: 16px 18px; display: grid; gap: 8px; font-size: 14px; }

/* ---------- всплывающие ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 30px); opacity: 0; transition: .3s; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; background: var(--p800); color: #fff; font-weight: 700; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast i { width: 22px; height: 22px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-style: normal; font-size: 13px; }
.modal { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 16px; background: rgba(20, 5, 40, .55); }
.modal.on { display: grid; }
.mbox { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 20px; padding: 24px; display: grid; gap: 14px; }
.mbox .row { display: flex; gap: 8px; justify-content: flex-end; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.lib button { aspect-ratio: 1; border: 2px solid var(--line); border-radius: 12px; background: var(--p50); padding: 6px; }
.lib button:hover { border-color: var(--p500); }
.lib img { width: 100%; height: 100%; object-fit: contain; }
.code { display: flex; gap: 8px; justify-content: center; }
.code input { width: 100%; max-width: 280px; text-align: center; font-family: Unbounded, sans-serif; font-size: 34px; letter-spacing: .3em; padding: 12px; }
.mbox label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; color: var(--ink2); }

/* ---------- узкие экраны ---------- */
@media (max-width: 1300px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .pv { position: static; order: -1; max-width: 640px; }
  .mgr .pv { order: 1; }
}
@media (max-width: 900px) {
  .hd { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .hd-net { margin-left: 0; order: 5; }
  .hd-user { margin-left: auto; }
  .tabs { top: 0; position: relative; padding: 0 12px; }
  .main { padding: 16px 16px 50px; }
  .it { grid-template-columns: 56px minmax(0, 1fr); }
  .it-ph { width: 56px; height: 56px; }
  .it-prices, .it-act { grid-column: 1 / -1; }
  .it-act { display: flex; justify-content: space-between; }
  .r-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-h { grid-template-columns: minmax(0, 1fr) auto; }
  .pt-h .pt-grp, .pt-h .pt-dots { display: none; }
  .pt-fields { grid-template-columns: 1fr 1fr; }
  .tv { grid-template-columns: 40px minmax(0, 1fr); }
  .tv-act { grid-column: 1 / -1; justify-content: flex-start; }
  .ov { grid-template-columns: minmax(0, 1fr) auto; }
  .scr-h { grid-template-columns: 40px minmax(0, 1fr); }
  .slide-row { grid-template-columns: auto minmax(0, 1fr); }
  .log-row { grid-template-columns: 1fr; gap: 2px; }
  .team-row { grid-template-columns: 1fr; gap: 4px; }
}
