/* Фирменный стиль МТА: жёлтый Pantone 123 C, тёмно-серый Cool Gray 11 C.
   Одна таблица токенов на светлую и тёмную тему, дальше — только var(). */

:root {
  --brand: #FFCD34;
  --brand-dark: #E5B21F;
  --brand-soft: #FFF3D1;
  --ink: #323538;
  --grey60: #72757D;
  --grey20: #C5C6CA;

  /* светлая тема (по умолчанию) */
  --bg: #F2F3F5;
  --panel: #FFFFFF;
  --panel-2: #FAFAFB;
  --line: #E4E5E8;
  --line-strong: #D3D5D9;
  --text: #323538;
  --text-soft: #55585E;
  --muted: #72757D;
  --accent: #FFCD34;
  --accent-ink: #323538;
  --accent-hover: #F2BC1E;
  --chip-brand-bg: #FFF3D1;
  --chip-brand-text: #323538;
  --chip-brand-line: rgba(255, 205, 52, .55);
  --side-bg: #323538;
  --side-text: #E9EAEC;
  --side-muted: #A9ADB3;
  --side-active: #FFCD34;
  --ok: #2E9E5B;
  --warn: #D99400;
  --err: #D64545;
  --shadow: 0 1px 2px rgba(16, 18, 20, .06), 0 8px 24px rgba(16, 18, 20, .06);
  --radius: 12px;
  --radius-s: 8px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Arial Narrow", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1E21;
    --panel: #262A2E;
    --panel-2: #2C3035;
    --line: #383D42;
    --line-strong: #474D53;
    --text: #E9EAEC;
    --text-soft: #C6C9CD;
    --muted: #9BA0A6;
    --brand-soft: #3A3524;
    --chip-brand-bg: rgba(255, 205, 52, .18);
    --chip-brand-text: #FFD968;
    --chip-brand-line: rgba(255, 205, 52, .38);
    --side-bg: #16191B;
    --side-text: #E9EAEC;
    --side-muted: #8E9298;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #1B1E21;
  --panel: #262A2E;
  --panel-2: #2C3035;
  --line: #383D42;
  --line-strong: #474D53;
  --text: #E9EAEC;
  --text-soft: #C6C9CD;
  --muted: #9BA0A6;
  --brand-soft: #3A3524;
  --chip-brand-bg: rgba(255, 205, 52, .18);
  --chip-brand-text: #FFD968;
  --chip-brand-line: rgba(255, 205, 52, .38);
  --side-bg: #16191B;
  --side-text: #E9EAEC;
  --side-muted: #8E9298;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; letter-spacing: .2px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

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

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--side-bg);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { display: block; padding: 4px 6px 8px; }
.brand-logo { width: 100%; max-width: 190px; height: auto; display: block; filter: brightness(0) invert(1); opacity: .96; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  color: var(--side-text);
  text-decoration: none;
  font-size: 14.5px;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); }
.nav-item.is-active { background: rgba(255, 205, 52, .14); border-left-color: var(--side-active); font-weight: 600; }
.nav-item.is-soon { color: var(--side-muted); cursor: default; }
.nav-item.is-soon:hover { background: none; }
.nav-item em {
  font-style: normal;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--side-muted);
  margin-left: auto;
}

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.side-data {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.side-data-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--side-muted); font-weight: 600;
}
.side-data-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.side-data-list li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; min-width: 0; }
.side-data-list .dot { width: 7px; height: 7px; }
.side-data-list .sd-name { color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-data-list .sd-day { margin-left: auto; color: var(--side-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-ok .dot { background: var(--ok); }
.sd-warn .dot { background: var(--warn); }
.sd-err .dot { background: var(--err); }
.sd-unknown .dot { background: var(--grey20); }
.side-data-head .dot-ok { background: var(--ok); }
.side-data-head .dot-warn { background: var(--warn); }
.side-data-head .dot-err { background: var(--err); }
.side-data-head .dot-unknown { background: var(--grey20); }
.sd-warn .sd-day, .sd-err .sd-day { color: var(--brand); font-weight: 600; }
.side-data-note { font-size: 11.5px; color: var(--side-muted); }
.side-data-note.is-warn { color: var(--brand); }

.theme-toggle {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .06);
  border: 0; color: var(--side-text);
  padding: 9px 12px; border-radius: var(--radius-s);
  cursor: pointer; font: inherit; font-size: 14px;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .12); }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.crumbs { font-family: var(--font-head); font-size: 17px; font-weight: 700; }

.burger {
  display: none; background: none; border: 0; color: var(--text);
  padding: 6px; border-radius: var(--radius-s); cursor: pointer;
}
.burger:hover { background: var(--panel-2); }

.fresh { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; color: var(--muted); min-width: 0; }
.fresh-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grey20); flex: none; }
.fresh-ok .dot { background: var(--ok); }
.fresh-warn .dot { background: var(--warn); }
.fresh-err .dot { background: var(--err); }
.fresh-unknown .dot { background: var(--grey20); }

