:root {
  --bg: #f6fafb;
  --surface: #ffffff;
  --surface-soft: #f4f8f9;
  --text: #15212a;
  --muted: #606a74;
  --line: #dce2e6;
  --nav: #111c26;
  --nav-2: #28343f;
  --blue: #00737e;
  --blue-hover: #005e68;
  --cyan: #16c8db;
  --bad: #b42336;
  --bad-bg: #fff1f2;
  --ok: #18774d;
  --ok-bg: #edfbf3;
  --warn-bg: #fff9e9;
  --shadow: 0 1px 2px rgba(21, 33, 42, .05), 0 1px 1px rgba(21, 33, 42, .03);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(0, 115, 126, .28); outline-offset: 3px; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 36px); line-height: 1.2; letter-spacing: -.045em; font-weight: 760; }
h2 { line-height: 1.3; }
p { margin: 0 0 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.app-shell--guest { grid-template-columns: minmax(0, 1fr); }
.sidebar { z-index: 2; position: sticky; top: 0; height: 100vh; padding: 27px 16px 23px; background: var(--nav); display: flex; flex-direction: column; color: #f1f6ff; }
.brand { display: flex; align-items: center; gap: 12px; padding: 3px 12px 39px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-icon { flex: 0 0 42px; border-radius: 12px; box-shadow: 0 8px 22px rgba(6,13,34,.3); }
.brand-type { display: flex; flex-direction: column; line-height: 1.14; }
.brand-type strong { font-size: 21px; letter-spacing: -.06em; font-weight: 800; }
.brand-type strong span, .topbar-brand strong span { color: #71dbe9; }
.brand-type small { margin-top: 5px; color: #8d9aa5; font-size: 11px; letter-spacing: .06em; }
.sidebar-section-label { padding: 0 18px 11px; color: #7d8993; font-size: 11px; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; }
.side-nav { display: grid; gap: 7px; }
.nav-item { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; padding: 12px 14px; color: #bcc7cf; border-radius: 11px; font-weight: 650; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav-item.is-active { background: #294779; color: #fff; border-color: rgba(136,184,255,.16); }
.nav-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.07); font-size: 19px; line-height: 1; }
.nav-icon--plus { font-size: 24px; }
.nav-item.is-active .nav-icon { color: #fff; background: rgba(94,160,255,.3); }
.sidebar-grow { flex: 1; min-height: 28px; }
.sidebar-note { border: 1px solid rgba(144,177,228,.17); background: #1b2c4b; border-radius: 14px; padding: 17px; }
.sidebar-note-label { display: block; font-size: 12px; font-weight: 750; color: #a3e2f0; }
.sidebar-note p { font-size: 12px; line-height: 1.55; margin: 8px 0 14px; color: #c4d0e4; }
.sidebar-note-chip { display: inline-block; padding: 4px 9px; color: #b8d2f9; border-radius: 7px; background: rgba(65, 133, 244, .15); font-size: 11px; font-weight: 700; }
.sidebar-site-link { display: flex; justify-content: space-between; color: #8d9aa5; margin: 16px 13px 0; font-size: 12px; }
.sidebar-site-link:hover { color: white; }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 13px clamp(22px,4vw,52px); border-bottom: 1px solid var(--line); background: #fff; gap: 16px; }
.topbar-title { display: flex; flex-direction: column; gap: 1px; }
.topbar-kicker { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.topbar-title strong { letter-spacing: -.02em; font-size: 14px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 20px; min-width: 0; }
.plan-pill { display: inline-block; border-radius: 8px; background: #e1f0f2; border: 1px solid #c4e0e4; color: #00525c; padding: 5px 10px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.user-email { font-size: 13px; color: #4b5963; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
form.inline { display: inline; margin: 0; }
button.topbar-logout { padding: 0; margin: 0; background: none; border: 0; color: #606a74; box-shadow: none; font-size: 13px; font-weight: 650; cursor: pointer; }
button.topbar-logout:hover { color: var(--blue); }
.topbar-brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.topbar-brand:hover { text-decoration: none; }
.topbar-brand strong { font-size: 22px; letter-spacing: -.06em; font-weight: 850; }
.topbar-brand strong span { color: #00737e; }
.topbar-external { font-weight: 650; font-size: 13px; }
.main-content { flex: 1; padding: 40px clamp(22px, 4vw, 52px) 64px; width: min(100%, 1440px); margin: 0 auto; }
.app-footer { padding: 18px clamp(22px, 4vw, 52px); display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #7d8993; font-size: 12px; gap: 15px; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--blue); font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .13em; }
.eyebrow--light { color: #73dceb; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 26px; }
.page-heading .lead { margin: 0; max-width: 660px; }
.lead { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 23px; }
.page-tag { display: flex; align-items: center; gap: 7px; white-space: nowrap; margin-top: 8px; color: #00525c; background: #e1f0f2; border: 1px solid #c4e0e4; border-radius: 22px; padding: 7px 12px; font-size: 12px; font-weight: 750; }
.page-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #19bbcf; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.step { display: flex; gap: 12px; align-items: center; border-radius: 12px; background: #f1f6f8; border: 1px solid #dce2e6; padding: 12px 14px; min-width: 0; }
.step-number { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: #cfe6ea; font-weight: 800; font-size: 13px; }
.step strong { display: block; font-size: 12px; }
.step small { display: block; color: var(--muted); font-size: 11px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(255px,1fr); gap: 22px; align-items: start; }
.main-column, .info-column { min-width: 0; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; margin-bottom: 20px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.panel-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #e1f0f2; color: var(--blue); font-size: 24px; font-weight: 700; }
.panel-heading h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.025em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.panel h2, .card h2 { margin: 0 0 12px; }
.panel-title { margin: 0 0 12px; font-size: 16px; font-weight: 750; }
.panel-subtitle { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.upload-zone { display: block; border: 1.5px dashed #9fc2c8; background: #f6fafb; border-radius: 13px; padding: 23px; margin-bottom: 14px; }
.upload-zone label { margin: 0 0 9px; font-weight: 700; }
.upload-zone .hint { margin: 9px 0 0; }
label { display: block; font-weight: 700; margin: 16px 0 6px; font-size: 13px; color: #2f3d48; }
input[type=text], input[type=file], select { width: 100%; padding: 11px 13px; border: 1px solid #d1d9dd; border-radius: 9px; background: #fff; color: var(--text); }
input[type=file] { padding: 11px; background: white; font-size: 13px; }
input[type=file]::file-selector-button { background: #e1f0f2; color: #00525c; border: 0; border-radius: 7px; padding: 7px 12px; font: inherit; font-weight: 750; cursor: pointer; margin-right: 12px; }
input[type=text]:focus, select:focus, input[type=file]:focus { border-color: #4fa3ab; }
.hint { color: var(--muted); font-size: 12px; margin: 5px 0 0; line-height: 1.55; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 17px 0; border: 1px solid #e3e9ec; border-radius: 10px; padding: 13px 15px; background: #f8fbfc; }
.check input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--blue); }
.check label { margin: 0; font-weight: 700; cursor: pointer; }
.check .hint { margin: 3px 0 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 9px; padding: 11px 20px; background: var(--blue); color: #fff; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; transition: background .18s, border-color .18s, transform .18s; }
button:hover, .btn:hover { background: var(--blue-hover); color: white; text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary { background: #fff; border-color: #d1d9dd; color: #2f3d48; }
button.secondary:hover, .btn.secondary:hover { border-color: #6fb0b8; background: #eef5f6; color: #00656f; }
.btn.small { font-size: 12px; padding: 7px 12px; }
.info-column .panel { padding: 22px; }
.output-list { list-style: none; margin: 0; padding: 0; }
.output-list li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #e6ecef; font-size: 12px; }
.output-list li:last-child { border-bottom: 0; }
.output-icon { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #e1f0f2; color: #00737e; font-weight: 800; font-size: 12px; }
.output-list strong { display: block; font-size: 13px; }
.output-list small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; }
.future-card { background: #142748; border-color: #142748; color: white; overflow: hidden; position: relative; }
.future-card::after { content: ""; position: absolute; right: -65px; top: -65px; border: 1px solid rgba(108,206,237,.19); width: 160px; height: 160px; border-radius: 50%; pointer-events: none; }
.future-card h3 { margin: 0 0 8px; font-size: 16px; }
.future-card p { font-size: 12px; color: #c7d6e9; line-height: 1.7; margin: 0 0 14px; }
.future-pill { display: inline-block; padding: 4px 9px; margin-bottom: 14px; border-radius: 7px; background: rgba(44,203,219,.17); color: #8ce8f2; font-size: 11px; font-weight: 800; }
.inline-link { color: #85ddf4; font-weight: 700; font-size: 12px; }
.errors { background: var(--bad-bg); border: 1px solid #f2bec6; color: #7e1c31; border-radius: 13px; padding: 16px 19px; margin: 0 0 20px; }
.errors h2 { margin: 0 0 8px; font-size: 15px; color: var(--bad); }
.errors ul, .warnings ul { margin: 0; padding-left: 20px; }
.quota { background: #eef7f6; border: 1px solid #c4e3df; color: #1f4a47; border-radius: 12px; padding: 12px 17px; margin: 0 0 18px; line-height: 1.55; }
.quota.is-low { background: var(--warn-bg); border-color: #f5df9d; color: #6b5209; }
.quota.is-empty { background: var(--bad-bg); border-color: #f2bec6; color: #7e1c31; }
.errors .where { color: #955b63; font-weight: 700; }
.errors li + li, .warnings li + li { margin-top: 5px; }
.warnings { background: var(--warn-bg); border: 1px solid #f5df9d; border-radius: 12px; padding: 15px 18px; margin: 17px 0; }
.warnings h2 { margin: 0 0 6px; font-size: 14px; color: #80610d; }
.ok { color: var(--ok); font-weight: 800; }
.success-box { padding: 15px 18px; border: 1px solid #c6edd6; border-radius: 11px; background: var(--ok-bg); margin-bottom: 20px; }
.success-box p { margin: 0 0 5px; }
.success-box .muted { margin: 0; font-size: 13px; }
.bad { color: var(--bad); font-weight: 700; }
.muted { color: var(--muted); }
.h2 { margin: 0 0 12px; font-size: 19px; }
.h3 { font-size: 15px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; margin: 0 0 10px; padding: 6px 12px; border-radius: 24px; background: #e1f0f2; color: #00525c; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.done { color: #1f7a40; background: #e4f4ea; }
.status.running { color: #00525c; background: #e1f0f2; }
.status.queued { color: #7a5a12; background: #fff3d5; }
.status.error, .status.timeout, .status.canceled { color: var(--bad); background: var(--bad-bg); }
.job-summary { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 22px; align-items: start; }
.job-status-panel { min-height: 220px; }
.job-status-panel h2 { margin: 0 0 14px; }
.job-status-panel .form-actions form { margin: 0; }
.job-meta-panel { background: #f8fbfc; }
dl { display: grid; grid-template-columns: minmax(100px,140px) minmax(0,1fr); gap: 9px 15px; margin: 0; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.job-detail-text { color: #3d4b56; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e3e9ec; vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
td a { color: var(--blue); font-weight: 650; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.download-table td { padding: 13px 3px; }
.schemes-project { padding: 0; overflow: hidden; }
.schemes-project-title { margin: 0; padding: 22px 24px; font-size: 19px; background: #f4f8f9; border-bottom: 1px solid var(--line); }
.contour-block { padding: 18px 24px 24px; }
.contour-block + .contour-block { border-top: 1px solid var(--line); }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 11px; }
.row-head .h3 { margin: 0; }
.mini-version {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #e1f0f2;
  color: #00525c;
  font-weight: 800;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; /* v3, v12, v123, v1000 — ширина растёт по содержимому */
}
.mini-version--latest { background: #cfe6ea; color: #003c46; box-shadow: inset 0 0 0 1px #9fc9cf; }
.mini-version--latest::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #16a66d;
}
.schemes-table td:first-child, .schemes-table th:first-child { padding-left: 12px; }
.empty-state { text-align: center; max-width: 560px; padding: 50px 30px; margin: 0 auto; }
.empty-state-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 17px; border-radius: 16px; background: #e1f0f2; color: var(--blue); font-size: 28px; }
.empty-state p { color: var(--muted); margin-bottom: 19px; }
.auth-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px, .8fr); background: #fff; min-height: 610px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.auth-intro { color: white; background: radial-gradient(circle at 80% 10%, #25528f, transparent 55%), #102440; padding: clamp(30px, 4vw, 66px); position: relative; overflow: hidden; }
.auth-intro h1 { max-width: 480px; font-size: clamp(32px, 3.4vw, 46px); margin-bottom: 18px; }
.auth-intro p { color: #bed0e8; max-width: 440px; font-size: 14px; }
.auth-topology { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 56px; }
.auth-zone { min-width: 125px; padding: 13px; display: flex; flex-direction: column; gap: 9px; border: 1px dashed #4b77a9; border-radius: 12px; background: #1b3659; }
.auth-zone > span { color: #81deef; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.auth-zone b { border: 1px solid #3e6290; border-radius: 7px; padding: 8px; font-size: 11px; font-weight: 550; color: #eef5f6; background: #25446e; text-align: center; }
.auth-footnote { margin-top: 24px; font-size: 11px; color: #9db9d7; }
.auth-form-column { display: flex; align-items: center; justify-content: center; padding: 30px; }
.auth-form-panel { width: min(100%,420px); }
.auth-form-panel h2 { font-size: 29px; margin: 0 0 10px; letter-spacing: -.04em; }
.auth-form-panel h1 { font-size: 29px; margin: 0 0 10px; }
.auth-form-panel .lead { margin-bottom: 27px; }
.auth-form-panel label { margin-bottom: 7px; }
.auth-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; margin-bottom: 26px; color: #00656f; background: #e1f0f2; font-size: 25px; }
.auth-safe { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.btn-wide { width: 100%; margin-top: 22px; justify-content: space-between; }
.auth-confirm { display: flex; justify-content: center; padding: 90px 24px; }
.auth-confirm .auth-form-panel { padding: 40px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth-confirm .auth-form-panel h1 { font-size: 27px; }
@media (max-width: 1150px) {
  .content-grid { grid-template-columns: minmax(0,1.6fr) minmax(240px,1fr); }
  .job-summary { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 20px; flex-direction: row; align-items: center; gap: 16px; }
  .sidebar .brand { padding: 0; }
  .sidebar-section-label, .sidebar-grow, .sidebar-note, .sidebar-site-link, .brand-type small { display: none; }
  .side-nav { display: flex; margin-left: auto; }
  .nav-item { padding: 8px 10px; font-size: 12px; }
  .nav-icon { width: 25px; height: 25px; flex-basis: 25px; font-size: 17px; }
  .topbar { min-height: 60px; }
}
@media (max-width: 700px) {
  .main-content { padding: 25px 16px 45px; }
  .topbar { padding: 10px 16px; min-height: 61px; }
  .topbar-kicker { display: none; }
  .topbar-right { gap: 12px; }
  .user-email { max-width: 140px; font-size: 11px; }
  .page-heading { display: block; }
  .page-tag { display: inline-flex; margin-top: 14px; }
  .steps { gap: 7px; }
  .step { gap: 8px; padding: 10px 9px; }
  .step small { display: none; }
  .step strong { font-size: 11px; }
  .step-number { width: 25px; flex-basis: 25px; height: 25px; }
  .content-grid, .job-summary { grid-template-columns: 1fr; }
  .panel, .card { padding: 20px; border-radius: 13px; }
  .info-column { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .info-column .panel { padding: 18px; margin-bottom: 0; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { padding: 32px; }
  .auth-intro h1 { font-size: 30px; }
  .auth-topology { margin-top: 25px; }
  .auth-zone { min-width: 100px; padding: 9px; }
  .auth-form-column { padding: 36px 24px; }
  .auth-confirm { padding: 32px 0; }
  .app-footer { padding: 16px; }
}
@media (max-width: 480px) {
  .sidebar { padding: 12px 13px; }
  .brand { gap: 7px; }
  .brand-icon { width: 32px; height: 32px; }
  .brand-type strong { font-size: 17px; }
  .nav-item { gap: 4px; padding: 7px; }
  .nav-item .nav-icon { display: none; }
  .nav-item span:last-child { font-size: 11px; }
  .user-email { display: none; }
  .topbar-title strong { font-size: 12px; }
  .plan-pill { font-size: 11px; }
  .info-column { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
  .step { justify-content: center; text-align: center; }
  .step-number { display: none; }
  .page-heading h1 { font-size: 29px; }
  .row-head { align-items: flex-start; }
  .row-head .btn { flex-shrink: 0; }
  dl { grid-template-columns: 100px minmax(0,1fr); }
  .form-actions > button, .form-actions > .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

/* Удаление схемы: действие предусмотрено только для завершённых задач. */
.btn.danger-outline, button.danger-outline { color:#b42336; border-color:#f1b5c2; background:#fff; }
.btn.danger-outline:hover, button.danger-outline:hover { background:#fff2f4; color:#a41c30; border-color:#e89baa; }
.btn.danger, button.danger { background:#b42336; border-color:#b42336; color:#fff; }
.btn.danger:hover, button.danger:hover { background:#941a2a; color:#fff; }
a.del { color:#b42336; font-weight:700; }
.delete-action { margin-top: 20px; display:flex; justify-content:flex-end; }


/* Каталог: масштабируется на десятки проектов без длинной ленты таблиц. */
.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;
}
.schemes-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 0 0 20px; flex-wrap: wrap;
}
.schemes-search { display: flex; align-items: center; gap: 9px; flex: 1 1 320px; min-width: 0; }
.schemes-search input[type="search"] {
  width: min(100%, 425px); min-width: 0; padding: 11px 14px;
  background: #fff; border: 1px solid #d1d9dd; border-radius: 10px;
  color: var(--text); font: inherit; flex: 1 1 auto;
}
.schemes-search input[type="search"]:focus { border-color: #4fa3ab; }
.schemes-search button { white-space: nowrap; }
.schemes-reset { font-size: 12px; font-weight: 650; white-space: nowrap; }
.schemes-count { color: var(--muted); font-weight: 650; font-size: 12px; white-space: nowrap; }
.schemes-accordion {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 11px; box-shadow: var(--shadow); overflow: hidden;
}
.schemes-accordion-head {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px;
  cursor: pointer; list-style: none; user-select: none;
}
.schemes-accordion-head::-webkit-details-marker { display: none; }
.schemes-accordion-head::marker { content: ""; }
.schemes-accordion-head:focus-visible { outline: 3px solid #6fb0b8; outline-offset: -3px; }
.schemes-accordion-head:hover { background: #f4f8f9; }
.schemes-accordion[open] .schemes-accordion-head { background: #f4f8f9; }
.schemes-project-glyph {
  flex: 0 0 42px; width: 42px; height: 42px; display: grid;
  place-items: center; border-radius: 11px; color: var(--blue);
  background: #e1f0f2; font-size: 22px;
}
.schemes-project-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.schemes-project-info strong { font-size: 16px; font-weight: 780; overflow-wrap: anywhere; }
.schemes-project-info small { color: var(--muted); font-size: 12px; }
.schemes-expander {
  flex: 0 0 28px; width: 28px; height: 28px; display: grid;
  place-items: center; border-radius: 8px; background: #ebf1f4;
  color: #606a74; font-size: 23px; line-height: 1;
  transition: transform .18s;
}
.schemes-accordion[open] .schemes-expander { transform: rotate(180deg); }
.schemes-accordion-body { border-top: 1px solid var(--line); }
.schemes-accordion .contour-block { padding: 16px 22px 22px; }
.schemes-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 16px; margin-top: 24px; font-size: 13px; color: var(--muted);
}
@media (max-width: 580px) {
  .schemes-search { flex-basis: 100%; }
  .schemes-count { width: 100%; }
  .schemes-accordion-head { padding: 13px 14px; gap: 11px; }
  .schemes-project-glyph { width: 34px; height: 34px; flex-basis: 34px; font-size: 18px; }
  .schemes-project-info strong { font-size: 14px; }
  .schemes-accordion .contour-block { padding: 14px 12px 18px; }
}


/* Иерархия проекта: независимые сворачиваемые контуры (Prod, Preprod, Dev и свои названия). */
.schemes-accordion .contour-accordion {
  padding: 0;
  border-top: 1px solid #e3e9ec;
}
.contour-accordion:first-child { border-top: 0; }
.contour-summary {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; padding: 14px 22px;
  list-style: none; user-select: none;
}
.contour-summary::marker { content: ""; }
.contour-summary::-webkit-details-marker { display: none; }
.contour-summary:hover { background: #f4f8f9; }
.contour-summary:focus-visible { outline: 3px solid #6fb0b8; outline-offset: -3px; }
.contour-name { font-weight: 750; color: #26333d; font-size: 14px; }
.contour-latest { margin-left: auto; color: var(--muted); font-size: 12px; }
.contour-chevron { font-size: 20px; color: #7d8993; line-height: 1; }
.contour-accordion[open] .contour-chevron { transform: rotate(180deg); }
.contour-content { padding: 0 22px 19px; }
.contour-content .row-head { padding: 4px 0 12px; font-size: 12px; }
@media (max-width: 580px) {
  .contour-summary { padding: 12px 13px; }
  .contour-content { padding: 0 12px 15px; }
  .contour-latest { font-size: 11px; }
}

/* Новый контур создаётся внутри существующего проекта. */
.project-toolbar { display:flex; justify-content:flex-end; padding:12px 22px; border-bottom:1px solid var(--line); background:#fff; }
@media(max-width:580px){.project-toolbar{padding:11px 13px;}}

/* Приватность архива: подпись над карточками без декоративного контейнера. */
.owner-note { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; margin: -2px 0 15px; }
.owner-note-dot { flex: 0 0 7px; height: 7px; width: 7px; border-radius: 50%; background: #159960; }


/* ---------------------------------------------------------------- Каталог v5
   Одна синяя кнопка на экране («Новая схема»); «Открыть vN» в строке контура;
   «Удалить» — в меню «⋯»; под номером версии — «7 ч назад» (точное время в title);
   цветные метки контуров. Без JavaScript: раскрытие и меню на <details>. */
.schemes-private { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.schemes-private .lock-icon { flex: 0 0 auto; }

/* Карточка проекта: меню «⋯» не должно обрезаться. */
.schemes-accordion { overflow: visible; }
.schemes-accordion-head { border-radius: 14px; gap: 12px; }
.schemes-accordion[open] > .schemes-accordion-head { border-radius: 14px 14px 0 0; }
.schemes-expander { order: -1; background: transparent; transform: rotate(-90deg); }
.schemes-accordion[open] .schemes-expander { transform: none; }

/* Строка контура */
.contour-row { position: relative; border-top: 1px solid #e3e9ec; }
.contour-row:first-child { border-top: 0; }
.schemes-accordion .contour-row .contour-accordion { border-top: 0; }
.contour-summary { min-height: 58px; box-sizing: border-box; flex-wrap: wrap; gap: 6px 12px; }
.contour-row--with-open .contour-summary { padding-right: 168px; }
.contour-chevron { width: 20px; text-align: center; transform: rotate(-90deg); transition: transform .18s; }
.contour-accordion[open] .contour-chevron { transform: none; }
.contour-tag {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere;
  background: #ebf1f4; color: #3d4b56;
}
.contour-tag--prod    { background: #fde8ea; color: #a3172d; }
.contour-tag--preprod { background: #efe9fe; color: #5b2fb8; }
.contour-tag--load    { background: #ffedd5; color: #9a3412; }
.contour-tag--test    { background: #ddf3f0; color: #0f6158; }
.contour-tag--dev     { background: #ebf1f4; color: #2f3d48; }
.contour-tag--dr      { background: #e1f0f2; color: #00656f; }
.contour-latest { margin-left: 0; font-size: 13px; color: var(--muted); }
.contour-open {
  position: absolute; top: 11px; right: 22px; height: 36px; padding: 0 13px;
  display: inline-flex; align-items: center; gap: 6px; border-radius: 9px;
  background: #e1f0f2; color: #00656f; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.contour-open:hover { background: #cfe6ea; color: #003c46; text-decoration: none; }
.contour-content { padding: 0 22px 18px 54px; }
.contour-content .row-head { padding: 2px 0 10px; }
.row-head-title { font-size: 13px; font-weight: 700; color: #26333d; }
.contour-add {
  display: flex; justify-content: center; align-items: center; margin: 4px 22px 16px;
  padding: 11px; border: 1.5px dashed #c3ced4; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: #00656f;
}
.contour-add:hover { border-color: #6fb0b8; background: #eef5f6; text-decoration: none; }

/* Таблица версий */
.schemes-accordion .table-wrap { overflow: visible; }
.schemes-table { border: 1px solid var(--line); border-radius: 11px; border-collapse: separate; border-spacing: 0; }
.schemes-table th { background: #f4f8f9; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; padding: 9px 12px; }
.schemes-table th:first-child { border-top-left-radius: 11px; }
.schemes-table th:last-child { border-top-right-radius: 11px; }
.schemes-table td { padding: 10px 12px; }
.schemes-table tr.latest-row td { background: #fff; }
.schemes-table .num { font-variant-numeric: tabular-nums; font-weight: 650; }
.num-label { display: none; }
.version-cell { white-space: nowrap; }
.version-line { display: flex; align-items: center; gap: 8px; }
.version-name { font-weight: 750; color: #26333d; font-variant-numeric: tabular-nums; }
.version-badge { padding: 1px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700; }
.version-ago { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.file-cell { max-width: 0; width: 45%; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2f3d48; }
.row-actions { display: inline-flex; align-items: center; gap: 2px; }
.row-open { padding: 7px 10px; border-radius: 8px; font-weight: 700; }
.row-open:hover { background: #e1f0f2; text-decoration: none; }

/* Меню «⋯» */
.row-menu { position: relative; }
.row-menu > summary {
  list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; color: #4b5963; font-size: 18px; font-weight: 800; line-height: 1;
}
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary::marker { content: ""; }
.row-menu > summary:hover, .row-menu[open] > summary { background: #ebf1f4; color: var(--text); }
.row-menu > summary:focus-visible { outline: 3px solid #6fb0b8; outline-offset: 1px; }
.row-menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 200px;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 14px 34px rgba(16, 29, 53, .16); text-align: left;
}
.row-menu-list a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--text); font-weight: 550; white-space: nowrap; }
.row-menu-list a:hover { background: #ebf1f4; text-decoration: none; }
.row-menu-list a.del { color: var(--bad); font-weight: 600; }
.row-menu-list a.del:hover { background: var(--bad-bg); }

/* Телефон: строки таблицы превращаются в карточки, без горизонтальной прокрутки. */
@media (max-width: 700px) {
  .contour-content { padding: 0 12px 15px; }
  .contour-row--with-open .contour-summary { padding-right: 128px; }
  .contour-open { right: 12px; padding: 0 10px; font-size: 12px; }
  .contour-add { margin: 4px 12px 14px; }
  .schemes-table, .schemes-table tbody { display: block; border: 0; }
  .schemes-table thead { display: none; }
  .schemes-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px;
    padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px;
  }
  .schemes-table td { display: block; padding: 0; border: 0; text-align: left; }
  .schemes-table td.version-cell { grid-column: 1; grid-row: 1; padding: 0; }
  .schemes-table td:last-child { grid-column: 2; grid-row: 1; text-align: right; }
  .schemes-table td.file-cell { grid-column: 1 / -1; max-width: none; width: auto; font-size: 12px; }
  .schemes-table td.num { grid-column: 1 / -1; font-weight: 500; color: var(--muted); font-size: 12px; }
  .num-label { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .schemes-expander, .contour-chevron { transition: none; }
}


/* =====================================================================
   Тема v6 («как в Lovable»): бирюзовый акцент, IBM Plex, спокойные границы,
   тёмная боковая панель, светлый вход. Меняется только внешний вид.
   Шрифты лежат у нас (/static/fonts), CSP: font-src 'self'. Лицензия — OFL.
   ===================================================================== */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); 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: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); 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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); 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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); 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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); 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; }

:root {
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --accent-bg: #ddeff1;
  --accent-fg: #003c46;
  --side-line: #28343f;
  --side-fg: #d0d9de;
  --side-muted: #8d9aa5;
  --bad: #c92b29;
  --bad-bg: #fdf3f2;
  --ok: #1f7a40;
  --ok-bg: #f0f8f2;
  --warn-bg: #fdf8e6;
  --input-line: #d1d9dd;
}
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
.mono, .version-name, .schemes-table .num, .contour-latest .mono { font-family: var(--font-mono); }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.page-heading h1 { font-size: 24px; }
strong, b, dt, label { font-weight: 600; }
.eyebrow { font-weight: 600; letter-spacing: .09em; font-size: 12px; }

/* Кнопки и поля: радиус 6px, высота 40px */
button, .btn { border-radius: 6px; padding: 0 16px; min-height: 40px; font-weight: 500; font-size: 14px; box-shadow: var(--shadow); }
button.secondary, .btn.secondary { box-shadow: none; color: var(--text); }
button.secondary:hover, .btn.secondary:hover { background: #ebf1f4; border-color: var(--input-line); color: var(--text); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 14px; }
input[type=text], input[type=file], input[type=search], select { border-radius: 6px; border-color: var(--input-line); min-height: 40px; }
input[type=text]:focus, input[type=file]:focus, input[type=search]:focus, select:focus, .schemes-search input[type="search"]:focus { outline: none; border-color: #4fa3ab; box-shadow: 0 0 0 2px rgba(0, 115, 126, .22); }
input[type=file]::file-selector-button { background: #ebf1f4; color: var(--text); border-radius: 5px; font-weight: 500; }
.schemes-search input[type="search"] { border-radius: 6px; min-height: 40px; }
button.danger, .btn.danger { box-shadow: none; }
.card, .panel { border-radius: 8px; padding: 22px; }
.panel-icon, .empty-state-icon, .output-icon, .auth-symbol { border-radius: 999px; background: var(--accent-bg); color: var(--accent-fg); }
.panel-icon { flex-basis: 36px; width: 36px; height: 36px; font-size: 18px; }
.panel-heading h2, .panel-title { font-weight: 600; letter-spacing: 0; }
.upload-zone { border-radius: 8px; border: 2px dashed var(--input-line); background: var(--surface); }
.check { border-radius: 6px; background: var(--surface); border-color: var(--line); }
.errors, .warnings, .success-box { border-radius: 8px; }
.errors { border-color: #f1c8c6; }
.warnings { border-color: #ecd98c; }
.success-box { border-color: #cbe5d2; }
.plan-pill { border-radius: 4px; background: var(--accent-bg); border: 0; color: var(--accent-fg); }
.status, .page-tag { background: var(--accent-bg); color: var(--accent-fg); border: 0; }
.page-tag::before { background: #00737e; }
.status.done { background: #e4f4ea; color: #1f7a40; }
.status.running { background: var(--accent-bg); color: var(--accent-fg); }
.status.queued { background: #fdf3d6; color: #7a5a12; }

/* Боковая панель */
.sidebar { background: #111c26; color: var(--side-fg); }
.brand-icon { box-shadow: none; border-radius: 8px; }
.brand-type strong, .topbar-brand strong { font-weight: 600; letter-spacing: -.01em; }
.brand-type strong span { color: inherit; }
.topbar-brand strong span { color: inherit; }
.brand-type small { color: var(--side-muted); letter-spacing: 0; font-size: 12px; }
.sidebar-section-label { color: var(--side-muted); letter-spacing: .09em; font-weight: 600; }
.side-nav { gap: 2px; }
.nav-item { border: 0; border-radius: 6px; padding: 9px 12px; color: rgba(208, 217, 222, .85); font-weight: 500; font-size: 14px; }
.nav-item:hover { background: rgba(40, 52, 63, .6); color: var(--side-fg); }
.nav-item.is-active { background: var(--side-line); color: #fff; }
.nav-icon, .nav-item.is-active .nav-icon { flex-basis: 18px; width: 18px; height: 18px; background: none; border-radius: 0; font-size: 16px; color: inherit; }
.nav-icon--plus { font-size: 18px; }
.sidebar-note { background: transparent; border: 1px solid var(--side-line); border-radius: 8px; padding: 14px; }
.sidebar-note-label { color: var(--side-fg); font-size: 14px; font-weight: 500; }
.sidebar-note p { color: var(--side-muted); }
.sidebar-note-chip { background: var(--side-line); color: var(--side-fg); border-radius: 4px; font-weight: 500; padding: 2px 8px; }
.sidebar-site-link { color: var(--side-muted); font-size: 14px; }
.sidebar-site-link:hover { color: var(--side-fg); text-decoration: none; }

/* Верхняя полоса */
.topbar { min-height: 64px; }
.topbar-title strong { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.topbar-kicker { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.user-email { color: var(--muted); }
button.topbar-logout { color: var(--muted); font-weight: 400; min-height: 0; border-radius: 0; }
button.topbar-logout:hover { background: none; color: var(--text); }
.app-footer { color: var(--muted); }

/* Шаги «Новая схема»: белые карточки, текущий шаг обведён бирюзой */
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.step-number { border-radius: 999px; background: #ebf1f4; color: var(--muted); font-weight: 600; }
.step.is-current { border-color: #00737e; box-shadow: 0 0 0 1px #00737e; }
.step.is-current .step-number { background: var(--accent-bg); color: var(--accent-fg); }
.step.is-done .step-number { background: #00737e; color: #fff; }
.step strong { font-size: 14px; font-weight: 500; }
.step small { font-size: 12px; }

/* Блок «Этап 2» — пунктирная карточка вместо тёмной */
.future-card { background: transparent; border: 1px dashed #c3ced4; box-shadow: none; color: var(--text); }
.future-card::after { display: none; }
.future-card h3 { font-size: 14px; font-weight: 600; }
.future-card p { color: var(--muted); }
.future-pill { background: #ebf1f4; color: var(--text); border-radius: 4px; font-weight: 600; }
.inline-link { color: #00737e; }

/* Вход: светлая левая часть */
.auth-layout { border-radius: 8px; box-shadow: var(--shadow); }
.auth-intro { background: #ebf1f4; color: var(--text); }
.auth-intro h1 { font-weight: 600; letter-spacing: -.02em; }
.auth-intro p { color: var(--muted); }
.eyebrow--light { color: #00737e; }
.auth-zone { background: rgba(0, 115, 126, .05); border: 1px dashed rgba(0, 115, 126, .35); border-radius: 8px; }
.auth-zone > span { color: #00737e; font-family: var(--font-mono); font-weight: 500; }
.auth-zone b { background: var(--surface); border: 1px solid rgba(21, 33, 42, .25); border-radius: 5px; color: var(--text); font-family: var(--font-mono); font-weight: 400; }
.auth-footnote { color: var(--muted); }
.auth-form-panel h2, .auth-form-panel h1 { font-weight: 600; letter-spacing: -.01em; font-size: 24px; }
.auth-confirm .auth-form-panel { border-radius: 8px; }
.btn-wide { justify-content: center; }

/* Каталог: проекты, контуры, версии */
.schemes-accordion { border-radius: 8px; }
.schemes-accordion-head, .schemes-accordion[open] > .schemes-accordion-head { border-radius: 8px; }
.schemes-accordion[open] > .schemes-accordion-head { border-radius: 8px 8px 0 0; }
.schemes-accordion-head:hover, .schemes-accordion[open] .schemes-accordion-head { background: rgba(235, 241, 244, .5); }
.schemes-project-info strong { font-weight: 500; font-size: 16px; }
.schemes-expander { color: var(--muted); }
.contour-summary:hover { background: transparent; }
.contour-tag {
  border-radius: 4px; height: 24px; padding: 0 8px; font-size: 12px; font-weight: 600; line-height: 24px;
  background: #ebf1f4; color: #2f3d48; box-shadow: inset 0 0 0 1px rgba(21, 33, 42, .12);
}
.contour-tag--prod    { background: rgba(201, 48, 45, .10);  color: #b82a27; box-shadow: inset 0 0 0 1px rgba(201, 48, 45, .25); }
.contour-tag--preprod { background: rgba(201, 105, 12, .10); color: #a65407; box-shadow: inset 0 0 0 1px rgba(201, 105, 12, .30); }
.contour-tag--load    { background: rgba(114, 98, 183, .10); color: #62519f; box-shadow: inset 0 0 0 1px rgba(114, 98, 183, .28); }
.contour-tag--test    { background: rgba(42, 117, 186, .10); color: #2268a5; box-shadow: inset 0 0 0 1px rgba(42, 117, 186, .27); }
.contour-tag--dev     { background: rgba(37, 134, 81, .10);  color: #1f7343; box-shadow: inset 0 0 0 1px rgba(37, 134, 81, .27); }
.contour-tag--dr      { background: rgba(21, 113, 113, .10); color: #115e5e; box-shadow: inset 0 0 0 1px rgba(21, 113, 113, .27); }
.contour-latest { font-size: 14px; }
.contour-open { background: none; padding: 0 2px; height: auto; top: 18px; font-size: 14px; font-weight: 500; color: #00737e; }
.contour-open:hover { background: none; color: #005e68; text-decoration: underline; }
.contour-row--with-open .contour-summary { padding-right: 140px; }
.contour-add { border: 0; border-radius: 6px; justify-content: flex-start; margin: 0; padding: 12px 22px 12px 50px; color: var(--muted); font-weight: 400; border-top: 1px solid #e3e9ec; border-radius: 0; }
.contour-add:hover { background: transparent; color: var(--text); border-color: #e3e9ec; }
.row-head-title { font-weight: 500; color: var(--text); font-size: 14px; }
.schemes-table { border-radius: 6px; border-color: var(--line); }
.schemes-table th { background: #ebf1f4; color: var(--muted); font-weight: 500; font-size: 12px; }
.schemes-table th:first-child { border-top-left-radius: 5px; }
.schemes-table th:last-child { border-top-right-radius: 5px; }
.schemes-table td { font-size: 14px; }
.schemes-table .num { font-weight: 400; }
.version-name { font-weight: 500; color: var(--text); }
.version-badge { padding: 0; background: none; color: #298646; font-size: 12px; font-weight: 400; }
.version-ago { font-size: 12px; }
.file-name { display: flex; color: var(--text); }
.fn-head { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-tail { flex: 0 0 auto; white-space: nowrap; }
.row-open { color: #00737e; font-weight: 500; font-size: 14px; padding: 6px 8px; }
.row-open:hover { background: none; text-decoration: underline; }
.row-menu > summary { border-radius: 4px; color: var(--muted); }
.row-menu > summary:hover, .row-menu[open] > summary { background: #ebf1f4; color: var(--text); }
.row-menu-list { border-radius: 8px; box-shadow: 0 8px 24px rgba(21, 33, 42, .14); }
.row-menu-list a { border-radius: 4px; font-weight: 400; }
.row-menu-list a:hover { background: #ebf1f4; }
.row-menu-list a.del, a.del { color: var(--bad); font-weight: 400; }
.row-menu-list a.del:hover { background: var(--bad-bg); }
.owner-note-dot { background: #298646; }
.btn.danger-outline, button.danger-outline { color: var(--bad); border-color: #efc4c2; }
.btn.danger-outline:hover, button.danger-outline:hover { background: var(--bad-bg); color: #a92322; border-color: #e5a8a6; }
.btn.danger, button.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover, button.danger:hover { background: #a92322; }
td a { font-weight: 500; }
@media (max-width: 700px) {
  .contour-row--with-open .contour-summary { padding-right: 112px; }
  .contour-open { top: 17px; font-size: 13px; }
  .contour-add { padding-left: 14px; }
  .schemes-table tr { border-radius: 8px; }
}
@media (max-width: 480px) { .page-heading h1 { font-size: 24px; } }
@media (max-width: 700px) { .page-heading > .btn { margin-top: 14px; } }
.brand-icon, .topbar-brand img { border-radius: 0; }

/* Документация (/help): обычная страница без JS */
.help { max-width: 860px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.help-toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none; }
.help-toc a:hover { border-color: var(--blue); color: var(--blue); }
.help-block { scroll-margin-top: 20px; }
.help-block p, .help-block li { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.help-block p { margin: 0 0 12px; }
.help-block ul, .help-block ol { margin: 0 0 12px; padding-left: 22px; }
.help-block li { margin-bottom: 8px; }
.help-block > :last-child { margin-bottom: 0; }
.help-block code { font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13px; padding: 1px 5px; border-radius: 4px; background: #ebf1f4; }
.help-table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 13px; }
.help-table th, .help-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-table th { background: #ebf1f4; font-weight: 600; }
.help-table td:first-child { width: 38%; color: var(--muted); }
.help-sub { margin: 20px 0 8px; font-size: 15px; font-weight: 700; }
.help-sub:first-of-type { margin-top: 14px; }
.help-table--cols td:first-child { width: 28%; color: var(--text); font-weight: 600; }
.help-table--cols td { line-height: 1.55; }
.help-table--icons td { vertical-align: middle; }
.help-table--icons td:first-child { width: 46%; color: var(--text); }
.help-role { display: flex; align-items: center; gap: 12px; }
.help-icon { flex: 0 0 auto; width: 28px; height: 28px; }
.help-figure { margin: 4px 0 16px; }
.help-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.help-figure figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
.help-contacts { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.topbar-link { font-weight: 500; font-size: 13px; margin-right: 18px; }
@media (max-width: 700px) { .help-table td:first-child { width: 42%; } .topbar-link { margin-right: 10px; } }

/* Иконки меню — lucide (ISC), как в макете */
.nav-icon svg { display: block; width: 18px; height: 18px; }

/* Футер со ссылками на документы и согласие на форме входа */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-links a:hover { color: var(--blue); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); font-weight: 400; cursor: pointer; }
.consent input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.consent a { color: var(--blue); }
.legal-text { max-width: 860px; }

/* Страница примеров (/demo): три карточки */
.demos { max-width: 1240px; }
.demos h1 { margin: 0 0 12px; }
.demos .lead { max-width: 820px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 26px; align-items: stretch; }
.demo-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.demo-figure { margin: 0; padding: 14px 14px 6px; background: #f1f5f6; border-bottom: 1px solid var(--line); }
.demo-figure img { display: block; width: 100%; height: auto; }
.demo-figure figcaption { margin-top: 4px; text-align: center; color: var(--muted); font-size: 11px; }
.demo-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.demo-badge { align-self: flex-start; padding: 4px 8px; border-radius: 4px; background: var(--accent-bg); color: var(--accent-fg); font-size: 12px; font-weight: 500; }
.demo-body h2 { margin: 12px 0 0; font-size: 20px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.demo-audience { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.demo-stats { margin: 16px 0 0; padding: 10px 0; border-block: 1px solid var(--line); font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.demo-points { margin: 16px 0 22px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.demo-points li { margin-bottom: 10px; }
.demo-points li::marker { color: var(--blue); }
.demo-actions { display: grid; gap: 8px; margin-top: auto; }
.demo-actions .btn { width: 100%; }
.demo-alt { text-align: center; font-size: 13px; padding-top: 4px; }
.demo-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.demo-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 26px; padding: 18px 0; border-block: 1px solid var(--line); }
.demo-cta p { margin: 0; font-size: 14px; font-weight: 500; }
.demo-cta-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 1100px) { .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } .demo-cta-actions { display: grid; width: 100%; } }
.demo-card .demo-actions:not(:has(.demo-alt)) { margin-bottom: 29px; }

.footer-tg a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-tg a:hover { color: var(--blue); }
