/* Сгенерировано frontend/tools/split_prototype.py из index.html — не править вручную. */
/* =========================================================
   1. ДИЗАЙН-ТОКЕНЫ — стиль «Личного кабинета КОНДА»:
   шалфейно-зелёный акцент, кремовый фон с лесом, Jost + Inter
   ========================================================= */
:root {
  color-scheme: light;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Jost', 'Segoe UI', Arial, sans-serif;

  --bg: #F4F4F0;
  --surface: #FFFFFF;
  --surface-2: #F7F7F4;
  --surface-3: #F2F1EF;
  --border: #ECECE7;
  --border-strong: #DCDDD6;
  --text: #1D2119;
  --text-2: #45523F;
  --text-3: #62675E;
  --grid: #EEEEE8;
  --axis: #D5D7CF;

  --primary: #5C7059;
  --primary-hover: #4E6150;
  --primary-soft: #E9EFE6;
  --primary-ink: #4E6150;
  --ai-grad: linear-gradient(135deg, #7D9077 0%, #5C7059 52%, #3F5743 100%);
  --ai-soft: linear-gradient(135deg, rgba(125, 144, 119, .16), rgba(177, 138, 95, .12));

  --success: #4F7A4C; --success-soft: #E8F1E4; --success-ink: #3E6B3C;
  --warning: #B8741A; --warning-soft: #FEF1DB; --warning-ink: #A6460B;
  --danger: #B0432E;  --danger-soft: #FBEAE6;  --danger-ink: #A33A26;
  --info: #2D5E8E;    --info-soft: #EAF4FE;    --info-ink: #2D5E8E;
  --violet: #B18A5F;  --violet-soft: #F5EDE3;  --violet-ink: #7A5326;
  --neutral-soft: #F2F1EF; --neutral-ink: #5A6056;

  /* Категориальная палитра рубрик и графиков: природные тона, различимые по светлоте и оттенку */
  --cat-1: #5C7059; --cat-2: #C08A4E; --cat-3: #3F6E9A; --cat-4: #B9573A;
  --cat-5: #8A6A9E; --cat-6: #3C8C86; --cat-7: #9C8E2E; --cat-8: #6E5848;

  --tg: #2AABEE; --vk: #0077FF; --site: #2A3326;
  --max-grad: linear-gradient(135deg, #2F7BFF 0%, #8A3FFC 100%);

  --shadow-sm: 0 1px 2px rgba(29, 33, 25, .05);
  --shadow: 0 4px 18px rgba(29, 33, 25, .05);
  --shadow-md: 0 8px 24px rgba(29, 33, 25, .08);
  --shadow-lg: 0 20px 60px rgba(29, 33, 25, .20);
  --shadow-btn: 0 4px 12px rgba(92, 112, 89, .22);
  --focus: 0 0 0 3px rgba(92, 112, 89, .24);
  --scrim: rgba(29, 33, 25, .55);
  --toast-bg: #2A3326;
  --glass: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .75);
  --sb-glass: rgba(250, 250, 247, .78);
  --plate: #F4F3F1;
  --plate-hover: #ECEBE7;
  --btn-border: #E1E2DC;
  --btn-hover: #F6F7F3;

  --r-sm: 10px; --r: 12px; --r-lg: 18px; --r-xl: 22px;
  --sidebar-w: 250px;
  --topbar-h: 0px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11140F;
  --surface: #191D16;
  --surface-2: #1F241B;
  --surface-3: #262C21;
  --border: #2D3428;
  --border-strong: #3A4333;
  --text: #ECEFE6;
  --text-2: #C3CCB9;
  --text-3: #9AA391;
  --grid: #283023;
  --axis: #3A4333;

  --primary: #5C7059;
  --primary-hover: #6B8267;
  --primary-soft: rgba(143, 168, 137, .16);
  --primary-ink: #B3CAAC;
  --ai-soft: linear-gradient(135deg, rgba(125, 144, 119, .20), rgba(177, 138, 95, .14));

  --success: #6FA36B; --success-soft: rgba(111, 163, 107, .16); --success-ink: #9FCB99;
  --warning: #D9963A; --warning-soft: rgba(217, 150, 58, .16);  --warning-ink: #F0BC70;
  --danger: #D4664F;  --danger-soft: rgba(212, 102, 79, .17);   --danger-ink: #F29C88;
  --info: #5E8FC0;    --info-soft: rgba(94, 143, 192, .16);     --info-ink: #A2C3E6;
  --violet: #C49A6C;  --violet-soft: rgba(196, 154, 108, .16);  --violet-ink: #DFBE96;
  --neutral-soft: rgba(195, 204, 185, .10); --neutral-ink: #C3CCB9;

  --cat-1: #8FA889; --cat-2: #D29E62; --cat-3: #6E9CC8; --cat-4: #D57658;
  --cat-5: #A98BBD; --cat-6: #5DB0A9; --cat-7: #C2B24E; --cat-8: #A88D78;

  --site: #3B4636;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 18px rgba(0, 0, 0, .28);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --shadow-btn: 0 4px 12px rgba(0, 0, 0, .3);
  --focus: 0 0 0 3px rgba(143, 168, 137, .38);
  --scrim: rgba(4, 5, 3, .7);
  --toast-bg: #2F372A;
  --glass: rgba(25, 29, 22, .7);
  --glass-border: rgba(255, 255, 255, .06);
  --sb-glass: rgba(20, 24, 18, .84);
  --plate: #262C21;
  --plate-hover: #2E3528;
  --btn-border: #3A4333;
  --btn-hover: #232920;
}

/* =========================================================
   2. БАЗА
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); font-size: 14px; line-height: 1.5; font-variant-numeric: lining-nums;
  color: var(--text); background: var(--bg) var(--img-appbg) center / cover fixed no-repeat;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
}
:root[data-theme="dark"] body { background-image: linear-gradient(rgba(17, 20, 15, .9), rgba(17, 20, 15, .9)), var(--img-appbg); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; }
p { margin: 0; }
a { color: var(--primary-ink); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--primary) 26%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.i { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.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; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.w-100 { width: 100%; }
.hidden, [hidden] { display: none !important; }
kbd {
  font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 3px 6px; border-radius: 6px; background: var(--surface-3);
  border: 1px solid var(--border); color: var(--text-2);
}
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* =========================================================
   3. КАРКАС ПРИЛОЖЕНИЯ
   ========================================================= */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  background: var(--sb-glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-right: 1px solid var(--glass-border);
  padding: 22px 14px 0; z-index: 40;
}
.sb-brand { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 8px 20px; text-decoration: none; color: var(--text); border-radius: 14px; flex-shrink: 0; }
.sb-brand:focus-visible { outline: none; box-shadow: var(--focus); }
.sb-brand .logo-img { width: 150px; height: auto; display: block; }
.sb-brand .logo-sub { font-size: 11.5px; color: var(--text-2); line-height: 1.2; letter-spacing: .01em; margin-top: 2px; }
:root[data-theme="dark"] .logo-img { filter: invert(1) brightness(.94); }
.sidebar .sb-close { display: none; position: absolute; top: 14px; right: 10px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 12px; color: var(--text);
  font-size: 15px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s;
}
.nav-item .i { width: 23px; height: 23px; }
.nav-item:hover { background: rgba(92, 112, 89, .10); }
.nav-item:focus-visible { outline: none; box-shadow: var(--focus); }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(92, 112, 89, .28); }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--warning-soft); color: var(--warning-ink); font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.nav-badge.danger { background: var(--danger); color: #fff; }
.nav-item.active .nav-badge { background: #fff; color: var(--warning-ink); }
.nav-item.active .nav-badge.danger { color: var(--danger-ink); }
.ap-mini {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 12px; border-radius: 14px; flex-shrink: 0;
  background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: border-color .15s;
}
.ap-mini:hover { border-color: var(--border-strong); }
.ap-mini:focus-visible { outline: none; box-shadow: var(--focus); }
.ap-mini-text { min-width: 0; }
.ap-mini b { display: block; font-size: 13px; font-weight: 600; }
.ap-mini-text > span { display: block; font-size: 12px; color: var(--text-3); }
.ap-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin: 0 4px;
  background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
.ap-mini.paused .ap-dot { background: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 22%, transparent); animation: none; }
.ap-mini.manual .ap-dot { background: var(--text-3); box-shadow: 0 0 0 4px var(--neutral-soft); animation: none; }
.sidebar-forest {
  flex: 1 0 170px; min-height: 170px; margin: 14px -14px 0;
  background: var(--img-sideforest) center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
:root[data-theme="dark"] .sidebar-forest { opacity: .5; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; font-size: 13px;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.demo-bar {
  display: flex; align-items: center; gap: 12px; padding: 7px 26px; min-height: 34px;
  background: color-mix(in srgb, var(--surface) 72%, transparent); border-bottom: 1px dashed #C8CCC2;
  font-size: 12px; color: var(--text-3); white-space: nowrap; overflow-x: auto; scrollbar-width: none;
}
.demo-bar::-webkit-scrollbar { display: none; }
:root[data-theme="dark"] .demo-bar { border-bottom-color: var(--border-strong); }
.demo-bar-label { flex-shrink: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; color: var(--warning-ink); }
.demo-bar a { color: var(--primary-ink); font-weight: 600; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }
.demo-bar .db-short { display: none; }
.topbar {
  position: relative; z-index: 30; width: 100%; max-width: calc(1600px + 52px);
  display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; padding: 18px 26px 14px;
}
.topbar .hamburger { display: none; }
.tb-title { flex: 1 1 320px; min-width: 0; }
.page-title { font-family: var(--font-display); font-size: 44px; line-height: 1.1; font-weight: 400; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.page-sub { font-size: 15px; color: var(--text-2); margin-top: 8px; line-height: 1.4; max-width: 780px; }
.tb-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-actions:empty { display: none; }
.top-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.top-sep { width: 1px; height: 30px; background: var(--border-strong); margin: 0 4px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  border: 0; background: transparent; color: var(--text); transition: background .15s, color .15s;
}
.icon-btn .i { width: 24px; height: 24px; }
.icon-btn:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.icon-btn .dot-count {
  position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
.user-chip {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px 4px 4px;
  border-radius: 24px; color: var(--text); font-size: 14.5px; font-weight: 500; max-width: 240px;
}
.user-chip:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.user-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.user-chip .av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-ink); font-size: 14px; font-weight: 700;
  border: 2px solid var(--surface); box-shadow: 0 2px 8px rgba(29, 33, 25, .10);
}
.user-chip .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .chev { width: 18px; height: 18px; color: var(--text-3); }
.view {
  width: auto; max-width: 1600px; margin: 0 26px 56px; padding: 16px; min-width: 0;
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: 24px; box-shadow: 0 10px 40px rgba(29, 33, 25, .06);
}
.view.enter { animation: viewIn .28s ease; }
.view:focus { outline: none; }
.sb-scrim { display: none; }

/* =========================================================
   4. ТИПОВЫЕ КОМПОНЕНТЫ
   ========================================================= */
.btn {
  --h: 40px; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--btn-border); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s, transform .06s;
  user-select: none;
}
.btn:hover { background: var(--btn-hover); border-color: color-mix(in srgb, var(--btn-border) 70%, var(--text-3)); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); border-color: transparent; color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--primary-hover); border-color: transparent; }
.btn-ai { background: var(--ai-grad); border-color: transparent; color: #fff; overflow: hidden; box-shadow: var(--shadow-btn); }
.btn-ai:hover { background: var(--ai-grad); border-color: transparent; filter: brightness(1.07); }
.btn-ai::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .30) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.btn-ai:hover::after { transform: translateX(120%); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--primary) 20%, var(--surface)); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(92, 112, 89, .09); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger) 26%, var(--btn-border)); }
.btn-danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, var(--btn-border)); }
.btn-danger-solid { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--danger) 86%, #000); border-color: transparent; }
.btn-success { background: var(--success); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(79, 122, 76, .22); }
.btn-success:hover { background: color-mix(in srgb, var(--success) 86%, #000); border-color: transparent; }
.btn-sm { --h: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-xs { --h: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-xs .i { width: 15px; height: 15px; }
.btn-lg { --h: 48px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn .spinner { width: 15px; height: 15px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-ink); font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 14px;
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: .85; }
.textarea { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.55; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--text-3) 45%, var(--border-strong)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(92, 112, 89, .16); }
.input.sm, .select.sm { height: 36px; font-size: 13px; border-radius: 10px; padding: 0 12px; }
.select.sm { padding-right: 32px; }
.input[readonly] { background: var(--surface-2); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2362675E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.label { font-weight: 600; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.label .opt { font-weight: 500; color: var(--text-3); }
.hint { font-size: 12px; color: var(--text-3); }
.field.invalid .input, .field.invalid .textarea, .field.invalid .select { border-color: var(--danger); }
.err { font-size: 12px; color: var(--danger-ink); font-weight: 600; }
.input-group { display: flex; align-items: stretch; min-width: 0; }
.input-group .ig-prefix { display: flex; align-items: center; padding: 0 10px 0 14px; border: 1px solid var(--border-strong); border-right: 0; border-radius: 12px 0 0 12px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-group .input { border-radius: 0 12px 12px 0; flex: 1; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 42px; }
.input-wrap .input.with-lead { padding-left: 40px; }
.input-wrap .lead { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; display: flex; }
.input-wrap .trail { position: absolute; right: 4px; }
.counter { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.warn { color: var(--warning-ink); font-weight: 600; }
.counter.over { color: var(--danger-ink); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input[type="range"] { accent-color: var(--primary); width: 100%; cursor: pointer; }
input[type="color"] { width: 42px; height: 42px; padding: 3px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }

.cb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex-shrink: 0; border-radius: 6px; border: 1.6px solid #C8CCC2; background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; transition: background .12s, border-color .12s; }
:root[data-theme="dark"] .cb { border-color: var(--border-strong); }
.cb:checked { background: var(--primary); border-color: var(--primary); }
.cb:checked::after { content: ''; width: 10px; height: 6px; border: 2.2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.cb:indeterminate { background: var(--primary); border-color: var(--primary); }
.cb:indeterminate::after { content: ''; width: 9px; height: 2px; background: #fff; border-radius: 1px; }
.cb:focus-visible { outline: none; box-shadow: var(--focus); }
.radio { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 1.6px solid #C8CCC2; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; }
:root[data-theme="dark"] .radio { border-color: var(--border-strong); }
.radio:checked { border-color: var(--primary); }
.radio:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.radio:focus-visible { outline: none; box-shadow: var(--focus); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 23px; border-radius: 20px; background: #D6DAD0; position: relative; transition: background .2s; flex-shrink: 0; }
:root[data-theme="dark"] .switch .track { background: var(--border-strong); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s cubic-bezier(.3, .7, .4, 1.3); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
.switch input:disabled + .track { opacity: .5; }
.switch .sw-label { font-weight: 500; }

.set-list { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; border-top: 1px solid var(--border); }
.set-row:first-child { border-top: 0; padding-top: 4px; }
.set-row:last-child { padding-bottom: 4px; }
.set-text { min-width: 0; }
.set-title { font-weight: 500; font-size: 14.5px; }
.set-desc { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.set-control { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 38px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .15s, color .15s; flex-shrink: 0; }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button:hover { background: var(--surface-2); }
.seg button.active { background: var(--primary); color: #fff; }
.seg button:focus-visible { outline: none; box-shadow: inset var(--focus); }
.seg button .i { width: 16px; height: 16px; }
.seg.full { display: flex; }
.seg.full button { flex: 1; justify-content: center; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--btn-border); background: var(--surface); color: var(--text); font-weight: 500; font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { background: var(--btn-hover); }
.chip.active { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 55%, transparent); color: var(--primary-ink); font-weight: 600; }
.chip:focus-visible { outline: none; box-shadow: var(--focus); }
.chip .i { width: 15px; height: 15px; }
.chip .swatch { width: 9px; height: 9px; border-radius: 3px; background: var(--rc, var(--primary)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--plate); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.tag button { border: 0; background: none; padding: 0; margin-right: -3px; color: var(--text-3); display: grid; place-items: center; }
.tag button:hover { color: var(--danger); }
.tag button .i { width: 14px; height: 14px; }
.tags-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: text; }
.tags-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(92, 112, 89, .16); }
.tags-input input { flex: 1; min-width: 140px; border: 0; outline: none; background: transparent; height: 26px; }
.rchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; min-width: 0; }
.rchip::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--rc); flex-shrink: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot { padding: 0 11px; }
.pill.no-dot::before { display: none; }
.pill.idea { background: var(--violet-soft); color: var(--violet-ink); }
.pill.draft { background: var(--neutral-soft); color: var(--neutral-ink); }
.pill.review { background: var(--warning-soft); color: var(--warning-ink); }
.pill.scheduled { background: var(--info-soft); color: var(--info-ink); }
.pill.published, .pill.ok { background: var(--success-soft); color: var(--success-ink); }
.pill.failed, .pill.err { background: var(--danger-soft); color: var(--danger-ink); }
.pill.warn { background: var(--warning-soft); color: var(--warning-ink); }
.pill.off { background: var(--neutral-soft); color: var(--neutral-ink); }
.pill.ai { background: var(--ai-soft); color: var(--primary-ink); }
.pill.ai::before { display: none; }
.pill .i { width: 14px; height: 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; flex-wrap: wrap; }
.card-title { font-family: var(--font-display); font-weight: 500; font-size: 21px; line-height: 1.25; display: flex; align-items: center; gap: 10px; color: var(--text); }
.card-title .i { color: var(--text-2); width: 22px; height: 22px; stroke-width: 1.6; }
.card-sub { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.card-body { padding: 16px 22px 22px; }
.section-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.section-sub { color: var(--text-3); font-size: 13px; margin-bottom: 14px; }

.grid { display: grid; gap: 16px; }
.cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.tabs { display: flex; gap: 10px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 42px; padding: 0 18px; border: 0; background: var(--plate); border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; display: flex; align-items: center; gap: 9px; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; flex-shrink: 0; }
.tab:hover { background: var(--plate-hover); }
.tab:focus-visible { outline: none; box-shadow: var(--focus); }
.tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.tab .i { width: 18px; height: 18px; }
.tab .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.tab .count.warn { background: var(--warning-soft); color: var(--warning-ink); }
.tab .count.danger { background: var(--danger-soft); color: var(--danger-ink); }
.tab.active .count { background: #fff; color: #1D2119; }
.tab.active .count.warn { color: #A6460B; }
.tab.active .count.danger { color: #B0432E; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info-ink); font-weight: 500; font-size: 13.5px; line-height: 1.45; border: 1px solid color-mix(in srgb, var(--info) 18%, transparent); }
.notice .i { margin-top: 1px; }
.notice.warn { background: #FFF6EC; color: #6B3A12; border-color: #F0D2B4; }
.notice.warn .i { color: var(--warning-ink); }
:root[data-theme="dark"] .notice.warn { background: var(--warning-soft); color: var(--warning-ink); border-color: transparent; }
.notice.err { background: var(--danger-soft); color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.notice.ok { background: var(--success-soft); color: var(--success-ink); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.notice.ai { background: var(--ai-soft); color: var(--primary-ink); border-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.notice .notice-body { flex: 1; min-width: 0; }
.notice b { display: block; margin-bottom: 2px; font-weight: 600; }

.meter { height: 8px; border-radius: 4px; background: var(--primary-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width .4s ease; }
.meter.warn { background: var(--warning-soft); } .meter.warn > span { background: var(--warning); }
.meter.danger { background: var(--danger-soft); } .meter.danger > span { background: var(--danger); }
.meter.ok { background: var(--success-soft); } .meter.ok > span { background: var(--success); }
.meter.lg { height: 10px; border-radius: 5px; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty-ico { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); }
.empty-ico .i { width: 30px; height: 30px; stroke-width: 1.5; }
.empty h3 { margin: 0 0 6px; font-size: 20px; color: var(--text); }
.empty p { max-width: 440px; margin: 0 auto 16px; font-size: 13.5px; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex-shrink: 0; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }

/* Иконки площадок */
.ch-ico { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; flex-shrink: 0; }
.ch-ico svg { width: 64%; height: 64%; }
.ch-ico.tg { background: var(--tg); border-radius: 50%; }
.ch-ico.vk { background: var(--vk); }
.ch-ico.max { background: var(--max-grad); }
.ch-ico.site { background: var(--site); }
.ch-ico.sm { width: 18px; height: 18px; border-radius: 5px; }
.ch-ico.sm.tg { border-radius: 50%; }
.ch-ico.lg { width: 44px; height: 44px; border-radius: 13px; }
.ch-ico.lg.tg { border-radius: 50%; }
.ch-ico.off { filter: grayscale(1); opacity: .45; }
.ch-stack { display: inline-flex; align-items: center; }
.ch-stack .ch-ico + .ch-ico { margin-left: -5px; box-shadow: 0 0 0 2px var(--surface); }
.brand-tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: -.02em; flex-shrink: 0; }
.brand-tile.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.brand-tile svg { width: 60%; height: 60%; }

/* Подсказка и выпадающие меню */
.tooltip { position: fixed; z-index: 400; pointer-events: none; max-width: 280px; padding: 7px 10px; border-radius: 9px; background: var(--toast-bg); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tooltip.show { opacity: 1; transform: none; }
.menu { position: fixed; z-index: 260; min-width: 220px; max-width: 320px; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: popIn .14s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; border: 0; background: none; color: var(--text); font-weight: 500; text-align: left; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); outline: none; }
.menu-item .i { color: var(--text-2); width: 18px; height: 18px; }
.menu-item.danger { color: var(--danger-ink); }
.menu-item.danger .i { color: var(--danger-ink); }
.menu-item.checked::after { content: '✓'; margin-left: auto; color: var(--primary-ink); font-weight: 700; }
.menu-item .mi-desc { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-label { padding: 8px 10px 4px; font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.menu-head b { display: block; font-weight: 600; }
.menu-head span:not([class]) { display: block; font-size: 12px; color: var(--text-3); }

/* Модальные окна */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn .18s ease; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.2, .9, .3, 1.15); }
.modal.sm { max-width: 460px; } .modal.lg { max-width: 880px; } .modal.xl { max-width: 1140px; }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 4px; }
.modal-head .mh-text { flex: 1; min-width: 0; }
.modal-title { font-family: var(--font-display); font-size: 25px; font-weight: 500; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.modal-title .i { width: 24px; height: 24px; color: var(--text-2); stroke-width: 1.6; }
.modal-sub { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }
.modal-body { padding: 16px 24px 22px; overflow-y: auto; min-height: 0; }
.modal-foot { padding: 14px 24px 18px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; display: flex; align-items: center; gap: 10px; }
.modal-backdrop.full { padding: 0; }
.modal.full { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; animation: slideUp .26s cubic-bezier(.2, .9, .3, 1); }
.modal-backdrop.drawer { justify-content: flex-end; padding: 0; }
.modal.drawer { max-width: 500px; height: 100%; max-height: none; border-radius: 22px 0 0 22px; border-right: 0; animation: slideIn .26s cubic-bezier(.2, .9, .3, 1); }
.modal-x { flex-shrink: 0; margin: -2px -8px 0 0; }

/* Уведомления-тосты */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; min-width: 300px; max-width: 480px; display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 14px; border-radius: 14px; background: var(--toast-bg); color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .26s cubic-bezier(.2, .9, .3, 1.2); font-weight: 500; font-size: 13.5px; }
.toast.out { animation: toastOut .2s ease forwards; }
body.modal-open .toasts { top: 16px; bottom: auto; }
body.modal-open .toast:not(.out) { animation-name: toastInTop; }
.toast .t-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, .12); }
.toast.success .t-ico { background: rgba(125, 190, 120, .24); color: #A9DCA4; }
.toast.error .t-ico { background: rgba(230, 110, 85, .26); color: #FFAD9B; }
.toast.warning .t-ico { background: rgba(240, 170, 80, .26); color: #F8CB86; }
.toast.ai .t-ico { background: var(--ai-grad); color: #fff; }
.toast .t-text { flex: 1; min-width: 0; }
.toast .t-text small { display: block; opacity: .72; font-weight: 400; font-size: 12px; }
.toast .t-action { border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; }
.toast .t-action:hover { background: rgba(255, 255, 255, .22); }
.toast .t-close { border: 0; background: none; color: rgba(255, 255, 255, .6); padding: 4px; display: grid; place-items: center; border-radius: 6px; }
.toast .t-close:hover { color: #fff; }

/* =========================================================
   5. ОБЗОР
   ========================================================= */
.hero {
  position: relative; overflow: hidden; height: 100%; border-radius: var(--r-lg); padding: 22px 24px; color: var(--text); isolation: isolate;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 44%); gap: 20px; align-items: stretch; }
.hero-info { min-width: 0; }
.hero-photo { position: relative; display: block; min-height: 190px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface-3); color: #fff; text-align: left; box-shadow: var(--shadow-md); }
button.hero-photo { cursor: pointer; }
button.hero-photo:focus-visible { outline: none; box-shadow: var(--focus); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease, filter .3s; }
button.hero-photo:hover img { transform: scale(1.03); }
.hero.paused .hero-photo img { filter: grayscale(.85); }
.hero-photo .hp-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px; background: linear-gradient(0deg, rgba(20, 24, 18, .78), transparent); font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-photo .hp-cap small { display: block; font-size: 11.5px; font-weight: 500; color: #E6EBE2; margin-bottom: 2px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--success-soft); color: var(--success-ink); font-size: 12.5px; font-weight: 600; }
.hero.paused .hero-kicker, .hero-kicker.setup { background: var(--warning-soft); color: var(--warning-ink); }
.hero-kicker.setup .live-dot { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 25%, transparent); animation: none; }
.hero-title { font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.2; margin-top: 12px; max-width: 520px; }
.hero-sub { color: var(--text-2); margin-top: 6px; max-width: 460px; font-size: 14px; }
.hero .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); animation: pulse 2s infinite; }
.hero.paused .live-dot { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 25%, transparent); animation: none; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: pipe; }
.pipe-step .ps-name, .pipe-step .ps-mode { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-step { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 10px 11px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); container-type: inline-size; }
@container (max-width: 104px) { .pipe-step .ps-name .i { display: none; } }
.pipe-step + .pipe-step::before { content: ''; position: absolute; left: -7px; top: 50%; width: 6px; height: 2px; border-radius: 1px; background: var(--border-strong); }
.pipe-step .ps-mode { display: flex; align-items: center; gap: 5px; }
.pipe-step .ps-mode .i { width: 13px; height: 13px; }
.pipe-step .ps-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.pipe-step .ps-name .i { width: 16px; height: 16px; color: var(--primary-ink); }
.pipe-step .ps-mode { font-size: 11.5px; color: var(--success-ink); font-weight: 600; }
.pipe-step.manual { border-style: dashed; border-color: var(--border-strong); }
.pipe-step.manual .ps-mode { color: var(--text-3); }
.pipe-step.manual .ps-name .i { color: var(--text-3); }
.hero-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--text-2); }
.hero-foot > .i { width: 16px; height: 16px; color: var(--text-3); }
.hero-foot b { font-weight: 600; color: var(--text); }
.hero-foot .link-btn { margin-left: auto; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; }
.kpi-label { color: var(--text-2); font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi-label .i { width: 20px; height: 20px; color: var(--primary-ink); stroke-width: 1.6; }
.kpi-value { font-family: var(--font-display); font-size: 36px; font-weight: 500; margin-top: 8px; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.kpi-delta { font-size: 12.5px; font-weight: 500; margin-top: 6px; color: var(--text-3); }
.kpi-delta.up { color: var(--success-ink); }
.kpi-delta.down { color: var(--danger-ink); }
.kpi a, .kpi button.link-btn { margin-top: auto; padding-top: 10px; font-size: 12.5px; }
.att-list { display: flex; flex-direction: column; gap: 10px; }
.att-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.att-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.att-ico .i { width: 20px; height: 20px; }
.att-ico.warn { background: var(--warning-soft); color: var(--warning-ink); }
.att-ico.err { background: var(--danger-soft); color: var(--danger-ink); }
.att-ico.info { background: var(--info-soft); color: var(--info-ink); }
.att-ico.ai { background: var(--primary-soft); color: var(--primary-ink); }
.att-text { flex: 1; min-width: 0; }
.att-text b { display: block; font-size: 13.5px; font-weight: 600; }
.att-text span { display: block; font-size: 12.5px; color: var(--text-3); }
.att-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.att-item.att-wide { flex-wrap: wrap; }
.att-item.att-wide .att-text { flex: 1 1 320px; }
.att-reason { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.up-list { display: flex; flex-direction: column; }
.up-item { display: grid; grid-template-columns: 54px 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.up-item:first-child { border-top: 0; }
.up-item:hover { background: var(--surface-2); }
.up-item:focus-visible { outline: none; box-shadow: var(--focus); }
.up-flag { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--warning-soft); color: var(--warning-ink); }
.up-flag .i { width: 15px; height: 15px; }
.up-time { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.up-day { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.thumb { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); overflow: hidden; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.lg { width: 56px; height: 56px; border-radius: 12px; }
.up-title { font-weight: 600; font-size: 13.5px; }
.up-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; min-width: 0; overflow: hidden; }
.up-meta .rchip { overflow: hidden; text-overflow: ellipsis; }
.setup { position: relative; overflow: hidden; }
.setup-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.setup-step { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); text-decoration: none; color: var(--text); font-weight: 500; font-size: 13px; transition: border-color .15s; }
.setup-step:hover { border-color: var(--border-strong); }
.setup-step .st-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1.5px dashed var(--border-strong); color: var(--text-3); }
.setup-step.done { color: var(--text-3); }
.setup-step.done .st-ico { background: var(--success); border: 0; color: #fff; }
.setup-step .st-ico .i { width: 14px; height: 14px; }
.ch-status-list { display: flex; flex-direction: column; gap: 4px; }
.ch-status { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; text-decoration: none; color: var(--text); }
.ch-status:hover { background: var(--surface-2); }
.ch-status .cs-text { flex: 1; min-width: 0; }
.ch-status .cs-text b { display: block; font-size: 13.5px; font-weight: 600; }
.ch-status .cs-text span { display: block; font-size: 12.5px; color: var(--text-3); }

/* Графики */
.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--text-3); font-size: 11.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { transition: opacity .15s; }
.chart .col-hit { fill: transparent; cursor: default; }
.chart .col-hit:focus { outline: none; }
.chart g.col:hover .bar, .chart g.col:focus-within .bar { opacity: .82; }
.chart .today-tick { fill: var(--text); font-weight: 700; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.legend .lg-item { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-tip { position: fixed; z-index: 450; pointer-events: none; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: 12.5px; opacity: 0; transition: opacity .1s; }
.chart-tip.show { opacity: 1; }
.chart-tip .ct-title { font-weight: 600; margin-bottom: 6px; }
.chart-tip .ct-row { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.chart-tip .ct-row b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip .ct-key { width: 12px; height: 3px; border-radius: 2px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { color: var(--text-3); font-weight: 500; font-size: 12.5px; }
.table-scroll { max-height: 260px; overflow: auto; }

/* =========================================================
   6. КОНТЕНТ-ПЛАН
   ========================================================= */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .period-title { font-family: var(--font-display); font-size: 24px; font-weight: 500; min-width: 180px; }
.plan-filters { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.plan-filters .chip { height: 32px; font-size: 12.5px; }
.pf-sep { width: 1px; height: 22px; background: var(--border-strong); }
.toolbar .spacer { flex: 1; }
.plan-summary { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.plan-summary .ps-item { display: inline-flex; align-items: center; gap: 6px; }
.plan-summary .ps-dot { width: 8px; height: 8px; border-radius: 50%; }
@media (max-width: 899px) {
  .plan-filters { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; }
  .plan-filters .pf-sep { display: none; }
  .plan-filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; min-width: 0; }
  .plan-filters .chips::-webkit-scrollbar { display: none; }
  .plan-filters .chip { flex-shrink: 0; }
  .plan-summary { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .plan-summary .ps-item { flex-shrink: 0; }
}
.cal { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-head div { padding: 10px 12px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(132px, auto); }
.cal-cell { position: relative; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; transition: background .12s; outline: none; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-grid .cal-cell:nth-last-child(-n + 7) { border-bottom: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell:focus-visible { box-shadow: inset var(--focus); }
.cal-cell.other { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cal-cell.other .cal-date { color: var(--text-3); font-weight: 400; }
.cal-cell.weekend .cal-date { color: var(--danger-ink); }
.cal-cell.other.weekend .cal-date { color: color-mix(in srgb, var(--danger-ink) 55%, var(--text-3)); }
.cal-cell.past { background-image: repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--surface-3) 55%, transparent) 9px 10px); }
.cal-cell.today { background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.cal-cell.today .cal-date { background: var(--primary); color: #fff; }
.cal-cell.drop-ok { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.cal-cell.drop-no { box-shadow: inset 0 0 0 2px var(--danger); cursor: not-allowed; }
.cal-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-date { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.cal-hol { font-size: 11px; color: var(--text-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal-add { margin-left: auto; width: 24px; height: 24px; border-radius: 7px; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; opacity: 0; transition: opacity .12s, background .12s; flex-shrink: 0; }
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--surface-3); color: var(--primary-ink); }
.cal-add .i { width: 16px; height: 16px; }
.cal-hol.rest { color: var(--danger-ink); }
.ev { display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 7px 5px 7px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--rc); font-size: 12px; font-weight: 500; min-width: 0; cursor: grab; text-align: left; width: 100%; color: var(--text); transition: box-shadow .12s, transform .12s; }
.ev:hover { box-shadow: var(--shadow); }
.ev:focus-visible { outline: none; box-shadow: var(--focus); }
.ev.dragging { opacity: .4; }
.ev.locked { cursor: pointer; }
.ev .ev-time { color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ev .ev-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ev .ev-ch { margin-left: auto; display: inline-flex; min-width: 0; overflow: hidden; flex-shrink: 1; }
.cal-cell { container-type: inline-size; }
@container (max-width: 112px) { .ev .ev-ch { display: none; } }
.ev .ev-ch .ch-ico.sm { width: 14px; height: 14px; }
.ev .ev-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.ev .ev-st { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ev.st-published { opacity: .72; }
.ev.st-published .ev-title { text-decoration: none; }
.ev.st-failed { background: var(--danger-soft); }
.ev.st-idea { border-style: dashed; border-left-style: solid; background: transparent; }
.cal-more { font-size: 12px; font-weight: 600; color: var(--primary-ink); padding: 2px 6px; background: none; border: 0; text-align: left; border-radius: 6px; }
.cal-more:hover { background: var(--primary-soft); }
.st-dot-idea { background: var(--violet); } .st-dot-draft { background: var(--text-3); } .st-dot-review { background: var(--warning); }
.st-dot-scheduled { background: var(--info); } .st-dot-published { background: var(--success); } .st-dot-failed { background: var(--danger); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.wk-col { display: flex; flex-direction: column; gap: 8px; min-height: 420px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); min-width: 0; transition: background .12s, box-shadow .12s; }
.wk-col.today { border-color: color-mix(in srgb, var(--primary) 50%, transparent); box-shadow: 0 0 0 3px var(--primary-soft); }
.wk-col.past { background: var(--surface-2); }
.wk-col.drop-ok { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.wk-col.drop-no { box-shadow: inset 0 0 0 2px var(--danger); }
.wk-head { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; border-bottom: 1px solid var(--border); }
.wk-head b { font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 1; }
.wk-head span { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.wk-head .cal-add { opacity: 1; }
.wk-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; border: 1px solid var(--border); border-left: 3px solid var(--rc); background: var(--surface-2); cursor: grab; text-align: left; color: var(--text); width: 100%; transition: box-shadow .12s; }
.wk-card:hover { box-shadow: var(--shadow); }
.wk-card:focus-visible { outline: none; box-shadow: var(--focus); }
.wk-card.locked { cursor: pointer; }
.wk-card .wk-img { width: 100%; aspect-ratio: 16/10; border-radius: 8px; object-fit: cover; display: block; }
.wk-card .wk-st { min-width: 0; }
.wk-card .wk-st .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wk-card .wk-title { overflow-wrap: anywhere; hyphens: auto; font-weight: 600; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wk-card .wk-meta { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.wk-empty { margin: auto 0; text-align: center; font-size: 12px; color: var(--text-3); padding: 10px; }
.agenda { display: flex; flex-direction: column; gap: 18px; }
.agenda-day h3 { font-size: 19px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.agenda-day h3 .tag { text-transform: none; }

/* Мастер плана */
.steps { display: flex; align-items: center; gap: 10px; margin: 6px 0 20px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 12px; }
.step.active { color: var(--text); }
.step.active .n { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.step.done .n { background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); border-radius: 2px; min-width: 16px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.preset-grid.wz-presets { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.summary-box .sb-main { display: block; font-weight: 600; }
.summary-box .sb-sub { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.model-sum { padding: 14px 16px; border-radius: 14px; background: var(--ai-soft); border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); }
.model-sum .ms-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--primary-ink); margin-bottom: 8px; }
.model-sum .ms-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; font-size: 13px; }
.model-sum dt { color: var(--text-3); }
.model-sum dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.model-sum .ms-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--primary) 16%, transparent); font-size: 13px; font-weight: 500; }
.res-title-wrap { position: relative; display: flex; align-items: center; }
.res-title-wrap .res-pen { position: absolute; right: 6px; width: 15px; height: 15px; color: var(--text-3); opacity: 0; pointer-events: none; transition: opacity .15s; }
.res-item:hover .res-pen, .res-title:focus + .res-pen { opacity: 1; }
.res-item .res-title:hover { border-color: var(--border); }
.preset { padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; transition: border-color .15s, box-shadow .15s; color: var(--text); }
.preset:hover { border-color: var(--border-strong); }
.preset.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.preset:focus-visible { outline: none; box-shadow: var(--focus); }
.preset b { display: block; font-size: 14px; font-weight: 600; }
.preset span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choice:hover { border-color: var(--border-strong); }
.choice.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.choice input { margin-top: 2px; }
.choice b { display: block; font-size: 13.5px; font-weight: 600; }
.choice span:not([class]) span:not([class]), .choice > span:not([class]) > span:not([class]) { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.choice .ch-ico { margin-top: 1px; }
.summary-box { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ai-soft); border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); font-weight: 500; }
.summary-box .i { color: var(--primary-ink); }
.gen { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 26px 0 10px; text-align: center; }
.orb { width: 88px; height: 88px; border-radius: 50%; background: var(--ai-grad); animation: orb 2.6s ease-in-out infinite; box-shadow: 0 0 46px rgba(92, 112, 89, .45), inset 0 0 22px rgba(255, 255, 255, .4); display: grid; place-items: center; color: #fff; }
.orb .i { width: 34px; height: 34px; animation: spinSlow 6s linear infinite; }
.gen-title { font-family: var(--font-display); font-size: 23px; font-weight: 500; }
.gen-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; min-width: 280px; }
.gen-steps li { display: flex; gap: 10px; align-items: center; color: var(--text-3); font-weight: 500; transition: color .2s; }
.gen-steps li .gs-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); flex-shrink: 0; }
.gen-steps li.active { color: var(--primary-ink); }
.gen-steps li.active .gs-ico { border-color: transparent; }
.gen-steps li.done { color: var(--text); }
.gen-steps li.done .gs-ico { background: var(--success); border-color: var(--success); color: #fff; }
.gen-steps li .gs-ico .i { width: 13px; height: 13px; }
.gen-progress { width: min(360px, 100%); }
.res-day { margin-bottom: 14px; }
.res-day h4 { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.res-item { display: grid; grid-template-columns: 22px 50px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 6px; }
.res-item.off { opacity: .5; }
.res-item .res-time { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.res-item .res-title { border: 1px solid transparent; background: transparent; font-weight: 600; padding: 4px 26px 4px 6px; border-radius: 8px; width: 100%; min-width: 0; color: var(--text); }
.res-item .res-title:hover { background: var(--surface-2); }
.res-item .res-title:focus { outline: none; box-shadow: var(--focus); background: var(--surface); }
.res-item .res-sub { display: flex; align-items: center; gap: 8px; padding: 0 6px; flex-wrap: wrap; }
.res-item .res-excerpt { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }

/* =========================================================
   7. ПУБЛИКАЦИИ
   ========================================================= */
.list-card { overflow: hidden; }
.list-tools { display: flex; align-items: center; gap: 10px; padding: 14px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.list-tools .input-wrap { width: min(320px, 100%); }
.list-tools .select { width: auto; min-width: 150px; }
.post-row { display: grid; grid-template-columns: 22px 56px minmax(0, 1fr) 160px 92px 150px 128px; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.post-row:first-child { border-top: 0; }
.post-row.no-check { grid-template-columns: 56px minmax(0, 1fr) 160px 92px 150px 128px; }
.post-row:hover { background: var(--surface-2); }
.post-row.selected { background: var(--primary-soft); }
.post-row:focus-visible { outline: none; box-shadow: inset var(--focus); }
.pr-main { min-width: 0; }
.pr-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-excerpt { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pr-flags { display: flex; gap: 6px; margin-top: 4px; align-items: center; flex-wrap: wrap; }
.pr-err { color: var(--danger-ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pr-date { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pr-rel { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pr-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pr-stats { display: flex; gap: 10px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.pr-stats span { display: inline-flex; align-items: center; gap: 4px; }
.pr-stats .i { width: 14px; height: 14px; }
.list-head { display: grid; grid-template-columns: 22px 56px minmax(0, 1fr) 160px 92px 150px 128px; gap: 14px; padding: 11px 16px; font-size: 12.5px; font-weight: 500; color: var(--text-3); background: var(--plate); border-bottom: 1px solid var(--border); }
.bulk-root { position: fixed; left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2); bottom: 20px; transform: translateX(-50%); z-index: 45; max-width: calc(100vw - var(--sidebar-w) - 32px); }
.bulk-root:empty { display: none; }
body.has-bulk .toasts { bottom: 86px; }
.bulk-bar { position: static; margin: 0; width: fit-content; max-width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--toast-bg); color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .2s; }
.bulk-bar .btn { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.bulk-bar .btn:hover { background: rgba(255, 255, 255, .2); }
.bulk-bar .btn.danger { color: #FF9396; }
.bulk-bar b { margin-right: 6px; font-weight: 600; }

/* =========================================================
   8. РЕДАКТОР ПУБЛИКАЦИИ
   ========================================================= */
.ed { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%; background: var(--bg); }
.ed-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ed-head .ed-crumb { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ed-head .ed-crumb b { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.ed-save-state { font-size: 12.5px; color: var(--text-3); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.ed-save-state.dirty { color: var(--warning-ink); }
.ed-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-mtabs { display: none; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.ed-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); min-height: 0; }
.ed-main { overflow-y: auto; padding: 22px 28px 64px; min-width: 0; }
.ed-main-inner { max-width: 860px; margin: 0 auto; }
.ed-side { overflow-y: auto; padding: 22px 22px 48px; border-left: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.ed-title { width: 100%; border: 0; background: transparent; color: var(--text); font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: 0; line-height: 1.2; padding: 6px 0; outline: none; border-bottom: 2px solid transparent; transition: border-color .15s; resize: none; overflow: hidden; display: block; font-family: inherit; }
.ed-title:focus { border-bottom-color: var(--primary); }
.ed-title::placeholder { color: var(--text-3); }
.ed-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 14px 0 18px; }
.ed-meta .ed-ch-field { grid-column: 1 / -1; }
.ch-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-toggle { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px 0 8px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 500; font-size: 13px; color: var(--text-2); transition: border-color .15s, background .15s, color .15s; }
.ch-toggle:hover { border-color: var(--text-3); }
.ch-toggle.on { border-color: color-mix(in srgb, var(--primary) 55%, transparent); background: var(--primary-soft); color: var(--primary-ink); }
.ch-toggle:not(.on) .ch-ico { filter: grayscale(1); opacity: .5; }
.ch-toggle:focus-visible { outline: none; box-shadow: var(--focus); }
.ch-toggle .warn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.ed-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.ed-tabs { display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border: 0; background: var(--plate); color: var(--text); font-weight: 500; font-size: 13.5px; white-space: nowrap; border-radius: 10px; flex-shrink: 0; transition: background .15s; }
.ed-tab:hover { background: var(--plate-hover); }
.ed-tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.ed-tab.active .ch-ico { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }
.ed-tab:focus-visible { outline: none; box-shadow: var(--focus); }
.ed-tab .own { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.ed-tab.active .own { background: #fff; }
.var-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: var(--text-2); flex-wrap: wrap; }
.var-bar .i { width: 16px; height: 16px; color: var(--text-3); }
.var-bar .spacer { flex: 1; }
.rte-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.rte-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; }
.rte-btn:hover { background: var(--surface-3); color: var(--text); }
.rte-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.rte-btn .i { width: 17px; height: 17px; }
.rte-btn[disabled] { opacity: .35; pointer-events: none; }
.rte-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.rte { min-height: 280px; padding: 16px 18px 20px; outline: none; line-height: 1.65; font-size: 15px; word-wrap: break-word; }
.rte:empty::before { content: attr(data-placeholder); color: var(--text-3); pointer-events: none; }
.rte p { margin: 0 0 10px; }
.rte h2 { font-size: 22px; margin: 18px 0 8px; }
.rte h3 { font-size: 18px; margin: 14px 0 6px; }
.rte ul, .rte ol { padding-left: 22px; margin: 6px 0 10px; }
.rte blockquote { border-left: 3px solid var(--primary); margin: 10px 0; padding: 6px 14px; color: var(--text-2); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.rte a { color: var(--primary-ink); }
.rte.locked { color: var(--text-2); background: var(--surface-2); cursor: default; }
.rte.typing::after { content: '▍'; color: var(--primary); animation: blink 1s steps(1) infinite; margin-left: 1px; }
.rte-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.rte-foot .limits { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ai-menu { width: 340px; max-width: calc(100vw - 16px); }
.menu-ask { display: flex; gap: 6px; padding: 4px 6px 8px; }
.menu-ask .input { flex: 1; min-width: 0; }
.idea-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--ai-soft); border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); margin-bottom: 14px; }
.idea-banner .ib-text { flex: 1; min-width: 0; }
.idea-banner b { display: block; font-weight: 600; }
.idea-banner .ib-text > span { font-size: 13px; color: var(--text-2); }
.ed-section { margin-top: 18px; }
.ed-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ed-section-head h3 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.media-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.ms-item { position: relative; width: 104px; height: 104px; border-radius: 13px; overflow: hidden; cursor: grab; background: var(--surface-3); box-shadow: var(--shadow-sm); }
.ms-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ms-item.dragging { opacity: .4; }
.ms-item.over { outline: 2px solid var(--primary); outline-offset: 2px; }
.ms-item .ms-n { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: rgba(20, 24, 18, .62); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ms-item .ms-tools { position: absolute; right: 5px; bottom: 5px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.ms-item:hover .ms-tools, .ms-item:focus-within .ms-tools { opacity: 1; }
.ms-tools button, .glass-btn { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(20, 24, 18, .62); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ms-tools button:hover, .glass-btn:hover { background: rgba(20, 24, 18, .85); }
.ms-tools button .i, .glass-btn .i { width: 15px; height: 15px; }
.ms-item .ms-video { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(20, 24, 18, .62); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.ms-add { width: 104px; height: 104px; border-radius: 13px; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; text-align: center; padding: 6px; transition: border-color .15s, color .15s, background .15s; }
.ms-add:hover { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-soft); }
.ms-add.ai { border-style: solid; border-color: transparent; background: var(--ai-soft); color: var(--primary-ink); }
.ms-add:focus-visible { outline: none; box-shadow: var(--focus); }
.side-block { margin-bottom: 18px; }
.side-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.ck-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 500; color: var(--text-2); }
.ck-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin-top: 0; }
.ck-ico .i { width: 12px; height: 12px; }
.ck-ico.ok { background: var(--success-soft); color: var(--success-ink); }
.ck-ico.warn { background: var(--warning-soft); color: var(--warning-ink); }
.ck-ico.err { background: var(--danger-soft); color: var(--danger-ink); }
.ck-ico.info { background: var(--info-soft); color: var(--info-ink); }
.pv-stack { display: flex; flex-direction: column; gap: 18px; }
.pv-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.pv-label .spacer { flex: 1; }
.results-list { display: flex; flex-direction: column; gap: 8px; }
.result-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.result-row .rr-text { flex: 1; min-width: 0; }
.result-row .rr-text b { display: block; font-weight: 600; }
.result-row .rr-text span { display: block; font-size: 12px; color: var(--text-3); }

/* Предпросмотры площадок */
.pv-tg { border-radius: 16px; overflow: hidden; padding: 12px; background-color: #CFE3B8; background-image: radial-gradient(rgba(255, 255, 255, .35) 1.2px, transparent 1.4px), linear-gradient(160deg, #DCEBC2 0%, #B9D8A8 55%, #A6CDA4 100%); background-size: 18px 18px, 100% 100%; }
[data-theme="dark"] .pv-tg { background-color: #0E1621; background-image: radial-gradient(rgba(255, 255, 255, .05) 1.2px, transparent 1.4px), linear-gradient(160deg, #13202E, #0E1621); }
.tg-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(255, 255, 255, .88); border-radius: 12px; margin-bottom: 10px; color: #000; }
[data-theme="dark"] .tg-head { background: rgba(23, 33, 43, .92); color: #fff; }
.tg-head .tg-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #7D9077, #4E6150); flex-shrink: 0; overflow: hidden; }
.tg-head b { display: block; font-size: 13.5px; }
.tg-head span:not([class]) { display: block; font-size: 12px; color: #6D7F8F; }
.tg-msg { background: #fff; color: #000; border-radius: 14px 14px 14px 4px; overflow: hidden; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .12); max-width: 100%; }
[data-theme="dark"] .tg-msg { background: #182533; color: #F5F5F5; }
.tg-text { padding: 8px 12px 2px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; font-family: -apple-system, 'Segoe UI', Roboto, var(--font); }
.tg-text p { margin: 0 0 6px; } .tg-text ul, .tg-text ol { margin: 4px 0 6px; padding-left: 20px; }
.tg-text a { color: #168ACD; text-decoration: none; }
[data-theme="dark"] .tg-text a { color: #71BAFA; }
.tg-text blockquote { margin: 4px 0; padding: 2px 8px; border-left: 3px solid #168ACD; background: rgba(22, 138, 205, .08); border-radius: 0 6px 6px 0; }
.tg-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 2px 10px 6px; font-size: 11.5px; color: #8FA0AE; }
.tg-meta .i { width: 13px; height: 13px; }
.tg-btns { display: grid; gap: 4px; margin-top: 4px; }
.tg-btn { background: rgba(0, 0, 0, .14); color: #fff; text-align: center; padding: 9px; border-radius: 10px; font-weight: 700; font-size: 13.5px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tg-split { margin-top: 6px; }
.pv-media { display: grid; gap: 2px; background: transparent; }
.pv-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-media .pm { position: relative; overflow: hidden; background: #ddd; }
.pv-media .pm .play { position: absolute; inset: 0; display: grid; place-items: center; }
.pv-media .pm .play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, .45); display: grid; place-items: center; color: #fff; }
.pv-media .pm .more { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.pv-vk { background: #fff; color: #000; border-radius: 12px; border: 1px solid #E3E4E8; overflow: hidden; font-family: -apple-system, 'Segoe UI', Roboto, var(--font); }
[data-theme="dark"] .pv-vk { background: #222222; color: #E1E3E6; border-color: #363738; }
.vk-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px 10px; }
.vk-head .vk-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, #7D9077, #4E6150); flex-shrink: 0; }
.vk-head b { display: block; font-size: 13.5px; color: #2C2D2E; }
[data-theme="dark"] .vk-head b { color: #E1E3E6; }
.vk-head span:not([class]) { display: block; font-size: 12.5px; color: #818C99; }
.vk-text { padding: 0 16px 10px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.vk-text .vk-more { color: #2A5885; font-weight: 600; cursor: pointer; }
[data-theme="dark"] .vk-text .vk-more { color: #71AAEB; }
.vk-foot { display: flex; gap: 8px; padding: 10px 16px 12px; align-items: center; }
.vk-act { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: #F0F2F5; color: #626D7A; font-size: 13px; font-weight: 600; }
[data-theme="dark"] .vk-act { background: #2C2D2E; color: #A6A9AD; }
.vk-act .i { width: 16px; height: 16px; }
.vk-views { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: #99A2AD; font-size: 12.5px; }
.vk-views .i { width: 15px; height: 15px; }
.pv-max { border-radius: 16px; padding: 12px; background: linear-gradient(180deg, #EEF1FF 0%, #F6F1FF 100%); }
[data-theme="dark"] .pv-max { background: linear-gradient(180deg, #151831, #120F24); }
.max-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 10px; border-radius: 14px; background: rgba(255, 255, 255, .7); color: #14152B; }
[data-theme="dark"] .max-head { background: rgba(30, 33, 64, .8); color: #fff; }
.max-head .max-ava { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #7D9077, #4E6150); }
.max-head b { display: block; font-size: 13.5px; }
.max-head span:not([class]) { display: block; font-size: 12px; color: #7A7FA3; }
.max-msg { background: #fff; color: #14152B; border-radius: 20px 20px 20px 6px; overflow: hidden; box-shadow: 0 2px 8px -3px rgba(70, 60, 180, .25); }
[data-theme="dark"] .max-msg { background: #23264A; color: #F1F1FA; }
.max-msg .tg-text a { color: #5B4BFF; }
[data-theme="dark"] .max-msg .tg-text a { color: #A99FFF; }
.max-meta { display: flex; justify-content: flex-end; gap: 6px; padding: 2px 12px 8px; font-size: 11.5px; color: #8A8FB5; }
.pv-site { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #fff; color: #15171F; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .pv-site { background: #FBFBFD; }
.site-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #EEF0F5; border-bottom: 1px solid #E1E4EC; }
.site-bar .dots { display: flex; gap: 5px; }
.site-bar .dots span { width: 9px; height: 9px; border-radius: 50%; background: #D3D7E2; }
.site-bar .dots span:nth-child(1) { background: #FF6159; } .site-bar .dots span:nth-child(2) { background: #FFBD2E; } .site-bar .dots span:nth-child(3) { background: #28C941; }
.site-url { flex: 1; min-width: 0; height: 24px; border-radius: 7px; background: #fff; color: #5C6278; font-size: 11.5px; display: flex; align-items: center; gap: 5px; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.site-url .i { width: 12px; height: 12px; color: #0E9F6E; }
.site-nav { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid #EEF0F4; font-size: 12px; color: #5C6278; font-weight: 700; }
.site-nav b { color: #15171F; font-size: 13px; margin-right: auto; }
.site-body { padding: 18px 20px 24px; max-height: 560px; overflow: auto; }
.site-cover { width: 100%; aspect-ratio: 16/9; border-radius: 10px; object-fit: cover; display: block; margin-bottom: 14px; background: #e8e8ee; }
.site-cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5C7059; }
.site-h1 { font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 1.2; margin: 6px 0 6px; }
.site-meta { font-size: 12px; color: #7A8098; margin-bottom: 12px; }
.site-content { font-size: 14px; line-height: 1.65; color: #2A2E3D; overflow-wrap: anywhere; }
.site-content h2 { font-size: 17px; margin: 16px 0 6px; color: #15171F; }
.site-content h3 { font-size: 15px; margin: 12px 0 4px; color: #15171F; }
.site-content p { margin: 0 0 10px; }
.site-content ul, .site-content ol { padding-left: 20px; margin: 4px 0 10px; }
.site-content blockquote { margin: 10px 0; padding: 6px 12px; border-left: 3px solid #5C7059; background: #EEF2EC; border-radius: 0 8px 8px 0; }
.site-content a { color: #4E6150; }
.site-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.site-tags span { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #F0F1F6; color: #5C6278; }
.serp { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.serp .s-url { font-size: 12px; color: var(--success-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.serp .s-title { font-size: 16px; color: #3A5FD9; font-weight: 600; margin: 2px 0; }
[data-theme="dark"] .serp .s-title { color: #8AB4F8; }
.serp .s-desc { font-size: 13px; color: var(--text-2); }

/* =========================================================
   9. МЕДИАТЕКА
   ========================================================= */
.media-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.src-panel { position: sticky; top: calc(var(--topbar-h) + 10px); display: flex; flex-direction: column; gap: 14px; }
.src-list { display: flex; flex-direction: column; gap: 2px; }
.src-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px; color: var(--text); font-weight: 500; text-decoration: none; border: 0; background: none; width: 100%; text-align: left; }
.src-item:hover { background: var(--surface-3); color: var(--text); }
.src-item.active { background: var(--primary-soft); color: var(--primary-ink); }
.src-item:focus-visible { outline: none; box-shadow: var(--focus); }
.src-item .cnt { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-3); }
.src-item.active .cnt { color: var(--primary-ink); }
.src-item.sub { padding-left: 38px; font-size: 13px; }
.src-item .i { width: 17px; height: 17px; }
.src-group-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 12px 10px 4px; }
.src-cloud { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.storage-meter { padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.storage-meter .sm-top { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.media-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.media-tools .input-wrap { width: min(300px, 100%); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.m-card { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s; outline: none; }
.m-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.m-card:focus-visible { box-shadow: var(--focus); }
.m-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.m-thumb { position: relative; aspect-ratio: 4/3; background: var(--surface-3); overflow: hidden; }
.m-thumb img, .m-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.m-card:hover .m-thumb img { transform: scale(1.04); }
.m-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.m-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; background: rgba(20, 24, 18, .58); color: #fff; font-size: 11px; font-weight: 600; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.m-badge .i { width: 12px; height: 12px; }
.m-badge.ai { background: var(--ai-grad); }
.m-check { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.m-check .cb { width: 22px; height: 22px; border-radius: 7px; border-color: rgba(255, 255, 255, .9); background: rgba(20, 24, 18, .3); }
.m-check .cb:checked { background: var(--primary); border-color: var(--primary); }
.m-card:hover .m-check, .m-card.selected .m-check, .m-card:focus-within .m-check, .selecting .m-check { opacity: 1; }
.m-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.m-play span { width: 44px; height: 44px; border-radius: 50%; background: rgba(20, 24, 18, .5); display: grid; place-items: center; color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.m-meta { padding: 10px 12px 12px; }
.m-name .mn-base { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.m-name .mn-ext { flex-shrink: 0; }
.m-name { display: flex; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-info { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-top: 3px; font-weight: 500; }
.m-info .used { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--success-ink); font-weight: 600; }
.m-info .i { width: 13px; height: 13px; }
.dropzone { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; background: color-mix(in srgb, var(--primary) 16%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dropzone.show { display: grid; }
.dropzone .dz-box { padding: 40px 56px; border-radius: 26px; border: 3px dashed var(--primary); background: var(--surface); text-align: center; box-shadow: var(--shadow-lg); }
.dropzone .dz-box .i { width: 40px; height: 40px; color: var(--primary-ink); }
.dropzone .dz-box b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 500; margin-top: 10px; }
.folder-row { padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; }
.upload-list { display: flex; flex-direction: column; gap: 10px; }
.upload-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.mv-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; height: 100%; min-height: 0; }
.mv-stage { position: relative; background: #11140F; display: grid; place-items: center; overflow: hidden; min-height: 0; }
.mv-stage img, .mv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.mv-info { overflow-y: auto; padding: 20px; border-left: 1px solid var(--border); }
.mv-nav { position: absolute; top: 50%; width: 42px; height: 42px; border-radius: 50%; transform: translateY(-50%); }
.mv-nav.prev { left: 12px; } .mv-nav.next { right: 12px; }
.mv-nav .i { width: 20px; height: 20px; } .mv-nav[disabled] { opacity: .35; cursor: default; }
.mv-count { position: absolute; top: 18px; right: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(20, 24, 18, .62); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.mv-props { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.mv-props dt { color: var(--text-3); font-weight: 400; }
.mv-props dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.fake-video { position: relative; width: 100%; height: 100%; overflow: hidden; }
.fake-video img { width: 100%; height: 100%; object-fit: cover; }
.fake-video.playing img { animation: kenburns 9s ease-in-out infinite alternate; }
.mv-stage .fake-video img { object-fit: contain; }
.fv-bar { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12px; font-weight: 700; }
.fv-bar .track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.fv-bar .track span { display: block; height: 100%; width: 0; background: #fff; }
.fv-bar button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .2); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* Генерация медиа */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.style-opt { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-3); aspect-ratio: 1; color: #fff; }
.style-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-opt span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); text-align: left; }
.style-opt.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.style-opt:focus-visible { outline: none; box-shadow: var(--focus); }
.gen-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gen-res { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface-3); padding: 0; }
.gen-res img { width: 100%; display: block; aspect-ratio: var(--ar, 1); object-fit: cover; }
.gen-res.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.gen-res .m-check { opacity: 1; }
.gen-res .skeleton { aspect-ratio: var(--ar, 1); border-radius: 0; }
/* Редактор медиа */
.me { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.me-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.me-stage { position: relative; background: #11140F; background-image: linear-gradient(45deg, #1A1F17 25%, transparent 25%), linear-gradient(-45deg, #1A1F17 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1A1F17 75%), linear-gradient(-45deg, transparent 75%, #1A1F17 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; display: grid; place-items: center; padding: 24px; overflow: hidden; min-height: 0; }
.me-canvas-wrap { position: relative; line-height: 0; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8); }
.me-canvas-wrap canvas { max-width: 100%; max-height: calc(100vh - 170px); display: block; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; touch-action: none; }
.crop-box::before, .crop-box::after { content: ''; position: absolute; border: 0 solid rgba(255, 255, 255, .45); pointer-events: none; }
.crop-box::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left-width: 1px; border-right-width: 1px; }
.crop-box::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top-width: 1px; border-bottom-width: 1px; }
.crop-label { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); background: rgba(0, 0, 0, .7); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.4; }
.me-panel { border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.me-tools { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.me-tools::-webkit-scrollbar { display: none; }
.me-tool { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 48px; padding: 8px 4px; border-radius: 10px; border: 0; background: none; color: var(--text-3); font-size: 11px; font-weight: 600; }
.me-tool:hover { background: var(--surface-3); color: var(--text); }
.me-tool.active { background: var(--primary-soft); color: var(--primary-ink); }
.me-tool:focus-visible { outline: none; box-shadow: var(--focus); }
.me-props { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.slider-row { display: flex; flex-direction: column; gap: 6px; }
.slider-row .sr-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; }
.slider-row .sr-top span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.filter-opt { border: 2px solid transparent; border-radius: 12px; padding: 0; background: none; overflow: hidden; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.filter-opt canvas, .filter-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 10px; }
.filter-opt.active { border-color: var(--primary); color: var(--primary-ink); }
.filter-opt span { display: block; padding: 4px 0 2px; }
.ar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ar-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text-2); }
.ar-opt .ar-shape { border: 2px solid currentColor; border-radius: 3px; }
.ar-opt.active { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-soft); }
.ar-opt small { font-weight: 400; font-size: 10.5px; color: var(--text-3); }
.ai-tool { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-align: left; color: var(--text); transition: border-color .15s, background .15s; }
.ai-tool:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-soft); }
.ai-tool .at-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); flex-shrink: 0; }
.ai-tool b { display: block; font-size: 13.5px; font-weight: 600; }
.ai-tool span:not([class]) span:not([class]), .ai-tool > span:not([class]) > span:not([class]) { display: block; font-size: 12px; color: var(--text-3); }
.me-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(17, 20, 15, .55); color: #fff; font-weight: 600; z-index: 5; }
.me-busy .orb { width: 64px; height: 64px; margin: 0 auto 12px; }

/* =========================================================
   10. НАСТРОЙКИ: БРЕНД, АВТОПИЛОТ, КАНАЛЫ, ИИ
   ========================================================= */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--topbar-h) + 10px); }
.tone-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 130px; gap: 14px; align-items: center; font-size: 13px; font-weight: 500; color: var(--text-2); }
.tone-row span:last-child { text-align: right; }
.sample-box { padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1.6; font-size: 14px; white-space: pre-wrap; min-height: 140px; transition: opacity .2s; }
.sample-box.updating { opacity: .5; }
.rubric-list { display: flex; flex-direction: column; gap: 10px; }
.rubric { display: grid; grid-template-columns: auto minmax(0, 1fr) 180px auto; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.rubric .r-color { width: 34px; height: 34px; border-radius: 10px; background: var(--rc); border: 0; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.rubric .r-color:focus-visible { outline: none; box-shadow: var(--focus); }
.rubric .r-fields { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, max-content); gap: 8px; min-width: 0; }
.rubric .r-fields .select { width: auto; max-width: 100%; }
.rubric .r-share { display: flex; flex-direction: column; gap: 4px; }
.rubric .r-share .sr-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.share-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface-3); }
.share-bar span { display: block; height: 100%; background: var(--rc); min-width: 2px; }
.share-bar span:first-child { border-radius: 6px 0 0 6px; }
.share-bar span:last-child { border-radius: 0 6px 6px 0; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, 32px); gap: 8px; padding: 4px; }
.swatch-btn { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--rc); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.swatch-btn.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rc); }
.design-preview { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/5; background: var(--surface-3); }
.design-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 18px; color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.25; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.dp-wm { position: absolute; display: flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; border-radius: 10px; background: rgba(255, 255, 255, .9); color: #1D2119; font-weight: 600; font-size: 12px; }
.dp-wm .dp-logo { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 11px; overflow: hidden; }
.dp-wm .dp-logo img { width: 100%; height: 100%; object-fit: cover; }
.logo-upload { display: flex; align-items: center; gap: 14px; }
.logo-box { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px; overflow: hidden; flex-shrink: 0; }
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.mode-card { position: relative; text-align: left; padding: 16px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s, transform .15s; color: var(--text); }
.mode-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.mode-card.active { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.mode-card:focus-visible { outline: none; box-shadow: var(--focus); }
.mode-card .mc-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.mode-card.active .mc-ico { background: var(--ai-grad); color: #fff; }
.mode-card b { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.mode-card > span:not([class]) { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.mode-card .mc-badge { position: absolute; top: 12px; right: 12px; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pl-step { position: relative; padding: 14px; border-radius: 16px; border: 1.5px dashed var(--border-strong); background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pl-step.auto { border-style: solid; border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: var(--primary-soft); }
.pl-step:not(:last-child)::after { content: ''; position: absolute; right: -11px; top: 50%; width: 10px; height: 2px; background: var(--border-strong); }
.pl-step .pl-top { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pl-step .pl-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.pl-step.auto .pl-ico { background: var(--ai-grad); color: #fff; }
.pl-step .pl-desc { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.pl-step > .pill { align-self: flex-start; margin-top: auto; }
.pl-step > .seg { margin-top: auto; }
.pl-step .seg { width: 100%; }
.pl-step .seg button { flex: 1; justify-content: center; padding: 0 6px; }
.pause-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.pause-card .pc-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--success-soft); color: var(--success-ink); }
.pause-card.paused .pc-ico { background: var(--warning-soft); color: var(--warning-ink); }
.pause-card .pc-text { flex: 1; min-width: 200px; }
.pause-card .pc-text b { font-family: var(--font-display); font-size: 21px; font-weight: 500; display: block; }
.sched-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; padding: 18px 20px; border-top: 1px solid var(--border); }
.sched-row:first-child { border-top: 0; }
.sched-ch { display: flex; gap: 12px; align-items: flex-start; }
.sched-ch b { display: block; font-weight: 600; }
.sched-ch div > span:not([class]) { display: block; font-size: 12.5px; color: var(--text-3); }
.sched-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sched-body.disabled { opacity: .45; pointer-events: none; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day-btn { width: 42px; height: 36px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.day-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.day-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.times { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.time-chip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px 0 11px; border-radius: 10px; background: var(--plate); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.time-chip button { width: 22px; height: 22px; border-radius: 6px; border: 0; background: none; color: var(--text-3); display: grid; place-items: center; }
.time-chip button:hover { color: var(--danger); background: var(--danger-soft); }
.time-chip button .i { width: 14px; height: 14px; }
.dtp { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.dtp .input { font-variant-numeric: tabular-nums; }
.dtp .dtp-d { width: 150px; padding-right: 40px; }
.dtp .dtp-t { width: 78px; text-align: center; padding-left: 8px; padding-right: 8px; }
.dtp .dtp-t.sm { width: 70px; }
.dtp .dtp-cal { width: 32px; height: 32px; margin-left: -44px; margin-right: 6px; border: 0; border-radius: 8px; background: none; color: var(--text-3); display: grid; place-items: center; z-index: 1; flex-shrink: 0; }
.dtp .dtp-cal:hover:not([disabled]) { background: var(--primary-soft); color: var(--primary-ink); }
.dtp .dtp-cal:focus-visible { outline: none; box-shadow: var(--focus); }
.dtp .dtp-cal .i { width: 17px; height: 17px; }
.dtp .dtp-cal[disabled] { opacity: .5; }
.dtp.block { display: flex; width: 100%; }
.dtp.block .dtp-d { flex: 1; min-width: 0; width: auto; }
.dtp.date.block .dtp-cal { margin-right: 0; }
.dtp.invalid .input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.cal-pop { width: 296px; max-width: calc(100vw - 16px); padding: 10px; }
.cp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 8px; }
.cp-head b { font-family: var(--font-display); font-weight: 500; font-size: 17px; }
.cp-wd, .cp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cp-wd span { text-align: center; font-size: 11px; color: var(--text-3); font-weight: 600; padding: 4px 0; }
.cp-day { height: 36px; border: 0; border-radius: 10px; background: none; font-size: 13px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.cp-day:hover:not([disabled]) { background: var(--primary-soft); }
.cp-day.other { color: var(--text-3); }
.cp-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.cp-day.sel { background: var(--primary); color: #fff; font-weight: 600; }
.cp-day[disabled] { opacity: .32; cursor: default; }
.cp-day:focus-visible { outline: none; box-shadow: var(--focus); }
.cp-foot { display: flex; justify-content: center; padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--border); }
.member-list { display: flex; flex-direction: column; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); min-width: 0; }
.member:first-child { border-top: 0; }
.member .avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; font-size: 13px; }
.member .avatar .i { width: 17px; height: 17px; }
.member.invited .avatar { background: var(--surface-3); color: var(--text-3); }
.member .mb-text { flex: 1; min-width: 0; }
.member .mb-text b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.member .mb-text > span { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .mb-actions { width: 34px; display: flex; justify-content: flex-end; flex-shrink: 0; }
.member .mb-actions:has(.btn:not(.btn-icon)) { width: auto; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter span { height: 4px; border-radius: 2px; background: var(--surface-3); }
.pw-meter span.on.s1 { background: var(--danger); } .pw-meter span.on.s2 { background: var(--warning); } .pw-meter span.on.s3, .pw-meter span.on.s4 { background: var(--success); }
.qr-box { padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: #fff; line-height: 0; }
.backup-codes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.backup-codes span { padding: 8px 6px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; font-size: 13px; font-weight: 600; }
.change-list { margin: 10px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.logout-screen { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: var(--img-appbg, none) center / cover no-repeat, var(--bg); }
.logout-screen::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ls-card { position: relative; width: min(400px, 100%); padding: 28px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.ls-card h2 { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 16px 0 6px; }
.ls-logo { height: 44px; width: auto; display: block; }
@media (max-width: 600px) { .backup-codes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .member { padding: 12px 14px; flex-wrap: wrap; } .member .select { order: 3; margin-left: 50px; } }
.chip.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.chip.add { border-style: dashed; color: var(--primary-ink); font-weight: 600; }
.days-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--border); }
.sched-row.not-connected .sched-ch b { color: var(--text-2); }
.sched-note { margin-bottom: -4px; }
.time-menu { width: 252px; }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 6px 6px; }
.tg-opt { height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text); }
.tg-opt:hover:not([disabled]) { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.tg-opt[disabled] { opacity: .4; cursor: default; }
.tg-opt.quiet { color: var(--text-3); border-style: dashed; }
.tg-opt:focus-visible { outline: none; box-shadow: var(--focus); }
.tg-custom { gap: 6px; padding: 6px 6px 4px; }
.tg-custom .input { flex: 1; min-width: 0; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
@supports (grid-template-rows: subgrid) { .ch-card:not(.disconnected) { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 14px; align-content: start; } .ch-card.disconnected { grid-row: span 6; align-self: start; } }
.ch-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ch-card-head { display: flex; gap: 14px; align-items: center; }
.ch-card-head .cch-text { flex: 1; min-width: 0; }
.ch-card-head b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 500; line-height: 1.2; }
.ch-card-head .cch-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ch-card-head .switch { flex-direction: column; gap: 4px; align-self: flex-start; min-width: 64px; }
.ch-card-head .switch .sw-label { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.ch-status { display: flex; align-items: center; gap: 6px; min-height: 26px; min-width: 0; }
.ch-status { flex-wrap: wrap; align-self: start; align-content: flex-start; }
.ch-status .ch-checked { margin-left: auto; white-space: nowrap; }
.pill-btn { border: 0; cursor: pointer; }
.pill-btn:hover { filter: brightness(.96); text-decoration: underline; }
.pill-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.ch-card-head .cch-text > span { display: block; font-size: 12.5px; color: var(--text-3); }
.ch-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ch-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 10px; min-width: 0; }
.ch-stat b { display: block; font-size: 16px; font-weight: 600; }
.ch-stat span { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 400; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-card .ch-desc { color: var(--text-2); font-size: 13px; }
.ch-card .ch-foot { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; align-items: center; }
.ch-card.disconnected { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.instr { counter-reset: st; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.instr li { position: relative; padding-left: 36px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.instr li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.instr b { color: var(--text); }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check-row .cr-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); flex-shrink: 0; }
.check-row.ok .cr-ico { background: var(--success); color: #fff; }
.check-row.err .cr-ico { background: var(--danger); color: #fff; }
.check-row.run .cr-ico { background: transparent; color: var(--primary); }
.check-row .cr-ico .i { width: 14px; height: 14px; }
.check-row span { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.code-box { position: relative; background: #1D2119; color: #E2E7DA; border-radius: 12px; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.55; overflow: auto; max-height: 340px; white-space: pre; }
.code-box .k { color: #9CDCFE; } .code-box .s { color: #CE9178; } .code-box .n { color: #B5CEA8; } .code-box .c { color: #6A9955; }
.code-box .copy { position: absolute; top: 8px; right: 8px; }
.map-table { width: 100%; border-collapse: collapse; }
.map-table td, .map-table th { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.map-table th { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.map-table .input { height: 34px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prov-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.prov-head { display: flex; align-items: center; gap: 12px; }
.prov-head .ph-text { flex: 1; min-width: 0; }
.prov-head b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.prov-head .ph-text > span { display: block; font-size: 12.5px; color: var(--text-3); }
.prov-caps { display: flex; gap: 6px; flex-wrap: wrap; }
.prov-key { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-2); }
.prov-key .i { width: 15px; height: 15px; color: var(--text-3); }
.prov-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.prov-opt { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; color: var(--text); transition: border-color .15s; }
.prov-opt:hover { border-color: var(--primary); }
.prov-opt:focus-visible { outline: none; box-shadow: var(--focus); }
.prov-opt b { display: block; font-size: 13.5px; font-weight: 600; }
.prov-opt > span:not([class]) > span:not([class]) { display: block; font-size: 12px; color: var(--text-3); }
.prov-opt[disabled] { opacity: .5; pointer-events: none; }
.route-list { display: flex; flex-direction: column; }
.route-row { display: grid; grid-template-columns: minmax(220px, 1.25fr) minmax(170px, 1fr) minmax(190px, 1.1fr) auto; gap: 14px; align-items: start; padding: 14px 20px; border-top: 1px solid var(--border); }
.route-row > .route-task, .route-row > [data-params] { align-self: center; }
.route-row:first-child { border-top: 0; }
.route-task { display: flex; gap: 12px; align-items: center; min-width: 0; }
.route-task .rt-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); flex-shrink: 0; }
.route-task b { display: block; font-size: 14px; font-weight: 600; }
.route-task span:not([class]) { display: block; font-size: 12px; color: var(--text-3); }
.route-extra { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.preset-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.prompt-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.prompt-list { display: flex; flex-direction: column; gap: 4px; }
.prompt-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 0; background: none; text-align: left; color: var(--text); font-weight: 500; width: 100%; }
.prompt-item:hover { background: var(--surface-3); color: var(--text); }
.prompt-item.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.prompt-item.active small { color: rgba(255, 255, 255, .8); }
.prompt-item:focus-visible { outline: none; box-shadow: var(--focus); }
.prompt-item small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.var-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.var-chip { height: 26px; padding: 0 8px; border-radius: 7px; border: 1px dashed color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-soft); color: var(--primary-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; }
.var-chip:hover { border-style: solid; }
.prompt-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; min-height: 220px; }
.test-out { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; line-height: 1.6; min-height: 120px; font-size: 13.5px; }
.test-out.typing::after { content: '▍'; color: var(--primary); animation: blink 1s steps(1) infinite; }
.budget-hero { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.budget-hero b { font-family: var(--font-display); font-size: 38px; font-weight: 500; line-height: 1; }
.budget-hero span { color: var(--text-3); font-weight: 500; padding-bottom: 4px; }
.spend-row { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr) 90px; gap: 12px; align-items: center; padding: 8px 0; font-size: 13px; font-weight: 500; }
.spend-row .sr-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.domain-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.domain-box .mono { font-size: 13.5px; font-weight: 600; color: var(--text); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
/* Командная палитра */
.palette-backdrop { align-items: flex-start; padding-top: 12vh; }
.palette { max-width: 640px; overflow: hidden; }
.pal-search { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.pal-search .i { color: var(--text-3); width: 20px; height: 20px; }
.pal-input { flex: 1; height: 58px; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 500; color: var(--text); }
.pal-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.pal-group { font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 12px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 11px; border: 0; background: none; text-align: left; color: var(--text); font-weight: 500; }
.pal-item .i { color: var(--text-3); }
.pal-item.active { background: var(--primary-soft); color: var(--primary-ink); }
.pal-item.active .i { color: var(--primary-ink); }
.pal-item .pi-sub { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 400; white-space: nowrap; }
.pal-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); font-weight: 500; }
.notif-item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; text-align: left; width: 100%; border: 0; background: none; color: var(--text); }
.notif-item:hover { background: var(--surface-3); }
.notif-item.unread { background: var(--primary-soft); }
.notif-item .ni-text { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; }
.notif-item .ni-text span { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.notif-menu { width: 380px; max-width: calc(100vw - 24px); padding: 8px; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; }
.notif-head b { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.welcome-art { height: 190px; border-radius: 18px; overflow: hidden; position: relative; margin-bottom: 18px; background: var(--surface-3); }
.welcome-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(29, 33, 25, .72), rgba(29, 33, 25, 0) 62%); }
.welcome-art .wa-logo { position: absolute; left: 20px; bottom: 16px; z-index: 1; color: #fff; font-family: var(--font-display); font-size: 26px; line-height: 1.2; }
.welcome-art .wa-logo small { display: block; font-family: var(--font); font-size: 13.5px; color: #E6EBE2; margin-top: 4px; }
.feature-list { display: grid; gap: 10px; margin: 6px 0 16px; }
.feature-list div { display: flex; gap: 12px; align-items: flex-start; }
.feature-list .fl-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); flex-shrink: 0; }
.feature-list b { display: block; font-weight: 600; }
.feature-list span:not([class]) span:not([class]) { display: block; font-size: 13px; color: var(--text-2); }

/* =========================================================
   11. АНИМАЦИИ
   ========================================================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes toastInTop { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes orb { 0%, 100% { transform: scale(1); border-radius: 50%; } 33% { transform: scale(1.06); border-radius: 46% 54% 52% 48%; } 66% { transform: scale(.97); border-radius: 53% 47% 45% 55%; } }
@keyframes floaty { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 20px); } }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.18) translate(-4%, -3%); } }
@keyframes flow { 0% { transform: translateX(-6px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateX(6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   12. АДАПТИВНОСТЬ
   ========================================================= */
@media (max-width: 1279px) {
  .ed-body { grid-template-columns: minmax(0, 1fr) 400px; }
  .post-row, .list-head { grid-template-columns: 22px 56px minmax(0, 1fr) 140px 150px 120px; }
  .post-row > .pr-ch, .list-head > .pr-ch { display: none; }
  .post-row.no-check { grid-template-columns: 56px minmax(0, 1fr) 140px 150px 120px; }
  .two-col { grid-template-columns: minmax(0, 1fr) 320px; }
  .route-row { grid-template-columns: minmax(200px, 1fr) minmax(150px, 1fr) minmax(170px, 1fr) auto; }
  .page-title { font-size: 38px; }
}
@media (max-width: 1199px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .kpi-row > .span-3 { grid-column: span 6; }
  .two-col { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .route-row { grid-template-columns: 1fr 1fr; }
  .route-row .route-task { grid-column: 1 / -1; }
  .pipeline { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .pl-step:not(:last-child)::after { display: none; }
  .prompt-layout { grid-template-columns: 1fr; }
  .prompt-list { flex-direction: row; overflow-x: auto; }
  .prompt-item { white-space: nowrap; width: auto; }
  .prompt-item small { display: none; }
  .media-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 1099px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 288px; transform: translateX(-105%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .9, .3, 1), visibility 0s linear .26s; box-shadow: var(--shadow-lg); padding-top: 20px; }
  .app.nav-open .sidebar { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2, .9, .3, 1), visibility 0s; }
  .app.nav-open .sb-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
  .sidebar .sb-close { display: inline-flex; }
  .topbar .hamburger { display: grid; margin-left: -6px; }
  .topbar { position: sticky; top: 0; max-width: none; align-items: center; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); margin-bottom: 14px; }
  .page-title { font-size: 28px; }
  .page-sub { font-size: 13px; margin-top: 3px; }
  .tb-right, .tb-title { display: contents; }
  .page-title { order: 2; flex: 1 1 0; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
  .top-actions { order: 3; gap: 2px; }
  .page-sub { order: 4; width: 100%; margin-top: -6px; max-width: none; }
  .page-sub:empty { display: none; }
  .page-actions { order: 10; width: 100%; gap: 8px; }
  .page-actions:empty { display: none; }
  .page-actions > .btn { flex: 1 1 auto; padding-left: 12px; padding-right: 12px; gap: 6px; }
  .page-actions > .autosave { display: none; }
  .page-actions:has(> .autosave:only-child) { display: none; }
  .user-chip { padding: 2px; }
  .user-chip .nm, .user-chip .chev, .top-sep { display: none; }
  .demo-bar { padding: 6px 16px; }
  .view { margin: 0 16px 40px; }
  .ed-body { grid-template-columns: 1fr; }
  .ed-mtabs { display: flex; }
  .ed[data-pane="edit"] .ed-side { display: none; }
  .ed[data-pane="preview"] .ed-main { display: none; }
  .ed-side { border-left: 0; }
  .mv-wrap { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 50vh) auto; }
  .mv-info { border-left: 0; border-top: 1px solid var(--border); }
  .me-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .me-panel { border-left: 0; border-top: 1px solid var(--border); max-height: 46vh; }
  .me-canvas-wrap canvas { max-height: 44vh; }
}
@media (max-width: 1099px) and (min-width: 900px) {
  .media-layout { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .page-title { font-size: 25px; }
  .page-sub { font-size: 12.5px; }
  .view { margin: 0 10px 40px; padding: 10px; border-radius: 18px; }
  .kpi-row > .span-3 { grid-column: span 6; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .media-layout { grid-template-columns: minmax(0, 1fr); }
  .src-panel { position: static; min-width: 0; }
  .src-list { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .src-item { width: auto; white-space: nowrap; border: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
  .src-item.sub { padding-left: 10px; }
  .src-group-title { display: none; }
  .storage-meter { display: none; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
  .post-row { grid-template-columns: 22px 48px minmax(0, 1fr) auto; grid-template-areas: none; gap: 10px; padding: 12px; }
  .post-row.no-check { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .post-row > .pr-date-col, .post-row > .pr-ch, .post-row > .pr-status, .post-row > .pr-actions { display: none; }
  .post-row .pr-mobile { display: flex !important; }
  .list-head { display: none; }
  .cal-grid { grid-auto-rows: minmax(64px, auto); }
  .cal-cell { padding: 4px; gap: 2px; }
  .cal-head div { padding: 8px 4px; text-align: center; font-size: 11px; }
  .cal-date { width: 24px; height: 24px; font-size: 12px; margin: 0 auto; }
  .cal-hol, .cal-add { display: none; }
  .ev { padding: 0; height: 6px; border: 0; border-radius: 3px; background: var(--rc); }
  .ev > *, .ev .ev-top { display: none !important; }
  .cal-more { font-size: 10.5px; padding: 0 2px; text-align: center; }
  .week { grid-template-columns: 1fr; }
  .wk-col { min-height: 0; }
  .tone-row { grid-template-columns: 1fr 1fr; }
  .tone-row input { grid-column: 1 / -1; grid-row: 2; }
  .rubric { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rubric .r-fields { grid-template-columns: 1fr; }
  .rubric .r-share { grid-column: 1 / -1; }
  .sched-row { grid-template-columns: 1fr; gap: 12px; }
  .route-row { grid-template-columns: 1fr; padding: 14px 16px; }
  .ch-grid, .prov-grid { grid-template-columns: 1fr; }
  .set-row { flex-wrap: wrap; gap: 10px 16px; }
  .set-row .set-text { flex: 1 1 220px; }
  .set-control { flex-wrap: wrap; max-width: 100%; }
  .ed-head { padding: 10px 12px; }
  .ed-head .ed-crumb > b { display: none; }
  .ed-head .ed-actions { width: 100%; justify-content: flex-end; }
  .ed-head .ed-actions .btn { --h: 34px; padding: 0 12px; font-size: 13px; }
  .att-item { flex-wrap: wrap; }
  .att-item .att-text { flex: 1 1 calc(100% - 52px); }
  .att-item .att-actions { width: 100%; justify-content: flex-end; }
  .ed-head .ed-save-state { display: none; }
  .ed-main { padding: 16px 14px 48px; }
  .ed-side { padding: 16px 14px 40px; }
  .ed-meta { grid-template-columns: 1fr 1fr; }
  .ed-meta .ed-ch-field { grid-column: 1 / -1; }
  .ed-title { font-size: 23px; }
  .res-item { grid-template-columns: 22px 44px minmax(0, 1fr) auto; }
  .res-item .res-ch { display: none; }
  .modal-backdrop:not(.full):not(.drawer):not(.palette-backdrop) { padding: 0; align-items: flex-end; }
  .modal-backdrop:not(.full):not(.drawer):not(.palette-backdrop) .modal { max-height: 94vh; border-radius: 22px 22px 0 0; animation: slideUp .26s cubic-bezier(.2, .9, .3, 1); }
  .modal.drawer { max-width: 100%; border-radius: 0; }
  .modal-head { padding: 18px 18px 4px; }
  .modal-title { font-size: 22px; }
  .modal-body { padding: 14px 18px 18px; }
  .modal-foot { padding: 12px 18px 16px; }
  .modal-foot .btn { flex: 1; }
  .modal-foot .left { width: 100%; margin: 0; }
  .toasts { left: 12px; right: 12px; bottom: 12px; transform: none; width: auto; align-items: stretch; }
  body.modal-open .toasts { left: 12px; right: 12px; top: 12px; transform: none; align-items: stretch; }
  .toast { max-width: none; min-width: 0; }
  .steps .step .st-label { display: none; }
  .preset-grid.wz-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { padding: 18px; }
  .hero-main { grid-template-columns: 1fr; }
  .hero-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .hero-title { font-size: 23px; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe-step:last-child { grid-column: 1 / -1; }
  .pipe-step::before { display: none; }
  .sidebar-forest { flex-basis: 140px; min-height: 140px; }
}
@media (max-width: 520px) {
  .kpi-row > .span-3 { grid-column: span 12; }
  .ed-meta { grid-template-columns: 1fr; }
  .preset-grid, .preset-grid.wz-presets { grid-template-columns: repeat(2, 1fr); }
  .tabs { margin-bottom: 14px; gap: 8px; }
  .tab { padding: 0 14px; height: 40px; }
  .page-title { font-size: 23px; }
  .demo-bar .db-long { display: none; }
  .demo-bar .db-short { display: inline; }
  .demo-bar a { margin-left: auto; }
}
@media (max-height: 820px) and (min-width: 1100px) {
  .sidebar-forest { flex-basis: 110px; min-height: 110px; }
  .nav-item { padding-top: 9px; padding-bottom: 9px; }
}
.pr-mobile { display: none !important; align-items: center; gap: 6px; flex-direction: column; align-items: flex-end; }
@media (forced-colors: active) {
  .btn-ai, .btn-primary { border: 1px solid ButtonText; }
  .pill, .tag, .chip { border: 1px solid CanvasText; }
}
