/* Админка ПОНАРОШКУ — редизайн 27.09.2026 (вариант A «Меню слева» с лёгким декором).
   Только этот файл: встроенные стили и скрипты запрещены политикой безопасности (CSP). */

:root {
  --bg: #f5f6f8;
  --surface: #fff;
  --line: #e6e8ec;
  --line2: #eef0f3;
  --text: #1c2130;
  --muted: #6b7280;
  --faint: #9aa1ad;
  --accent: #4f5bd5;
  --accent-hover: #4350c4;
  --accent-soft: #eef0ff;
  --accent-ink: #3a45b8;
  --green: #1f9d63;
  --green-soft: #e6f6ee;
  --amber: #b7791f;
  --amber-soft: #fdf3e1;
  --red: #c2413b;
  --red-soft: #fdecea;
  --orange: #c05621;
  --orange-soft: #fff1e6;
  --gray-soft: #f0f1f4;
  --violet: #6b46c1;
  --violet-soft: #f1ecff;
  --grad: linear-gradient(120deg, #3b3f9e, #6d4bd1 55%, #a35bd8);
  --r: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --side: 244px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 14px; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 14px; font-weight: 600; margin: 14px 0 8px; }
h1 small, h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
p { margin: 0 0 10px; }
code { background: var(--gray-soft); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.muted { color: var(--muted); font-size: 13px; }
.faint { color: var(--faint); }
.sp { flex: 1; }
.nw { white-space: nowrap; }
.pad { padding: 14px 16px; }
.link { color: var(--accent-ink); }

/* ---------- иконки и знак ---------- */
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ico.xs { width: 13px; height: 13px; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #4f5bd5, #8b5cf6);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 91, 213, .3);
}
.logo svg { width: 21px; height: 21px; }
.logo.sm { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.logo.sm svg { width: 17px; height: 17px; }

/* ---------- каркас ---------- */
.navtoggle { position: absolute; opacity: 0; pointer-events: none; }
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .w { font-weight: 700; letter-spacing: .08em; font-size: 13px; line-height: 1.15; }
.brand .w small { display: block; font-weight: 500; letter-spacing: 0; color: var(--faint); font-size: 11.5px; }

.evcard { border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(60, 50, 140, .18); margin-bottom: 14px; }
.evcard summary { list-style: none; cursor: pointer; display: block; }
.evcard summary::-webkit-details-marker { display: none; }
.evcard .cover {
  display: block; position: relative; padding: 12px 34px 12px 12px; color: #fff;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .55) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, .5) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 44% 78%, rgba(255, 255, 255, .45) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 64%, rgba(255, 255, 255, .5) 0 1.5px, transparent 2.5px),
    var(--grad);
}
.evcard .n { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; }
.evcard .d { display: block; font-size: 12px; color: rgba(255, 255, 255, .85); margin-top: 2px; }
.evcard .caret { position: absolute; right: 10px; top: 13px; color: rgba(255, 255, 255, .85); transition: transform .15s; }
.evcard[open] .caret { transform: rotate(180deg); }
.evcard .low { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); white-space: nowrap; }
.evcard .days { margin-left: auto; font-size: 12px; color: var(--muted); }
.evmenu { background: var(--surface); border-top: 1px solid var(--line2); padding: 6px; }
.evmenu a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 13px; }
.evmenu a small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.evmenu a:hover { background: var(--bg); text-decoration: none; }
.evmenu a.on { background: var(--accent-soft); color: var(--accent-ink); }
.evmenu a.all { color: var(--accent-ink); font-size: 12.5px; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: #394056; font-weight: 500; font-size: 13.5px;
}
.nav a .ico { color: #8a90a2; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); }
.nav a.on .ico { color: var(--accent); }
.nav .cnt { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--muted); }
.nav .cnt.warn { color: var(--amber); font-weight: 600; }
.nav .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 14px 10px 6px; }

