/* ==========================================================================
   LastPanel — интерфейс истории QA-проверок.

   Принцип: оболочка нейтральная, цвет несут только вердикты. Зелёный, красный,
   янтарный и серый означают результат прогона и больше нигде не тратятся — так
   провал виден с первого взгляда, а не тонет среди декоративных акцентов.
   Синий — только интерактив: ссылки, кнопки, выбранное.

   Шрифты лежат в /static/fonts (OFL): Onest — интерфейс, JetBrains Mono —
   то, что копируют в терминал и в Jira: ключи, ветки, серверы, SHA, логи.
   ========================================================================== */

@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;
  src:url("/static/fonts/onest-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Onest";font-style:normal;font-display:swap;font-weight:100 900;
  src:url("/static/fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-display:swap;font-weight:400;
  src:url("/static/fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-display:swap;font-weight:400;
  src:url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-display:swap;font-weight:500;
  src:url("/static/fonts/jetbrains-mono-cyrillic-500-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-display:swap;font-weight:500;
  src:url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+2000-206F}

/* --- Токены ------------------------------------------------------------- */
:root{
  color-scheme:light;
  --bg:#f3f5f8; --surface:#fff; --surface-2:#f8f9fb; --surface-3:#eef1f5;
  --ink:#131a24; --ink-2:#3a4656; --muted:#667285; --line:#e1e6ec; --line-strong:#cbd2db;
  --accent:#1f5fe0; --accent-hover:#1a51c2; --accent-soft:#e9f0fd; --accent-line:#b4c9f5;
  --pass:#12825a; --pass-soft:#e2f3eb; --fail:#cf3a2b; --fail-soft:#fce9e6;
  --block:#ad6c07; --block-soft:#fbf0db; --other:#7d8a9c; --other-soft:#eef1f5;
  --active:#6650c4; --active-soft:#efebfb;
  --ring:rgba(31,95,224,.32); --on-accent:#fff;
  --shadow:0 1px 2px rgba(19,26,36,.06),0 8px 24px rgba(19,26,36,.05);
  --shadow-pop:0 12px 32px rgba(19,26,36,.14),0 2px 6px rgba(19,26,36,.06);
  --r-sm:7px; --r:9px; --r-lg:14px;
  --sidebar:228px; --topbar:60px;
  --font:"Onest",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Consolas,monospace;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0e131a; --surface:#151b24; --surface-2:#1a212c; --surface-3:#212a37;
  --ink:#e8edf3; --ink-2:#bcc6d3; --muted:#8a96a7; --line:#252f3c; --line-strong:#35414f;
  --accent:#6f9bff; --accent-hover:#8cafff; --accent-soft:rgba(111,155,255,.14); --accent-line:rgba(111,155,255,.4);
  --pass:#3cc58b; --pass-soft:rgba(60,197,139,.14); --fail:#ff6d5e; --fail-soft:rgba(255,109,94,.14);
  --block:#eda93a; --block-soft:rgba(237,169,58,.15); --other:#8e9aab; --other-soft:rgba(142,154,171,.14);
  --active:#a894ff; --active-soft:rgba(168,148,255,.15);
  --ring:rgba(111,155,255,.4); --on-accent:#0b1220;
  --shadow:0 1px 2px rgba(0,0,0,.22),0 8px 24px rgba(0,0,0,.18);
  --shadow-pop:0 16px 40px rgba(0,0,0,.5);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#0e131a; --surface:#151b24; --surface-2:#1a212c; --surface-3:#212a37;
    --ink:#e8edf3; --ink-2:#bcc6d3; --muted:#8a96a7; --line:#252f3c; --line-strong:#35414f;
    --accent:#6f9bff; --accent-hover:#8cafff; --accent-soft:rgba(111,155,255,.14); --accent-line:rgba(111,155,255,.4);
    --pass:#3cc58b; --pass-soft:rgba(60,197,139,.14); --fail:#ff6d5e; --fail-soft:rgba(255,109,94,.14);
    --block:#eda93a; --block-soft:rgba(237,169,58,.15); --other:#8e9aab; --other-soft:rgba(142,154,171,.14);
    --active:#a894ff; --active-soft:rgba(168,148,255,.15);
    --ring:rgba(111,155,255,.4); --on-accent:#0b1220;
    --shadow-pop:0 16px 40px rgba(0,0,0,.5);
  }
}

/* --- База --------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{background:var(--bg);-webkit-text-size-adjust:100%}
body{margin:0;color:var(--ink);font:400 14px/1.5 var(--font);font-feature-settings:"tnum" 1;-webkit-font-smoothing:antialiased}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-hover)}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
code,kbd,pre,.mono-cell,.task-key,.key-badge{font-family:var(--mono);font-feature-settings:normal}
code{font-size:.9em}
h1{font-size:26px;line-height:1.2;font-weight:650;letter-spacing:-.015em;margin:0}
h2{font-size:16px;line-height:1.3;font-weight:620;margin:0}
h3{font-size:13px;font-weight:600;margin:0}
hr{border:0;border-top:1px solid var(--line);margin:20px 0}
svg{flex:none}
.muted{color:var(--muted)}
.nowrap{white-space:nowrap}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.text-warn{color:var(--block)}
.eyebrow{margin:0 0 4px;font-size:13px;color:var(--muted)}

/* --- Каркас ------------------------------------------------------------- */
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);background:var(--surface);border-right:1px solid var(--line);z-index:20;display:flex;flex-direction:column;overflow-y:auto}
.brand{height:var(--topbar);display:flex;align-items:center;gap:10px;padding:0 18px;color:var(--ink);font-weight:680;font-size:15px;letter-spacing:-.01em;flex:none}
.brand:hover{color:var(--ink)}
.brand-mark{width:28px;height:28px;border-radius:8px}
.nav{padding:8px 10px;display:grid;gap:2px}
.nav-link{display:flex;align-items:center;gap:11px;padding:8px 10px;border-radius:var(--r);color:var(--ink-2);font-weight:500}
.nav-link:hover{background:var(--surface-3);color:var(--ink)}
.nav-link.active{background:var(--accent-soft);color:var(--accent)}
.nav-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.sidebar-collapse{margin-top:auto;border:0;border-top:1px solid var(--line);background:transparent;color:var(--muted);padding:12px 20px;display:flex;align-items:center;gap:10px;cursor:pointer;font-size:13px}
.sidebar-collapse:hover{color:var(--ink)}
.sidebar-collapse svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.quick-filters{border-top:1px solid var(--line);padding:14px 12px}
.quick-filters p{font-size:12px;color:var(--muted);margin:0 0 6px 8px}
.quick-filters a{display:flex;justify-content:space-between;color:var(--ink-2);padding:6px 8px;border-radius:var(--r-sm);font-size:13px}
.quick-filters a:hover,.quick-filters a.active{background:var(--surface-3);color:var(--ink)}
.quick-filters b{font-weight:500;color:var(--muted)}

