/* Общие стили кабинета отеля и админки платформы «Заезд» */
:root {
  --bg: #F4F5F3; --surface: #FFFFFF; --surface-2: #EEF0ED; --ink: #15202B; --muted: #5E6975; --line: #DFE3DF;
  --a1: #2F7F8C; --a1-deep: #1E5C66; --a2: #F08C6E; --a3: #F6D9A8; --sel: #E4EFF0;
  --good: #3E9B6E; --warn: #D9892C; --bad: #C9553F; --info: #4B7FB5;
  --shadow: 0 1px 2px rgba(21, 32, 43, .05), 0 10px 30px rgba(21, 32, 43, .07);
  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif; --font-body: "Onest", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0F151B; --surface: #161E26; --surface-2: #1D2731; --ink: #ECEFF2; --muted: #9AA7B3; --line: #28333E; --a1: #5FB0BD; --a1-deep: #3A8A97; --a2: #F2A188; --a3: #DCC39A; --sel: #1C2E33; --good: #62BC90; --warn: #E3A456; --bad: #E98A74; --info: #7FA9D8; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0F151B; --surface: #161E26; --surface-2: #1D2731; --ink: #ECEFF2; --muted: #9AA7B3; --line: #28333E; --a1: #5FB0BD; --a1-deep: #3A8A97; --a2: #F2A188; --a3: #DCC39A; --sel: #1C2E33; --good: #62BC90; --warn: #E3A456; --bad: #E98A74; --info: #7FA9D8; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: 26px; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--a1); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* Каркас */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; font-family: var(--font-display); font-weight: 700; font-size: 18px; text-decoration: none; color: var(--ink); }
.brand i { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--a1), var(--a2)); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 15px; }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: 11px; color: var(--muted); display: block; letter-spacing: .08em; text-transform: uppercase; }
.who { display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; min-width: 0; }
.who .ava { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--a1-deep); }
.who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-size: 12px; }
.nav-group { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 4px; font-weight: 700; }
.side button.nav { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 10px; text-align: left; color: var(--muted); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.side button.nav span.ic { width: 20px; text-align: center; font-size: 15px; }
.side button.nav em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--sel); color: var(--a1); border-radius: 999px; padding: 1px 7px; }
.side button.nav em.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.side button.nav:hover { background: var(--surface-2); color: var(--ink); }
.side button.nav.on { background: var(--sel); color: var(--ink); font-weight: 600; }
.side .spacer { flex: 1; }
.side .foot { padding: 8px 10px 0; font-size: 12px; color: var(--muted); display: grid; gap: 6px; }
.side .foot a { text-decoration: none; }
.main { padding: 22px 28px 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.top p { color: var(--muted); margin-top: 4px; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.burger { display: none; }
@media (max-width: 920px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; transform: translateX(-105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .35); }
  .main { padding: 14px 16px 60px; }
  .burger { display: inline-flex; }
}

/* Кнопки, поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 10px 16px; font-weight: 600; font-size: 14px; background: var(--a1); color: #fff; text-decoration: none; white-space: nowrap; transition: transform .15s, filter .15s, box-shadow .15s; }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--a1); }
.btn.hot { background: var(--a2); color: #1A1410; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.icon { padding: 8px 10px; }
.inp { display: grid; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.inp input, .inp select, .inp textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--ink); font-size: 14px; min-width: 0; width: 100%; }
.inp input:focus, .inp select:focus, .inp textarea:focus { outline: none; border-color: var(--a1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 15%, transparent); }
.inp.mono input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

/* Карточки, плитки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card.pad0 { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head p { color: var(--muted); font-size: 13px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 4px; }
.tile small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.tile b { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.tile .d { font-size: 13px; color: var(--muted); }
.tile .d.up { color: var(--good); } .tile .d.down { color: var(--bad); }
.tile .spark { height: 36px; margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sel); color: var(--a1); white-space: nowrap; }
.pill.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill.mute { background: var(--surface-2); color: var(--muted); }
.pill.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; font-style: normal; }
.pill.live i { animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hint { font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }
.hint.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--ink); border-left: 3px solid var(--warn); }
.hint.good { background: color-mix(in srgb, var(--good) 10%, var(--surface)); border-left: 3px solid var(--good); color: var(--ink); }
.hint.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-left: 3px solid var(--bad); color: var(--ink); }

/* Таблицы */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl .sub { display: block; font-size: 12px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input, .toolbar select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); font-size: 14px; }
.chips { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 999px; }
.chips button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chips button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* Переключатели */
.toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle:last-child { border-bottom: 0; }
.toggle b { font-size: 14px; display: block; }
.toggle small { color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--a1); }
.switch input:checked + span::after { transform: translateX(18px); }

/* Диагностика */
.diag { display: grid; gap: 6px; }
.diag div { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.diag div small { display: block; color: var(--muted); font-size: 12px; }
.diag .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line); color: var(--muted); }
.diag .ok .st { background: var(--good); color: #fff; animation: pop .35s; }
.diag .bad .st { background: var(--bad); color: #fff; }
.diag .warn .st { background: var(--warn); color: #fff; }
.diag .run .st { background: var(--sel); }
.diag .run .st::after { content: ""; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--a1); border-radius: 50%; animation: spin .8s linear infinite; }
.diag .ms { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } }

/* Графики */
.chart { position: relative; width: 100%; }
.chart canvas { width: 100%; height: 100%; display: block; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: 8px; transform: translate(-50%, -115%); white-space: nowrap; display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Прочее */
.steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0 0 18px; padding: 0; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); }
.steps li.on { color: var(--ink); font-weight: 600; border-color: var(--a1); }
.steps li.on span { background: var(--a1); color: #fff; }
.steps li.done span { background: var(--good); color: #fff; }
.code { background: #1A2430; color: #D7E3EA; border-radius: 12px; padding: 14px 16px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-x: auto; position: relative; }
.code b { color: #F6D9A8; font-weight: 500; } .code i { color: #7CD0A9; font-style: normal; }
.code .copy { position: absolute; right: 10px; top: 10px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ph { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--surface-2); position: relative; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .cover { position: absolute; left: 6px; top: 6px; font-size: 10px; font-weight: 700; background: var(--a1); color: #fff; padding: 2px 6px; border-radius: 5px; }
.ph.add { border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 13px; cursor: pointer; }
.ph.add:hover { border-color: var(--a1); color: var(--a1); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 12px; }
.timeline li { position: relative; padding-left: 24px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--a1); }
.timeline li small { display: block; color: var(--muted); font-size: 12px; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border-radius: 12px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 200px; }
.col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; padding: 2px 4px; }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; cursor: grab; }
.lead b { font-size: 14px; }
.lead.drag { opacity: .5; }
.col.over { outline: 2px dashed var(--a1); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: rise .3s; max-width: calc(100% - 32px); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); z-index: 50; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 50px rgba(0, 0, 0, .2); transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; padding: 22px 24px 40px; display: grid; gap: 16px; align-content: start; }
.drawer.open { transform: none; }
.drawer .x { position: absolute; right: 14px; top: 14px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--a1); border-radius: inherit; }
.preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 16/10; position: relative; }
.preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.preview .ov { position: absolute; inset: auto 0 0 0; padding: 10px 12px; font-size: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; }
.alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.alert .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.alert.bad .ic { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.alert.warn .ic { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.alert.info .ic { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.alert small { display: block; color: var(--muted); font-size: 12px; }
.rise { animation: fade .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade { from { opacity: .5; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
