/* Брендбук 3/4: только палитра ниже. Оранжевый — логотип и заголовки разделов; голубой — плашки. */
:root {
  --bg: #FDF1E3; --fg: #342626; --accent: #E8492B; --plate: #BEDDFC;
  --muted: rgba(52, 38, 38, .6); --line: rgba(52, 38, 38, .15);
  --btn-bg: #342626; --btn-fg: #FDF1E3;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #342626; --fg: #FDF1E3; --muted: rgba(253, 241, 227, .6); --line: rgba(253, 241, 227, .18);
          --btn-bg: #FDF1E3; --btn-fg: #342626; }
  /* оранжевый на коричневом запрещён — заголовки в тёмной теме бежевые */
  h2.section { color: var(--fg) !important; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 15px/1.45 Geneva, "Golos Text", system-ui, sans-serif; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }
header { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 8px 0 16px;
         border-bottom: 1px solid var(--line); margin-bottom: 20px; }
/* логотип — векторные «3/4» из брендбука маской: цвет — как у текста темы (текст «3/4» остаётся для экранных чтецов) */
.logo { display: inline-block; width: 64px; aspect-ratio: 588 / 319; font-size: 0; color: transparent; text-decoration: none;
        background-color: var(--fg); -webkit-mask: url("/static/logo.svg") center / contain no-repeat;
        mask: url("/static/logo.svg") center / contain no-repeat; }
nav { display: flex; gap: 16px; flex-wrap: wrap; }
nav a, a { color: var(--fg); }
nav a.on { font-weight: 700; text-decoration: none; }
.who { margin-left: auto; color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2.section { color: var(--accent); font-size: 24px; margin: 28px 0 8px; font-weight: 700; }
.muted { color: var(--muted); }
/* плашка: светлая тема — голубая с коричневым текстом; тёмная — спокойнее: голубая рамка, бежевый текст */
.plate { background: var(--plate); color: #342626; padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; }
@media (prefers-color-scheme: dark) {
  .plate { background: transparent; color: var(--fg); border: 1px solid var(--plate); }
}
.error { border: 1px solid var(--fg); padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; font-weight: 600; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.tabs a.on { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
       padding: 12px 0; border-bottom: 1px solid var(--line); }
.row.hidden .name { opacity: .5; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--line); display: block; }
.name { font-weight: 600; }
.prices { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line);
         font-weight: 400; margin-left: 6px; }
.badge.plate { border: 0; margin: 0 0 0 6px; padding: 1px 8px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 380px; }
form.inline { display: inline; margin: 0; }
button, .btn { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
               border: 1px solid var(--btn-bg); background: transparent; color: var(--fg); text-decoration: none;
               display: inline-block; }
button.main, .btn.main { background: var(--btn-bg); color: var(--btn-fg); }
label { display: block; margin: 14px 0 4px; font-weight: 600; }
input[type=text], input:not([type]), select, textarea { font: inherit; width: 100%; max-width: 480px; padding: 8px 10px;
  border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--fg); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
.check input { width: auto; }
.hours { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); gap: 8px; margin: 8px 0; }
.hours label { margin: 0; font-weight: 400; font-size: 13px; }
.card { padding: 16px 0; border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
td, th { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.photo { max-width: 240px; border-radius: 12px; display: block; margin: 8px 0; }
@media (max-width: 640px) {
  .row { grid-template-columns: 48px 1fr; }
  .thumb { width: 48px; height: 48px; }
  .actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .hours { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- сайт бота бюджета ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; display: block; }
a.tile:hover { border-color: var(--fg); }
.tile b { display: block; font-size: 16px; margin-bottom: 2px; }
.tile .v { font-size: 28px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 13px; color: var(--muted); }
.scroll { overflow-x: auto; margin: 0 0 16px; }
.scroll table { min-width: 560px; }
td.n, th.n { text-align: right; padding-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 1px solid var(--fg); }
form.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 16px; }
form.bar label { margin: 0 0 4px; font-weight: 400; font-size: 13px; color: var(--muted); }
form.bar input { width: auto; }
.pager { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.ok { font-weight: 600; }
.warn { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

/* ---------------- дашборд очереди: плитки, графики (палитра брендбука: линия — цвет текста темы) ---------------- */
.qfilters { align-items: center; }
.qlive { font-size: 13px; margin-left: auto; }
.qtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.qtile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.qtile-name { font-weight: 600; }
.qtile-v { font-size: 40px; font-weight: 600; line-height: 1.1; margin: 4px 0; }   /* крупное — пропорциональные цифры */
.qtile-unit { font-size: 15px; font-weight: 400; color: var(--muted); }
.qtile-off { color: var(--muted); }
.qtile-sub { font-size: 13px; }
.qchart { margin: 0 0 18px; outline: none; }
.qchart:focus-visible { box-shadow: 0 0 0 2px var(--fg); border-radius: 8px; }
.qchart-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.qchart-read { font-variant-numeric: tabular-nums; }
.qsvg { display: block; width: 100%; height: auto; overflow: visible; color: var(--fg); }
.qgrid { stroke: var(--line); stroke-width: 1; }
.qtick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.qthr { stroke: var(--muted); stroke-width: 1; }
.qline { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.qarea { fill: currentColor; opacity: .1; stroke: none; }
.qdot1 { fill: currentColor; }
.qcross { stroke: var(--muted); stroke-width: 1; }
.qdot { fill: currentColor; stroke: var(--bg); stroke-width: 2; }
.qstale { opacity: .6; transition: opacity .2s; }

/* ---------------- мониторинг ---------------- */
.mtile .mrow { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.mtile .mrow b { font-variant-numeric: tabular-nums; }
.mtile.alarm { border: 2px solid var(--accent); }
.hm td, .hm th { text-align: center; padding: 4px 6px; min-width: 34px; }
.lv-busy { background: var(--plate); color: #342626; }
.lv-over { background: var(--accent); color: #FDF1E3; font-weight: 700; }
@media (prefers-color-scheme: dark) { .lv-busy { background: transparent; outline: 1px solid var(--plate); color: var(--fg); } }