html.nav-collapsed{--sidebar:64px}
.nav-collapsed .brand-name,.nav-collapsed .nav-link span,.nav-collapsed .quick-filters,.nav-collapsed .sidebar-collapse span{display:none}
.nav-collapsed .nav-link{justify-content:center}
.nav-collapsed .brand{padding:0 18px}
.nav-collapsed .sidebar-collapse{justify-content:center;padding:12px}
.nav-collapsed .sidebar-collapse svg{transform:rotate(180deg)}

.topbar{position:fixed;left:var(--sidebar);right:0;top:0;height:var(--topbar);z-index:15;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 28px;
  background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--line)}
.global-search{height:38px;width:min(520px,52vw);display:flex;align-items:center;gap:9px;padding:0 10px 0 12px;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);color:var(--muted)}
.global-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.global-search svg,.list-search svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.global-search input{border:0;outline:0;flex:1;min-width:0;background:transparent;color:var(--ink)}
.global-search kbd{font-size:11px;border:1px solid var(--line);border-radius:5px;padding:1px 6px;background:var(--surface-2);color:var(--muted)}
.topbar-actions,.topbar-user{display:flex;align-items:center;gap:10px}
.topbar-user strong{font-weight:550}
.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:700}
.logout-form{margin:0;display:flex}
.logout-button{border:0;background:transparent;color:var(--muted);width:32px;height:32px;border-radius:var(--r-sm);cursor:pointer;display:grid;place-items:center}
.logout-button:hover{background:var(--surface-3);color:var(--ink)}
.logout-button svg,.icon-btn svg,.btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.icon-btn circle{fill:currentColor;stroke:none}

.main-content{margin-left:var(--sidebar);padding:calc(var(--topbar) + 26px) 28px 24px;min-height:100vh}
.main-content>*{max-width:1440px;margin-left:auto;margin-right:auto}
.footer{margin-top:32px;padding-top:14px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted);font-size:12px}

/* --- Заголовки страниц -------------------------------------------------- */
.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px}
.page-lede{margin:6px 0 0;color:var(--muted)}
.breadcrumbs{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;margin-bottom:14px}
.breadcrumbs a{color:var(--muted)}
.breadcrumbs a:hover{color:var(--accent)}
.result-count{color:var(--muted)}

/* --- Кнопки ------------------------------------------------------------- */
.btn{min-height:36px;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);color:var(--ink);padding:7px 13px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:550;cursor:pointer;white-space:nowrap;text-decoration:none;transition:background .12s,border-color .12s}
.btn:hover{background:var(--surface-3);color:var(--ink)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--on-accent)}
.btn-quiet{border-color:transparent;background:transparent;color:var(--ink-2)}
.btn-quiet:hover{background:var(--surface-3)}
.btn-danger{color:var(--fail);border-color:color-mix(in srgb,var(--fail) 35%,transparent)}
.btn-danger:hover{background:var(--fail-soft);color:var(--fail)}
.btn-small{min-height:30px;padding:4px 10px;font-size:13px;border-radius:var(--r-sm)}
.full-width{width:100%}
.icon-btn{width:34px;height:34px;border:1px solid transparent;border-radius:var(--r);background:transparent;display:inline-grid;place-items:center;color:var(--ink-2);cursor:pointer;text-decoration:none}
.icon-btn:hover{background:var(--surface-3);color:var(--ink)}
.icon-btn.large{width:36px;height:36px;border-color:var(--line-strong);background:var(--surface)}
.link-quiet{font-size:13px}
.count-badge{color:var(--accent);font-weight:800}
.inline-form{display:inline-flex;margin:0}
.star-button{border:0;background:transparent;color:var(--line-strong);font-size:19px;line-height:1;cursor:pointer;padding:4px;border-radius:var(--r-sm)}
.star-button:hover{color:var(--block)}
.star-button.selected{color:#e3a20b}
.star-button.large{font-size:24px}

/* --- Формы -------------------------------------------------------------- */
label{display:block;font-size:13px;font-weight:550;color:var(--ink-2);margin:0 0 12px}
input,textarea,select{width:100%;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);color:var(--ink);padding:8px 11px;margin-top:5px;min-height:38px}
input:focus,textarea:focus,select:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
input[type=checkbox],input[type=radio]{width:auto;min-height:0;margin:0;accent-color:var(--accent)}
input[type=color]{padding:3px;width:42px}
textarea{min-height:100px;resize:vertical;line-height:1.5}
.short{min-height:72px}
.form-grid{display:grid;gap:12px}
.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}
.form-panel{max-width:860px}
.collapsible-form{display:none}
.collapsible-form.open{display:block}

/* --- Поверхности -------------------------------------------------------- */
.panel,.toolbar-card,.table-card,.reports-card,.report-overview-card,.settings-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.panel{padding:20px;margin-bottom:16px}
/* Временная совместимость со старым шаблоном списка задач. Удалить вместе с
   блоком stats после переноса index.html на компактную панель из redesign. */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.stat-card{display:flex;align-items:center;gap:12px;padding:15px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.stat-card>div{display:flex;flex-direction:column}
.stat-card>div>span{font-size:12px;color:var(--muted)}
.stat-card strong{font-size:24px;line-height:1.15;margin-top:2px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px}
.section-heading h2 .muted{font-weight:500;margin-left:4px}
.empty-state{text-align:center!important;padding:36px 20px!important;color:var(--muted)!important}
.empty-state.compact{padding:18px 8px!important;margin:0;text-align:left!important}
.notice{margin:14px 0 0;padding:10px 12px;border-radius:var(--r);background:var(--block-soft);color:var(--block);font-size:13px}

/* --- Статусы и вердикты ------------------------------------------------- */
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:3px 10px 3px 8px;font-size:12px;font-weight:560;white-space:nowrap;background:var(--other-soft);color:var(--ink-2)}
.pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.status-passed,.status-closed,.verdict-passed,.report-status-published,.report-result-passed{background:var(--pass-soft);color:var(--pass)}
.status-failed,.verdict-failed,.report-result-failed{background:var(--fail-soft);color:var(--fail)}
.status-blocked,.verdict-blocked,.report-result-remark{background:var(--block-soft);color:var(--block)}
.status-ready_for_test,.status-testing{background:var(--accent-soft);color:var(--accent)}
.status-in_progress,.status-sent_to_development{background:var(--active-soft);color:var(--active)}
.status-new,.status-not_reproduced,.verdict-not_reproduced,.verdict-inconclusive,.report-status-draft{background:var(--other-soft);color:var(--ink-2)}

.v-passed{background:var(--pass)} .v-failed{background:var(--fail)} .v-blocked{background:var(--block)}
.v-other{background:var(--other)} .s-ready{background:var(--accent)} .s-active{background:var(--active)}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:none}

/* История прогонов: сегмент на каждый прогон, от старого к новому. Главный
   сигнал списка — видно, что задача прошла путь «ошибка → ошибка → успех». */
.trail{display:inline-flex;align-items:center;gap:3px;vertical-align:middle}
.trail i{width:7px;height:16px;border-radius:2px;display:block}
.trail i:last-child{width:11px}
.trail i.v-none{width:22px;height:2px;border-radius:1px;background:var(--line-strong)}

