:root {
  /* Бренд OpeRatio (docs/brand): navy #0B1E3B, orange #FF7A00, white, light gray #E9EDF3 */
  --navy: #0b1e3b;
  --navy-2: #16305a;          /* границы и наведение на тёмном */
  --bg: #e9edf3;
  --card: #ffffff;
  --ink: #0b1e3b;
  --muted: #5d6a80;
  --line: #d6dce7;
  --accent: #ff7a00;          /* заливки: главная кнопка, активные отметки */
  --accent-ink: #0b1e3b;      /* текст на оранжевом — тёмно-синий (белый читается плохо) */
  --accent-text: #b85600;     /* оранжевый текст и ссылки на светлом фоне */
  --accent-soft: #fff1e2;
  --head: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Thonburi, sans-serif;
  --warn: #b3261e;
  --warn-soft: #fbeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 28, .06), 0 2px 8px rgba(20, 30, 28, .05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Thonburi, Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.4; }
h1 { font-size: 15px; margin: 0; font-family: var(--head); font-weight: 600; }
h2 { font-size: 14px; margin: 0 0 10px; display: inline-block; font-family: var(--head); font-weight: 700; }
h3 { font-family: var(--head); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 18px; background: var(--navy); color: #fff; border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 1000; }
.top .logoimg { height: 40px; width: auto; display: block; flex: none; }
.top .brand > div { border-left: 1px solid var(--navy-2); padding-left: 12px; }
.top .sub { color: #aebbd0; }
.top .langs { border-color: var(--navy-2); }
.top .langs button { color: #c5d0e2; font-family: var(--head); font-weight: 600; font-size: 12.5px; }
.top .userbox .who { color: #c5d0e2; }
.top .userbox .btn.ghost { background: transparent; border-color: var(--navy-2); color: #fff; }
.top .userbox .btn.ghost:hover { background: var(--navy-2); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 20px; font-weight: 700; flex: none; }
.sub { color: var(--muted); font-size: 12.5px; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.langs button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font: inherit; color: var(--muted); }
.langs button.on { background: var(--accent); color: var(--accent-ink); }

.layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; padding: 16px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; color: var(--muted); font-size: 12.5px; }
.field input, .field select { font: inherit; color: var(--ink); padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .field.small { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-text); padding: 8px 12px;
  border-radius: 8px; text-decoration: none; width: 100%; }
.btn { font-family: var(--head); font-weight: 600; font-size: 13px; border-color: #f0c89c; color: var(--ink); }
.btn:hover { filter: brightness(.97); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); width: auto; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.big { padding: 11px; font-size: 15px; font-weight: 700; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.link { color: var(--accent-text); font-size: 13px; }
.divider { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0 8px; border-top: 1px solid var(--line); }
.divider span { position: relative; top: -9px; background: var(--card); padding: 0 6px; }
.status { margin-top: 10px; font-size: 13px; }
.status .warn { color: var(--warn); }
.notes { list-style: none; padding: 0; margin: 6px 0 0; font-size: 12px; max-height: 140px; overflow: auto; }
.notes li { padding: 3px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.notes li.bad { color: var(--warn); }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary .sumtitle { font-size: 13px; color: var(--accent-text); }
details summary .sumtitle::before { content: "▸ "; }
details[open] summary .sumtitle::before { content: "▾ "; }
details[open] summary { margin-bottom: 10px; }
.btn.small { width: auto; padding: 8px 12px; font-size: 13px; }
.btn.danger { color: var(--warn); }
.minihead { color: var(--muted); font-size: 12px; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.status .hint { color: #a15c00; }
.saved { margin-left: 8px; color: var(--accent-text); font-size: 12.5px; }
.exports { margin-top: 10px; }
.foot { color: var(--muted); font-size: 11px; margin: 0 4px; }

.mainpane { min-width: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; font: inherit; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button { font-family: var(--head); font-weight: 500; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi.bad .v { color: var(--warn); }
#map { height: 52vh; min-height: 320px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sources { color: var(--muted); font-size: 12px; margin: 6px 2px 12px; }
.problems { background: var(--warn-soft); border: 1px solid #f1c7c4; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.problems h3 { margin: 0 0 6px; font-size: 13.5px; color: var(--warn); }
.problems li { font-size: 13px; }

.vans { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; align-items: start; }
.van { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.van.focus { outline: 2px solid var(--accent); }
.van header { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-left: 6px solid var(--c); }
.van header .name { font-weight: 600; }
.van .pin { border: 0; background: transparent; cursor: pointer; font-size: 14px; padding: 0 2px; opacity: .25; filter: grayscale(1); }
.van .pin:hover { opacity: .7; }
.van .pin.on { opacity: 1; filter: none; }
.editsbar button:disabled { opacity: .4; cursor: default; }
.van header .meta { color: var(--muted); font-size: 12.5px; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.van .zones { padding: 0 12px 8px 18px; color: var(--muted); font-size: 12px; margin-top: -4px; }
.van header .vline { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.van .vinfo { display: none; gap: 6px; padding: 0 12px 8px 18px; }
.van.open .vinfo { display: flex; }
.van .vinfo input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.van ol { margin: 0; padding: 0 12px 10px 12px; list-style: none; display: none; }
.van.open ol { display: block; }
.van li { display: grid; grid-template-columns: 26px 46px 1fr auto; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; align-items: start; position: relative; }
.van li[data-key] { cursor: grab; }
.van li.dragging { opacity: .35; }
.van.dropover { outline: 2px dashed var(--accent); outline-offset: 2px; }
.van .ctl { display: flex; gap: 3px; align-items: center; position: absolute; right: 0; top: 4px; background: var(--card);
  padding: 2px 0 2px 6px; box-shadow: -8px 0 8px var(--card); opacity: 0; pointer-events: none; transition: opacity .12s; }
.van li:hover .ctl, .van li:focus-within .ctl { opacity: 1; pointer-events: auto; }
@media (hover: none) { .van .ctl { position: static; opacity: 1; pointer-events: auto; grid-column: 3 / 5; box-shadow: none; padding: 0; } }
.van .ctl button { border: 1px solid var(--line); background: #fff; border-radius: 5px; width: 22px; height: 22px; cursor: pointer; font-size: 11px; padding: 0; }
.van .ctl button:disabled { opacity: .3; cursor: default; }
.van .ctl select { font: inherit; font-size: 11px; max-width: 92px; border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 2px; }
.van .warn { color: var(--warn); font-size: 12px; padding: 0 12px 6px 18px; font-weight: 600; }
.van .badge { font-size: 11px; background: #fff2cc; color: #8a5a00; border-radius: 10px; padding: 1px 7px; margin-left: 6px; font-weight: 500; }
.van li .h small.was { color: #a15c00; font-weight: 600; }
.van.newvan { border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); min-height: 54px; box-shadow: none; background: transparent; }
.editsbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff8e6; border: 1px solid #f0d9a4; border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.editsbar.hint { background: transparent; border: 0; padding: 0 2px; color: var(--muted); font-size: 12px; }
.editsbar .right { margin-left: auto; cursor: pointer; }
table.op tr.chg td { background: #fff8e6; }
.van li .n { width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.van.eve li .n { border-radius: 4px; }
.van li .tm { font-weight: 600; font-variant-numeric: tabular-nums; }
.van li .h small { display: block; color: var(--muted); font-size: 11.5px; }
.van li .s { color: var(--muted); font-size: 12px; text-align: right; }
.van li.depot { grid-template-columns: 26px 46px 1fr; color: var(--muted); cursor: default; }

.tablewrap { overflow: auto; max-height: calc(100vh - 150px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.op { border-collapse: collapse; width: 100%; font-size: 13px; }
table.op th, table.op td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.op th { position: sticky; top: 0; background: #e9edf3; font-weight: 600; z-index: 1; }
table.op tr.bad td { background: var(--warn-soft); }
table.op td.num { text-align: right; font-variant-numeric: tabular-nums; }

.pin { width: 24px; height: 24px; border: 2px solid #fff; color: #fff; font: 700 12px/20px sans-serif; text-align: center; box-shadow: 0 0 3px rgba(0,0,0,.5); }
.star { font-size: 26px; color: #c62828; text-shadow: 0 0 3px #fff, 0 0 2px #fff; line-height: 26px; text-align: center; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 2000; max-width: 90vw; }
.toast.err { background: var(--warn); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .side { position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { padding: 10px 12px; }
}

/* контрольная точка программы */
.row.nowrap { flex-wrap: nowrap; }
.pointfield select { flex: 1; min-width: 0; }
.pointfield .pointinfo { line-height: 1.45; }
.pointform { margin-top: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; }
.pointform .field { margin-bottom: 8px; }
.pointform input::placeholder { color: #b3bcc6; }

/* группы в «Параметрах программы» */
.setgroup { margin: 16px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
#settingsFields > .setgroup:first-child { margin-top: 6px; border-top: 0; padding-top: 0; }

/* брони: календарь по дням */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: -2px 0 10px; }
.cal .day { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 3px 0 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font: inherit; line-height: 1.15; color: var(--muted); }
.cal .day .wd { font-size: 10px; text-transform: uppercase; }
.cal .day .dn { font-size: 13px; font-weight: 600; color: var(--ink); }
.cal .day .g { font-size: 10.5px; }
.cal .day.has { background: var(--accent-soft); border-color: #f0c89c; }
.cal .day.has .g { color: var(--accent-text); font-weight: 600; }
.cal .day.on { outline: 2px solid var(--accent); outline-offset: -1px; }
.tabs button:disabled { opacity: .4; cursor: default; }

/* брони: список дня */
.bkbar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.bkbar input[type=search] { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; min-width: 240px; flex: 0 1 320px; }
.bksum { color: var(--muted); font-size: 12.5px; }
table.bk td { white-space: normal; vertical-align: top; }
table.bk td:first-child, table.bk td.num { white-space: nowrap; }
table.bk tbody tr { cursor: pointer; }
table.bk tbody tr:hover td { background: #f4f6fa; }
table.bk tr.cancelled td { color: var(--muted); text-decoration: line-through; }
table.bk tr.cancelled td:nth-last-child(2) { text-decoration: none; }
table.bk tr.problem td { background: var(--warn-soft); }
table.bk .muted { color: var(--muted); }
table.bk .warn { color: var(--warn); font-size: 12px; }
table.bk td.emptyrow { color: var(--muted); padding: 24px; text-align: center; cursor: default; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge.foc { background: #fff1d6; color: #8a5a00; border: 1px solid #f0d49a; }

/* приём броней: поле перетаскивания */
.drop { border: 2px dashed #d6dce7; border-radius: 10px; padding: 12px 10px; text-align: center; margin: 4px 0 10px;
  background: #fbfcfc; transition: background .15s, border-color .15s; }
.drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop .dz1 { font-weight: 600; color: var(--ink); }
.drop .dz2 { font-size: 11.5px; color: var(--muted); margin: 2px 0 8px; }
.row.center { justify-content: center; }
details.demo { margin-top: 10px; font-size: 13px; }
details.demo summary { cursor: pointer; color: var(--muted); }
details.demo .row { margin-top: 8px; }
details.demo .link { display: inline-block; margin-top: 8px; }
#btnAddBooking { width: 100%; }

/* форма брони */
dialog.bkdlg { border: 0; border-radius: 12px; padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.bkdlg::backdrop { background: rgba(20, 30, 28, .35); }
.bkdlg form { padding: 14px 18px 16px; }
.bkdlg header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bkdlg h3 { margin: 0; font-size: 16px; }
.bkdlg .x { border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); }
.bkdlg .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.bkdlg .wide { grid-column: 1 / -1; }
.bkdlg .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.bkdlg textarea { font: inherit; color: var(--ink); padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; resize: vertical; }
.bkdlg .warn { color: var(--warn); }
.bkdlg #bkPay { font-weight: 600; color: var(--ink); margin: 2px 0 8px; }
.bkdlg footer { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.bkdlg footer .sp { flex: 1; }
.bkdlg footer .btn { width: auto; }
.bkhist { font-size: 12px; color: var(--muted); }
.bkhist summary { cursor: pointer; }
.bkhist ul { margin: 6px 0 0; padding-left: 16px; max-height: 160px; overflow: auto; }
.hotelpick { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 58px; z-index: 5; list-style: none; margin: 0; padding: 4px 0;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 240px; overflow: auto; }
.suggest li { padding: 6px 10px; cursor: pointer; color: var(--ink); }
.suggest li:hover { background: var(--accent-soft); }
.suggest li.none { color: var(--muted); cursor: default; }
.suggest .muted { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .bkdlg .grid { grid-template-columns: 1fr; } }

/* приём броней: ход разбора, ИИ */
.instatus { font-size: 12px; margin-top: 8px; color: var(--ink); }
.instatus .warn { color: var(--warn); margin-top: 3px; text-align: left; }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid #d6dce7; border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
details.aibox { margin: 0 0 10px; font-size: 12.5px; }
details.aibox summary { cursor: pointer; color: var(--muted); }
details.aibox summary .warn { color: #a15c00; }
details.aibox[open] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
details.aibox .row { margin-bottom: 6px; }

/* «На проверке» */
.inbox { background: #fffdf6; border: 1px solid #efe1b5; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.inhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inhead h3 { margin: 0; font-size: 15px; }
.inhead .sp { flex: 1; }
.inhead .btn { width: auto; }
.inbox .tablewrap.short { max-height: 46vh; margin-top: 8px; }
table.inb td { vertical-align: top; }
table.inb .diff { font-size: 12px; color: #8a5a00; margin-top: 3px; max-width: 260px; }
table.inb .warn { font-size: 12px; color: var(--warn); margin-top: 3px; }
table.inb select.hsel { margin-top: 4px; max-width: 280px; font: inherit; font-size: 12.5px; padding: 3px 5px; border: 1px solid #e3b3ae; border-radius: 6px; }
table.inb tr.cancelled-in td:not(:nth-child(2)):not(:first-child):not(:last-child) { text-decoration: line-through; color: var(--muted); }
table.inb td.acts { white-space: nowrap; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 7px; cursor: pointer; font: inherit; font-size: 12px; }
.mini:hover { background: var(--accent-soft); }
.badge.k-new { background: var(--accent-soft); color: var(--accent-text); }
.badge.k-same { background: #eef1f0; color: var(--muted); }
.badge.k-change { background: #fff1d6; color: #8a5a00; }
.badge.k-cancel { background: var(--warn-soft); color: var(--warn); }
#bkPasteText, #pasteText { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* место не из справочника */
.bkdlg .newplace { margin: -4px 0 8px; font-size: 12.5px; }
.plnear { background: #fff8e6; border: 1px solid #f0d49a; border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 13px; }
.plnear .btn { width: auto; margin: 6px 6px 0 0; }

/* инвойсы */
.invbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.invbox h3 { margin: 6px 0 8px; font-size: 15px; }
.invbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.invbar .field { margin-bottom: 0; }
.invbar input[type=date], .invbar select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; }
.invbar .sp { flex: 1; }
.invbar .btn { width: auto; }
.tablewrap.auto { max-height: none; }
table.op td.emptyrow { color: var(--muted); padding: 18px; text-align: center; }
table.op .muted { color: var(--muted); }
table.op .warn { color: var(--warn); font-size: 12px; margin-top: 3px; white-space: normal; }
table.op td.acts { white-space: nowrap; }
table.op td.acts .mini { display: inline-block; text-decoration: none; color: var(--ink); margin: 1px 0; }
table.op tr.cancelled td { color: var(--muted); }
table.op tr.off td { opacity: .45; }
.invprep { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.prepfoot { margin-top: 10px; align-items: flex-end; }
.prepfoot .grow { flex: 1; margin-bottom: 0; }
.prepfoot .btn { width: auto; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; margin: 10px 0; }
.cgrid .wide { grid-column: 1 / -1; }
.cgrid textarea { font: inherit; color: var(--ink); padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
details.invbox summary { cursor: pointer; font-weight: 600; }

.badge.ind { background: #e7e3f6; color: #4b3f8f; border: 1px solid #cfc7ee; }
.badge.prog { background: #e3eef8; color: #24527a; border: 1px solid #c3d8ea; margin-top: 3px; }

/* листы водителей */
.field.small.inline { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.field.small.inline select { padding: 5px 6px; }
.van header .vanpdf { font-size: 11px; font-weight: 700; color: var(--accent-text); border: 1px solid #f0c89c; border-radius: 5px;
  padding: 1px 5px; text-decoration: none; margin-right: 4px; }
.van header .vanpdf:hover { background: var(--accent-soft); }

/* проверка плана и замечания */
details.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; }
details.review summary { cursor: pointer; font-weight: 600; }
.rv-ok { color: var(--accent-text); font-weight: 500; }
.rv-bad { color: var(--warn); }
.rv-n { display: inline-block; min-width: 18px; text-align: center; background: #fff1d6; color: #8a5a00; border-radius: 999px; padding: 0 6px; font-size: 12px; }
details.review ul { list-style: none; margin: 8px 0 4px; padding: 0; }
details.review li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; border-bottom: 1px dashed #edf0ef; font-size: 13px; }
details.review li.link { cursor: pointer; }
details.review li.link:hover { background: #f4f6fa; }
details.review li.err { color: var(--warn); }
.rk { flex: none; width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff; }
.rk-Э { background: #16305a; } .rk-Р { background: #b3261e; } .rk-Т { background: #a15c00; } .rk-Д { background: #24527a; }

/* почта для броней */
.mbox { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.mbox a { margin-left: 6px; font-size: 12px; }
.mbox .warn { color: #a15c00; }
ul.maillog { list-style: none; margin: 6px 0 0; padding: 0; font-size: 11.5px; color: var(--ink); max-height: 140px; overflow: auto; }
ul.maillog li { padding: 2px 0; }
ul.maillog .warn { color: var(--warn); }
.mlhow { background: #f4f6fa; border-radius: 7px; padding: 6px 8px; margin: -2px 0 8px; line-height: 1.45; }

/* вход и роли */
.userbox { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 12px; flex-wrap: wrap; }
.userbox .who { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.userbox .scopesel { width: auto; max-width: 260px; padding: 4px 6px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; }
.userbox .btn { width: auto; padding: 5px 9px; font-size: 12px; }
body.role-operator .admin-only { display: none !important; }
.loginwrap { position: fixed; inset: 0; background: var(--navy); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.loginbox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; width: min(380px, 100%);
  box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.loginbox .logo { margin-bottom: 10px; }
.loginbox h2 { margin: 0 0 4px; font-size: 18px; }
.loginbox .warn { color: var(--warn); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.loginbox .btn { width: 100%; }
.loginhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.loginhead .logo { margin: 0; }
.loginlangs { font-size: 12px; }
.loginlogo { display: block; width: min(340px, 86vw); height: auto; margin: 0 auto 18px; }
.loginwrap { flex-direction: column; }
.loginhead { justify-content: flex-end; }
.top .userbox { flex-wrap: nowrap; }
.top .userbox .scopesel { background: var(--navy); color: #fff; border-color: var(--navy-2); max-width: 220px; }

/* ===================== OpeRatio: современный слой (18.11.2026) =====================
   Только внешний вид: мягкие тени вместо рамок, крупные скругления, воздух, вкладки-«таблетки», акцентные показатели.
   Разметка и расположение блоков не меняются. */
:root {
  --radius: 16px;
  --line: #e3e8f0;
  --bg: #eef1f6;
  --shadow: 0 1px 2px rgba(11, 30, 59, .04), 0 8px 24px -8px rgba(11, 30, 59, .12);
  --shadow-lg: 0 2px 4px rgba(11, 30, 59, .05), 0 18px 40px -12px rgba(11, 30, 59, .22);
  --ring: 0 0 0 3px rgba(255, 122, 0, .22);
}
body { font-size: 14px; -webkit-font-smoothing: antialiased; letter-spacing: .005em;
  background: radial-gradient(1200px 500px at 85% -10%, #dfe6f2 0%, transparent 60%), var(--bg); background-attachment: fixed; }
::selection { background: rgba(255, 122, 0, .25); }

/* шапка: глубина вместо плоской заливки */
.top { padding: 10px 24px; border-bottom: 0; background: linear-gradient(100deg, #071428 0%, #0b1e3b 45%, #12305e 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 30px -12px rgba(7, 20, 40, .55); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(255, 122, 0, .0) 55%); }
.top .logoimg { height: 42px; }
.top h1 { font-size: 14px; letter-spacing: .01em; }
.top .sub { font-size: 12px; }
.top .langs { border-radius: 999px; padding: 3px; background: rgba(255, 255, 255, .06); border-color: transparent; }
.top .langs button { border-radius: 999px; padding: 5px 12px; transition: background .15s, color .15s; }
.top .langs button.on { box-shadow: 0 2px 8px rgba(255, 122, 0, .45); }
.top .userbox .btn.ghost, .top .userbox .scopesel { border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, .06);
  border-color: transparent; transition: background .15s; }
.top .userbox .btn.ghost:hover { background: rgba(255, 255, 255, .14); }

/* раскладка и карточки */
.layout { gap: 22px; padding: 22px 24px; grid-template-columns: 356px 1fr; }
.side { gap: 16px; top: 84px; padding: 2px 4px 12px 2px; margin: -2px -4px 0 -2px; }
.card { border: 0; padding: 18px; }
.card h2 { font-size: 15px; letter-spacing: .01em; margin-bottom: 14px; }
.kpi, .van, .tablewrap, #map, .empty, details.review { border: 0; box-shadow: var(--shadow); }
.empty { border: 0; background: rgba(255, 255, 255, .7); }

/* поля */
.field { gap: 6px; margin-bottom: 12px; font-size: 12px; font-weight: 500; }
.field input, .field select, .bkbar input[type=search], .van .vinfo input, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #f8fafc;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.field input:focus, .field select:focus, .bkbar input[type=search]:focus, .van .vinfo input:focus, textarea:focus {
  outline: 0; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.field .hint { font-weight: 400; line-height: 1.45; }

/* кнопки */
.btn { border-radius: 10px; padding: 9px 14px; border-color: transparent; background: #f1f4f9; color: var(--ink);
  transition: transform .08s, box-shadow .15s, background .15s; }
.btn:hover { filter: none; background: #e6ebf3; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn.ghost { background: #fff; border-color: var(--line); }
.btn.ghost:hover { background: #f4f6fa; }
.btn.primary { background: linear-gradient(180deg, #ff8a1f 0%, #ff7a00 100%); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 16px -4px rgba(255, 122, 0, .55); }
.btn.primary:hover { background: linear-gradient(180deg, #ff9433 0%, #ff8208 100%); }
.btn.big { padding: 13px; border-radius: 12px; font-size: 15px; letter-spacing: .01em; }
.btn.danger { color: var(--warn); }
.link { text-underline-offset: 3px; text-decoration-color: rgba(184, 86, 0, .35); }

/* вкладки — «таблетки» */
.tabs { gap: 4px; border-bottom: 0; background: rgba(255, 255, 255, .75); padding: 5px; border-radius: 14px;
  box-shadow: var(--shadow); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.tabs button { border: 0; margin: 0; border-radius: 10px; padding: 8px 18px; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, color .15s; }
.tabs button:hover:not(:disabled):not(.on) { background: #eef1f6; color: var(--ink); }
.tabs button.on { background: var(--navy); color: #fff; font-weight: 600; box-shadow: 0 4px 12px -4px rgba(11, 30, 59, .5); }

/* показатели */
.kpis { gap: 14px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); opacity: .9; }
.kpi .v { font-family: var(--head); font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: 2px; }
.kpi.bad::before { background: var(--warn); }
#map { border-radius: var(--radius); }

/* машины */
.vans { gap: 14px; }
.van { transition: box-shadow .15s, transform .15s; }
.van:hover { box-shadow: var(--shadow-lg); }
.van header { padding: 12px 14px; border-left-width: 5px; }
.van header .name { font-family: var(--head); font-weight: 700; font-size: 14px; }
.van li { border-top-color: #eef1f6; padding: 8px 0; }
.van li .n { width: 22px; height: 22px; box-shadow: 0 2px 6px -1px rgba(11, 30, 59, .35); }
.van li .tm { font-family: var(--head); }

/* таблицы */
.tablewrap { border-radius: var(--radius); }
table.op th { background: #f6f8fb; color: var(--muted); font-family: var(--head); font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600; padding: 11px 12px; border-bottom: 1px solid var(--line); }
table.op td { padding: 10px 12px; border-bottom-color: #eef1f6; }
table.op tbody tr:last-child td { border-bottom: 0; }
table.bk tbody tr { transition: background .1s; }
table.bk tbody tr:hover td { background: #fff7ee; }
.badge { padding: 2px 9px; }

/* календарь и приём броней */
.cal { gap: 6px; }
.cal .day { border: 0; border-radius: 10px; padding: 6px 0; background: #f4f6fa; transition: background .12s, transform .08s; }
.cal .day:hover { background: #e9edf3; }
.cal .day .dn { font-family: var(--head); font-size: 14px; font-weight: 700; }
.cal .day.has { background: var(--accent-soft); }
.cal .day.on { outline: 0; background: var(--navy); box-shadow: 0 6px 14px -6px rgba(11, 30, 59, .6); }
.cal .day.on .dn, .cal .day.on .wd { color: #fff; }
.cal .day.on .g { color: #ffb066; }
.drop { border: 1.5px dashed #c9d2e0; border-radius: 14px; padding: 16px 12px; background: #f8fafc; }
.drop.over { border-style: solid; box-shadow: var(--ring); }

/* окна, подсказки, вход */
dialog.bkdlg { border-radius: 18px; box-shadow: var(--shadow-lg); }
dialog.bkdlg::backdrop { background: rgba(7, 20, 40, .5); backdrop-filter: blur(3px); }
.toast { border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow-lg); background: var(--navy); }
.loginwrap { background: radial-gradient(900px 500px at 50% 0%, #17386c 0%, transparent 65%), linear-gradient(160deg, #071428, #0b1e3b); }
.loginbox { border: 0; border-radius: 20px; padding: 28px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.loginbox h2 { font-size: 20px; }
.loginbox .btn { padding: 12px; }

/* полосы прокрутки — тонкие */
* { scrollbar-width: thin; scrollbar-color: #c5cede transparent; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; padding: 14px; } .top { padding: 10px 14px; } }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-color: rgba(184, 86, 0, .35); }
.loginlangs a { color: var(--muted); }