.user { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 600; font-size: 14px; }

.content { padding: 22px; max-width: 1500px; width: 100%; }

/* --- шапка страницы и кнопки -------------------------------------------- */

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 26px; }
.page-head p { margin: 6px 0 0; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--grey60); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); border-color: transparent; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.is-busy { opacity: .7; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}
.chip-ok { background: rgba(46, 158, 91, .12); color: var(--ok); border-color: rgba(46, 158, 91, .3); }
.chip-warn { background: rgba(217, 148, 0, .14); color: var(--warn); border-color: rgba(217, 148, 0, .3); }
.chip-err { background: rgba(214, 69, 69, .12); color: var(--err); border-color: rgba(214, 69, 69, .3); }
.chip-unknown { background: var(--panel-2); color: var(--muted); }
.chip-card { background: var(--chip-brand-bg); color: var(--chip-brand-text); border-color: var(--chip-brand-line); }
.chip-nocard { background: var(--panel-2); color: var(--muted); }
.chip-admin { background: var(--chip-brand-bg); color: var(--chip-brand-text); border-color: var(--chip-brand-line); }
.chip-view { background: var(--panel-2); color: var(--muted); }

/* --- панель фильтров ----------------------------------------------------- */

.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 14px;
}
.input {
  padding: 8px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  font: inherit; font-size: 14px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.search { flex: 1 1 260px; min-width: 180px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-soft); cursor: pointer; }
.check input { accent-color: var(--brand-dark); width: 16px; height: 16px; }

/* --- список справок ------------------------------------------------------ */

.list { display: flex; flex-direction: column; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: 30px 96px minmax(0, 1fr) 132px auto;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.pick { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pick-box { width: 18px; height: 18px; accent-color: var(--brand-dark); }

.thumb-cell { display: flex; }
.thumb {
  width: 96px; height: 68px; object-fit: cover; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--panel-2); cursor: zoom-in; display: block;
}
.thumb-empty {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--grey60);
  cursor: default;
}

.row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.route-number { font-family: var(--font-head); font-size: 22px; font-weight: 700; line-height: 1; }
.row-city { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.row-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.row-when { text-align: right; line-height: 1.5; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.copies { margin-top: 4px; font-size: 13px; }
.copies summary { cursor: pointer; color: var(--muted); }
.copies summary:hover { color: var(--text); }
.copies ul { margin: 6px 0 0; padding-left: 18px; }
.copies li { margin-bottom: 2px; }
.copies a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.copies a:hover { border-bottom-color: var(--accent); }

.zip-bar {
  position: sticky; bottom: 0; z-index: 15;
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.zip-bar .btn { margin-left: auto; }

.empty {
  background: var(--panel); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: 42px 20px; text-align: center;
}
.empty p { margin: 0 0 6px; }

.section { margin-top: 26px; }
.section h2 { font-size: 19px; margin-bottom: 4px; }
.files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; gap: 10px; align-items: baseline; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.files a { color: var(--text); text-decoration: none; font-weight: 600; word-break: break-all; }
.files a:hover { color: var(--brand-dark); }
.files .muted { margin-left: auto; white-space: nowrap; }
.hint { margin-top: 10px; }

/* --- страница источников ------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; align-items: start; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--grey20);
  border-radius: var(--radius); padding: 16px 16px 14px;
}
.card-ok { border-left-color: var(--ok); }
.card-warn { border-left-color: var(--warn); }
.card-err { border-left-color: var(--err); }
.card-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; margin-right: auto; }
.card-what { margin: 8px 0 12px; }

.metrics { margin: 0; display: flex; flex-direction: column; gap: 1px; }
.metric { display: flex; gap: 12px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); }
.metric dt { color: var(--muted); font-size: 13px; flex: 1 1 auto; min-width: 0; }
.metric dd { margin: 0; font-weight: 600; font-size: 14px; text-align: right; flex: 0 1 auto; }
.metric .hint { display: block; font-weight: 400; margin-top: 2px; max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-note { margin: 12px 0 0; }
.checks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.check-result { font-size: 13px; margin-top: 8px; }
.check-result:empty { display: none; }
.check-result .ok { color: var(--ok); }
.check-result .err { color: var(--err); }

/* --- модальное окно ------------------------------------------------------ */

.modal {
  border: 0; padding: 0; border-radius: var(--radius); max-width: min(1100px, 94vw);
  width: auto; background: var(--panel); color: var(--text); box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(20, 22, 24, .62); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.modal-head strong { font-family: var(--font-head); font-size: 17px; margin-right: auto; }
.modal-body { padding: 12px; background: var(--panel-2); max-height: 74vh; overflow: auto; }
.modal-body img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-s); }
.modal-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }

/* --- вход ---------------------------------------------------------------- */

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--bg); }
.login-card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-top: 4px solid var(--brand);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
}
.login-logo { width: 190px; height: auto; margin-bottom: 18px; }
:root[data-theme="dark"] .login-logo { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-logo { filter: brightness(0) invert(1); } }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card p { margin: 0 0 16px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--text-soft); }
.login-form input {
  padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit;
}
.login-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.login-links { margin-top: 16px; text-align: center; font-size: 14px; }
.login-links a { color: var(--muted); }
.login-links a:hover { color: var(--text); }