/* --- Быстрые фильтры ---------------------------------------------------- */
.segmented{display:flex;flex-wrap:nowrap;overflow-x:auto;align-items:center;gap:4px;margin-bottom:14px;padding-bottom:3px;scrollbar-width:thin}
.segmented{max-width:100%;scrollbar-width:thin}
.segmented a{flex:0 0 auto}
.segmented a{display:inline-flex;align-items:center;gap:7px;padding:6px 11px;border-radius:999px;color:var(--ink-2);font-size:13px;font-weight:520;border:1px solid transparent}
.segmented a:hover{background:var(--surface);border-color:var(--line)}
.segmented a.active{background:var(--ink);color:var(--surface)}
.segmented b{font-weight:500;color:var(--muted);font-size:12px}
.segmented a.active b{color:inherit;opacity:.7}
.segmented-divider{width:1px;height:20px;background:var(--line-strong);margin:0 6px}

/* --- Панель фильтров ---------------------------------------------------- */
.toolbar-card{padding:12px;margin-bottom:14px}
.filter-form{margin:0}
.filter-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.list-search{flex:1 1 320px;display:flex;align-items:center;gap:9px;margin:0;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--r);color:var(--muted);background:var(--surface)}
.list-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.list-search input{border:0;box-shadow:none!important;margin:0;padding:0;min-height:36px;background:transparent}
.sort-select{display:flex;align-items:center;gap:8px;margin:0;color:var(--muted);font-weight:500;white-space:nowrap}
.sort-select select{margin:0;width:auto;min-height:36px;padding-right:28px}
.filter-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.filter-grid.open{display:grid}
.filter-grid label{margin:0}
/* Старый index.html показывает фильтры постоянно. Новый .filter-form раскрывает
   тот же grid кнопкой, поэтому совместимость ограничена формой без этого класса. */
.filter-panel form:not(.filter-form) .filter-grid{display:grid}
.filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.saved-filter-sets{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:10px;font-size:13px}
.saved-filter-sets a{padding:3px 10px;border:1px solid var(--line);border-radius:999px;color:var(--ink-2)}
.saved-filter-sets a:hover{border-color:var(--line-strong)}
.saved-filter-sets a.active{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}

/* --- Таблицы ------------------------------------------------------------ */
.table-card{overflow:hidden}
.table-scroll{overflow:auto}
.table-scroll-hint{position:relative}
.table-scroll-hint::after{content:"";position:absolute;z-index:2;top:0;right:0;width:22px;height:100%;pointer-events:none;background:linear-gradient(90deg,transparent,var(--surface))}
.table-scroll-hint:focus-within::after{opacity:.35}
.task-table,.reports-table,.checked-tasks{width:100%;border-collapse:collapse}
.task-table{width:100%;table-layout:fixed;min-width:0}
.task-table th,.task-table td{box-sizing:border-box;overflow-wrap:anywhere}
.task-table th{overflow:hidden;text-overflow:ellipsis}
.task-table th:last-child{white-space:normal!important;line-height:1.2}
.task-table th:nth-child(1){width:42px}.task-table th:nth-child(2){width:120px}.task-table th:nth-child(3){width:auto}.task-table th:nth-child(4){width:150px}.task-table th:nth-child(5){width:100px}.task-table th:nth-child(6){width:105px}
.task-table td,.task-table th{padding-left:10px!important;padding-right:10px!important}
.task-table th,.reports-table th,.checked-tasks th{position:sticky;top:0;background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:550;text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.task-table td,.reports-table td,.checked-tasks td{padding:11px 12px;border-bottom:1px solid var(--line);vertical-align:middle;color:var(--ink-2)}
.task-table tbody tr:last-child td,.reports-table tbody tr:last-child td,.checked-tasks tbody tr:last-child td{border-bottom:0}
.task-table tbody tr:hover td,.reports-table tbody tr:hover td{background:var(--surface-2)}
.favorite-col{width:44px}
.task-key{font-size:12.5px;font-weight:500;white-space:nowrap}
.task-table .task-key{white-space:normal;overflow-wrap:anywhere}
.task-title{display:block;color:var(--ink);font-weight:550;line-height:1.35}
.task-table .task-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.task-title:hover{color:var(--accent)}
.title-cell{min-width:0}
.inline-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}
.task-table .inline-tags{max-height:24px;overflow:hidden}
.inline-tags span,.chip{display:inline-flex;align-items:center;gap:5px;border-radius:6px;padding:1px 7px;font-size:12px;color:var(--ink-2);background:var(--surface-3)}
.inline-tags span[style]::before,.tag-chip::before{content:"";width:6px;height:6px;border-radius:2px;background:var(--tag-color,var(--other))}
.module-tag{font-family:var(--mono);font-size:11.5px!important;background:transparent!important;border:1px solid var(--line)}
.task-runtime-meta{max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px;color:var(--muted);font-size:11px}
.task-runtime-meta code{font-size:11px}
.mono-cell{font-size:12.5px;white-space:nowrap}
.date-cell{white-space:nowrap;font-size:13px}
.date-pair{display:grid;gap:2px}.date-pair time:last-child{color:var(--muted);font-size:11px}
.task-table td:nth-child(4) .pill{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:1560px){.col-created{display:none}}
.table-footer{padding:10px 14px;color:var(--muted);font-size:12px;border-top:1px solid var(--line);background:var(--surface-2)}
.table-actions{display:flex;gap:6px;flex-wrap:wrap}

