/* Jet Mobility Staff — мобильный интерфейс сотрудников, светлая и тёмная темы.
   Цвета — по логотипу: чёрная шапка, оранжевый акцент со стрелки. */

:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #0f1b2a;
  --muted: #5d6b7c;
  --line: #dde3ea;
  /* Тёмно-оранжевый: на белом фоне читается (контраст ≥ 4.5) */
  --brand: #b85200;
  --brand-ink: #ffffff;
  --navy: #0d0f12;

  --free: #16a34a;
  --free-bg: #dcfce7;
  --rent: #e0533d;
  --rent-bg: #fde4df;
  --reserve: #d48a07;
  --reserve-bg: #fdf0d3;
  --service: #5b6b8c;
  --service-bg: #e3e8f2;
  /* График загрузки: свои оттенки тех же цветов — различимы и при дальтонизме */
  --chart-rent: #c0362c;
  --chart-reserve: #c98a00;
  --warn: #b45309;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 42, .06), 0 4px 16px rgba(15, 27, 42, .06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1420;
    --surface: #111e2d;
    --surface-2: #172739;
    --text: #e6edf5;
    --muted: #93a3b8;
    --line: #22344a;
    --brand: #ff8a1f;
    --brand-ink: #1a0d00;
    --free: #4ade80;
    --free-bg: #12341f;
    --rent: #ff8a73;
    --rent-bg: #3d1d18;
    --reserve: #fbbf24;
    --reserve-bg: #3a2c0c;
    --service: #a5b4d4;
    --service-bg: #222f45;
    --chart-rent: #c23a2c;
    --chart-reserve: #c08a12;
    --warn: #fbbf24;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand); }
.muted { color: var(--muted); }

/* --- Общие элементы --- */

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; display: block; }
.brand__tag {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 999px; background: var(--brand); color: var(--brand-ink);
}
.brand--big { margin-bottom: 28px; }
.brand--big img { height: 64px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 600;
}
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn:disabled { opacity: .6; cursor: default; }
.link { background: none; border: 0; padding: 6px 0; color: var(--brand); cursor: pointer; font-weight: 600; }
.link:disabled { color: var(--muted); cursor: default; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); }

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .search {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px;
}
.field input:focus, .search:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.code-input { letter-spacing: .5em; font-size: 24px !important; text-align: center; font-weight: 700; }

.error { color: var(--rent); font-weight: 600; margin: 14px 0 0; }
.banner { margin: 8px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--reserve-bg); color: var(--text); font-size: 14px; }

/* --- Вход --- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, rgba(255, 122, 0, .16), transparent 60%), var(--bg); }
.login__card { width: 100%; max-width: 380px; }
.login__form { display: grid; gap: 16px; }
.login__form h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.login__form p { margin: 0; }
.login__links { display: flex; justify-content: space-between; }
.login__top { display: flex; justify-content: flex-end; margin-bottom: 18px; }

/* --- Выбор языка: в шапке и в подвале --- */

