/* Кабинет Innovation Lab — тёмная тема в духе ChatGPT/Claude, акцент из
   палитры Innovation Lab (#1c7cff -> #77e8ff). Только для страниц /lab. */

:root {
  --bg: #212121;
  --side: #171717;
  --surface: #262626;
  --surface-2: #2f2f2f;
  --surface-3: #383838;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #ececec;
  --muted: #a1a1a1;
  --faint: #6f6f6f;
  --accent: #1c7cff;
  --accent-2: #77e8ff;
  --accent-soft: rgba(28, 124, 255, 0.16);
  --accent-text: #b9d6ff;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(28, 124, 255, 0.4); }

/* ---------- каркас ---------- */
.lab-app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.lab-side {
  background: var(--side);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.lab-logo { display: block; padding: 6px 10px 22px; }
.lab-logo img { display: block; width: 168px; height: auto; }
.lab-new {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; margin-bottom: 14px;
  background: transparent; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 500; transition: background .15s, border-color .15s;
}
.lab-new:hover { background: #212121; border-color: rgba(255, 255, 255, 0.22); }
.lab-new svg { flex: none; }
.lab-nav { display: flex; flex-direction: column; gap: 2px; }
.lab-nav-label {
  font-size: 12px; color: var(--faint); padding: 14px 12px 6px; font-weight: 500;
}
.lab-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); color: #d4d4d4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lab-nav a:hover { background: #212121; }
.lab-nav a.is-active { background: #2a2a2a; color: #fff; }
.lab-nav a .dim { color: var(--faint); font-size: 12px; margin-left: auto; }
.lab-side-foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; padding-left: 6px;
}
.lab-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #031028;
}
.lab-user { min-width: 0; flex: 1; }
.lab-user b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-user span { color: var(--faint); font-size: 12px; }
.lab-iconbtn {
  background: transparent; border: 0; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--muted);
}
.lab-iconbtn:hover { background: #2a2a2a; color: var(--text); }
.lab-account {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  background: transparent; border: 0; padding: 6px; margin-left: -6px; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; color: inherit;
}
.lab-account:hover { background: #212121; }
.lab-account:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(28, 124, 255, .3); }

/* ---------- окно аккаунта ---------- */
dialog.acct {
  width: min(820px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 32px));
  padding: 0; border: 1px solid var(--border-2); border-radius: 18px;
  background: var(--bg); color: var(--text); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
dialog.acct::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }
.acct-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); height: min(640px, calc(100vh - 34px)); }
.acct-nav { background: var(--side); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); }
.acct-who { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; min-width: 0; }
.acct-who-txt { min-width: 0; }
.acct-who-txt b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who-txt span { display: block; color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-avatar { width: 38px; height: 38px; font-size: 14px; }
.acct-tab {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: #d4d4d4; cursor: pointer; text-align: left;
}
.acct-tab:hover { background: #212121; }
.acct-tab.is-active { background: #2a2a2a; color: #fff; }
.acct-logout { margin-top: auto; }
.acct-body { padding: 18px 26px 24px; overflow-y: auto; min-width: 0; }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.acct-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.acct-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.acct-small { font-size: 12.5px; margin: 14px 0 0; }
.acct-lead { color: var(--muted); margin: 0 0 16px; }
.acct-copy { display: flex; gap: 8px; }
.acct-copy input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.acct-steps { margin: 4px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; }
.acct-steps b { color: var(--text); font-weight: 500; }
.acct-steps code, .acct-small code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; word-break: break-all;
}
.acct-h3 { font-size: 14px; font-weight: 600; margin: 22px 0 10px; }
.acct-list { display: grid; gap: 8px; }
.acct-conn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
.acct-conn > div { min-width: 0; }
.acct-conn b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-conn span { font-size: 12px; }
input[aria-invalid="true"] { border-color: var(--err); }
@media (max-width: 640px) {
  .acct-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 34px); }
  .acct-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px; }
  .acct-who { width: 100%; padding-bottom: 8px; }
  .acct-tab { width: auto; }
  .acct-logout { margin: 0 0 0 auto; }
  .acct-body { padding: 16px; }
}

.lab-main { min-width: 0; padding: 30px 40px 80px; }
.lab-wrap { max-width: 1240px; margin: 0 auto; }

/* ---------- типографика ---------- */
.lab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.lab-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-bottom: 6px; }
.lab-h1 { font-size: 28px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.lab-sub { color: var(--muted); margin: 6px 0 0; max-width: 720px; }
.lab-h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--pill); border: 1px solid transparent;
  font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.3;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: #ececec; color: #0d0d0d; }
.btn-primary:hover { background: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #3a8dff; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: rgba(248, 113, 113, .35); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, .1); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }

/* ---------- переключатели ---------- */
.seg {
  display: inline-flex; gap: 2px; padding: 3px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--pill); flex-wrap: wrap;
}
.seg a, .seg button {
  padding: 6px 13px; border-radius: var(--pill); color: var(--muted); font-size: 13px;
  border: 0; background: transparent; cursor: pointer;
}
.seg a:hover, .seg button:hover { color: var(--text); }
.seg a.is-active, .seg button.is-active { background: #ececec; color: #0d0d0d; font-weight: 500; }
.lab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.lab-range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lab-range input[type=date] { width: 142px; flex: none; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 0; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--text); border-color: var(--accent); }
.tabs .count { color: var(--faint); margin-left: 4px; font-size: 12px; }