/* --- Обзор -------------------------------------------------------------- */
.overview-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:16px;align-items:start}
.overview-grid>.panel{margin:0}
.feed-panel{grid-column:1}
.legend{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--muted)}
.legend li{display:flex;align-items:center;gap:6px}
.legend i{width:8px;height:8px;border-radius:2px;display:block}
.legend b{color:var(--ink);font-weight:600}
.activity-chart{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:8px;height:220px;align-items:stretch}
.activity-day{height:100%;display:flex;flex-direction:column;gap:6px;min-width:0}
.activity-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:4px;min-height:0}
.activity-bar{height:max(calc(var(--h) * .86),3px);display:flex;flex-direction:column;border-radius:5px;overflow:hidden;background:var(--surface-3)}
.activity-bar span{display:block;min-height:3px}
.activity-bar span+span{border-top:1.5px solid var(--surface)}
.activity-total{font-size:11px;color:var(--muted);text-align:center;line-height:1}
.activity-day:hover .activity-bar{filter:brightness(1.08)}
.activity-label{font-size:11px;color:var(--muted);text-align:center;white-space:nowrap}
.activity-day.is-today .activity-label{color:var(--ink);font-weight:600}
.status-panel h2{margin-bottom:12px}
.status-list{list-style:none;margin:0;padding:0}
.status-list a{display:flex;align-items:center;gap:10px;padding:8px 6px;border-radius:var(--r-sm);color:var(--ink-2)}
.status-list a:hover{background:var(--surface-2);color:var(--ink)}
.status-list b{margin-left:auto;font-weight:600;color:var(--ink);font-size:15px}
.status-bar{display:flex;height:8px;border-radius:99px;overflow:hidden;margin-top:14px;gap:2px}
.status-bar span{min-width:3px}
.task-line,.report-line{display:flex;align-items:center;gap:12px;padding:9px 6px;border-top:1px solid var(--line);color:var(--ink-2)}
.task-line:first-of-type,.report-line:first-of-type{border-top:0}
.task-line:hover,.report-line:hover{background:var(--surface-2);color:var(--ink)}
.task-line .task-key{flex:none;min-width:88px;color:var(--accent)}
.overview-grid .task-line{display:flex;flex-wrap:wrap;overflow:hidden;min-width:0}
.overview-grid .task-line .task-key{flex:0 1 120px;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}
.overview-grid .task-line-title{flex:1 1 180px}
.overview-grid .task-line .trail,.overview-grid .task-line .pill,.overview-grid .task-line time{flex:0 0 auto;max-width:100%}
.task-line-title,.report-line-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-weight:520}
.run-feed{list-style:none;margin:0;padding:0}
.run-feed li{display:grid;grid-template-columns:10px minmax(0,1fr) minmax(155px,220px);align-items:center;gap:12px;padding:9px 4px;border-top:1px solid var(--line);font-size:13px;min-width:0}
.run-feed li.empty-state{display:block}
.run-feed li:first-child{border-top:0}
.verdict-mark{width:10px;height:10px;border-radius:3px}
.run-feed-main{display:flex;gap:10px;min-width:0;color:var(--ink)}
.overview-grid .run-feed-main{min-width:0}
.run-feed-main .task-key{color:var(--accent)}
.overview-grid .run-feed-main .task-key{min-width:0;white-space:normal;overflow-wrap:anywhere}
.run-feed-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.run-feed-verdict-text{color:var(--muted);font-size:11px;white-space:nowrap}
.run-feed-env{color:var(--muted);white-space:nowrap}
.run-feed-env code{display:inline;overflow-wrap:anywhere;word-break:break-word}
.run-feed time{color:var(--muted);text-align:right;white-space:nowrap}
.run-feed-meta{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:10px;color:var(--muted)}
.run-feed-meta .run-feed-env{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
.run-feed-meta time{flex:0 0 auto}
@media (max-width:1350px){
  .overview-grid .run-feed li{grid-template-columns:10px minmax(0,1fr)}
  .overview-grid .run-feed-meta{grid-column:2;justify-content:flex-start;flex-wrap:wrap;gap:3px 10px}
  .overview-grid .run-feed-meta .run-feed-env,.overview-grid .run-feed-meta time{text-align:left}
  .overview-grid .run-feed-meta .run-feed-env{width:100%}
}

/* --- Карточка задачи ---------------------------------------------------- */
.detail-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:20px}
.detail-title{min-width:0;flex:1}
.detail-key-line{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.key-badge{font-size:13px;font-weight:500;padding:2px 8px;border-radius:6px;background:var(--surface-3);color:var(--ink)}
.muted-badge{color:var(--muted);font-family:var(--font)}
.detail-header h1{max-width:980px}
.subtitle{max-width:820px;color:var(--ink-2);margin:10px 0 0;white-space:pre-wrap}
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.header-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}
.detail-primary{min-width:0}
.sticky-panel{position:sticky;top:calc(var(--topbar) + 18px)}
.detail-sidebar h2{font-size:14px;margin-bottom:12px}
.details-list{display:grid;grid-template-columns:110px minmax(0,1fr);gap:9px 10px;margin:0;font-size:13px}
.details-list dt{color:var(--muted)}
.details-list dd{margin:0;overflow-wrap:anywhere;color:var(--ink)}
.jira-sync{display:grid;gap:6px;justify-items:center;margin-top:14px}
.status-form label:last-of-type{margin-bottom:12px}

.task-summary-panel{box-shadow:inset 3px 0 0 var(--accent)}
.summary-generate-form{margin:0}
.preview-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.preview-heading h3{color:var(--muted);font-weight:550}
.markdown-content{line-height:1.6;color:var(--ink)}
.markdown-content>:first-child{margin-top:0}
.markdown-content>:last-child{margin-bottom:0}
.markdown-content code{background:var(--surface-3);border-radius:4px;padding:1px 5px}
.markdown-content ul,.markdown-content ol{padding-left:22px}
.summary-edit{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.summary-edit>summary{cursor:pointer;color:var(--accent);font-size:13px;font-weight:550;width:max-content}
.summary-edit-form{margin-top:12px}
.markdown-toolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:5px;border:1px solid var(--line-strong);border-bottom:0;border-radius:var(--r) var(--r) 0 0;background:var(--surface-2)}
.markdown-toolbar .muted{margin-left:auto;font-size:12px;padding-right:6px}
.summary-editor{min-height:140px;margin-top:0;border-radius:0 0 var(--r) var(--r)}
.summary-meta{display:flex;justify-content:space-between;gap:12px;margin:6px 0 4px;font-size:12px}

.heading-with-trail{display:flex;align-items:center;gap:14px}
.run-list{display:grid;gap:10px}
.run-card{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);position:relative;overflow:hidden}
.run-card::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--pass)}
.run-card.verdict-failed::before{background:var(--fail)}
.run-card.verdict-blocked::before{background:var(--block)}
.run-card.verdict-not_reproduced::before,.run-card.verdict-inconclusive::before{background:var(--other)}
.run-card>details>summary{list-style:none}
.run-card>details>summary::-webkit-details-marker{display:none}
.run-card>details>summary{cursor:pointer;color:var(--accent);font-size:12.5px;padding:8px 14px 8px 18px;display:flex;align-items:center;gap:8px}
.run-card>details>summary::after{content:"";width:7px;height:7px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);margin-left:4px;transition:transform .15s}
.run-card>details[open]>summary::after{transform:rotate(225deg)}
.run-heading{display:flex;align-items:center;gap:10px;padding:12px 14px 12px 18px;cursor:pointer;flex-wrap:wrap}
.run-heading:hover{background:var(--surface-2)}
.run-heading::after{content:"";width:7px;height:7px;border-right:1.6px solid var(--muted);border-bottom:1.6px solid var(--muted);transform:rotate(45deg);margin-left:4px;transition:transform .15s}
details[open]>.run-heading::after{transform:rotate(225deg)}
.run-card>.run-heading{cursor:default}
.run-card>.run-heading::after{display:none}
.run-number{font-size:13px;font-weight:620;color:var(--ink)}
.run-env{font-weight:500;color:var(--ink-2)}
.run-heading time{margin-left:auto;color:var(--muted);font-size:12.5px}
.run-meta{display:flex;flex-wrap:wrap;gap:4px 16px;color:var(--muted);font-size:12.5px;padding:0 14px 0 18px}
.run-meta code{color:var(--ink-2)}
.run-details{display:grid;gap:14px;padding:14px 14px 16px 18px}
.run-block h3{margin-bottom:6px;color:var(--muted);font-weight:550}
.run-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.run-details pre,.report-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-sm);padding:10px 12px;font:12.5px/1.6 var(--mono);color:var(--ink)}
.verdict-failed .run-actual pre{border-color:color-mix(in srgb,var(--fail) 35%,var(--line));background:var(--fail-soft)}
.report-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.report-heading h3{margin:0}