.langs { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.langs button { min-width: 40px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.langs button:hover { color: var(--text); }
.langs button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 27, 42, .15); }
.langs--top { margin-right: 6px; background: rgba(255, 255, 255, .1); }
.langs--top button { color: #b8c7d8; min-width: 36px; padding: 0 8px; }
.langs--top button:hover { color: #fff; }
.langs--top button[aria-pressed="true"] { background: #fff; color: var(--navy); }
.langs--full { flex-wrap: wrap; background: none; padding: 0; gap: 4px 6px; }
.langs--full button { border: 1px solid var(--line); background: var(--surface); }
.langs--full button[aria-pressed="true"] { border-color: var(--brand); color: var(--text); box-shadow: none; }
.langs__label { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 2px; }
.footer { display: grid; justify-items: center; gap: 8px; margin-top: 28px; font-size: 12px; color: var(--muted); text-align: center; }
.footer--app { max-width: 1100px; margin: 8px auto 0; padding: 18px 16px 24px; border-top: 1px solid var(--line); }
@media (max-width: 420px) { .langs--top button { min-width: 32px; padding: 0 6px; font-size: 12px; } .langs--top { margin-right: 2px; } }
/* Узкие телефоны: в шапке остаются логотип, языки и две кнопки */
@media (max-width: 380px) {
  .topbar { gap: 6px; padding-left: 12px; padding-right: 8px; }
  .topbar .brand__tag { display: none; }
  .topbar .icon-btn { width: 34px; }
}

/* --- Каркас --- */

.app { min-height: 100vh; padding-bottom: calc(76px + var(--safe-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; background: var(--navy); color: #fff;
}
.topbar .brand__tag { background: #ff8a1f; color: #1a0d00; }
.topbar__right { margin-left: auto; display: flex; gap: 2px; }

.statusline { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px 0; font-size: 13px; max-width: 1100px; margin: 0 auto; }
.view { padding: 12px 16px 24px; max-width: 1100px; margin: 0 auto; }

.tabs { display: flex; }
.tabs button {
  border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 4px; flex: 1; position: relative;
}
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--brand); }
.tabs .count {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--rent); color: #fff; font-size: 11px; line-height: 18px;
}
.tabs--bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: var(--safe-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabs--top { display: none; }

@media (min-width: 860px) {
  .app { padding-bottom: 0; }
  .tabs--bottom { display: none; }
  .tabs--top { display: flex; gap: 4px; margin-left: 24px; }
  .tabs--top button { flex-direction: row; gap: 8px; color: #b8c7d8; font-size: 14px; padding: 8px 12px; border-radius: 10px; flex: none; }
  .tabs--top button svg { width: 20px; height: 20px; }
  .tabs--top button[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
  .tabs--top .count { position: static; }
}

/* --- Карточки и списки --- */

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; font-weight: 700; }
.section-title:first-child { margin-top: 4px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.list { display: grid; gap: 10px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats--3 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 640px) { .stats--3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .stats--3 .stat { padding: 12px 10px; } .stats--3 .stat__value { font-size: 26px; } .stats--3 .stat__label { font-size: 12px; align-items: flex-start; } .stats--3 .dot { margin-top: 3px; } }
.note { font-size: 13px; margin: 10px 2px 0; }

/* Окно «Проблемы» на обзоре */
.ok-line { margin: 4px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--free-bg); color: var(--text); font-weight: 600; font-size: 14px; }
.problems { margin-top: 4px; border-color: var(--rent); overflow: hidden; }
.problems__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--rent-bg); }
.problems__head h2 { margin: 0; font-size: 16px; }
.problems__head .muted { font-size: 13px; }
.problem { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; }
button.problem { cursor: pointer; }
button.problem:hover { background: var(--surface-2); }
.problem__level { flex: none; width: 96px; font-size: 12px; font-weight: 700; padding-top: 2px; white-space: nowrap; }
.problem__level--error { color: var(--rent); }
.problem__level--warning { color: var(--warn); }
.problem__main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.problem__title { font-weight: 700; font-size: 14px; }
.problem__detail { font-size: 13px; color: var(--muted); }
.problem__go { flex: none; font-size: 20px; color: var(--muted); line-height: 1; padding-top: 2px; }
.problems__errors { font-size: 13px; font-weight: 700; color: var(--rent); }

/* Заявки: источники */
.subsection-title { margin: 16px 2px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stat[data-goto] { cursor: pointer; }
.stat--alert { border-color: var(--rent); background: var(--rent-bg); }
.sources { margin-top: 10px; padding: 4px 0; }
.sources__row { display: grid; grid-template-columns: 1fr 70px 70px; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sources__row > span:not(:first-child) { text-align: right; font-weight: 700; }
.sources__row--head { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.sources__row--head > span { font-weight: 700 !important; }
.sources__name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-weight: 600; }
.sources__state { font-size: 12px; font-weight: 700; color: var(--free); }
.sources__row.is-off { color: var(--muted); }
.sources__row.is-off .sources__state { color: var(--warn); }
.sources__hint { margin: 0; padding: 8px 14px 10px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* По типам: на компьютере — таблица, на телефоне — название и «всего», под ними 4 числа */
.types { padding: 2px 0; }
.types__row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr) .8fr; align-items: center; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.types__row--head { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.types__row--head span, .types__cell, .types__total { text-align: right; }
.types__name { font-weight: 700; }
.types__cell b, .types__total b { font-size: 16px; }
.types__total b { font-weight: 800; }
.types__cell small, .types__total small { display: none; }
@media (max-width: 640px) {
  .types__row--head { display: none; }
  .types__row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; padding: 12px 14px; }
  .types__row:nth-child(2) { border-top: 0; }
  .types__name { grid-column: 1 / 4; grid-row: 1; font-size: 15px; }
  .types__total { grid-column: 4; grid-row: 1; display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; }
  .types__total small { display: inline; font-size: 12px; color: var(--muted); }
  .types__cell { grid-row: 2; display: grid; align-content: start; justify-items: start; text-align: left; gap: 2px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
  .types__cell b { font-size: 20px; line-height: 1.1; }
  .types__cell small { display: flex; align-items: flex-start; gap: 4px; font-size: 11px; color: var(--muted); line-height: 1.25; }
  .types__cell .dot { margin-top: 3px; }
  .types__cell .dot { width: 8px; height: 8px; }
}

.pchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pchip b { font-variant-numeric: tabular-nums; }
.pchip[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--surface); }
.pchip:disabled { opacity: .45; cursor: default; }
.pcat { border-top: 1px solid var(--line); }
.pcat__title { margin: 0; padding: 10px 14px 4px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pcat .problem { border-top: 0; }
.pcat .problem + .problem { border-top: 1px dashed var(--line); }
.pcat__more { display: block; margin: 0 14px 10px; font-size: 13px; }
@media (max-width: 420px) { .problem { flex-wrap: wrap; gap: 4px 10px; } .problem__level { width: auto; } .problem__main { flex-basis: 100%; order: 3; } .problem__go { margin-left: auto; } }

/* График загрузки парка на 14 дней */
.load { margin-top: 10px; padding: 14px 14px 10px; }
.load__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; font-size: 14px; }
.load__legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.load__legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.sw--rent { background: var(--chart-rent); }
.sw--reserve { background: var(--chart-reserve); }
.load__plot { position: relative; margin-top: 14px; padding-left: 34px; }
.load__grid { position: absolute; left: 0; right: 0; top: 0; height: 140px; pointer-events: none; }
.load__grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); line-height: 0; }
.load__grid span::before { content: none; }
.load__cols { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.load__col { position: relative; display: grid; gap: 6px; outline: none; }
.load__area { position: relative; height: 140px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.load__stack { width: min(70%, 26px); display: flex; flex-direction: column-reverse; gap: 2px; }
.load__seg { display: block; flex: 0 1 0; min-height: 2px; }
.load__stack > .load__seg:last-child { border-radius: 4px 4px 0 0; }
.load__seg--rent { background: var(--chart-rent); }
.load__seg--reserve { background: var(--chart-reserve); }
.load__value { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.load__x { display: grid; justify-items: center; font-size: 11px; color: var(--muted); line-height: 1.2; }
.load__x b { color: var(--text); font-size: 12px; }
.load__x--today b { color: var(--brand); }
.load__col:hover .load__area, .load__col:focus-visible .load__area { background: var(--surface-2); border-radius: 6px; }
.load__tip { display: none; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 5; min-width: 150px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 12px; white-space: nowrap; }
.load__tip span { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.load__tip--left { left: 0; transform: none; }
.load__tip--right { left: auto; right: 0; transform: none; }
.load__col:hover .load__tip, .load__col:focus-visible .load__tip { display: block; }
@media (max-width: 420px) {
  .load { padding: 12px 10px 8px; }
  .load__plot { padding-left: 28px; }
  .load__cols { gap: 2px; }
  .load__wd { display: none; }
  .load__x b { font-size: 11px; }
  .load__value { font-size: 10px; }
}
.load__table { margin-top: 8px; font-size: 13px; }
.load__table summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.load__table .type-table th, .load__table .type-table td { padding: 6px 8px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat__value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat__label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot--free { background: var(--free); }
.dot--rent { background: var(--rent); }
.dot--reserve { background: var(--reserve); }
.dot--service { background: var(--service); }

.table-wrap { overflow-x: auto; }
.type-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.type-table th, .type-table td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--line); }
@media (max-width: 420px) { .type-table th, .type-table td { padding: 10px 6px; font-size: 14px; } .type-table th { font-size: 11px; } }
.type-table tr:last-child td { border-bottom: 0; }
.type-table th { font-size: 12px; color: var(--muted); font-weight: 700; }
.type-table th:first-child, .type-table td:first-child { text-align: left; }
.type-table td:first-child { font-weight: 600; }

.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row__main { min-width: 0; flex: 1; }
.row__title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__sub { font-size: 13px; color: var(--muted); }
.row__side { text-align: right; font-size: 13px; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill--free { background: var(--free-bg); color: var(--free); }
.pill--rent { background: var(--rent-bg); color: var(--rent); }
.pill--reserve { background: var(--reserve-bg); color: var(--reserve); }
.pill--service { background: var(--service-bg); color: var(--service); }
.pill--new { background: var(--rent); color: #fff; }
.pill--taken { background: var(--surface-2); color: var(--muted); }

/* --- Фильтры --- */

.toolbar { display: grid; gap: 10px; margin-bottom: 12px; position: sticky; top: 60px; z-index: 10; background: var(--bg); padding: 8px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.result-count { font-size: 13px; color: var(--muted); }

/* --- Парк --- */

.car { padding: 14px; cursor: pointer; }
.car__head { display: flex; align-items: flex-start; gap: 10px; }
.car__title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.car__plate { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700; background: var(--surface-2); border-radius: 6px; padding: 1px 7px; margin-right: 6px; }
.car__meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.car__meta b { color: var(--text); font-weight: 600; }
.car__details { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; display: grid; gap: 6px; }
.car__details dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.car__details dt { color: var(--muted); }
.car__details dd { margin: 0; }
.seg-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.seg-list li { display: flex; align-items: center; gap: 8px; }
.warn { color: var(--reserve); font-weight: 600; }

/* --- Календарь --- */

.cal { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.cal__grid { position: relative; min-width: max-content; }
.cal__row { display: flex; border-bottom: 1px solid var(--line); min-height: 44px; }
.cal__row:last-child { border-bottom: 0; }
.cal__label {
  position: sticky; left: 0; z-index: 3; width: 128px; flex: none; padding: 6px 10px; background: var(--surface);
  border-right: 1px solid var(--line); font-size: 12px; line-height: 1.3; display: flex; flex-direction: column; justify-content: center;
}
.cal__label b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__track { position: relative; flex: none; }
.cal__day { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.cal__day--weekend { background: var(--surface-2); opacity: .6; }
.cal__head .cal__label { font-weight: 700; color: var(--muted); }
.cal__head { position: sticky; top: 0; z-index: 4; background: var(--surface); }
.cal__date { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); border-left: 1px solid var(--line); }
.cal__date b { font-size: 13px; color: var(--text); }
.cal__date--today b { color: var(--brand); }
.cal__group { padding: 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); position: sticky; left: 0; }
.bar { position: absolute; top: 9px; bottom: 9px; border-radius: 6px; min-width: 4px; }
.bar--rent { background: var(--rent); }
.bar--reserve { background: var(--reserve); }
.bar--service { background: repeating-linear-gradient(135deg, var(--service), var(--service) 5px, transparent 5px, transparent 9px); border: 2px solid var(--service); }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); z-index: 2; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 10px 2px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }

/* --- Заявки --- */

.req { padding: 14px; display: grid; gap: 8px; }
.req__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req__id { font-weight: 800; }
.req__time { margin-left: auto; font-size: 13px; color: var(--muted); }
.req__line { font-size: 14px; }
.req__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.req__actions a { text-decoration: none; }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

/* --- Сайт: фото и описания моделей --- */

.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 10px; }
@media (max-width: 520px) { .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.mcard { overflow: hidden; display: flex; flex-direction: column; }
/* Рамка как на сайте: светлый фон, вырезанная техника — целиком, фото с фоном — на всю карточку */
.mframe, .md-frame {
  position: relative; aspect-ratio: 16 / 11; display: grid; place-items: center; padding: 10px;
  background: radial-gradient(circle at 50% 70%, #ffffff 0, #eef3f7 70%); overflow: hidden;
}
.mframe img, .md-frame img, .md-frame canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.mframe.is-photo, .md-frame.is-photo { padding: 0; }
.mframe.is-photo img, .md-frame.is-photo img, .md-frame.is-photo canvas { object-fit: cover; }
.mframe__empty { font-size: 40px; opacity: .45; }
.mcard__body { padding: 10px 12px 12px; display: grid; gap: 3px; flex: 1; align-content: start; }
.mcard__title { font-weight: 700; line-height: 1.3; }
.mcard__desc { font-size: 13px; }
.mcard__meta { font-size: 12px; color: var(--muted); }
.mcard__body .btn { margin-top: 8px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--reserve-bg); color: var(--reserve); }

.sheet { width: min(560px, calc(100% - 16px)); max-height: calc(100% - 16px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.sheet::backdrop { background: rgba(5, 15, 25, .55); }
.sheet__body { display: grid; gap: 12px; padding: 16px; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet__head h2 { margin: 2px 0 0; font-size: 20px; }
.icon-btn--plain { background: var(--surface-2); color: var(--text); font-size: 24px; line-height: 1; border: 0; }
.md-frame { border-radius: 14px; }
.md-caption { margin: -4px 0 0; font-size: 12px; }
.md-photo { display: grid; gap: 10px; }
.md-photo > .btn { justify-self: start; cursor: pointer; }
#md-options { display: grid; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; }
.md-hint { margin: 0; font-size: 13px; }
.md-status { margin: 0; font-weight: 600; min-height: 1px; }
.md-status.is-ok { color: var(--free); }
.md-status.is-error { color: var(--rent); }
.md-buttons { display: flex; gap: 10px; justify-content: flex-end; }

/* Описание на 4 языках */
.md-desc { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.md-desc h3 { margin: 0; font-size: 15px; }
.md-lang { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.md-lang input { width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; }
.md-lang input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.md-desc__note { margin: 0; font-size: 13px; font-weight: 600; }
.md-desc__note.is-ok { color: var(--free); }
.md-desc__note.is-warn { color: var(--warn); }
.md-desc__note.is-error { color: var(--rent); }
@media (max-width: 420px) { .md-lang { grid-template-columns: 1fr; gap: 4px; } }

/* Галерея модели в окне правки */
.md-gallery { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.md-gallery__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; }
.md-gallery__head h3 { margin: 0; font-size: 15px; }
.md-gallery__head .btn { cursor: pointer; }
.md-ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.md-ggrid:empty::before { content: "No extra photos yet"; color: var(--muted); font-size: 13px; }
.md-gitem { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.md-gitem .mframe { padding: 6px; }
.md-gitem .mframe.is-photo { padding: 0; }
.md-gitem__new { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--free); color: #fff; }
.md-gitem__link { font-size: 12px; color: var(--muted); padding: 8px; text-align: center; word-break: break-all; }
.md-gitem__tools { display: grid; grid-template-columns: repeat(4, 1fr); }
.md-gitem__tools button { min-height: 34px; border: 0; background: none; color: var(--text); font-size: 15px; cursor: pointer; }
.md-gitem__tools button:hover:not(:disabled) { background: var(--line); }
.md-gitem__tools button:disabled { opacity: .3; cursor: default; }
.md-gitem__tools [data-gdel] { color: var(--rent); }

/* --- Роль в строке состояния --- */

.role {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; vertical-align: 1px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: var(--surface-2); color: var(--muted);
}
.role--admin { background: var(--navy); color: #ff9a3c; }
.role--editor { background: var(--free-bg); color: var(--free); }

/* Шесть вкладок внизу (у админа) — помельче, чтобы влезли в телефон */
.tabs--bottom.tabs--many button { font-size: 11px; padding-left: 1px; padding-right: 1px; }
@media (max-width: 380px) { .tabs--bottom.tabs--many button { font-size: 10px; letter-spacing: -.01em; } }

/* --- Вкладка «Сервер»: приборная панель, тёмная в обеих темах --- */

.cockpit {
  --ck-bg: #070b10; --ck-panel: #0d141c; --ck-line: #1e2a38; --ck-well: #05080c;
  --ck-text: #e6edf5; --ck-dim: #7d8b9c; --ck-cyan: #38d9f5; --ck-white: #f4f7fb;
  --ck-green: #2fd36b; --ck-amber: #ffb000; --ck-red: #ff5a5a;
  --ck-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  display: grid; gap: 12px; padding: 12px; border-radius: var(--radius);
  background: var(--ck-bg); color: var(--ck-text); border: 1px solid #000; box-shadow: inset 0 0 0 1px #1a2430;
  font-variant-numeric: tabular-nums;
}
.cockpit .is-ok { color: var(--ck-green); }
.cockpit .is-caution { color: var(--ck-amber); }
.cockpit .is-warning { color: var(--ck-red); }

/* Табло ламп */
.ck-annun { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.ck-masters { display: grid; gap: 8px; align-content: start; }
.master {
  display: grid; place-items: center; width: 96px; min-height: 46px; border-radius: 6px; text-align: center;
  font: 800 11px/1.15 var(--ck-mono); letter-spacing: .06em;
  background: #141b23; color: #3a4654; border: 1px solid #2a3542;
}
.master--warning.is-on { background: #c81e1e; color: #fff; border-color: #ff7b7b; box-shadow: 0 0 16px rgba(255, 64, 64, .55); animation: ck-blink 1s steps(2) infinite; }
.master--caution.is-on { background: #d49100; color: #1a1200; border-color: #ffd166; box-shadow: 0 0 16px rgba(255, 176, 0, .45); }
@keyframes ck-blink { 50% { filter: brightness(.6); } }
@media (prefers-reduced-motion: reduce) { .master--warning.is-on { animation: none; } }
.ck-lamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; }
.lamp {
  display: grid; place-items: center; min-height: 36px; padding: 4px 6px; border-radius: 4px; text-align: center;
  font: 700 10.5px/1.15 var(--ck-mono); letter-spacing: .04em; cursor: default;
  background: #10161d; color: #485566; border: 1px solid #222d39;
}
.lamp--caution { background: #3a2a00; color: var(--ck-amber); border-color: #8a6100; box-shadow: inset 0 0 10px rgba(255, 176, 0, .25); }
.lamp--warning { background: #3d0c0c; color: var(--ck-red); border-color: #9b1c1c; box-shadow: inset 0 0 10px rgba(255, 64, 64, .3); }
.lamp--run { background: #062b14; color: var(--ck-green); border-color: #146c35; }
.lamp--off { border-style: dashed; color: #3a4654; }
.ecam {
  list-style: none; margin: 0; padding: 8px 12px; display: grid; gap: 4px; border-radius: 6px;
  background: var(--ck-well); border: 1px solid var(--ck-line); font: 600 13px/1.4 var(--ck-mono);
}
.ecam--warning { color: var(--ck-red); }
.ecam--caution { color: var(--ck-amber); }
.ecam--ok { color: var(--ck-green); }
@media (max-width: 560px) {
  .ck-annun { grid-template-columns: minmax(0, 1fr); }
  .ck-masters { grid-template-columns: 1fr 1fr; }
  .master { width: auto; }
  .ck-lamps { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .ecam { font-size: 12px; }
}

/* Панели и заголовки */
.ck-panel { background: var(--ck-panel); border: 1px solid var(--ck-line); border-radius: 10px; padding: 12px; min-width: 0; }
.ck-title {
  margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px;
  font: 800 12px/1.3 var(--ck-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ck-cyan);
}
.ck-title span { font: 600 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: 0; text-transform: none; color: var(--ck-dim); }
.ck-title .ck-run { color: var(--ck-green); font-weight: 800; }

/* Круглые приборы */
.ck-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ck-gauges--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .ck-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gauge { margin: 0; display: grid; gap: 4px; justify-items: center; text-align: center; min-width: 0; }
.gauge svg { display: block; width: 100%; max-width: 190px; height: auto; }
.gauge figcaption { display: grid; gap: 2px; justify-items: center; width: 100%; }
.gauge figcaption b { font: 800 11px/1.2 var(--ck-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ck-cyan); }
.gauge figcaption > span { font-size: 12px; color: var(--ck-dim); }
.g-track { fill: none; stroke: #18222d; stroke-width: 7; }
.g-fill { fill: none; stroke-width: 7; opacity: .4; }
.g-fill--ok { stroke: var(--ck-green); }
.g-fill--caution { stroke: var(--ck-amber); }
.g-fill--warning { stroke: var(--ck-red); }
.g-fill--off { stroke: none; }
.g-zone { fill: none; stroke-width: 2.5; }
.g-zone--ok { stroke: var(--ck-green); }
.g-zone--caution { stroke: var(--ck-amber); }
.g-zone--warning { stroke: var(--ck-red); }
.g-tick { stroke: #8795a6; stroke-width: 1; }
.g-tick--major { stroke: var(--ck-white); stroke-width: 1.6; }
.g-needle { stroke: var(--ck-white); stroke-width: 2.6; stroke-linecap: round; }
.g-hub { fill: #2a3542; stroke: var(--ck-white); stroke-width: 1.2; }
.g-box { fill: var(--ck-well); stroke: #2a3542; stroke-width: 1; }
.g-read { font: 700 12px var(--ck-mono); text-anchor: middle; fill: var(--ck-green); }
.g-read--caution { fill: var(--ck-amber); }
.g-read--warning { fill: var(--ck-red); }
.g-read--off { fill: var(--ck-dim); }

/* Мини-график за час */
.spark { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 170px; margin-top: 2px; }
.spark svg { flex: 1; height: 20px; background: var(--ck-well); border: 1px solid #18222d; border-radius: 3px; }
.spark polyline { fill: none; stroke: var(--ck-cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--ck-cyan); }
.spark i { font-style: normal; font-size: 10px; color: var(--ck-dim); white-space: nowrap; }

/* Двигатель: приборы + цифровые табло */
.ck-engine { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; align-items: start; }
@media (max-width: 720px) { .ck-engine { grid-template-columns: minmax(0, 1fr); } }
.ck-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
@media (max-width: 420px) { .ck-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ck-cell { display: grid; gap: 2px; min-width: 0; padding: 6px 8px; border-radius: 6px; background: var(--ck-well); border: 1px solid #18222d; }
.ck-cell > span { font: 700 10px/1.25 var(--ck-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ck-dim); }
.ck-cell > b { font: 700 14px/1.3 var(--ck-mono); color: var(--ck-green); overflow-wrap: anywhere; }
.ck-cell--wide { grid-column: 1 / -1; }
.ck-cell--wide .spark { max-width: none; }
.ck-cells--traffic { margin: 14px 0 0; }

/* Топливо: трафик за месяц против лимита */
.fuel { display: grid; gap: 6px; }
.fuel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.fuel__big { font: 800 22px/1.1 var(--ck-mono); color: var(--ck-green); }
.fuel__pct { font: 800 16px/1.1 var(--ck-mono); color: var(--ck-green); }
.fuel__bar { position: relative; height: 22px; border-radius: 4px; background: var(--ck-well); border: 1px solid #2a3542; }
.fuel__zone { position: absolute; top: 0; bottom: 0; opacity: .2; }
.fuel__zone--caution { background: var(--ck-amber); }
.fuel__zone--warning { background: var(--ck-red); }
.fuel__fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 3px 0 0 3px; background: var(--ck-green); }
.fuel__fill.is-caution { background: var(--ck-amber); }
.fuel__fill.is-warning { background: var(--ck-red); }
.fuel__forecast { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--ck-white); }
.fuel__forecast i { position: absolute; top: 100%; left: 0; transform: translateX(-50%); margin-top: 2px; font: 600 10px var(--ck-mono); font-style: normal; color: var(--ck-text); white-space: nowrap; }
.fuel__forecast--start i { transform: none; }
.fuel__forecast--end i { transform: translateX(-100%); }
.fuel__scale { display: flex; justify-content: space-between; margin-top: 14px; font: 600 10px var(--ck-mono); color: var(--ck-dim); }

/* Трафик по дням */
.ck-sub { margin-top: 16px; }
.ck-subhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.ck-subhead b { font: 800 11px/1.3 var(--ck-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ck-cyan); }
.ck-subhead > span { font-size: 12px; color: var(--ck-dim); }
.ck-subhead--2 { margin-top: 14px; }
.tlegend { display: flex; gap: 10px; }
.tlegend span { display: inline-flex; align-items: center; gap: 4px; }
.tsw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.tsw--out { background: var(--ck-cyan); }
.tsw--in { background: #5b6b80; }
.tdays { display: grid; grid-template-columns: repeat(var(--days, 31), minmax(0, 1fr)); gap: 2px; height: 120px; }
.tday { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; }
.tday__area { display: flex; align-items: flex-end; border-bottom: 1px solid #2a3542; min-height: 0; }
.tday__stack { display: flex; flex-direction: column; width: 100%; min-height: 1px; border-radius: 2px 2px 0 0; overflow: hidden; background: #2a3542; }
.tday__out { background: var(--ck-cyan); }
.tday__in { background: #5b6b80; }
.tday__x { height: 14px; font: 600 10px/14px var(--ck-mono); color: var(--ck-dim); text-align: center; white-space: nowrap; overflow: visible; }
.tday--today .tday__x { color: var(--ck-white); }

/* На что ушёл трафик */
.brow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(60px, 2fr) auto 46px; gap: 4px 8px; align-items: center; padding: 6px 0; border-top: 1px solid #141d27; font-size: 13px; }
.brow__name { min-width: 0; }
.brow__bar { height: 8px; border-radius: 4px; background: var(--ck-well); overflow: hidden; }
.brow__bar i { display: block; height: 100%; border-radius: 4px; background: var(--ck-cyan); }
.brow__val { font: 700 12px var(--ck-mono); color: var(--ck-green); text-align: right; white-space: nowrap; }
.brow__pct { font: 600 12px var(--ck-mono); color: var(--ck-dim); text-align: right; }
@media (max-width: 520px) {
  .brow { grid-template-columns: minmax(0, 1fr) auto 42px; }
  .brow__bar { grid-column: 1 / -1; grid-row: 2; }
}
.ck-note { margin: 10px 0 0; font-size: 12px; color: var(--ck-dim); }
.ck-note--warn { color: var(--ck-amber); font-size: 14px; }
.ck-foot { margin: 0; font-size: 12px; color: var(--ck-dim); text-align: right; }
.ck-months { margin-top: 14px; font-size: 13px; }
.ck-months summary { cursor: pointer; color: var(--ck-cyan); font-weight: 700; }
.ck-months table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ck-months th, .ck-months td { padding: 5px 6px; text-align: left; border-top: 1px solid #141d27; }
.ck-months th { color: var(--ck-dim); font-weight: 600; }

/* Настройки лимита трафика (под панелью, обычный стиль портала) */
.srv-settings { margin-top: 12px; padding: 14px; display: grid; gap: 10px; }
.srv-settings h3 { margin: 0; font-size: 16px; }
.srv-settings__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 560px) { .srv-settings__row { grid-template-columns: minmax(0, 1fr); } }

/* --- Меню «Ещё» внизу на телефоне --- */

.tabs--bottom { position: fixed; }
.tabs-more {
  position: absolute; right: 8px; bottom: calc(100% + 8px); z-index: 30; min-width: 190px; padding: 6px;
  display: grid; gap: 2px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 27, 42, .2);
}
.tabs-more button { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.tabs-more button[aria-current="page"] { background: var(--surface-2); }

/* --- Парк: статус по рабочей группе --- */

.car__group { margin-top: 6px; font-size: 13px; color: var(--muted); }
.car__group.warn { color: var(--warn); font-weight: 600; }

/* --- Журнал рабочей группы WhatsApp --- */

.jr { display: grid; gap: 12px; }
.jr-views { margin-bottom: 2px; }
.jr .filters { display: grid; gap: 10px; }
.jr-banner { padding: 10px 14px; border-radius: 12px; background: var(--reserve-bg); color: var(--text); }
.jr-day { margin: 10px 2px 0; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.jr-small { font-size: 12px; }
.jr-card { padding: 12px 14px; display: grid; gap: 6px; }
.jr-card--review { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn) inset; }
.jr-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.jr-kind { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.jr-kind--rent { background: var(--rent-bg); color: var(--rent); }
.jr-kind--free { background: var(--free-bg); color: var(--free); }
.jr-kind--reserve { background: var(--reserve-bg); color: var(--reserve); }
.jr-kind--service { background: var(--service-bg); color: var(--service); }
.jr-kind--task { background: var(--surface-2); color: var(--muted); }
.jr-when { font-weight: 700; }
.jr-who { color: var(--muted); }
.jr-edited { color: var(--muted); }
.jr-title { font-weight: 700; font-size: 15px; line-height: 1.35; }
.jr-plate {
  border: 0; padding: 1px 7px; border-radius: 6px; cursor: pointer; background: var(--surface-2); color: var(--text);
  font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.jr-plate:hover { background: var(--brand); color: var(--brand-ink); }
.jr-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); }
.jr-moneys { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-money { padding: 3px 9px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.jr-money i { font-style: normal; font-weight: 500; color: var(--muted); }
.jr-money small { font-weight: 500; color: var(--muted); }
.jr-contact, .jr-assign { font-size: 13px; }
.jr-notes { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.jr-photos { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.jr-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.jr-raw summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 600; }
.jr-raw pre { margin: 6px 0 0; padding: 10px; border-radius: 8px; background: var(--surface-2); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.jr-review-note { margin: 0; font-size: 13px; color: var(--warn); font-weight: 600; }
.jr-fix { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.jr-fix label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.jr-fix select, .jr-fix input { min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; }
.jr-fix input { width: 96px; }
.jr-fix__buttons { display: flex; gap: 6px; }
.jr-more { display: grid; justify-items: center; }
.jr-month { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 16px; text-transform: capitalize; }
.jr-person summary {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, auto); gap: 4px 14px; align-items: center;
  padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14px;
}
.jr-person summary::-webkit-details-marker { display: none; }
.jr-person summary > span { color: var(--muted); white-space: nowrap; }
.jr-shifts { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 2px; font-size: 13px; }
.jr-shifts li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
@media (max-width: 480px) {
  .jr-person summary { grid-template-columns: minmax(0, 1fr) auto; }
  .jr-person summary > span:nth-child(2), .jr-person summary > span:nth-child(3) { grid-row: 2; font-size: 12px; }
}
.jr-recs { gap: 8px; }
.jr-rec { padding: 10px 14px; display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1.7fr) minmax(0, 1fr); gap: 6px 14px; align-items: center; font-size: 14px; }
.jr-rec--mismatch { border-color: var(--rent); }
.jr-rec--waiting { border-color: var(--reserve); }
.jr-rec__group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.jr-rec__state { font-weight: 600; font-size: 13px; }
.jr-rec--ok .jr-rec__state, .jr-rec--none .jr-rec__state, .jr-rec--unknown .jr-rec__state { color: var(--muted); font-weight: 500; }
@media (max-width: 720px) { .jr-rec { grid-template-columns: minmax(0, 1fr) auto; } .jr-rec__group, .jr-rec__state { grid-column: 1 / -1; } }
.jr-wa { padding: 14px; display: grid; gap: 10px; }
.jr-wa h3 { margin: 0; font-size: 16px; }
.jr-wa p { margin: 0; }
.jr-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.jr-qr { width: min(280px, 100%); height: auto; padding: 10px; border-radius: 12px; background: #fff; justify-self: start; }
.jr-code { font: 800 28px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; }
.jr-wa__group, .jr-wa__pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 520px) { .jr-wa__group, .jr-wa__pair { grid-template-columns: minmax(0, 1fr); } }
.jr-card > .link { justify-self: start; padding: 2px 0; }