/* ---------- карточки и показатели ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card + .card { margin-top: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--faint); font-size: 12px; margin-top: 2px; }
.kpi.is-accent { background: linear-gradient(160deg, rgba(28, 124, 255, .22), rgba(119, 232, 255, .06)); border-color: rgba(28, 124, 255, .35); }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.lab-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lab-table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #232323;
}
.lab-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lab-table tr:last-child td { border-bottom: 0; }
.lab-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.lab-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lab-table tr.is-link { cursor: pointer; }
.lab-table tfoot td { font-weight: 600; background: #232323; border-top: 1px solid var(--border-2); }
.camp-name { font-weight: 500; color: var(--text); display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-meta { color: var(--faint); font-size: 12px; margin-top: 2px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px 3px 8px; border-radius: var(--pill); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.badge.live { color: #a7f3d0; background: rgba(52, 211, 153, .1); }
.badge.live::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.badge.scheduled { color: var(--accent-text); background: var(--accent-soft); }
.badge.scheduled::before { background: var(--accent); }
.badge.paused::before { background: var(--warn); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); margin-left: 6px; vertical-align: 1px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; font-weight: 500; }

/* ---------- уведомления ---------- */
.note { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.note.ok { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .07); }
.note.err { border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); color: #fecaca; }
.note.warn { border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .07); color: #fde68a; }
.note ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .label { color: var(--muted); font-size: 13px; }
.field .hint { color: var(--faint); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=url], input[type=email], select, textarea {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 12px;
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(28, 124, 255, .22); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); }
select:disabled, input:disabled { opacity: .55; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--pill);
  border: 1px solid var(--border-2); color: var(--muted); cursor: pointer; user-select: none; transition: all .15s;
}
.chip span:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.chip input:checked + span { background: var(--accent-soft); border-color: rgba(28, 124, 255, .55); color: var(--accent-text); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(28, 124, 255, .3); }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }

.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.format-card { position: relative; }
.format-card input { position: absolute; opacity: 0; pointer-events: none; }
.format-card label {
  display: block; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border-2);
  cursor: pointer; transition: all .15s; background: var(--surface-2);
}
.format-card label:hover { border-color: rgba(255, 255, 255, .25); }
.format-card input:checked + label { border-color: var(--accent); background: linear-gradient(160deg, rgba(28, 124, 255, .18), rgba(119, 232, 255, .04)); }
.format-card input:disabled + label { opacity: .45; cursor: not-allowed; }
.format-card b { display: block; font-weight: 600; font-size: 15px; }
.format-card .price { color: var(--accent-text); margin-top: 4px; }
.format-card .sizes { color: var(--faint); font-size: 12px; margin-top: 6px; }