.upload-form{display:flex;gap:10px;align-items:stretch;margin-bottom:8px}
.file-picker{position:relative;display:flex;align-items:center;gap:10px;flex:1;min-height:44px;border:1.5px dashed var(--line-strong);border-radius:var(--r);padding:8px 14px;margin:0;color:var(--muted);cursor:pointer;background:var(--surface-2);font-weight:500}
.file-picker:hover,.file-picker.has-file{border-color:var(--accent);color:var(--accent)}
.file-picker svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.file-picker input{position:absolute;inset:0;opacity:0;cursor:pointer;margin:0}
.file-list{display:grid}
.file-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:9px 4px;border-top:1px solid var(--line)}
.file-list>.file-row:first-child{border-top:0}
.file-name{flex:1 1 240px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-weight:500}
.file-row small{color:var(--muted)}
.file-actions{display:flex;gap:4px;margin-left:auto}

.timeline{list-style:none;margin:0;padding:0 0 0 22px;display:grid;gap:16px;position:relative}
.timeline::before{content:"";position:absolute;left:5px;top:6px;bottom:6px;width:2px;background:var(--line)}
.timeline-event{position:relative}
.timeline-dot{position:absolute;left:-22px;top:5px;width:12px;height:12px;border-radius:50%;border:2.5px solid var(--other);background:var(--surface)!important;padding:0}
.timeline-dot::before{display:none}
.timeline-dot.status-passed,.timeline-dot.status-closed{border-color:var(--pass)}
.timeline-dot.status-failed{border-color:var(--fail)}
.timeline-dot.status-blocked{border-color:var(--block)}
.timeline-dot.status-testing,.timeline-dot.status-ready_for_test{border-color:var(--accent)}
.timeline-dot.status-in_progress,.timeline-dot.status-sent_to_development{border-color:var(--active)}
.timeline-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.timeline-event p{margin:6px 0 2px;color:var(--ink-2)}
.timeline-event small{color:var(--muted);font-size:12px}

.more-menu{position:relative}
.more-menu>summary{list-style:none}
.more-menu>summary::-webkit-details-marker{display:none}
.more-menu>div{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:190px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-pop)}
.more-menu>div form{margin:0}
.more-menu>div a,.more-menu>div button{display:block;width:100%;border:0;background:none;text-align:left;color:var(--ink);padding:8px 10px;border-radius:var(--r-sm);cursor:pointer;font-size:13.5px}
.more-menu>div a:hover,.more-menu>div button:hover{background:var(--surface-3)}

/* --- Прочие страницы задачи --------------------------------------------- */
.report-panel,.report-editor-panel{max-width:1100px}
.report-editor{min-height:520px;font:13px/1.6 var(--mono)}
.report-panel pre{font-size:13px;padding:20px}
.tag-picker{border:1px solid var(--line);border-radius:var(--r);padding:12px;margin:4px 0 14px}
.tag-picker legend{font-size:13px;font-weight:550;color:var(--ink-2);padding:0 4px}
.tag-picker>input{margin:0 0 10px}
.tag-options{display:flex;flex-wrap:wrap;gap:6px}
.tag-options label{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:var(--r-sm);padding:5px 9px;margin:0;cursor:pointer;font-weight:500}
.tag-options label:has(input:checked){border-color:var(--accent-line);background:var(--accent-soft);color:var(--accent)}
.tag-options span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:2px;background:var(--tag-color,var(--other));margin-right:6px}

/* --- Страница ошибки ---------------------------------------------------- */
.error-page{max-width:560px!important;margin:8vh auto 0!important;text-align:center}
.error-code{font:500 13px var(--mono);color:var(--muted);margin:0 0 10px}
.error-detail{color:var(--ink-2);margin:12px 0 24px;overflow-wrap:anywhere}
.error-actions{display:flex;justify-content:center;gap:8px}