/* Форма внутри карточки — настройки доступа. Ширину не тянем на всю карточку:
   поле во всю ширину широкого экрана читается хуже, чем поле в четверть. */
.form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; max-width: 420px; }
.form label { font-size: 14px; color: var(--text-soft); margin-top: 10px; }
.form input {
  padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit;
}
.form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.form-hint { margin: 0; }
.form-actions { margin-top: 16px; }

/* Вход через Telegram: кнопка на странице входа и страница с цифрами. */
.login-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: 13px; }
.login-sep::before, .login-sep::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.btn-tg { display: flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; }
.btn-tg svg { width: 18px; height: 18px; flex: none; fill: currentColor; }

.tg-code {
  font-family: var(--font-head); font-size: 44px; font-weight: 700; line-height: 1.1;
  letter-spacing: .14em; text-align: center; padding: 14px 10px; margin: 4px 0 16px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  font-variant-numeric: tabular-nums; user-select: all;
}
.tg-steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; color: var(--text-soft); }
.tg-steps li { margin-bottom: 7px; }
.tg-steps b { color: var(--text); }
.tg-status { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.tg-status.is-err { color: var(--err); }

.alert { padding: 10px 12px; border-radius: var(--radius-s); font-size: 14px; margin-bottom: 14px; }
.alert-err { background: rgba(214, 69, 69, .12); color: var(--err); border: 1px solid rgba(214, 69, 69, .3); }
.alert-ok { background: rgba(46, 160, 96, .12); color: var(--ok); border: 1px solid rgba(46, 160, 96, .3); }

/* --- заявки: чат с агентом и загрузка выпуска ---------------------------- */

[hidden] { display: none !important; }  /* разметку прячет app.js, задавая атрибут */

.form textarea {
  padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  font: inherit; resize: vertical; min-height: 74px;
}
.form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.form input[type="file"] { padding: 8px 10px; }

.job { margin-top: 14px; }
.job-meta { margin: 6px 0 0; }
.job-note { margin: 10px 0 0; }
.job-pre {
  white-space: pre-wrap; word-break: break-word; margin: 10px 0 0;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 12px; max-height: 48vh; overflow: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.45;
}
.job-tail .job-pre { max-height: 26vh; color: var(--text-soft); }
.job-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.job-notes { list-style: none; margin: 10px 0 0; padding: 0; }
.job-notes li { padding: 2px 0; }

.jobs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.job-row {
  display: flex; gap: 10px; align-items: baseline; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px;
}
.job-row-what {
  color: var(--text); text-decoration: none; font-weight: 600;
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-row-what:hover { color: var(--brand-dark); }

code { font-family: var(--mono); font-size: 13px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }

/* --- телефон и планшет --------------------------------------------------- */

@media (max-width: 1100px) {
  .row { grid-template-columns: 30px 96px minmax(0, 1fr) auto; }
  .row-when { display: none; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 268px; height: 100%;
    transform: translateX(-100%); transition: transform .18s ease;
    z-index: 40; box-shadow: var(--shadow);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(20, 22, 24, .5); z-index: 30;
  }

  .burger { display: inline-flex; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .fresh-text { max-width: 34vw; }
  .user-name { display: none; }
  .content { padding: 16px 14px 24px; }

  .page-head h1 { font-size: 22px; }
  .page-actions { margin-left: 0; width: 100%; }

  .row {
    grid-template-columns: 26px 72px minmax(0, 1fr);
    grid-template-areas: "pick thumb main" ". . actions";
    gap: 10px 12px; align-items: start;
  }
  .pick { grid-area: pick; }
  .thumb-cell { grid-area: thumb; }
  .thumb, .thumb-cell { width: 72px; }
  .thumb { height: 52px; }
  .row-main { grid-area: main; }
  .row-actions { grid-area: actions; justify-content: flex-start; grid-column: 2 / -1; }
  .route-number { font-size: 19px; }
  .row-city { font-size: 16px; }

  .cards { grid-template-columns: 1fr; }
  .toolbar .search { flex: 1 1 100%; }
  .modal-body { max-height: 66vh; }
  .job-row-when { display: none; }
  .job-pre { max-height: 60vh; }
}

@media (max-width: 520px) {
  .row {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
      "pick    pick"
      "thumb   main"
      "actions actions";
    row-gap: 8px;
  }
  .pick { justify-content: flex-start; }
  .row-actions { grid-column: 1 / -1; }
  .thumb, .thumb-cell { width: 64px; }
  .thumb { height: 46px; }
  .crumbs { display: none; }
  .fresh-text { max-width: none; }
  .user .chip { display: none; }
  .zip-bar { flex-wrap: wrap; }
  .zip-bar .btn { margin-left: 0; width: 100%; }
}