.region-box { border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface-2); }
.region-box input[type=text] { border: 0; border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; background: transparent; }
.region-list { max-height: 210px; overflow-y: auto; padding: 6px; }
.region-list label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.region-list label:hover { background: var(--surface-3); }
.region-list .grp { color: var(--faint); font-size: 12px; padding: 8px 8px 4px; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

details.more { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; background: var(--surface); margin-top: 14px; }
details.more summary { cursor: pointer; padding: 14px 0; color: var(--muted); list-style: none; display: flex; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; color: var(--faint); }
details.more[open] summary::after { content: "–"; }
details.more[open] { padding-bottom: 6px; }

/* ---------- редактор ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.editor > * { min-width: 0; }
select { max-width: 100%; }
.editor .section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.section-head .n { color: var(--accent-2); font-weight: 600; font-size: 12px; letter-spacing: .06em; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.summary { position: sticky; top: 20px; }
.summary .card { padding: 20px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary .big { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.summary .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.summary .actions .btn { width: 100%; }
.save-state { color: var(--faint); font-size: 12px; text-align: center; min-height: 18px; margin-top: 6px; }

.creatives { display: grid; gap: 10px; }
.creative {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px;
}
.creative.is-off { opacity: .55; }
.creative .thumb {
  width: 96px; height: 72px; border-radius: 8px; background: #1b1b1b; overflow: hidden;
  display: grid; place-items: center; color: var(--faint); font-size: 11px; text-align: center;
}
.creative .thumb img, .creative .thumb video { max-width: 100%; max-height: 100%; object-fit: contain; }
.creative .meta b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative .meta .sub { color: var(--faint); font-size: 12px; }
.creative .meta input { margin-top: 6px; padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.creative .ctrl { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dropzone {
  border: 1.5px dashed var(--border-2); border-radius: var(--radius); padding: 22px; text-align: center;
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.dropzone b { color: var(--text); font-weight: 500; }
.toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 22px; cursor: pointer; transition: .15s; }
.toggle span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #d4d4d4; border-radius: 50%; transition: .15s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::before { transform: translateX(16px); background: #fff; }

/* ---------- график ---------- */
.chart-card { padding: 16px 18px 10px; margin-bottom: 18px; }
.chart-legend { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; width: 100%; height: 240px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .tip {
  position: absolute; pointer-events: none; background: #0f0f0f; border: 1px solid var(--border-2);
  border-radius: 10px; padding: 8px 10px; font-size: 12.5px; white-space: nowrap; opacity: 0; transition: opacity .1s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}

/* ---------- вход ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(28, 124, 255, .18), transparent 60%),
    radial-gradient(700px 400px at 110% 110%, rgba(119, 232, 255, .10), transparent 60%),
    #0b0c10;
}
.login-card { width: 100%; max-width: 380px; }
.login-card .lab-logo { padding: 0 0 34px; display: flex; justify-content: center; }
.login-card .lab-logo img { width: 230px; }
.login-card h1 { font-size: 24px; font-weight: 600; text-align: center; margin: 0 0 6px; }
.login-card p.lead { text-align: center; color: var(--muted); margin: 0 0 26px; }
.login-card input { padding: 13px 16px; border-radius: 14px; background: #16171b; }
.login-card .btn { width: 100%; padding: 12px; margin-top: 6px; font-size: 15px; }
.login-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 28px; }
.consent-card { max-width: 440px; }
.consent-card p.lead { margin-bottom: 18px; }
.consent-what { margin-bottom: 14px; }
.consent-what .label { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.consent-what ul { margin: 0 0 12px; padding-left: 18px; }
.consent-what ul:last-child { margin-bottom: 0; }
.consent-host { font-size: 12.5px; text-align: center; margin: 0 0 16px; }
.consent-card .btn-ghost { margin-top: 8px; }


/* ---------- навигация внутри разделов ---------- */
.back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 16px; }
.back:hover { color: var(--text); }
.link-soft { color: var(--accent-text); }
.link-soft:hover { text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font-size: inherit; }
.linkbtn:hover { text-decoration: underline; }
.badge.finished::before { background: var(--faint); }

/* ---------- освоение бюджета ---------- */
.meter { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-bottom: 3px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; }

/* ---------- мастер: шаги ---------- */
.stepper { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stepper li { position: relative; }
.stepper button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.stepper button:hover { border-color: rgba(255, 255, 255, .22); color: var(--text); }
.stepper .dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted);
}
.stepper .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.stepper li.is-current button { border-color: rgba(28, 124, 255, .55); background: linear-gradient(160deg, rgba(28, 124, 255, .16), rgba(119, 232, 255, .03)); color: var(--text); }
.stepper li.is-current .dot { background: var(--accent); color: #fff; }
.stepper li.is-done .dot { background: rgba(52, 211, 153, .18); color: var(--ok); }
.stepper li.is-done .dot::after { content: ""; }
.stepper li.has-issue .dot { background: rgba(248, 113, 113, .18); color: var(--err); }
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.step-nav .save-state { margin: 0; }
dl.review { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
dl.review dt { color: var(--muted); }
dl.review dd { margin: 0; overflow-wrap: anywhere; }
.lab-h2 { margin-top: 4px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 760px) {
  .stepper .txt { display: none; }
  .stepper button { justify-content: center; }
}
@media (max-width: 900px) {
  .lab-app { grid-template-columns: minmax(0, 1fr); }
  .lab-side, .lab-nav { min-width: 0; }
  .lab-nav { scrollbar-width: none; }
  .lab-nav::-webkit-scrollbar { display: none; }
  .lab-side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .lab-logo { padding: 4px 6px; margin-right: auto; }
  .lab-logo img { width: 130px; }
  .lab-new { width: auto; margin: 0; padding: 7px 12px; }
  .lab-nav { flex-direction: row; width: 100%; overflow-x: auto; order: 5; }
  .lab-nav-label, .lab-nav .drafts { display: none; }
  .lab-side-foot { margin: 0; border: 0; padding: 0; }
  .lab-user { display: none; }
  .lab-main { padding: 20px 16px 60px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .creative { grid-template-columns: 72px minmax(0, 1fr); }
  .creative .thumb { width: 72px; height: 56px; }
  .creative .ctrl { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  /* Шапка-полоса: логотип и выход в одну строку, «Новая кампания» — в заголовке страницы. */
  .lab-side > form:first-of-type { display: none; }
  .lab-account { flex: none; margin: 0; padding: 2px; }
  .lab-head .btn { width: 100%; }
  .lab-head form { width: 100%; }
  .lab-toolbar { flex-direction: column; align-items: stretch; }
  .seg { justify-content: flex-start; }
  .lab-range { width: 100%; }
  .lab-range input[type=date] { width: auto; flex: 1 1 120px; min-width: 0; }
  .lab-range select { flex: 1 1 100%; max-width: none !important; width: 100% !important; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .value { font-size: 19px; }
  .lab-h1 { font-size: 24px; }
  dl.review { grid-template-columns: 1fr; gap: 2px 0; }
  dl.review dd { margin-bottom: 8px; }
}