/* --- Отчёты ------------------------------------------------------------- */
.reports-heading{align-items:center}
.reports-card{overflow:hidden}
.reports-filters{display:grid;grid-template-columns:minmax(260px,1fr) auto auto auto;gap:8px;padding:12px;border-bottom:1px solid var(--line);align-items:center}
.reports-search,.date-filter{min-height:38px;border:1px solid var(--line-strong);border-radius:var(--r);display:flex;align-items:center;gap:8px;padding:0 12px;margin:0;color:var(--muted);font-weight:500;background:var(--surface)}
.reports-search:focus-within,.date-filter:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring)}
.reports-search input,.date-filter input{border:0;margin:0;padding:0;min-height:34px;box-shadow:none!important;background:transparent}
.reports-search input{flex:1}
.date-filter input{width:132px}
.reports-table{min-width:760px}
.report-date{white-space:nowrap}
.report-date strong,.report-date span,.report-title-cell a,.report-title-cell span{display:block}
.report-date strong{font-weight:550;color:var(--ink)}
.report-date span,.report-title-cell span{font-size:12.5px;color:var(--muted);margin-top:2px}
.report-title-cell{max-width:720px}
.report-title-cell a{font-weight:560;color:var(--ink)}
.report-title-cell a:hover{color:var(--accent)}
.report-title-cell span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-actions{display:flex;gap:2px;align-items:center;justify-content:flex-end}
.reports-footer{padding:10px 14px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:13px;border-top:1px solid var(--line);background:var(--surface-2)}
.pagination{display:flex;gap:4px}
.pagination a,.pagination span.disabled{min-width:32px;height:32px;padding:0 6px;border-radius:var(--r-sm);display:grid;place-items:center;color:var(--ink-2)}
.pagination a:hover{background:var(--surface-3)}
.pagination a.active{background:var(--ink);color:var(--surface)}
.pagination span.disabled{opacity:.35}
.report-detail-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}
.report-title-line{display:flex;align-items:center;gap:6px}
.report-title-line form{margin:0}
.report-meta{display:flex;align-items:center;gap:12px;margin-top:10px;color:var(--muted);font-size:13px;flex-wrap:wrap}
.report-tabs{display:flex;gap:24px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.report-tabs>*{padding:10px 2px;color:var(--muted)}
.report-tabs .active{color:var(--accent);font-weight:650;border-bottom:2px solid var(--accent)}
.report-overview-card{padding:20px;margin-bottom:14px}
.report-overview-card h2{margin-bottom:14px}
.report-summary{line-height:1.6}
.report-summary>:first-child{margin-top:0}
.report-summary>:last-child{margin-bottom:0}
.report-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.report-stats article{border:1px solid var(--line);border-radius:var(--r);padding:14px;display:flex;align-items:center;gap:12px}
.report-stats article div{display:flex;flex-direction:column}
.report-stats strong{font-size:24px;font-weight:650;line-height:1.1}
.report-stats article div span{font-size:12.5px;color:var(--muted)}
.stat-icon{width:36px;height:36px;border-radius:var(--r);display:grid;place-items:center;font-weight:800;flex:none}
.stat-icon.neutral{background:var(--surface-3);color:var(--ink-2)}
.stat-icon.success{background:var(--pass-soft);color:var(--pass)}
.stat-icon.danger{background:var(--fail-soft);color:var(--fail)}
.stat-icon.warning{background:var(--block-soft);color:var(--block)}
.checked-tasks{min-width:700px}
.checked-tasks td:nth-child(2){width:46%}
.checked-tasks td:nth-child(2) a{color:var(--ink);font-weight:520}
.report-task-comment-cell{white-space:pre-wrap;min-width:220px}
.report-form{max-width:1120px}
.report-title-editor{display:grid;gap:8px;align-content:start}
.report-generated-title{font-size:18px;font-weight:620;padding:8px 0}
.report-section-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.report-task-editor{display:grid;gap:8px}
.report-task-row{display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(150px,.6fr) minmax(150px,.6fr) 36px;gap:10px;align-items:end;padding:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r)}
.report-task-row label{margin:0}
.report-task-row input[readonly]{background:transparent;border-style:dashed;color:var(--muted)}
.report-task-comment{grid-column:1/-2}
.report-task-comment textarea{min-height:60px}
.remove-row{border-color:var(--line-strong)!important}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* --- Адаптив ------------------------------------------------------------ */
@media (max-width:1100px){
  .overview-grid{grid-template-columns:1fr}
  .feed-panel{grid-column:auto}
  .detail-layout{grid-template-columns:1fr}
  .sticky-panel{position:static}
  .overview-grid .run-feed-main{flex-direction:column;gap:2px}
  .overview-grid .run-feed-main .task-key{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .overview-grid .run-feed-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
}
@media (max-width:900px){
  .topbar-user strong,.topbar-actions .btn-primary span{display:none}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reports-filters{grid-template-columns:1fr 1fr}
  .reports-search{grid-column:1/-1}
  .report-stats{grid-template-columns:1fr 1fr}
  .report-task-row{grid-template-columns:1fr 1fr}
  .report-task-row label:first-child{grid-column:1/-1}
  .activity-chart{gap:4px}
  .activity-label{font-size:10px}
  .task-table thead{display:none}
  .task-table tbody{display:grid}
  .task-table tbody tr{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 10px;padding:10px 12px;border-bottom:1px solid var(--line)}
  .task-table tbody td{display:block!important;width:auto!important;padding:0!important;border:0!important;min-width:0}
  .task-table tbody td:nth-child(1){grid-column:1;grid-row:1/4}
  .task-table tbody td:nth-child(2){grid-column:2;grid-row:1}
  .task-table tbody td:nth-child(3){grid-column:2;grid-row:2/5}
  .task-table tbody td:nth-child(4){grid-column:3;grid-row:1/3;align-self:start}
  .task-table tbody td:nth-child(5){grid-column:3;grid-row:3;align-self:center}
  .task-table tbody td:nth-child(6){grid-column:3;grid-row:4;align-self:end}
  .task-table .task-key{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .task-table .task-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .task-table .inline-tags{max-height:24px;overflow:hidden}
  .task-table .task-runtime-meta{margin-top:3px}
}
@media (max-width:760px){
  :root{--sidebar:64px}
  .brand-name,.nav-link span,.quick-filters,.sidebar-collapse{display:none}
  .nav-link{justify-content:center}
  .topbar{padding:0 12px;gap:8px}
  .global-search{width:auto;flex:1}
  .global-search kbd{display:none}
  .main-content{padding-left:14px;padding-right:14px}
  .page-heading,.detail-header,.report-detail-header,.reports-footer{align-items:flex-start;flex-direction:column}
  .form-grid.two,.form-grid.three,.run-compare{grid-template-columns:1fr}
  .run-heading time{width:100%;margin-left:0}
  .upload-form{flex-direction:column}
  .run-feed li{grid-template-columns:10px minmax(0,1fr) auto}
  .run-feed-env{display:none}
  .overview-grid .run-feed-env{display:block}
  .activity-label{writing-mode:vertical-rl;transform:rotate(180deg);justify-self:center}
}
@media (max-width:600px){
  .stats,.reports-filters,.report-stats,.report-task-row{grid-template-columns:1fr}
  .report-task-row label:first-child{grid-column:auto}
  h1{font-size:22px}
  .topbar-user .avatar{display:none}
  .global-search{display:none}
  .topbar{justify-content:flex-end}
  .activity-panel .section-heading{align-items:flex-start;flex-direction:column}
  .activity-panel .legend{min-width:0;gap:4px 10px}
  .activity-chart{min-width:0;gap:2px}
  .overview-grid .task-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px}
  .overview-grid .task-line .task-key,.overview-grid .task-line-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}
  .overview-grid .task-line .task-key{grid-column:1}.overview-grid .task-line-title{grid-column:1}.overview-grid .task-line .trail,.overview-grid .task-line .pill,.overview-grid .task-line time{grid-column:2;grid-row:auto;justify-self:end}
  .overview-grid .task-line{grid-template-columns:minmax(0,1fr)}
  .overview-grid .task-line .trail,.overview-grid .task-line .pill,.overview-grid .task-line time{grid-column:1;justify-self:start}
  .run-feed li{grid-template-columns:10px minmax(0,1fr);align-items:start}
  .run-feed-main{flex-direction:column;gap:2px}
  .run-feed time{grid-column:2;text-align:left;font-size:11px}
  .task-table tbody tr{grid-template-columns:28px minmax(0,1fr);gap:3px 8px}
  .task-table tbody td:nth-child(1){grid-column:1;grid-row:1/5}
  .task-table tbody td:nth-child(2),.task-table tbody td:nth-child(3){grid-column:2}
  .task-table tbody td:nth-child(4){grid-column:2;grid-row:auto;justify-self:start}
  .task-table tbody td:nth-child(5),.task-table tbody td:nth-child(6){display:none!important}
}