.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex: none;
}
.me .who { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbtn { background: none; border: 0; color: var(--muted); padding: 4px; cursor: pointer; border-radius: 6px; }
.linkbtn:hover { background: var(--bg); color: var(--text); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 24px; position: sticky; top: 0; z-index: 5;
}
.burger, .toplogo { display: none; }
.search {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 0 11px; width: 340px; max-width: 100%; color: var(--faint);
}
.search:focus-within { border-color: #b9bff5; box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { border: 0; outline: 0; font: inherit; padding: 8px 0; flex: 1; min-width: 0; background: transparent; color: var(--text); }
.content { padding: 22px 24px 40px; max-width: 1400px; width: 100%; }
.solo { max-width: 520px; margin: 0 auto; padding: 24px 16px; }
.scrim, .tabbar { display: none; }

/* ---------- кнопки и поля ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 500; font-size: 13px;
  cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.3;
}
button:hover, .btn:hover { background: var(--bg); text-decoration: none; }
button[type="submit"]:not(.linkbtn):not(.ghost):not(.danger):not(.plain), .btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
button[type="submit"]:not(.linkbtn):not(.ghost):not(.danger):not(.plain):hover, .btn.primary:hover { background: var(--accent-hover); }
.btn.ghost, button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.danger, button.danger { color: var(--red); border-color: #f3c9c6; background: var(--surface); }
.btn.danger:hover, button.danger:hover { background: var(--red-soft); }
.btn.sm, button.sm { padding: 4px 9px; font-size: 12px; }
button.plain { background: var(--surface); color: var(--text); }

input, select, textarea { font: inherit; color: var(--text); }
input[type="text"], input[type="tel"], input[type="number"], input[type="datetime-local"], input[type="password"],
input:not([type]), select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: #b9bff5; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.wide { width: 100%; max-width: 44rem; display: block; }
.form { max-width: 560px; }
.form label { display: block; margin-bottom: 12px; font-weight: 500; font-size: 13px; color: #394056; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.form input[type="checkbox"], .form input[type="radio"] { display: inline-block; width: auto; margin: 0 6px 0 0; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 4px 6px 4px 0; flex-wrap: wrap; }
.inline-form input[type="text"], .inline-form input:not([type]) { min-width: 180px; }

/* ---------- сообщения ---------- */
.notice { background: var(--accent-soft); border: 1px solid #d9dcff; color: #2d357f; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.notice p { margin: 4px 0; }
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.alert.error { background: var(--red-soft); color: #9b2c26; border: 1px solid #f5c6c0; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- карточки, таблицы, метки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.card-h h2 { margin: 0; }
.card-h .more { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.card-h .btn { margin-left: auto; }
.card:has(> .card-h) { padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.5;
}
.c-green { background: var(--green-soft); color: var(--green); }
.c-amber { background: var(--amber-soft); color: var(--amber); }
.c-red { background: var(--red-soft); color: var(--red); }
.c-gray { background: var(--gray-soft); color: #4b5263; }
.c-orange { background: var(--orange-soft); color: var(--orange); }
.c-accent { background: var(--accent-soft); color: var(--accent-ink); }
.c-violet { background: var(--violet-soft); color: var(--violet); }

table.data { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13.5px; }
.card > table.data, section > table.data { border-radius: 0 0 var(--r) var(--r); }
table.data th {
  text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: #fafbfc;
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafbff; }
main > table.data, .content > table.data { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ref { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
tr.free td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.booked td:first-child { box-shadow: inset 3px 0 0 var(--amber); }

.detail { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 16px; }
.actions form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.page-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.page-h h1 { margin: 0; }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 16px; }
.subtabs a { padding: 8px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.subtabs a:hover { text-decoration: none; color: var(--text); }
.event-switch { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- «Обзор» ---------- */
.banner {
  border-radius: 14px; padding: 18px 22px; margin-bottom: 16px; color: #fff; display: flex; align-items: center; gap: 20px;
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 255, 255, .35) 0 2px, transparent 3px),
    radial-gradient(circle at 22% 80%, rgba(255, 255, 255, .3) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 63% 18%, rgba(255, 255, 255, .3) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 79% 72%, rgba(255, 255, 255, .35) 0 2px, transparent 3px),
    var(--grad);
}
.banner h1 { color: #fff; margin: 0; }
.banner .sub { color: rgba(255, 255, 255, .88); font-size: 13.5px; margin-top: 3px; }
.banner .count { margin-left: auto; text-align: right; }
.banner .count b { display: block; font-size: 32px; line-height: 1; letter-spacing: -.02em; }
.banner .count span { font-size: 12.5px; color: rgba(255, 255, 255, .88); }
.ring { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .ring-bg { stroke: rgba(255, 255, 255, .25); }
.ring .ring-fg { stroke: #fff; stroke-linecap: round; }
.ring text { transform: rotate(90deg); transform-origin: 18px 18px; fill: #fff; font-size: 8.5px; font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 16px 18px; margin: 0; color: var(--text); display: block; }
a.kpi:hover { text-decoration: none; border-color: #d4d8f6; }
.kpi .ki { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.k-accent { background: var(--accent-soft); color: var(--accent); }
.k-green { background: var(--green-soft); color: var(--green); }
.k-amber { background: var(--amber-soft); color: var(--amber); }
.k-violet { background: var(--violet-soft); color: var(--violet); }
.kpi .l { font-size: 12.5px; color: var(--muted); }
.kpi .v { font-size: 25px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; line-height: 1.2; }
.kpi .v small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi .v.warn { color: var(--amber); }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.bar { display: block; width: 100%; height: 6px; margin-top: 10px; }
.bar-bg { fill: var(--line2); }
.bar-fg { fill: var(--accent); }
.bar-full { fill: var(--green); }

.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
.cols2 > .card { margin: 0; overflow-x: auto; }
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line2); }
.attention li .t { flex: 1; }
.attention li.ok { color: var(--muted); }
.tablefill { margin-top: 14px; padding: 0; }
.tf-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 22px; padding: 4px 16px 16px; }
.tf-h { display: flex; gap: 8px; font-size: 12.5px; }
.tf-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf .bar { margin-top: 6px; }
.empty { text-align: center; padding: 40px; }

/* ---------- «Мероприятия» ---------- */
.evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 14px; }
.evc-h { display: flex; gap: 10px; align-items: flex-start; }
.evc-h h2 { margin: 0 0 2px; font-size: 16px; }
.evc-h h2 a { color: var(--text); }
.evc-h .chip { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.stat { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.stat b { display: block; font-size: 18px; font-weight: 600; }
.stat b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat span { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: block; }

/* ---------- прочее со старых страниц ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.audit-detail pre { margin: 0; font-size: 12px; white-space: pre-wrap; word-break: break-word; color: #555; }
.login-card { max-width: 460px; margin: 10vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.login-card input { width: 100%; margin: 6px 0 12px; }
.broadcast { margin-bottom: 16px; }
.broadcast p { margin: 6px 0; }
.message-preview { background: var(--bg); border-left: 3px solid var(--accent); margin: 8px 0; padding: 10px 14px; white-space: pre-wrap; border-radius: 0 8px 8px 0; }
.preview-button { display: inline-block; margin-top: 6px; color: var(--accent-ink); font-weight: 600; }
.broadcast-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.one-table { margin: 6px 0 0; padding-left: 18px; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols2 { grid-template-columns: minmax(0, 1fr); }
  .tf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; width: 280px;
    transform: translateX(-105%); transition: transform .2s; box-shadow: 12px 0 30px rgba(16, 24, 40, .18);
  }
  .navtoggle:checked ~ .app .side { transform: none; }
  .navtoggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(20, 24, 40, .35); z-index: 20; }
  .top { padding: 0 12px; height: 54px; }
  .burger { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; flex: none; }
  .toplogo { display: inline-flex; }
  .search { width: auto; flex: 1; }
  .hide-sm { display: none; }
  .content { padding: 14px 12px 90px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: 62px; background: var(--surface);
    border-top: 1px solid var(--line); justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar label { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); cursor: pointer; }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--accent-ink); }
  .tabbar a:hover { text-decoration: none; }
  .banner { padding: 14px 16px; gap: 14px; }
  .banner h1 { font-size: 17px; }
  .banner .sub { font-size: 12px; }
  .banner .count b { font-size: 24px; }
  .ring { width: 50px; height: 50px; }
  .kpis { gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .v { font-size: 19px; }
  .kpi .ki { display: none; }
  .tf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evgrid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { min-width: 0; }
  .attention li { padding: 10px 12px; gap: 8px; }
  .attention li .t { min-width: 0; font-size: 13px; }
  .detail { grid-template-columns: 1fr; gap: 2px; }
  .detail dd { margin-bottom: 8px; }
  table.data { font-size: 12.5px; }
  .cols2 table.data th:nth-child(6), .cols2 table.data td:nth-child(6) { display: none; }
  .content > table.data { display: block; overflow-x: auto; }
}

/* ---------- карточка брони (редизайн 27.09.2026, шаг 2) ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.bk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bk-head h1 { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
a.chip:hover { text-decoration: none; filter: brightness(.97); }
.bk { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.bk-main > .card, .bk-main > .suggest { margin: 0 0 14px; }
.bk-side { padding: 0; position: sticky; top: 74px; }
.bk-side .sec { padding: 14px 16px; border-top: 1px solid var(--line2); }
.bk-side .sec:first-child { border-top: 0; }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sec-h h2 { margin: 0; font-size: 14px; }
.sec-h .chip, .sec-h .more { margin-left: auto; }
.sec-h .more { font-size: 12.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 5px 10px; margin: 0 0 10px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.row2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row2 .grow, form.grow { flex: 1; min-width: 0; }
button.wide { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 12.5px; margin-top: 4px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }
.note { white-space: pre-wrap; margin: 0; }
table.people td { vertical-align: middle; }
table.people td b { font-weight: 600; }
table.people .sub { display: block; font-size: 12px; color: var(--faint); }
table.people tr.gone td { color: var(--faint); }
table.people td.split { color: var(--orange); }
table.people td.act { width: 44px; text-align: right; }
.rowmenu { position: relative; display: inline-block; }
.rowmenu summary {
  list-style: none; cursor: pointer; width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu summary:hover, .rowmenu[open] summary { background: var(--bg); color: var(--text); }
.rowmenu .menu {
  position: absolute; right: 0; top: 34px; z-index: 12; width: 290px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
  padding: 8px; display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.rowmenu .menu > a { padding: 7px 8px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 13px; }
.rowmenu .menu > a:hover { background: var(--bg); text-decoration: none; }
.rowmenu .swap { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--line2); }
.rowmenu .swap label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.rowmenu .swap select { width: 100%; }
.rowmenu form:last-child button.danger { width: 100%; }
.suggest { border: 1px dashed #cfd4ff; background: #f8f9ff; border-radius: 12px; padding: 12px 14px; }
.suggest.sm { font-size: 13px; padding: 10px 12px; margin: 8px 0; }
.seat-line { margin-bottom: 2px; }
.seat-hint { margin-top: 6px; }
.card.seats { padding: 12px 16px; }
.history { list-style: none; margin: 0; padding: 0 0 6px; }
.history li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line2); font-size: 13px; }
.history .when { color: var(--muted); white-space: nowrap; }
.history .who { color: var(--faint); white-space: nowrap; }
.mobilebar { display: none; }

@media (max-width: 1180px) {
  .bk { grid-template-columns: minmax(0, 1fr); }
  .bk-side { position: static; }
}
@media (max-width: 900px) {
  table.people thead { display: none; }
  table.people, table.people tbody, table.people tr, table.people td { display: block; }
  table.people tr { position: relative; padding: 10px 12px; border-top: 1px solid var(--line2); }
  table.people tr:first-child { border-top: 0; }
  table.people td { padding: 0; border: 0; }
  table.people td.act { position: absolute; right: 8px; top: 8px; width: auto; }
  table.people td:nth-child(2), table.people td:nth-child(3), table.people td:nth-child(4) { display: inline; font-size: 12.5px; color: #394056; }
  table.people td:nth-child(3)::before { content: " · "; color: var(--faint); }
  table.people td:nth-child(4)::before { content: " · "; color: var(--faint); }
  table.people td.split { color: var(--orange); }
  .history li { grid-template-columns: 80px minmax(0, 1fr); }
  .history .who { grid-column: 2; }
  .mobilebar {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 62px; z-index: 9;
    background: var(--surface); border-top: 1px solid var(--line); padding: 8px 12px;
  }
  .content:has(.mobilebar) { padding-bottom: 150px; }
  .rowmenu .menu { width: min(290px, 80vw); }
}

/* ---------- списки (редизайн 27.09.2026, шаг 3) ---------- */
.card.flush { padding: 0; overflow-x: auto; }
.card.flush > table.data { border-radius: var(--r); }
.empty-list { text-align: center; padding: 28px; }
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .fchips { margin-bottom: 0; }
.fchips a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: #394056; font-weight: 500; font-size: 13px;
}
.fchips a b { font-weight: 600; color: var(--muted); }
.fchips a:hover { text-decoration: none; background: var(--bg); }
.fchips a.on { background: var(--text); border-color: var(--text); color: #fff; }
.fchips a.on b { color: rgba(255, 255, 255, .75); }
.fcompany { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fcompany label { color: var(--muted); font-size: 13px; }
table.list td a.name { color: var(--text); font-weight: 500; }
table.list td .sub, table.roles td .sub, .wl-h .sub { display: block; font-size: 12px; color: var(--muted); }
table.list td b.name { font-weight: 600; }
table.data td.act { text-align: right; }
table.data td.act .btn { margin-left: 4px; }
.page-h h1 small { font-size: 14px; }

.rolegroup { margin-bottom: 14px; }
.rolegroup .card-h { padding-bottom: 8px; }
.rolegroup .card-h .muted { margin-left: auto; }
table.roles td:first-child { width: 34%; }
.star { color: #c9a227; }

.tbl-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tbl-h h2 { margin: 0 0 8px; }
.rolechips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.rc { border: 1px solid #bfe6d2; background: var(--green-soft); color: #17714a; border-radius: 8px; padding: 3px 9px; font-size: 12.5px; }
.rc.busy { border-color: var(--line); background: var(--gray-soft); color: #4b5263; }

.compgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 14px; }
.comp.warn { border-color: #f6d6bd; }
.comp-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chip.big { font-size: 13.5px; padding: 4px 12px; }
.comp-bookings { list-style: none; margin: 0 0 10px; padding: 0; }
.comp-bookings li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.comp-bookings li span:nth-child(2) { flex: 1; }
.comp-seats { font-size: 13px; margin-bottom: 8px; }

.broadcast .bc-grid { display: block; }
.wl-h { margin-bottom: 10px; }
.wl-count { margin: 0; font-weight: 500; }
details.closed-wl { margin-top: 14px; }
details.closed-wl summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: #394056; }

@media (max-width: 900px) {
  .fcompany { margin-left: 0; }
  table.roles td:first-child { width: auto; }
  table.roles th:nth-child(5), table.roles td:nth-child(5), table.roles th:nth-child(6), table.roles td:nth-child(6) { display: none; }
  table.list th:nth-child(3), table.list td:nth-child(3), table.list th:nth-child(8), table.list td:nth-child(8) { display: none; }
}

/* ---------- служебные страницы (редизайн 27.09.2026, шаг 4) ---------- */
.content > form.card, .content > section.card.confirm, .content > .card.form { max-width: 640px; }
form.card { padding: 18px 20px; }
form.card > button, form.card > .btn { margin-top: 6px; }
form.card > button + .btn, form.card > button + a { margin-left: 6px; }
.form.card label { margin-bottom: 14px; }
.form.card textarea { resize: vertical; }
.form.card h2 { margin-top: 6px; }
.form.card label:has(> input[type="checkbox"]) { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.form.card label:has(> input[type="checkbox"]) input { margin-top: 3px; }
form.stacked-form.card { padding: 0; max-width: 900px; overflow: hidden; }
form.stacked-form.card table.data { border-radius: var(--r) var(--r) 0 0; }
form.stacked-form.card table.data input, form.stacked-form.card table.data select { width: 100%; }
form.stacked-form.card > button { margin: 14px 8px 16px 16px; }
form.stacked-form.card > a { margin: 14px 0 16px; }
.confirm { max-width: 640px; padding: 20px; }
.confirm-actions { display: flex; gap: 8px; margin-top: 14px; }
.errorbox { max-width: 560px; margin: 8vh auto 0; text-align: center; padding: 32px; }
.errorbox h1 { margin-bottom: 8px; }
.errorbox .row2 { justify-content: center; }
table.audit .code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--faint); }
table.audit td.audit-detail { max-width: 420px; }
details.roles-list { margin: 0 0 14px; }
details.roles-list p { margin: 6px 0 0; font-size: 13px; }
@media (max-width: 900px) { table.audit td.audit-detail { min-width: 280px; } }
.login-card h1 { font-size: 20px; }
.login-brand { padding: 0 0 16px; }

/* «Частые вопросы» (27.09.2026) */
.card.faq { padding: 14px 16px; margin-bottom: 10px; max-width: 900px; scroll-margin-top: 70px; }
.card.faq.off { opacity: .72; }
.faq-h { display: flex; align-items: center; gap: 10px; }
.faq-h h2 { margin: 0; font-size: 15px; }
.faq-h .num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.faq-a { margin: 8px 0 10px 34px; color: var(--muted); font-size: 13px; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.faq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-left: 34px; }
.faq-actions .inline-form { margin: 0; }
.form.card.faq-new { max-width: 900px; margin-top: 18px; }
@media (max-width: 900px) { .faq-a, .faq-actions { margin-left: 0; } }

/* «Разные столы — вопрос решён» (27.09.2026) */
.split-resolve { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; font-size: 12.5px; }
.split-done { margin-top: 8px; font-size: 13px; color: #3f6b4f; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.split-done.sm { font-size: 12.5px; }
.split-done .inline-form { margin: 0; }

/* Тестовая копия: оранжевая полоса сверху (27.09.2026) */
.teststripe {
  position: fixed; top: 0; left: 0; right: 0; height: 28px; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #f59e0b 0 16px, #ea8a07 16px 32px);
  color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
body.test-stand { padding-top: 28px; }
body.test-stand .side { top: 28px; height: calc(100vh - 28px); }
body.test-stand .top { top: 28px; }
body.test-stand .bk-side { top: 102px; }
@media (max-width: 900px) { body.test-stand .side { top: 28px; height: auto; } }

/* Учёт расходов и прибыли (27.09.2026) */
.kpis.money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi .s a.warn { color: #b45309; }
.v.pos, td.pos { color: #15803d; }
.v.neg, td.neg { color: #b91c1c; }
td.num, th.num { text-align: right; }
.money-table tr.total td { background: var(--bg); }
.catsum { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.content > form.card.expense-add, .expense-add { max-width: none; }
.expense-add { display: grid; grid-template-columns: 130px minmax(0, 2fr) minmax(0, 1.2fr) 150px minmax(0, 1.4fr) auto; gap: 10px; align-items: end; padding: 14px 16px; margin-bottom: 6px; }
.expense-add label { font-size: 12.5px; font-weight: 500; color: #394056; }
.expense-add input, .expense-add select { display: block; width: 100%; min-width: 0; margin-top: 4px; }
.small-note { font-size: 12.5px; margin: 0 0 14px; }
.add-cat { margin-top: 14px; }
.inline-form.add-cat input { min-width: 340px; }
.paid-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 6px 0 8px; }
.paid-form label { font-size: 12.5px; color: var(--muted); }
.paid-form input { display: block; width: 130px; margin-top: 3px; }
.paid-form button { flex: 1; }
.paid-sum { margin: 4px 0 8px; }
form.stack label.lbl { font-size: 12.5px; color: var(--muted); }
form.stack label.lbl input { display: block; width: 100%; margin-top: 3px; }
@media (max-width: 1180px) { .expense-add { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .kpis.money { grid-template-columns: minmax(0, 1fr); }
  .expense-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .expense-add .desc, .expense-add button { grid-column: 1 / -1; }
  .inline-form.add-cat input { min-width: 0; width: 100%; }
}
/* Тестовая копия: знак «два бокала» тоже рыжий (27.09.2026) */
body.test-stand .logo { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 4px 12px rgba(234, 88, 12, .28); }

/* Список гостей на вход (27.09.2026): без дизайна, удобен для печати */
.guestlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.guestlist-tables { overflow-x: auto; }
/* Одинаковые столбцы у всех компаний, независимо от длины содержимого. */
.gl { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; page-break-inside: auto; }
.gl col.gl-col-number { width: 36px; }
.gl col.gl-col-role { width: 25%; }
.gl col.gl-col-table { width: 20%; }
.gl col.gl-col-phone { width: 140px; }
.gl col.gl-col-mark { width: 30px; }
.gl th, .gl td { overflow-wrap: anywhere; border-bottom: 1px solid #e4e6ee; padding: 5px 6px; text-align: left; vertical-align: top; }
.gl thead th { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.gl tr.gl-company th { font-size: 14px; color: var(--text); padding-top: 10px; border-bottom: 2px solid #c9cde0; }
.gl .n { white-space: nowrap; color: var(--muted); }
.gl .mark { text-align: center; }
.gl .box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #8a90a6; border-radius: 3px; }
.gl .tag { font-size: 11px; color: #b45309; }
.gl tr { page-break-inside: avoid; }
.print-only { display: none; }
@media print {
  .side, .top, .tabbar, .noprint, .teststripe, .scrim { display: none !important; }
  body, body.test-stand { padding: 0; background: #fff; }
  .app, .main, .content { display: block; padding: 0; margin: 0; max-width: none; }
  .guestlist { border: 0; padding: 0; }
  .print-only { display: block; margin: 0 0 4px; font-size: 16px; }
  .guestlist-tables { overflow: visible; }
  .gl { min-width: 0; font-size: 11px; }
  .gl col.gl-col-number { width: 30px; }
  .gl col.gl-col-phone { width: 118px; }
  .gl col.gl-col-mark { width: 28px; }
  @page { size: A4; margin: 12mm; }
}

/* Меню на телефоне (правка Романа 01.10.2026).
   Плитка мероприятия и разделы стоят в колонке и по умолчанию ужимаются,
   когда содержимому не хватает высоты. На айфоне высоты не хватает всегда:
   у плитки обрезка краёв, поэтому открытый список мероприятий схлопывался
   в ноль — стрелка поворачивалась, а списка не было видно.
   Запрещаем сжатие и даём списку мероприятий собственную прокрутку. */
.side > .brand, .side > .evcard, .side > .nav, .side > .me { flex: none; }
.evmenu { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* Список длиннее экрана: ссылка «Все мероприятия» всегда видна и подсказывает,
   что список прокручивается (правка Романа 01.10.2026). */
.evmenu a.all {
  position: sticky; bottom: -6px; margin-top: 2px; background: var(--surface);
  box-shadow: 0 -8px 10px -4px var(--surface); border-top: 1px solid var(--line2);
}
@media (max-width: 900px) {
  /* Safari на айфоне считает в 100vh область под своей нижней панелью. */
  .side { height: 100dvh; }
  .evmenu { max-height: 60vh; }
  body.test-stand .side { height: calc(100dvh - 28px); }
}

/* Готовые сообщения по брони и кнопки «копировать» (решение заказчика 01.10.2026). */
.card.msg + .card.msg, .card.pay { margin-top: 14px; }
.msgbox {
  width: 100%; font: inherit; font-size: 13px; line-height: 1.5; color: var(--text);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); resize: vertical;
}
.notice.sm { font-size: 12.5px; padding: 6px 10px; }
.copybtn {
  background: none; border: 0; padding: 1px 5px; margin-left: 2px; cursor: pointer;
  color: var(--muted); border-radius: 6px; font-size: 14px; line-height: 1.2;
}
.copybtn:hover { background: var(--bg); color: var(--text); }
.copybtn.copied { color: var(--ok, #2e9e5b); }
.card.pay > summary { cursor: pointer; font-weight: 600; }
