:root {
  --bg: #f4f2ef; --panel: #ffffff; --ink: #1d1b19; --muted: #6f6a64; --line: #e3dfd9;
  --accent: #b4232a; --accent-ink: #ffffff; --accent-soft: #f8e6e6;
  --ok: #1f7a4d; --ok-soft: #e1f2e8; --warn: #a86400; --warn-soft: #fbefd9; --info: #2456a6; --info-soft: #e3ebf8;
  --seat: #e9e5df; --seat-vip: #efe1c4; --seat-sel: #1f7a4d; --seat-sold: #b9b3ab; --seat-res: #e3a33b;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Шапка */
.top { display: flex; align-items: center; gap: 16px; background: #211d1b; color: #fff; padding: 0 16px; height: 54px; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.brand .logo { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; font-size: 13px; }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.nav button { background: none; border: 0; color: #cfc8c2; padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.nav button:hover { background: #332e2b; color: #fff; }
.nav button.on { background: var(--accent); color: #fff; }
.who { font-size: 13px; color: #cfc8c2; white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.who button { background: #332e2b; border: 0; color: #fff; padding: 6px 10px; border-radius: 6px; cursor: pointer; }

main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.sub-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.sub-tabs button { border: 1px solid var(--line); background: var(--panel); padding: 7px 14px; border-radius: 20px; cursor: pointer; }
.sub-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Элементы форм */
.btn { border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c9c3bb; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.info { background: var(--info); border-color: var(--info); color: #fff; }
.btn.warn { background: var(--warn-soft); border-color: #eccf9c; color: var(--warn); }
.btn.danger { color: var(--accent); }
.btn.big { padding: 14px 18px; font-size: 16px; font-weight: 600; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 4px 9px; font-size: 13px; }
input, select, textarea { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #e8b9bb; border-color: var(--accent); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea { color: var(--ink); font-size: 15px; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; align-items: end; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tr.off td { color: var(--muted); text-decoration: line-through; }
tfoot td { font-weight: 700; border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; background: var(--seat); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--accent-soft); color: var(--accent); }
.badge.info { background: var(--info-soft); color: var(--info); }

/* Сеансы в кассе */
.shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.show-card { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.show-card:hover { border-color: var(--accent); }
.show-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.show-card.past { opacity: .55; }
.show-card .time { font-size: 22px; font-weight: 700; }
.show-card .title { font-weight: 600; }
.fill { height: 5px; border-radius: 3px; background: var(--seat); overflow: hidden; margin-top: 4px; }
.fill > i { display: block; height: 100%; background: var(--accent); }

/* Схема зала */
.hall { overflow-x: auto; padding: 8px 0 4px; }
.screen { margin: 0 auto 18px; width: 70%; height: 8px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: linear-gradient(#c9c3bb, #eee); position: relative; }
.screen::after { content: "ЭКРАН"; position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.seat-rows { display: flex; flex-direction: column; gap: 5px; align-items: center; min-width: max-content; margin: 0 auto; }
.seat-row { display: flex; gap: 4px; align-items: center; }
.seat-row .rn { width: 26px; text-align: center; font-size: 12px; color: var(--muted); }
.seat { width: 28px; height: 26px; border-radius: 6px 6px 4px 4px; border: 0; background: var(--seat); font-size: 11px; cursor: pointer; color: #555; padding: 0; }
.seat:hover { outline: 2px solid var(--ink); }
.seat.vip { background: var(--seat-vip); }
.seat.sel { background: var(--seat-sel); color: #fff; }
.seat.sold { background: var(--seat-sold); color: #fff; }
.seat.res { background: var(--seat-res); color: #fff; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); justify-content: center; margin-top: 12px; }
.legend i { display: inline-block; width: 14px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* Бар */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.product { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: left; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; }
.product:hover { border-color: var(--accent); }
.product .pn { font-weight: 600; }
.product .pp { font-size: 17px; font-weight: 700; }
.product.low { background: var(--warn-soft); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.total { font-size: 26px; font-weight: 700; margin: 12px 0; display: flex; justify-content: space-between; }

/* Отчёты */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.good .v { color: var(--ok); } .kpi.bad .v { color: var(--accent); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.chart .col { flex: 1; min-width: 14px; display: flex; flex-direction: column-reverse; position: relative; height: 100%; }
.chart .col > b { display: block; }
.chart .t { background: var(--accent); border-radius: 0 0 2px 2px; }
.chart .b { background: #e3a33b; border-radius: 2px 2px 0 0; }
.chart-x { display: flex; gap: 3px; font-size: 10px; color: var(--muted); }
.chart-x span { flex: 1; min-width: 14px; text-align: center; overflow: hidden; }

/* Модалки и уведомления */
.modal-bg { position: fixed; inset: 0; background: rgba(20,16,14,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; padding: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
#toast { position: fixed; top: 112px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; }
#toast div { background: #211d1b; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); max-width: 90vw; }
#toast div.err { background: var(--accent); }

/* Вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, #3a2322, #151211); }
.login .panel { width: min(380px, 100%); }
.login .panel > * + * { margin-top: 12px; }
.login h1 { font-size: 22px; }

.empty { padding: 30px; text-align: center; color: var(--muted); }
.hall-preview { transform-origin: top left; }

@media (max-width: 900px) {
  .grid2 { grid-template-columns: minmax(0, 1fr) !important; }
  .grid2 > [data-order], .grid2 > [data-cart] { position: static !important; }
  .top { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .nav { order: 3; flex-basis: 100%; }
  main { padding: 12px; }
}
@media print { .top, .no-print { display: none !important; } body { background: #fff; } .panel { box-shadow: none; border: 0; } }

/* ===== Монитор покупателя (светлая тема) ===== */
body.cust { background: #eef0f3; color: #1d1b19; min-height: 100vh; overflow: hidden; }
.cust #app { min-height: 100vh; display: flex; flex-direction: column; }
.c-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px 24px; background: #fff; border-bottom: 1px solid #dde1e6; }
.c-top h1 { margin: 0; font-size: 26px; font-weight: 500; text-align: center; }
.c-brand { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.c-brand .logo { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; }
.c-clock { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; border-left: 2px solid #dde1e6; padding-left: 14px; }
.c-clock span { font-size: 13px; color: #6f7680; } .c-clock b { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.c-rep { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 14px; align-content: start; overflow: hidden; }
.c-film { display: flex; gap: 14px; background: #fff; border-radius: 8px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.c-poster { width: 120px; flex: none; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; background: #d9dde2; display: grid; place-items: center; font-size: 30px; color: #8a929c; }
.c-poster img { width: 100%; height: 100%; object-fit: cover; }
.c-fi { flex: 1; min-width: 0; }
.c-ft { font-size: 20px; font-weight: 700; }
.c-agebadge { display: inline-block; font-size: 12px; color: #fff; border-radius: 4px; padding: 1px 7px; margin-top: 4px; }
.c-agebadge.a12 { background: #2f7de1; } .c-agebadge.a16 { background: #e07b17; } .c-agebadge.a18 { background: #d0343c; }
.c-dur { font-size: 12px; color: #6f7680; margin: 4px 0 8px; }
.c-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px; }
.c-times div { display: flex; flex-direction: column; } .c-times b { font-size: 18px; font-weight: 600; } .c-times span { font-size: 11px; color: #8a929c; }
.c-times .past { opacity: .35; }
.c-empty { grid-column: 1/-1; text-align: center; font-size: 48px; font-weight: 700; padding-top: 20vh; }
.c-show { display: flex; align-items: center; gap: 12px; justify-self: start; }
.c-sposter { width: 44px; height: 62px; border-radius: 4px; overflow: hidden; background: #d9dde2; display: grid; place-items: center; }
.c-sposter img { width: 100%; height: 100%; object-fit: cover; }
.c-stitle { font-size: 22px; font-weight: 600; } .c-stitle small { font-size: 15px; color: #6f7680; font-weight: 400; }
.c-ssub { color: #6f7680; font-size: 16px; }
.cust .c-top:has(.c-show) { grid-template-columns: auto 1fr auto; }
.c-selbox { justify-self: end; background: #1f6fe0; color: #fff; border-radius: 8px; padding: 8px 18px; min-width: 190px; display: flex; flex-direction: column; }
.c-selbox span { font-size: 13px; } .c-selbox b { font-size: 26px; }
.c-legend { display: flex; justify-content: space-around; gap: 16px; flex-wrap: wrap; padding: 8px 24px; font-size: 14px; background: #f7f8fa; border-bottom: 1px solid #dde1e6; }
.c-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.lg-free { background: #1f9d3a; } .lg-vip { background: #c98a1b; } .lg-taken { background: #5f6b7a; } .lg-sel { background: #1f6fe0; }
.c-prods { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 6px; }
.c-prods span { background: #fff; border: 1px solid #dde1e6; border-radius: 20px; padding: 3px 12px; font-size: 14px; }
.c-hall { --s: 40px; flex: 1; display: flex; flex-direction: column; align-items: center; gap: calc(var(--s) * .16); padding: 16px; }
.c-screen { width: 60%; background: #eef2a8; border: 1px solid #d8dd7c; text-align: center; padding: 8px; border-radius: 4px; margin-bottom: 16px; font-size: 18px; }
.c-row { display: flex; align-items: center; gap: calc(var(--s) * .3); }
.c-line { display: flex; gap: calc(var(--s) * .14); }
.c-rn { width: calc(var(--s) * 1.8); min-width: 60px; background: #f4f6d2; border: 1px solid #e0e3a6; border-radius: 4px; text-align: center; font-weight: 600; font-size: calc(var(--s) * .32); padding: calc(var(--s) * .22) 0; }
.c-seat { width: var(--s); height: var(--s); background: #1f9d3a; color: #0a3d15; border-radius: 3px; display: grid; place-items: center; font-size: calc(var(--s) * .38); }
.c-seat.vip { background: #c98a1b; color: #4a2f00; }
.c-seat.taken { background: #5f6b7a; color: #3b4450; }
.c-seat.sel { background: #1f6fe0; color: #fff; box-shadow: 0 0 0 3px #9cc2ff; font-weight: 700; }
.c-order { width: min(760px, 92vw); margin: 4vh auto; background: #fff; border-radius: 12px; padding: 24px 30px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.c-oline { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e8ebef; font-size: 24px; }
.c-ototal { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 8px; font-size: 26px; }
.c-ototal b { font-size: 46px; }
.c-chg, .c-chg b { color: #1f9d3a; }
.c-thanks { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.c-big { font-size: 64px; font-weight: 700; }
.c-sum { font-size: 34px; }
.c-seats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.c-seats span { background: #1f6fe0; color: #fff; border-radius: 10px; padding: 8px 16px; font-size: 24px; font-weight: 600; }
.c-hint { position: fixed; bottom: 8px; left: 0; right: 0; text-align: center; color: #8a929c; font-size: 14px; }
.who button[data-cust] { background: var(--accent); }

/* ===== Касса (вкладки как в кассовых программах) ===== */
main.kmode { max-width: none; padding: 0; }
.kbar { display: flex; align-items: stretch; background: #2b3346; color: #fff; min-height: 50px; position: sticky; top: 54px; z-index: 9; }
.ktabs { display: flex; flex: 1; overflow-x: auto; }
.ktabs button { background: none; border: 0; color: #c8cfdc; padding: 0 24px; font-size: 16px; cursor: pointer; white-space: nowrap; }
.ktabs button:hover { background: #36405a; color: #fff; }
.ktabs button.on { background: #3d4a6b; color: #fff; box-shadow: inset 0 -3px 0 #7aa2ff; }
.kcount { display: flex; flex-direction: column; justify-content: center; padding: 0 18px; border-left: 1px solid #3d4660; font-size: 14px; min-width: 150px; }
.kcount .ksum { font-size: 20px; }
.kclock { display: flex; align-items: center; padding: 0 16px; font-size: 13px; color: #c8cfdc; white-space: nowrap; }
.kbody { padding: 14px; min-height: calc(100vh - 104px); display: flex; flex-direction: column; gap: 12px; }
.ktool { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ktool .btn { min-width: 110px; }

.kcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 8px; align-content: start; flex: 1; }
.kcard { --c: #2f4fb3; display: grid; grid-template-columns: 96px 60px 1fr; gap: 12px; align-items: center; text-align: left; border: 0; border-radius: 6px; padding: 8px 14px; background: var(--c); color: #fff; cursor: pointer; min-height: 92px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.kcard:hover { filter: brightness(1.08); }
.kcard.on { outline: 3px solid #1d1b19; outline-offset: 1px; }
.kcard.past { opacity: .55; }
.kc-time { display: flex; flex-direction: column; line-height: 1.15; }
.kc-time b { font-size: 32px; font-weight: 500; }
.kc-time span { font-size: 13px; opacity: .9; }
.kc-poster { width: 56px; height: 78px; border-radius: 4px; overflow: hidden; background: rgba(0,0,0,.25); display: grid; place-items: center; font-size: 22px; }
.kc-poster img { width: 100%; height: 100%; object-fit: cover; }
.kc-title { font-size: 18px; font-weight: 700; }
.kc-age { font-size: 13px; opacity: .9; min-height: 16px; }
.kc-row { display: flex; justify-content: space-between; font-size: 15px; margin-top: 4px; }

.kbottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.kbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; padding: 8px 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; cursor: pointer; font-size: 13px; }
.kbtn i { font-style: normal; font-size: 20px; }
.kbtn:hover { border-color: #c9c3bb; }
.kbtn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.kbtn.primary { background: var(--accent); border-color: var(--accent); color: #fff; min-width: 130px; }
.kbtn:disabled { opacity: .5; }

.kseats { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; }
.kside { display: flex; flex-direction: column; gap: 8px; background: #e7e4df; border-radius: 8px; padding: 8px; max-height: calc(100vh - 230px); }
.kside-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.kside-item { --c: #2f4fb3; text-align: left; border: 0; border-left: 5px solid var(--c); background: #fff; border-radius: 6px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.kside-item.on { background: #1f5fd1; color: #fff; }
.kside-item.past { opacity: .55; }
.kmain { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; min-width: 0; }
.khead { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kh-poster { width: 40px; height: 56px; border-radius: 4px; overflow: hidden; background: #ddd; display: grid; place-items: center; }
.kh-poster img { width: 100%; height: 100%; object-fit: cover; }
.kh-time { font-size: 24px; }
.kh-title { display: flex; flex-direction: column; } .kh-title b { font-size: 18px; } .kh-title span { color: var(--muted); font-size: 14px; }
.kh-fmt { font-size: 22px; }
.kh-prices { text-align: right; color: var(--muted); }
.kmapwrap { position: relative; flex: 1; overflow: auto; padding: 14px 60px 14px 14px; }
.kmap { --z: 1; min-width: max-content; margin: 0 auto; }
.kscreen { background: #efe98f; border: 1px solid #d6cf62; text-align: center; padding: 6px; border-radius: 4px; width: 60%; margin: 0 auto 18px; color: #555; }
.krows { display: flex; flex-direction: column; gap: calc(6px * var(--z)); align-items: center; }
.krow { display: flex; align-items: center; gap: calc(10px * var(--z)); }
.kseatline { display: flex; gap: calc(6px * var(--z)); justify-content: center; }
.krn { background: #efe98f; border: 1px solid #d6cf62; border-radius: 4px; font-size: calc(13px * var(--z)); font-weight: 600; width: calc(64px * var(--z)); text-align: center; padding: calc(6px * var(--z)) 0; }
.kseat { width: calc(34px * var(--z)); height: calc(34px * var(--z)); border: 1px solid #9aa3ad; border-radius: 4px; background: #fff; font-size: calc(13px * var(--z)); cursor: pointer; display: flex; align-items: flex-end; justify-content: flex-end; padding: 2px 4px; color: #333; }
.kseat:hover { border-color: #1d1b19; box-shadow: 0 0 0 1px #1d1b19; }
.kseat.vip { background: #f6e7c6; }
.kseat.sel { background: #1f9d3a; border-color: #177a2c; color: #fff; }
.kseat.sold { background: #8a94a3; border-color: #7a8493; color: #fff; }
.kseat.res { background: #f0a53a; border-color: #d18a22; color: #fff; }
.kzoom { position: absolute; right: 10px; top: 40%; display: flex; flex-direction: column; gap: 6px; }
.kzoom button { width: 40px; height: 40px; border: 1px solid var(--line); background: #f2f1ef; border-radius: 6px; font-size: 20px; cursor: pointer; }
.kstats { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.kstats b { color: var(--ink); }

.kprod, .kpay { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; flex: 1; }
.kcart { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 116px; max-height: calc(100vh - 130px); }
.kc-head { background: #e7e4df; margin: -16px -16px 0; padding: 8px 16px; border-radius: 10px 10px 0 0; font-weight: 600; }
.kc-lines { overflow-y: auto; max-height: 45vh; }
.kc-line { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kc-line select { margin-top: 4px; padding: 3px 6px; }
.kc-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; color: var(--muted); }
.kc-sum b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.kc-total { background: #1f9d3a; color: #fff; border-radius: 8px; padding: 16px 20px; font-size: 20px; display: flex; justify-content: space-between; align-items: center; }
.kc-total b { font-size: 28px; }
.kpad-top { display: flex; gap: 8px; margin-bottom: 10px; }
.kamount { flex: 1; font-size: 26px; padding: 10px 14px; background: #fff; }
.kpad { display: grid; grid-template-columns: 3fr 2fr 2fr; gap: 12px; align-items: start; }
.kkeys, .kquick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kquick { grid-template-columns: repeat(2, 1fr); }
.kkeys button, .kquick button { height: 56px; border: 1px solid var(--line); background: #f7f6f4; border-radius: 6px; font-size: 20px; cursor: pointer; }
.kkeys button:active, .kquick button:active { background: #e3e0db; }
.kmethods { display: grid; gap: 8px; }
.kmeth { height: 76px; border: 0; border-radius: 8px; color: #fff; font-size: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.kmeth i { font-style: normal; font-size: 22px; }
.kmeth.cash { background: #3f8f3a; } .kmeth.card { background: #2f6fb3; } .kmeth.exact { background: #6f6a64; height: 56px; }
.kmeth:disabled { opacity: .5; }

@media (max-width: 1000px) {
  .kseats, .kprod, .kpay { grid-template-columns: minmax(0, 1fr); }
  .kside { max-height: 240px; }
  .kpad { grid-template-columns: 1fr 1fr; }
  .kcards { grid-template-columns: minmax(0, 1fr); }
  .kbar { top: 0; flex-wrap: wrap; }
  .kcart { position: static; max-height: none; }
}
input[type=color] { height: 40px; width: 90px; padding: 3px; cursor: pointer; }

/* Смена кассира */
.kshift { background: #36405a; color: #fff; border: 0; border-left: 1px solid #3d4660; padding: 0 16px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; font-size: 14px; font-weight: 600; min-width: 150px; }
.kshift small { font-weight: 400; color: #c8cfdc; font-size: 12px; }
.kshift.closed { background: #8a3a1e; }
.kshift:hover { filter: brightness(1.15); }

/* Отчёты */
.rlayout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.rlist { padding: 8px; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; }
.rgroup { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 12px 8px 4px; }
.rlist button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 6px; cursor: pointer; color: #2456a6; }
.rlist button:hover { background: var(--info-soft); }
.rlist button.on { background: var(--info); color: #fff; }
.rmain { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rwrap { overflow-x: auto; background: #fff; }
.rdoc { font-family: Arial, sans-serif; font-size: 13px; color: #000; }
.rdoc h2 { font-size: 17px; text-align: center; margin: 0 0 4px; }
.rsub { text-align: center; color: #333; }
.rt { border-collapse: collapse; width: 100%; margin: 12px 0; }
.rt th, .rt td { border: 1px solid #9a9a9a; padding: 4px 7px; font-size: 12px; }
.rt th { background: #ececec; text-transform: none; letter-spacing: 0; color: #000; text-align: center; font-weight: 700; }
.rt td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt td.grp { background: #f3f3f3; font-weight: 700; }
.rt .b { font-weight: 700; }
.rt tfoot td { font-weight: 700; background: #f7f7f7; }
.rt td.empty { text-align: center; color: #888; padding: 14px; }
.rkv { border-collapse: collapse; margin: 10px 0; } .rkv td { padding: 3px 10px; border: 0; } .rkv td:first-child { color: #555; }
.rtitle { font-size: 14px; margin: 16px 0 0; }
.rsign { margin: 20px 0; } .rsign div { margin: 12px 0; } .rsign span { color: #666; }
.rgen { color: #888; font-size: 11px; margin-top: 8px; }
@media (max-width: 1000px) { .rlayout { grid-template-columns: minmax(0, 1fr); } .rlist { position: static; max-height: none; } }
.kmeth.qr { background: #5a3fb0; } .btn.qrbtn { background: #5a3fb0; border-color: #5a3fb0; color: #fff; }

/* ===== Пульс ===== */
.pulse { display: flex; flex-direction: column; gap: 14px; }
.pfilters { gap: 8px; }
.pcard { background: #fcfcfb; border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.pcard h3 { font-size: 15px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard h3 small { font-weight: 400; color: #52514e; font-size: 13px; }
.pgrid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; }
.pgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pgrid3 { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; }
.pgrid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.phero .pl, .ptile .pl { font-size: 13px; color: #52514e; }
.phv { font-size: 48px; font-weight: 700; line-height: 1.1; margin: 6px 0; }
.pmini { display: flex; gap: 16px; margin-top: 12px; font-size: 13px; color: #52514e; flex-wrap: wrap; }
.pmini i, .vlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.pmini b { color: #0b0b0b; }
.ptiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ptile { background: #fcfcfb; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ptile .pv { font-size: 22px; font-weight: 600; margin: 2px 0; }
.vdelta { font-size: 12px; color: #898781; }
.vdelta.good, .ptab .good { color: #006300; } .vdelta.bad, .ptab .bad { color: #d03b3b; }
.pchart { width: 100%; }
.pchart svg { display: block; overflow: visible; }
.vax { font-size: 11px; fill: #898781; font-variant-numeric: tabular-nums; }
.vend { font-size: 12px; fill: #0b0b0b; font-weight: 600; }
.vbar { transition: opacity .1s; } .vhit:hover + .vbar, .vhit:hover { cursor: default; }
#vtip { position: fixed; z-index: 80; display: none; pointer-events: none; background: #fff; border: 1px solid rgba(11,11,11,.12); border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: 13px; }
.vt-row { display: flex; align-items: center; gap: 8px; } .vt-row i { width: 12px; height: 2px; } .vt-row b { color: #0b0b0b; } .vt-row span { color: #52514e; }
.vshare { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.vshare span { min-width: 3px; }
.vlegend div { display: grid; grid-template-columns: auto 1fr auto 44px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid #efeeea; font-size: 13px; }
.vlegend b { font-variant-numeric: tabular-nums; } .vlegend em { font-style: normal; color: #898781; text-align: right; }
.ptab { width: 100%; font-size: 13px; } .ptab th { font-size: 11px; } .ptab td, .ptab th { padding: 6px 6px; }
.pshare { display: inline-block; width: 90px; height: 8px; background: #eeede8; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.pshare i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.ptabs button { border: 1px solid var(--line); background: #fff; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.ptabs button:first-child { border-radius: 6px 0 0 6px; } .ptabs button:last-child { border-radius: 0 6px 6px 0; }
.ptabs button.on { background: #0b0b0b; color: #fff; border-color: #0b0b0b; }
.netstat { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: #f3f2ef; }
.netstat.ok { background: var(--ok-soft); color: var(--ok); } .netstat.bad { background: var(--accent-soft); color: var(--accent); }
code.key { font-size: 12px; background: #f3f2ef; padding: 2px 6px; border-radius: 4px; user-select: all; }
@media (max-width: 1200px) { .pgrid4 { grid-template-columns: 1fr 1fr; } .pgrid3 { grid-template-columns: 1fr; } .ptiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .pgrid, .pgrid2, .pgrid4 { grid-template-columns: minmax(0, 1fr); } .ptiles { grid-template-columns: 1fr 1fr; } .phv { font-size: 38px; } }
.pcard { overflow-x: auto; }
.ptab td:nth-child(n) { white-space: normal; } .ptab td.num, .ptab td:has(+ td) { vertical-align: middle; }
@media (max-width: 800px) { .who { flex-wrap: wrap; gap: 6px; } .who > span { display: none; } .top { min-width: 0; } }
.nav button { padding: 8px 11px; }
@media (max-width: 1500px) { .who > span { display: none; } }

/* Логотипы сети «Мурас» */
.brand-img { height: 34px; width: auto; max-width: 150px; border-radius: 6px; object-fit: contain; display: block; }
.brand-img + .brand-name { font-size: 13px; opacity: .75; }
@media (max-width: 900px) { .brand-img + .brand-name { display: none; } }
.login-logo { margin: -4px 0 14px; }
.login-logo img { display: block; width: 100%; max-height: 170px; object-fit: contain; border-radius: 10px; }
.c-logo { height: 64px; width: auto; max-width: 260px; border-radius: 8px; object-fit: contain; display: block; }
.logo-prev { display: block; height: 70px; width: auto; max-width: 100%; margin-top: 8px; border-radius: 8px; }
.logo-prev[hidden] { display: none; }
.net-logo { height: 30px; width: auto; max-width: 90px; border-radius: 5px; object-fit: contain; flex: none; }

/* Обзор сети */
.nov-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.nov-tot > div { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.nov-tot small { display: block; color: var(--muted, #6b6760); font-size: 12px; }
.nov-tot b { font-size: 20px; }
.nov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.nov-card { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.nov-card.off { opacity: .55; }
.nov-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.nov-head img { height: 46px; width: auto; max-width: 120px; border-radius: 7px; object-fit: contain; flex: none; }
.nov-head b { display: block; font-size: 16px; }
.nov-head small { color: var(--muted, #6b6760); }
.nov-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.nov-kv span { color: var(--muted, #6b6760); }
.nov-kv b { text-align: right; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Экран покупателя: оплата по QR */
.c-qr { display: flex; align-items: center; justify-content: center; gap: 6vw; height: calc(100vh - 140px); padding: 0 4vw; }
.c-qrbox { width: min(62vh, 44vw); aspect-ratio: 1; background: #fff; padding: 2vh; border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.c-qrbox svg { width: 100%; height: 100%; display: block; }
.c-qrtext { max-width: 40vw; display: grid; gap: 14px; }

/* ---------- Расписание: таймлайн ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 7px 12px; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.tl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 12px; align-items: start; }
.tl-main { padding: 12px; min-width: 0; }
.tl-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tl-halls { background: #faf8f5; border-right: 1px solid var(--line); }
.tl-corner { height: 26px; border-bottom: 1px solid var(--line); }
.tl-hname { height: 58px; padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.tl-hname b { font-size: 14px; } .tl-hname span { font-size: 11px; color: var(--muted); }
.tl-scroll { overflow-x: auto; overflow-y: hidden; }
.tl-inner { position: relative; }
.tl-scale { display: flex; height: 26px; border-bottom: 1px solid var(--line); background: #faf8f5; }
.tl-hour { flex: none; border-left: 1px solid var(--line); font-size: 11px; color: var(--muted); padding: 5px 0 0 4px; position: relative; }
.tl-hour::after { content: ''; position: absolute; left: 50%; bottom: 0; height: 6px; border-left: 1px solid var(--line); }
.tl-row { position: relative; height: 58px; border-bottom: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(to right, #ece8e2 1px, transparent 1px); }
.tl-row:hover { background-color: #fbfaf8; }
.tl-show { position: absolute; top: 3px; bottom: 3px; display: flex; cursor: grab; user-select: none; z-index: 1; }
.tl-show.locked { cursor: pointer; }
.tl-film { background: color-mix(in srgb, var(--c) 22%, #fff); border: 1px solid color-mix(in srgb, var(--c) 55%, #fff); border-left: 3px solid var(--c);
  border-radius: 5px; padding: 3px 5px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-width: 0; }
.tl-film b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #222; }
.tl-meta { font-size: 10px; color: #555; white-space: nowrap; overflow: hidden; }
.tl-time { display: flex; justify-content: space-between; font-size: 10px; color: #333; gap: 4px; } .tl-time i { font-style: normal; }
.tl-show.local .tl-film { border-style: dashed; }
.tl-show:hover .tl-film { box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.tl-pause { background: repeating-linear-gradient(135deg, #eeeae4 0 4px, #f7f5f1 4px 8px); border-radius: 0 4px 4px 0; font-size: 10px; color: var(--muted);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px; }
.tl-pause.bad { background: repeating-linear-gradient(135deg, #f3b4b4 0 4px, #fbe3e3 4px 8px); color: var(--accent); font-weight: 700; }
.tl-now { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--accent); z-index: 2; pointer-events: none; }
.tl-now::before { content: ''; position: absolute; top: 20px; left: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tl-ghost { position: absolute; z-index: 3; pointer-events: none; border: 2px dashed var(--accent); background: rgba(180,35,42,.08); border-radius: 5px;
  font-size: 11px; font-weight: 600; color: var(--accent); padding: 4px; box-sizing: border-box; white-space: nowrap; overflow: hidden; }
.tl-side { padding: 12px; position: sticky; top: 12px; max-height: calc(100vh - 100px); overflow: auto; }
.tl-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tl-prices label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 2px; }
.tl-prices input { padding: 5px 7px; width: 100%; box-sizing: border-box; }
.tl-films { display: flex; flex-direction: column; gap: 6px; }
.tl-fcard { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--line); border-left: 4px solid var(--c);
  border-radius: 8px; cursor: grab; background: #fff; }
.tl-fcard:hover { border-color: var(--c); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tl-fcard b { display: block; font-size: 13px; line-height: 1.2; } .tl-fcard span { font-size: 11px; color: var(--muted); }
.tl-fposter { width: 34px; height: 48px; border-radius: 4px; background: var(--c); overflow: hidden; }
.tl-fposter img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .tl-wrap { grid-template-columns: 1fr; } .tl-side { position: static; max-height: none; } .tl-grid { grid-template-columns: 90px minmax(0,1fr); } }
.tl-ghost.bad { border-color: #888; background: repeating-linear-gradient(135deg, rgba(0,0,0,.08) 0 6px, transparent 6px 12px); color: #555; }