/* --- Настройки (порт прежней вёрстки на токены) ------------------------ */
/* Настройки: Configure surface — компактные списки, явные состояния, минимум декора. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.settings-heading{align-items:flex-start;margin-bottom:18px}.settings-heading .muted{margin:5px 0 0;font-size:13px}
.settings-dashboard{max-width:1440px;margin:0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.settings-card{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:18px}
.settings-filter-card,.settings-sort-card{display:flex;flex-direction:column}.settings-filter-card>form,.settings-sort-card>form{display:flex;flex:1;flex-direction:column}.settings-filter-card .settings-save,.settings-sort-card .settings-save{margin-top:auto}
.settings-saved-card,.settings-tags-card{grid-column:1/-1}.settings-card-header h2{font-size:16px}.settings-card-header p{margin:4px 0 0;color:var(--muted);font-size:12px}
.settings-control-list{border:1px solid var(--line);border-radius:7px;overflow:hidden;margin:16px 0 12px}.settings-control-row{min-height:45px;display:flex;align-items:center;gap:10px;padding:7px 10px;border-bottom:1px solid var(--line)}.settings-control-row:last-child{border-bottom:0}.settings-drag{color:var(--muted);cursor:grab;font-size:16px;line-height:1}.settings-control-name{min-width:0;flex:1;font-weight:600}.settings-state{color:var(--muted);font-size:11px}.settings-switch{position:relative;display:inline-flex}.settings-switch input{position:absolute;opacity:0;pointer-events:none}.settings-switch>span:first-of-type{width:31px;height:18px;border-radius:999px;background:var(--line-strong);position:relative;transition:.15s}.settings-switch>span:first-of-type:after{content:"";position:absolute;width:14px;height:14px;left:2px;top:2px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px rgba(9,30,66,.25);transition:.15s}.settings-switch input:checked+span{background:var(--accent)}.settings-switch input:checked+span:after{transform:translateX(13px)}.settings-switch input:focus-visible+span{outline:3px solid var(--ring);outline-offset:2px}
.settings-order-buttons{display:flex;gap:2px}.settings-order-buttons button,.settings-icon-button{width:28px;height:28px;padding:0;border:0;border-radius:5px;background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer}.settings-order-buttons button:hover,.settings-icon-button:hover{background:var(--surface-3);color:var(--ink)}.settings-order-buttons button:disabled{opacity:.25;cursor:default;background:transparent}.settings-icon-button.active{color:var(--accent);font-weight:800}.settings-icon-button.danger:hover{background:var(--fail-soft);color:var(--fail)}.settings-save{width:100%;min-height:36px}
.settings-default-radio{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:10px;white-space:nowrap}.settings-default-radio input{accent-color:var(--accent)}
.settings-create-set{margin-top:15px}.settings-create-main{display:flex;gap:8px;max-width:370px}.settings-create-main input,.settings-set-fields input,.settings-set-fields select,.settings-inline-editor input,.settings-create-tag input{min-height:36px;border:1px solid var(--line-strong);border-radius:6px;padding:6px 9px;background:var(--surface)}.settings-create-main input{flex:1;min-width:0}.settings-set-options{margin-top:9px}.settings-set-options>summary{width:max-content;color:var(--accent);font-size:12px;cursor:pointer}.settings-set-fields{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:8px;margin-top:10px;padding:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:7px}.settings-check{display:flex;align-items:center;gap:7px;font-size:12px}
.settings-saved-list{border:1px solid var(--line);border-radius:7px;overflow:visible;margin-top:14px}.settings-saved-row{min-height:59px;display:flex;align-items:center;gap:11px;padding:9px 12px;border-bottom:1px solid var(--line);position:relative}.settings-saved-row:last-child{border-bottom:0}.settings-set-icon{width:26px;height:26px;border-radius:6px;background:var(--surface-3);color:var(--ink-2);display:grid;place-items:center}.settings-set-copy{flex:1;min-width:0}.settings-set-copy>div{display:flex;align-items:center;gap:7px}.settings-set-copy small{display:block;color:var(--muted);font-size:11px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-default-badge{padding:2px 6px;border:1px solid var(--accent-line);border-radius:4px;color:var(--accent);background:var(--accent-soft);font-size:9px;font-weight:600}.settings-row-actions{display:flex;align-items:center;gap:2px}.settings-row-actions form{margin:0}.settings-inline-editor{position:relative}.settings-inline-editor>summary{list-style:none}.settings-inline-editor>summary::-webkit-details-marker{display:none}.settings-inline-editor[open]>form{position:absolute;right:0;top:34px;z-index:5;display:flex;gap:7px;align-items:center;padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow);min-width:300px}.settings-empty{padding:22px;text-align:center;color:var(--muted)}
.settings-tags-card{padding-bottom:10px}.settings-tags-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.settings-tag-tools{display:flex;align-items:flex-start;gap:8px}.settings-tag-search{height:36px;width:220px;border:1px solid var(--line-strong);border-radius:6px;display:flex;align-items:center;gap:7px;padding:0 9px;color:var(--muted)}.settings-tag-search input{min-width:0;width:100%;border:0;outline:0;background:transparent}.settings-create-tag{position:relative}.settings-create-tag>summary{list-style:none}.settings-create-tag>summary::-webkit-details-marker{display:none}.settings-create-tag[open]>form{position:absolute;right:0;top:43px;z-index:5;display:flex;gap:7px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow)}.settings-create-tag input[type=color]{width:38px;padding:3px}
.settings-tag-tabs{display:flex;gap:18px;margin-top:18px;border-bottom:1px solid var(--line)}.settings-tag-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:8px 1px;color:var(--muted);font-weight:600;cursor:pointer}.settings-tag-tabs button.active{color:var(--accent);border-color:var(--accent)}.settings-tag-tabs span{margin-left:4px;padding:1px 5px;border-radius:999px;background:var(--surface-3);font-size:10px}.settings-tag-table-wrap{overflow-x:auto}.settings-tag-table{width:100%;border-collapse:collapse;min-width:670px}.settings-tag-table th{height:39px;text-align:left;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line)}.settings-tag-table td{height:45px;border-bottom:1px solid var(--line);color:var(--ink-2)}.settings-tag-table th:first-child,.settings-tag-table td:first-child{padding-left:8px;width:36%}.settings-tag-table th:last-child,.settings-tag-table td:last-child{text-align:right;padding-right:5px}.settings-tag-table td.settings-empty{text-align:center;padding:22px}.settings-tag-table .tag-actions{justify-content:flex-end}.settings-tag-color{display:block;width:12px;height:12px;border-radius:50%;background:var(--tag-color)}.settings-tag-status{display:inline-flex;padding:3px 7px;border-radius:4px;font-size:10px;font-weight:700}.settings-tag-status.active{background:var(--pass-soft);color:var(--pass)}.settings-tag-status.hidden{background:var(--surface-3);color:var(--muted)}.settings-tag-table tr[hidden]{display:none}
@media(max-width:900px){.settings-dashboard{grid-template-columns:1fr}.settings-saved-card,.settings-tags-card{grid-column:auto}.settings-set-fields{grid-template-columns:repeat(2,minmax(130px,1fr))}}
@media(max-width:650px){.settings-tags-heading,.settings-tag-tools{flex-direction:column}.settings-tag-tools,.settings-tag-search{width:100%}.settings-control-row{gap:7px}.settings-state,.settings-default-radio span{display:none}.settings-set-fields{grid-template-columns:1fr}.settings-create-main{max-width:none}.settings-saved-row{align-items:flex-start}.settings-inline-editor[open]>form{position:fixed;left:14px;right:14px;top:30%;min-width:0}.settings-set-copy small{white-space:normal}}

/* --- Скриншоты прогона -------------------------------------------------- */
.shot-badge{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border:1px solid var(--line-strong);border-radius:999px;color:var(--ink-2);font-size:12px;line-height:1}
.shot-badge svg{width:14px;height:14px;display:block}
.shot-badge b{font-weight:600}
.shot-strip{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
.shot-thumb{padding:0;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);cursor:zoom-in;overflow:hidden;line-height:0}
.shot-thumb:hover{border-color:var(--accent)}
/* object-position:top — Гермес снимает страницу целиком, «простынёй». В превью полезен
   верх страницы: по нему кадр узнаётся, а середина длинной простыни неинформативна. */
.shot-thumb img{width:132px;height:88px;object-fit:cover;object-position:top;display:block}
/* Диалог на весь экран: тогда кнопки позиционируются относительно него, а не вьюпорта,
   и на узких экранах ничего не разъезжается. */
.shot-viewer{width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:100dvh;margin:0;border:0;padding:0;background:transparent;overflow:hidden}
.shot-viewer[open]{display:grid;grid-template-rows:1fr auto}
.shot-viewer::backdrop{background:rgba(9,15,26,.88)}
/* Простыню вписываем ПО ШИРИНЕ и скроллим по вертикали. Если ограничить высоту,
   картинка в десять тысяч пикселей сожмётся в нечитаемую полоску. */
.shot-stage{overflow:auto;display:grid;place-items:start center;padding:56px 16px 8px}
.shot-stage img{max-width:min(1280px,100%);width:auto;height:auto;display:block;border-radius:8px;background:var(--surface)}
.shot-caption{margin:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));text-align:center;color:#e6ebf2;font-size:13px;background:rgba(9,15,26,.6)}
.shot-close,.shot-nav{position:absolute;border:0;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;border-radius:8px}
.shot-close{top:12px;right:12px;width:38px;height:38px;font-size:16px}
.shot-nav{top:calc(50% - 32px);width:40px;height:64px;font-size:30px;line-height:1}
.shot-prev{left:12px}
.shot-next{right:12px}
.shot-close:hover,.shot-nav:hover{background:rgba(255,255,255,.26)}
@media(max-width:600px){.shot-thumb img{width:96px;height:66px}.shot-stage{padding:52px 8px 6px}.shot-nav{width:34px;height:52px;font-size:24px}.shot-prev{left:6px}.shot-next{right:6px}.shot-close{top:8px;right:8px;width:34px;height:34px}}


/* Страница входа. Оформлена по макету uKit (Андрей собрал в Claude design).
   Токены объявлены НА .lp-page, а не в :root: имена вроде --white и --radius-*
   пересекаются с панельными, и в глобальной области они поехали бы внутрь панели.
   Шрифт Inter сознательно не тащим — в стеке uKit прописан системный фолбэк. */
.lp-page{
  --lp-blue-500:#3D8BEE;--lp-blue-600:#1F6FD4;--lp-blue-700:#1556A6;
  --lp-gray-100:#ECEEF0;--lp-gray-200:#DADDE1;--lp-gray-300:#BFC3C9;--lp-gray-400:#A4A9B0;
  --lp-gray-500:#878D95;--lp-gray-600:#6B7178;--lp-gray-800:#3D4248;--lp-gray-900:#21201F;
  --lp-coral-100:#FFEBE8;--lp-coral-700:#C2331F;
  --lp-font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --lp-ring:0 0 0 3px rgba(61,139,238,.35);
  margin:0;min-height:100vh;min-height:100dvh;display:grid;place-items:center;
  padding:40px 24px;background:var(--lp-gray-100);font-family:var(--lp-font);color:var(--lp-gray-900)
}
.lp-shell{width:100%;max-width:384px;display:flex;flex-direction:column;gap:28px}
.lp-head{display:flex;flex-direction:column;gap:14px;align-items:center;text-align:center}
.lp-mark{display:block}
.lp-title{margin:0;font-size:28px;line-height:34px;font-weight:600;letter-spacing:-.01em}
.lp-card{background:#fff;border:1px solid var(--lp-gray-200);border-radius:20px;padding:28px}
.lp-error{margin:0 0 18px;background:var(--lp-coral-100);color:var(--lp-coral-700);border-radius:12px;padding:11px 14px;font-size:14px;line-height:20px}
.lp-form{display:flex;flex-direction:column;gap:18px}
.lp-field{display:flex;flex-direction:column;gap:8px}
.lp-label{font-size:14px;line-height:18px;font-weight:500;color:var(--lp-gray-800)}
.lp-input{width:100%;min-height:48px;padding:0 14px;border:1px solid var(--lp-gray-300);border-radius:12px;background:#fff;font:400 16px/24px var(--lp-font);color:var(--lp-gray-900);outline:0}
.lp-input::placeholder{color:var(--lp-gray-400)}
.lp-input:hover{border-color:var(--lp-gray-400)}
.lp-input:focus{border-color:var(--lp-blue-500);box-shadow:var(--lp-ring)}
.lp-reveal{align-self:flex-start;padding:0;border:0;background:none;cursor:pointer;font:500 12px/16px var(--lp-font);color:var(--lp-gray-600)}
.lp-reveal:hover{color:var(--lp-gray-800)}
.lp-submit{margin-top:4px;width:100%;min-height:48px;border:0;border-radius:12px;background:var(--lp-blue-500);color:#fff;font:500 16px/20px var(--lp-font);letter-spacing:.01em;cursor:pointer}
.lp-submit:hover{background:var(--lp-blue-600)}
.lp-submit:active{background:var(--lp-blue-700)}
.lp-submit:focus-visible{box-shadow:var(--lp-ring)}
.lp-note{margin:0;text-align:center;font-size:12px;line-height:16px;color:var(--lp-gray-500)}

/* Настройки: глобальные отступы полей формы здесь мешают выравниванию в строках. */
.settings-control-row label,.settings-default-radio,.settings-switch{margin:0}
.settings-create-main input,.settings-set-fields input,.settings-set-fields select,.settings-inline-editor input,.settings-create-tag input{margin:0}
.settings-tag-search input{margin:0;padding:0;min-height:0;border:0;box-shadow:none!important}
.settings-tag-table th{text-transform:none!important;letter-spacing:0!important;font-size:12px!important;font-weight:550}
.settings-set-options>summary,.settings-check{margin:0}
.reports-table th:last-child{text-align:right}
.overview-grid>*,.detail-layout>*{min-width:0}
@media (max-width:600px){
  .task-line .trail{display:none}
  .task-line .task-key{min-width:0}
  .task-line,.report-line{flex-wrap:wrap;row-gap:4px}
  .task-line-title,.report-line-title{order:3;flex-basis:100%;white-space:normal}
  .sort-select{flex:1 1 100%}
  .sort-select select{flex:1;width:100%}
  .legend{gap:4px 10px}
}

/* Пагинация списка задач */
.list-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pagination-gap{min-width:24px;text-align:center;color:var(--muted)}
.page-size{margin:0}
.page-size label{display:flex;align-items:center;gap:8px;margin:0;font-weight:500;color:var(--muted);font-size:12px}
.page-size select{margin:0;width:auto;min-height:30px;padding:2px 26px 2px 8px;font-size:12px}

/* Снимок статусов в отчёте */
.snapshot-note{margin:10px 0 0;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:7px}
.snapshot-note::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--other);flex:none}
.snapshot-note.is-frozen::before{border-radius:2px;background:var(--accent)}
.now-hint{display:block;margin-top:4px;font-size:12px;color:var(--muted)}
.report-task-row .now-hint{margin-top:3px}
