/* OfferUno — стили сайта, кабинета и админки */
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --brand: #5B2EFF;
  --brand-600: #4A1FE6;
  --brand-700: #3A12C4;
  --brand-100: #E9E3FF;
  --brand-50: #F4F1FF;
  --lilac: #B9A6FF;
  --navy: #0B0F3A;
  --navy-2: #151a4d;
  --ink: #14172E;
  --text: #2A2E45;
  --muted: #6B6F86;
  --faint: #9A9DB0;
  --line: #E6E7EF;
  --line-2: #EFF0F5;
  --bg: #F6F6FB;
  --white: #fff;
  --success: #0E9F6E;
  --success-bg: #E7F8F1;
  --danger: #E0393E;
  --danger-bg: #FDECEC;
  --warning: #C77700;
  --warning-bg: #FFF4E0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 60, .06);
  --shadow: 0 1px 2px rgba(16, 20, 60, .05), 0 6px 24px rgba(16, 20, 60, .06);
  --shadow-lg: 0 12px 48px rgba(16, 20, 60, .14);
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.hidden { display: none !important; }
.right { text-align: right; }
.center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 15px; height: 15px; vertical-align: -2px; }
.icon.lg { width: 22px; height: 22px; }
.icon.fill { fill: currentColor; stroke: none; }

/* --- Кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  background: var(--white); color: var(--ink); border-color: var(--line); transition: .15s ease;
  text-decoration: none;
}
.btn:hover { border-color: #cfd1df; color: var(--ink); background: #fbfbfe; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(91, 46, 255, .25); }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.dark:hover { background: var(--navy-2); color: #fff; }
.btn.soft { background: var(--brand-50); border-color: var(--brand-50); color: var(--brand-700); }
.btn.soft:hover { background: var(--brand-100); border-color: var(--brand-100); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); border-color: #f6c6c7; color: var(--danger); }
.btn.del { color: var(--muted, #8A8FA8); }
.btn.del:hover { background: var(--danger-bg); border-color: #f6c6c7; color: var(--danger); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn.icon-only { width: 36px; padding: 0; height: 36px; }
.btn.sm.icon-only { width: 32px; height: 32px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --- Формы --- */
label { display: block; font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url],
input[type=date], input[type=datetime-local], input[type=time], input[type=search], input[type=color], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); transition: .15s;
  outline: none; appearance: none; -webkit-appearance: none;
}
textarea { height: auto; min-height: 90px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6F86' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 46, 255, .14); }
input[type=color] { padding: 4px; width: 56px; cursor: pointer; }
input[type=file] { font-size: 13.5px; }
input::placeholder, textarea::placeholder { color: #a7aabb; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; color: var(--text); cursor: pointer; margin-bottom: 10px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.input-group { display: flex; gap: 8px; }
.input-group > input, .input-group > select { flex: 1; }

/* --- Карточки и блоки --- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 20px 22px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 16px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.brand { background: var(--brand-50); color: var(--brand-700); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.dark { background: var(--navy); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert.success { background: var(--success-bg); border-color: #b7ebd5; color: #08613f; }
.alert.error { background: var(--danger-bg); border-color: #f6c6c7; color: #9d1c20; }
.alert.info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.alert.warning { background: var(--warning-bg); border-color: #f6dcab; color: #8a5300; }
.alert .grow p:last-child { margin: 0; }
.flashes { position: fixed; top: 16px; right: 16px; z-index: 1000; width: min(420px, calc(100vw - 32px)); }
.flashes .alert { box-shadow: var(--shadow-lg); animation: flash-in .25s ease; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

/* --- Таблицы --- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FBFBFD; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #FAFAFE; }
.table .title-cell a { color: var(--ink); font-weight: 600; }
.table .title-cell a:hover { color: var(--brand); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--lilac); margin-bottom: 8px; }
.empty h3 { margin-bottom: 6px; }

/* --- Публичная шапка (лендинг) --- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(230, 231, 239, .7); }
.site-header .inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; align-items: center; gap: 28px; }
.site-header .logo img { height: 36px; display: block; }
.site-header nav { display: flex; gap: 24px; flex: 1; }
.site-header nav a { color: var(--text); font-weight: 500; font-size: 14.5px; }
.site-header nav a:hover { color: var(--brand); }
.site-header .btn-row { margin-left: auto; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* --- Авторизация --- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at 10% 0%, #7C5CFF 0%, transparent 60%), radial-gradient(800px 600px at 100% 100%, #2B1BB8 0%, transparent 60%), var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; max-width: 460px; }
.auth-side p { color: rgba(255, 255, 255, .78); font-size: 16px; max-width: 440px; }
.auth-side .logo img { height: 40px; }
.auth-side .float-card { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; padding: 16px; display: flex; gap: 14px; align-items: center; backdrop-filter: blur(6px); max-width: 380px; margin-top: 14px; }
.auth-side .float-card .ph { width: 64px; height: 64px; border-radius: 12px; background: linear-gradient(135deg, #9b85ff, #5B2EFF); flex: none; }
.auth-side .float-card b { display: block; color: #fff; }
.auth-side .float-card span { color: rgba(255, 255, 255, .7); font-size: 13px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 26px; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 26px; }
.auth-box .ref-note { margin: -14px 0 20px; padding: 10px 14px; border-radius: 12px; background: var(--brand-50); color: var(--ink); font-size: 14px; }
.auth-box .mobile-logo { display: none; margin-bottom: 28px; }
.auth-box .mobile-logo img { height: 34px; }
.auth-foot { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }

/* --- Кабинет: каркас --- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: none; background: var(--navy); color: #c9cbe4; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 60; }
.sidebar .brand { padding: 20px 20px 18px; display: block; }
.sidebar .brand img { height: 32px; display: block; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.sidebar .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6f7399; padding: 16px 10px 6px; font-weight: 600; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #c9cbe4; font-weight: 500; font-size: 14.5px; margin-bottom: 2px; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.active { background: linear-gradient(90deg, rgba(91, 46, 255, .9), rgba(91, 46, 255, .55)); color: #fff; box-shadow: 0 4px 16px rgba(91, 46, 255, .35); }
.sidebar nav a .count { margin-left: auto; background: #FF5A5F; color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.sidebar .side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar .me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: #fff; }
.sidebar .me:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .me .avatar { width: 34px; height: 34px; }
.sidebar .me div b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.2; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me div span { font-size: 12px; color: #8d90b5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sidebar .cta { margin: 6px 12px 14px; }
/* Тонкая полоса прокрутки меню: видна при наведении, в цвет интерфейса */
.sidebar nav { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sidebar nav:hover { scrollbar-color: rgba(201, 203, 228, .28) transparent; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-button { display: none; height: 0; }
.sidebar nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
.sidebar nav:hover::-webkit-scrollbar-thumb { background: rgba(201, 203, 228, .28); }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(91, 46, 255, .85); }
/* Кнопка сворачивания меню */
.side-toggle { position: absolute; top: 24px; right: -13px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(91, 46, 255, .45);
  background: var(--navy); color: #c9cbe4; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 4px 14px rgba(11, 15, 58, .35); transition: background .15s, color .15s, transform .2s; z-index: 2; }
.side-toggle:hover { background: var(--brand, #5B2EFF); color: #fff; border-color: var(--brand, #5B2EFF); }
.side-toggle svg { transition: transform .2s ease; }
.sidebar, .main { transition: width .2s ease, margin-left .2s ease; }
/* Свёрнутое меню: только значки, подписи — во всплывающих подсказках */
html.side-collapsed { --sidebar: 76px; }
html.side-collapsed .side-toggle svg { transform: rotate(180deg); }
html.side-collapsed .sidebar .brand { padding: 20px 0 18px 20px; overflow: hidden; width: 54px; }
html.side-collapsed .sidebar .brand img { max-width: none; }
html.side-collapsed .sidebar .cta { margin: 6px 14px 14px; }
html.side-collapsed .sidebar .cta .btn { font-size: 0; gap: 0; padding: 0; height: 44px; justify-content: center; }
html.side-collapsed .sidebar .cta .btn svg { width: 20px; height: 20px; }
html.side-collapsed .sidebar nav { padding: 6px 14px 12px; }
html.side-collapsed .sidebar nav a { font-size: 0; gap: 0; justify-content: center; padding: 11px 0; position: relative; }
html.side-collapsed .sidebar nav a svg { width: 20px; height: 20px; }
html.side-collapsed .sidebar nav a .count { position: absolute; top: 3px; right: 3px; font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; }
html.side-collapsed .sidebar .nav-label { font-size: 0; padding: 10px 0 6px; margin: 0 8px; border-top: 1px solid rgba(255, 255, 255, .08); }
html.side-collapsed .sidebar .side-foot { padding: 14px 12px; }
html.side-collapsed .sidebar .me { justify-content: center; padding: 8px 0; }
html.side-collapsed .sidebar .me > div { display: none; }
/* Админка: значок «Владелец сервиса», красные счётчики у пунктов и «Выйти» в свёрнутом меню */
html.side-collapsed .sidebar .side-role { padding: 0 0 8px !important; display: flex; justify-content: center; }
html.side-collapsed .sidebar .side-role .badge { padding: 6px; }
html.side-collapsed .sidebar .side-role .badge > span { display: none; }
html.side-collapsed .sidebar nav a .badge { position: absolute; top: 3px; right: 3px; margin: 0 !important; font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; line-height: 16px; justify-content: center; }
html.side-collapsed .sidebar .side-logout { font-size: 0; gap: 0; justify-content: center; }
html.side-collapsed .sidebar .side-logout svg { width: 18px; height: 18px; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: rgba(246, 246, 251, .97); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid transparent; }
/* Мерцание у бокового меню при прокрутке (Mac): «резиновый» отскок страницы открывал светлый фон под тёмным меню,
   а размытие под шапкой перерисовывало край меню на каждом кадре. Отскок выключен, меню — на своём слое. */
html:has(body > .app), html:has(body > .app) body { overscroll-behavior-y: none; }
@media (min-width: 901px) { .sidebar { transform: translateZ(0); backface-visibility: hidden; } }
.topbar .menu-btn { display: none; }
.topbar .crumbs { flex: 1; font-size: 14px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs a:hover { color: var(--brand); }
.content { padding: 8px 32px 48px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #8C72FF, #5B2EFF); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.imp-bar { background: #FFB020; color: #3b2600; font-weight: 600; font-size: 13.5px; padding: 8px 32px; display: flex; align-items: center; gap: 12px; }
.imp-bar form { margin: 0 0 0 auto; }
.sub-banner { margin: 0 0 18px; }

/* --- Статистика --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stat .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.layout-2 > aside { position: sticky; top: 80px; }
.layout-2 > aside.tall { position: static; } /* выше экрана — прокручивается со страницей, иначе её низ не увидеть */

/* --- Онбординг --- */
.onboard { background: linear-gradient(120deg, #0B0F3A 0%, #2a1a9e 60%, #5B2EFF 100%); color: #fff; border-radius: 18px; padding: 26px 28px; position: relative; overflow: hidden; margin-bottom: 22px; }
.onboard h2 { color: #fff; font-size: 22px; }
.onboard p { color: rgba(255, 255, 255, .8); max-width: 640px; }
.onboard .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.onboard .step { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 14px 16px; }
.onboard .step b { display: flex; align-items: center; gap: 8px; color: #fff; margin-bottom: 4px; }
.onboard .step span { font-size: 13.5px; color: rgba(255, 255, 255, .75); }
.onboard .step .n { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.onboard .step.done .n { background: #2BD68D; color: #fff; }
.onboard .btn { margin-top: 8px; }

/* --- Список подборок --- */
.sel-list { display: flex; flex-direction: column; }
.sel-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); color: var(--text); }
.sel-row:last-child { border-bottom: 0; }
.sel-row:hover { background: #FAFAFE; color: var(--text); }
/* Отметка подборок и вариантов для удаления разом */
.sel-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-2); }
.sel-item:last-child { border-bottom: 0; }
.sel-item .sel-row { flex: 1; min-width: 0; border-bottom: 0; padding-left: 10px; }
.sel-item.picked, .sel-item.picked .sel-row { background: var(--brand-50); }
.sel-pick { display: flex; align-items: center; padding: 0 0 0 20px; cursor: pointer; }
.sel-pick input, .item-card .pick input, .bulk-all input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); cursor: pointer; flex: none; }
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line-2); }
.bulk-bar.card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; margin-bottom: 12px; }
.bulk-bar .grow { flex: 1; }
.bulk-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; margin: 0; }
.item-card .pick { display: flex; align-self: flex-start; margin: 0 0 0 -4px; padding: 4px 2px; cursor: pointer; }
.item-card.picked { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 46, 255, .12); }
.sel-row .thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--brand-50) center/cover no-repeat; flex: none; display: flex; align-items: center; justify-content: center; color: var(--lilac); }
.sel-row .t { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-row .m { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.sel-row .m span { display: inline-flex; align-items: center; gap: 4px; }
.sel-row .side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { max-width: 300px; height: 38px; }
.filters select { width: auto; height: 38px; }
.tabs { display: inline-flex; background: #ECECF4; border-radius: 10px; padding: 3px; gap: 2px; }
.tabs a { padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.tabs a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; }

/* --- Редактор подборки --- */
.editor-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 18px; }
.editor-head .title-input { font-size: 24px; font-weight: 800; color: var(--ink); border: 1px solid transparent; background: transparent; height: 48px; padding: 0 10px; margin-left: -10px; flex: 1; min-width: 260px; letter-spacing: -.02em; }
.editor-head .title-input:hover { border-color: var(--line); background: #fff; }
.sel-code { margin: -16px 0 16px; letter-spacing: .02em; }
.editor-head .title-input:focus { background: #fff; }
.share-box { display: flex; gap: 8px; align-items: center; background: var(--brand-50); border: 1px dashed var(--lilac); border-radius: 12px; padding: 8px 8px 8px 14px; }
.share-box input { border: 0; background: transparent; height: 32px; padding: 0; font-size: 13.5px; color: var(--brand-700); box-shadow: none !important; }
.item-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 12px; transition: box-shadow .15s, border-color .15s; position: relative; }
.item-card:hover { box-shadow: var(--shadow); }
.item-card.dragging { opacity: .5; }
.item-card.drag-over { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 46, 255, .15); }
.item-card .grip { cursor: grab; color: var(--faint); display: flex; align-items: center; padding: 0 2px; margin: -16px 0 -16px -8px; }
.item-card .grip:active { cursor: grabbing; }
.item-card .photo { width: 168px; height: 124px; border-radius: 12px; background: var(--brand-50) center/cover no-repeat; flex: none; position: relative; display: flex; align-items: center; justify-content: center; color: var(--lilac); overflow: hidden; }
.item-card .photo .cnt { position: absolute; bottom: 6px; right: 6px; background: rgba(11, 15, 58, .7); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; display: flex; gap: 4px; align-items: center; }
.item-card .body { flex: 1; min-width: 0; }
.item-card .kind { font-size: 11.5px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.item-card h3 { font-size: 17px; margin: 2px 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-card .stars { color: #FFB020; font-size: 14px; letter-spacing: 1px; }
.item-card .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.item-card .facts span { display: inline-flex; align-items: center; gap: 5px; }
.item-card .price { font-size: 20px; font-weight: 800; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.item-card .old { text-decoration: line-through; color: var(--faint); font-size: 13px; font-weight: 500; }
.item-card .side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; flex: 0 1 auto; max-width: 260px; min-width: 150px; }
.item-card .side .small { overflow-wrap: anywhere; }
.item-card .comment { margin-top: 10px; background: #FFFBEA; border: 1px solid #FBEBB0; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; color: #6b5300; }
.item-card .actions { display: flex; gap: 4px; }
.item-card .rec { position: absolute; top: -9px; left: 22px; }
.item-card .views { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.add-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.add-tile { border: 1.5px dashed #cfc6ff; border-radius: 14px; padding: 14px; text-align: center; color: var(--brand-700); font-weight: 600; font-size: 13.5px; background: #fcfbff; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.add-tile:hover { background: var(--brand-50); border-color: var(--brand); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 10px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border: 0; }
.timeline .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; }
.timeline .ic.req { background: var(--success-bg); color: var(--success); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; color: var(--ink); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.mini-stats div { background: var(--bg); border-radius: 12px; padding: 10px 6px; }
.mini-stats b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.mini-stats span { font-size: 12px; color: var(--muted); }

/* Фото в форме варианта */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-tile { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--bg) center/cover no-repeat; border: 1px solid var(--line); cursor: grab; }
.photo-tile .x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; background: rgba(11, 15, 58, .75); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.photo-tile .first { position: absolute; left: 5px; bottom: 5px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.photo-tile.removed { opacity: .25; }
.dropzone { border: 1.5px dashed #cfc6ff; border-radius: 12px; padding: 18px; text-align: center; background: #fcfbff; color: var(--muted); font-size: 13.5px; }
.dropzone.over { background: var(--brand-50); border-color: var(--brand); }

/* Модальные окна */
.modal { position: fixed; inset: 0; background: rgba(11, 15, 58, .45); backdrop-filter: blur(3px); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal.open { display: flex; animation: fade .15s ease; }
.modal .dialog { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); }
.modal .dialog.wide { max-width: 760px; }
.modal .dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal .dialog-head h3 { margin: 0; font-size: 17px; }
.modal .dialog-body { padding: 20px 22px; }
.modal .dialog-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }

.dropdown { position: relative; display: inline-block; }
.dropdown .menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 100; }
.dropdown.open .menu { display: block; }
.dropdown .menu a, .dropdown .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown .menu a:hover, .dropdown .menu button:hover { background: var(--bg); color: var(--ink); }
.dropdown .menu .danger { color: var(--danger); }
.dropdown .menu hr { margin: 6px 0; }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; position: relative; }
.plan.current { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 46, 255, .12); }
.plan.popular { border-color: var(--brand); }
.plan .tag { position: absolute; top: -11px; left: 22px; }
.plan h3 { font-size: 19px; margin-bottom: 4px; }
.plan .price { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 10px 0 2px; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; flex: 1; }
.plan li { display: flex; gap: 8px; padding: 5px 0; font-size: 14px; }
.plan li .icon { color: var(--success); margin-top: 2px; }
.plan li.off { color: var(--faint); }
.plan li.off .icon { color: var(--faint); }
.periods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.periods label { margin: 0; flex: 1; min-width: 70px; }
.periods input { display: none; }
.periods span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.periods span small { display: block; color: var(--success); font-size: 11px; font-weight: 600; }
.periods input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }

/* Лендинг */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; background: radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, .22), transparent 60%), radial-gradient(700px 500px at -10% 20%, rgba(91, 46, 255, .10), transparent 60%), #fff; }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 54px; line-height: 1.05; letter-spacing: -.035em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #5B2EFF, #A78BFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 540px; margin-bottom: 26px; }
.hero .note { margin-top: 14px; color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero .note span { display: inline-flex; align-items: center; gap: 6px; }
.hero .note .icon { color: var(--success); }
.mock { position: relative; }
.mock .browser { background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(30, 20, 120, .22), 0 0 0 1px rgba(16, 20, 60, .06); overflow: hidden; }
.mock .bar { height: 36px; background: #F2F2F8; display: flex; align-items: center; gap: 6px; padding: 0 14px; }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #dcdcea; display: block; }
.mock .bar .url { margin-left: 12px; background: #fff; border-radius: 6px; height: 22px; flex: 1; font-size: 11px; color: var(--muted); display: flex; align-items: center; padding: 0 10px; }
.mock .page { padding: 18px; background: linear-gradient(180deg, #F7F5FF, #fff 40%); }
.mock .agency { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mock .agency .lg { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #8C72FF, #5B2EFF); }
.mock .agency b { font-size: 13px; color: var(--ink); display: block; }
.mock .agency span { font-size: 11px; color: var(--muted); }
.mock .tour { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.mock .tour .im { width: 92px; height: 72px; border-radius: 10px; flex: none; background-size: cover; background-position: center; }
.mock .tour b { font-size: 13px; color: var(--ink); display: block; }
.mock .tour .st { color: #FFB020; font-size: 11px; }
.mock .tour .f { font-size: 11px; color: var(--muted); }
.mock .tour .p { margin-left: auto; text-align: right; font-weight: 800; color: var(--ink); font-size: 14px; white-space: nowrap; }
.mock .tour .p .btn { height: 26px; font-size: 11px; padding: 0 9px; margin-top: 6px; border-radius: 7px; }
.mock .chip { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.mock .chip .ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.mock .chip.c1 { left: -28px; bottom: -24px; }
.mock .chip.c1 .ic { background: var(--success-bg); color: var(--success); }
.mock .chip.c2 { right: -22px; top: -22px; }
.mock .chip.c2 .ic { background: var(--brand-50); color: var(--brand); }
.mock .chip small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.section { padding: 76px 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -.025em; }
.section-head p { color: var(--muted); font-size: 17px; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.feature .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: how; }
.how .s { position: relative; padding-top: 56px; }
.how .s::before { counter-increment: how; content: counter(how); position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.how h3 { font-size: 18px; }
.how p { color: var(--muted); }
.cta-band { background: linear-gradient(120deg, #0B0F3A 0%, #2a1a9e 55%, #5B2EFF 100%); border-radius: 26px; padding: 48px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.cta-band p { color: rgba(255, 255, 255, .8); margin: 0; font-size: 17px; }
.cta-band .btn { background: #fff; color: var(--navy); border-color: #fff; }
.site-footer { background: var(--navy); color: #a9acd0; padding: 44px 0 32px; font-size: 14px; }
.site-footer .inner { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { color: #d7d9f2; }
.site-footer a:hover { color: #fff; }
.site-footer img { height: 30px; }
.site-footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer .footer-social { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 16px 8px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; transition: background .15s; }
.site-footer .footer-social:hover { background: rgba(255, 255, 255, .16); }
.site-footer .footer-social .mx { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; }
.site-footer .footer-social .mx svg { display: block; width: 100%; height: 100%; }
.site-footer .footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.site-footer .footer-bottom p { margin: 0; color: #6f7399; font-size: 13px; }
.site-footer .footer-counter { line-height: 0; opacity: .55; transition: opacity .15s; }
.site-footer .footer-counter:hover { opacity: 1; }
.site-footer .footer-counter img { width: 88px; height: 31px; border-radius: 4px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.doc { max-width: 820px; margin: 0 auto; padding: 48px 20px 80px; }
.doc h1 { font-size: 34px; margin-bottom: 26px; }
.doc h2 { font-size: 19px; margin-top: 28px; }
.doc p { color: var(--text); }

/* Сводные графики */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.bars .b { flex: 1; background: linear-gradient(180deg, #8C72FF, #5B2EFF); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .b:hover::after { content: attr(data-t); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.hbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.hbar .n { width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .track { flex: 1; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--brand); border-radius: 99px; }
.hbar .v { width: 36px; text-align: right; font-weight: 700; color: var(--ink); }

.locked { text-align: center; padding: 56px 24px; }
.locked .icon { width: 44px; height: 44px; color: var(--brand); }

.code-box { background: var(--navy); color: #d8daf5; border-radius: 12px; padding: 14px 16px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.steps-list { counter-reset: st; list-style: none; padding: 0; margin: 0; }
.steps-list li { position: relative; padding: 0 0 18px 48px; }
.steps-list li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50); color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps-list li b { color: var(--ink); }
kbd { background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; font-size: 12.5px; font-family: inherit; }

.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.error-page .code { font-size: 96px; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(90deg, #5B2EFF, #A78BFF); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* --- Адаптив --- */
@media (max-width: 1100px) {
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .layout-2 > aside { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .mock { max-width: 560px; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  html.side-collapsed { --sidebar: 248px; }
  .side-toggle { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 8px 16px 40px; }
  .imp-bar { padding: 8px 16px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-box .mobile-logo { display: block; }
  .site-header nav { display: none; }
  .onboard .steps { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 24px; }
  .item-card { flex-wrap: wrap; }
  .item-card .photo { width: 100%; height: 170px; }
  .item-card .side { flex-direction: row; width: 100%; max-width: none; align-items: center; }
  .item-card .grip { display: none; }
  .hero { padding: 40px 0 20px; }
  .hero h1 { font-size: 36px; }
  .features { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 28px; }
  .cta-band { padding: 30px 22px; }
  .cta-band h2 { font-size: 26px; }
  .cta-band > div, .cta-band .btn { width: 100%; }
  .cta-band .btn { white-space: normal; text-align: center; height: auto; min-height: 50px; padding: 10px 16px; font-size: 15px; line-height: 1.25; }
  .hero .btn-row .btn { width: 100%; }
  .site-header .inner { gap: 12px; padding: 0 16px; height: 62px; }
  .site-header .logo { flex-shrink: 0; }
  .site-header .logo img { height: 32px; width: auto; }
  .site-header .btn-row { flex-wrap: nowrap; gap: 6px; }
  .site-header .btn { height: 38px; padding: 0 12px; font-size: 14px; }
  .site-header .btn.ghost { padding: 0 8px; }
  .hide-sm { display: none; }
  .add-tiles { grid-template-columns: 1fr 1fr; }
  .sel-row .side { display: none; }
  .mock .chip { display: none; }
}
@media (max-width: 380px) {
  .site-header .logo img { height: 26px; }
  .site-header .btn { padding: 0 10px; font-size: 13.5px; }
  .hero .container > * { min-width: 0; }
  .hero h1 { font-size: 31px; }
  .hero .btn-row .btn { white-space: normal; height: auto; min-height: 50px; padding: 10px 16px; font-size: 15px; text-align: center; }
}

/* Блок «Оплата из подборки» на главной */
.pay-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; background: linear-gradient(135deg, var(--brand-50, #F2EEFF), #fff 70%); border: 1px solid var(--line); border-radius: 26px; padding: 44px; }
.pay-band h2 { font-size: 34px; letter-spacing: -.02em; margin: 10px 0 12px; }
.pay-band .lead-sm { font-size: 17px; color: var(--muted); margin: 0 0 18px; }
.pay-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.pay-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.pay-points li .icon { color: var(--success); flex: none; margin-top: 2px; }
.pay-mock { position: relative; max-width: 360px; justify-self: center; width: 100%; }
.pm-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.pm-im { height: 150px; background: linear-gradient(135deg, #46c3e6 0%, #1e7fbf 55%, #f3d7a0 56%, #e9c07a 100%); }
.pm-body { padding: 18px; display: grid; gap: 8px; }
.pm-body .st { color: #F5A524; margin-left: 6px; font-size: 13px; }
.pm-body .f { color: var(--muted); font-size: 13.5px; }
.pm-price { font-size: 26px; font-weight: 800; color: var(--ink); margin: 4px 0; }
.pm-price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.pm-body .btn { pointer-events: none; }
.pm-ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pm-ways span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 52px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: #fff; }
.pm-ways span.on { border-color: var(--brand); background: var(--brand-50); color: var(--ink); }
.pm-ways img { display: block; width: auto; }
.pay-band-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.pay-band-brands .pay-brands.chips img { border: 1px solid var(--line); }
.pay-mock .pm-chip { position: absolute; right: -28px; top: 118px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.pay-mock .pm-chip .ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--success-bg); color: var(--success); }
.pay-mock .pm-chip small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
@media (max-width: 900px) {
  .pay-band { grid-template-columns: 1fr; padding: 30px 22px; gap: 28px; }
  .pay-band h2 { font-size: 26px; }
  .pay-mock .pm-chip { right: 8px; top: 118px; }
}

/* Шаблоны подборок */
.tpl-now { margin-bottom: 20px; }
.tpl-now-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tpl-card { overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.tpl-card.is-current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100), 0 10px 30px rgba(91, 46, 255, .12); }
.tpl-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--brand-50); overflow: hidden; border-bottom: 1px solid var(--line-2); }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .4s; }
.tpl-thumb:hover img { transform: scale(1.03); }
.tpl-look { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 6px); opacity: 0; transition: .2s; background: rgba(11, 15, 58, .86); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 99px; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tpl-thumb:hover .tpl-look { opacity: 1; transform: translate(-50%, 0); }
.tpl-marks { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-marks .badge { box-shadow: 0 4px 12px rgba(11, 15, 58, .15); }
.tpl-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tpl-body h3 { margin: 0 0 6px; font-size: 18px; }
.tpl-body p { margin: 0 0 12px; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tpl-tags span { font-size: 12px; font-weight: 600; color: var(--brand-700); background: var(--brand-50); padding: 4px 10px; border-radius: 99px; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tpl-actions .btn[disabled] { opacity: 1; cursor: default; }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-grid.adm-tpl { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tpl-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 8px 0 14px; }
@media (max-width: 900px) { .tpl-checks { grid-template-columns: 1fr 1fr; } }
.tpl-checks .check { font-size: 13.5px; }
.tpl-checks .check small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
@media (hover: none) { .tpl-look { opacity: 1; transform: translate(-50%, 0); } }
.tpl-marks .badge.brand { background: var(--brand); color: #fff; }

/* Теги вариантов */
.nights-pair { display: flex; align-items: center; gap: 6px; }
.nights-pair input { flex: 1; min-width: 0; text-align: center; padding: 0 6px; }
.nights-pair span { color: var(--muted); font-weight: 600; }
.tag-pill, .tag-prev { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: var(--tag, #5B2EFF); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; text-transform: uppercase; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-opt { position: relative; cursor: pointer; }
.tag-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tag-opt span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--tag); color: var(--tag); font-size: 12.5px; font-weight: 800; letter-spacing: .03em; background: #fff; transition: all .15s; }
.tag-opt span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tag); }
.tag-opt input:checked + span { background: var(--tag); color: #fff; }
.tag-opt input:checked + span::before { background: #fff; }
.tag-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(91, 46, 255, .2); }
.tag-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tag-row { display: flex; align-items: center; gap: 10px; }
.tag-row input[type=color] { width: 36px; height: 32px; padding: 2px; border-radius: 8px; flex: none; cursor: pointer; }
.tag-row input[data-tag-label] { flex: 1; height: 34px; min-width: 0; text-transform: uppercase; }
.tag-row .tag-prev { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.item-card .tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; }
.item-card .tags .tag-pill { height: 20px; font-size: 10.5px; padding: 0 7px; }

/* API: документация и интеграции */
.api-doc .code-box { margin: 8px 0 14px; }
.api-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
.api-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.api-table td:first-child { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink); }
.key-new { background: var(--success-bg); border: 1px solid var(--success); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.key-new .code-box { margin: 8px 0; user-select: all; }
.table-mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-mini th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.table-mini td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
@media (max-width: 640px) { .api-table td:first-child { white-space: normal; } }

/* Выбор туроператора: свой выпадающий список под полем */
.op-pick { position: relative; }
.op-pick-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 288px; overflow-y: auto; padding: 6px; z-index: 50; }
.op-pick-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.op-pick-item small { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.op-pick-item:hover, .op-pick-item.active { background: var(--brand-50); color: var(--brand-700); }
.op-pick-empty { padding: 10px; color: var(--muted); font-size: 13px; }

/* Варианты одной карточки (6, 7, 9 ночей) */
.item-group { margin-bottom: 12px; }
.item-group .item-card { margin-bottom: 0; }
.item-group .item-card + .item-card { margin-top: 6px; }
.item-group.dragging { opacity: .5; }
.item-card.is-variant { margin-left: 34px; background: var(--brand-50); border-style: dashed; padding: 12px 16px; }
.item-card.is-variant .photo { width: 120px; height: 88px; }
.item-card .var-mark { cursor: default; color: var(--brand); }
.item-card .var-label { color: var(--muted); }
.item-card .var-note { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--brand-700); background: var(--brand-50); border-radius: 8px; padding: 4px 9px; }
.item-card .var-offer { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--warning); background: var(--warning-bg); border-radius: 8px; padding: 5px 10px; width: fit-content; }
.linklike { all: unset; cursor: pointer; color: var(--brand); font-weight: 600; text-decoration: underline; }
@media (max-width: 640px) { .item-card.is-variant { margin-left: 14px; } }

/* Подпись акта ЭП */
.esign-status { font-size: 13.5px; color: var(--muted); }
.esign-status.err { color: var(--danger); }
.esign-status.ok { color: var(--success); font-weight: 600; }
.esign .esign-help { margin-top: 10px; }
.esign-setup { margin: 10px 0 0; padding-left: 18px; line-height: 1.55; background: var(--warning-bg); border-radius: 10px; padding: 10px 12px 10px 28px; }
.esign-setup li + li { margin-top: 4px; }
/* Страница акта: просмотр документа шире, лист целиком помещается в окно */
.act-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.act-frame { width: 100%; height: min(1040px, calc(100vh - 150px)); min-height: 620px; border: 0; display: block; background: #ECEAF5; }
@media (max-width: 1000px) { .act-layout { grid-template-columns: 1fr; } .act-frame { height: 80vh; } }
.phones { display: grid; gap: 8px; }
.phone-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 8px; align-items: center; }
.phones [data-phone-add] { justify-self: start; }
@media (max-width: 640px) { .phone-row { grid-template-columns: 1fr auto; } .phone-row input[name="phone_notes"] { grid-column: 1; } }
.react-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.react-sum span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.react-sum .like { background: #FFF0F3; color: #E0245E; }
.react-sum .like .ic { fill: currentColor; }
.react-sum .dis { background: #F1F2F6; color: #4A4F60; }
.sel-row .m .dl-on { color: var(--brand); }
.sel-row .m .dl-past { color: #B86E00; }

/* Приведи коллегу */
.ref-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; padding: 26px 28px; margin-bottom: 22px; border-radius: var(--radius); color: #fff; background: radial-gradient(120% 140% at 0% 0%, #7B5CFF 0%, #5B2EFF 45%, #2A1A7A 100%); box-shadow: var(--shadow-sm); }
.ref-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; opacity: .85; }
.ref-bonus { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 8px 0 10px; }
.ref-hero-text p { margin: 0; opacity: .85; font-size: 14px; line-height: 1.55; }
.ref-link-box { background: #fff; color: var(--ink); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.ref-link-box label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ref-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FBFBFD; }
.ref-link .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ref-share { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-total { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ref-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.ref-steps b { display: block; }
.ref-steps span { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .ref-hero { grid-template-columns: 1fr; padding: 20px; } .ref-bonus { font-size: 24px; } }

/* Страница партнёрской программы */
.ref-visual { position: relative; display: flex; justify-content: center; padding: 30px 0; }
.ref-gift { width: min(380px, 100%); border-radius: 26px; padding: 28px 30px; color: #fff; background: radial-gradient(130% 140% at 0% 0%, #8C72FF 0%, #5B2EFF 45%, #1E1470 100%); box-shadow: 0 30px 80px rgba(30, 20, 120, .3); position: relative; overflow: hidden; }
.ref-gift::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ref-gift-top { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; opacity: .9; }
.ref-gift-val { font-size: 64px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 22px 0 6px; }
.ref-gift-sub { opacity: .8; font-size: 15px; }
.ref-gift-code { margin-top: 24px; padding: 12px 14px; border: 1.5px dashed rgba(255, 255, 255, .45); border-radius: 12px; font-family: ui-monospace, monospace; font-size: 18px; font-weight: 700; letter-spacing: .12em; text-align: center; }
.ref-visual .chip { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.ref-visual .chip .ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand); }
.ref-visual .chip.c1 { left: 0; bottom: 0; }
.ref-visual .chip.c2 { right: 0; top: 4px; }
.ref-visual .chip.c2 .ic { background: var(--success-bg); color: var(--success); }
.ref-visual .chip small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.ref-rules-wrap { padding-top: 0; }
.ref-rules { background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.ref-rules summary { list-style: none; cursor: pointer; padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; position: relative; padding-right: 56px; }
.ref-rules summary::-webkit-details-marker { display: none; }
.ref-rules summary span { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 17px; }
.ref-rules summary span .icon { color: var(--brand); }
.ref-rules summary small { color: var(--muted); font-size: 13.5px; }
.ref-rules summary::after { content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--brand); line-height: 1; }
.ref-rules[open] summary::after { content: "–"; }
.ref-rules[open] summary small { display: none; }
.ref-rules-body { max-width: none; padding: 0 24px 24px; font-size: 14px; border-top: 1px solid var(--line-2); }
.ref-rules-body h2 { font-size: 16px; margin-top: 22px; }
.ref-prog-grid { align-items: end; }
@media (max-width: 900px) { .ref-gift-val { font-size: 48px; } .ref-visual .chip { position: static; margin-top: 10px; } .ref-visual { flex-direction: column; align-items: center; } }

/* «Цена действует до…» */
.deadline-field input[type=datetime-local] { width: 200px; height: 34px; font-size: 14px; padding: 0 10px; }
.deadline-field input[type=datetime-local]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.deadline-field .btn.sm { height: 34px; }
.deadline-field .dl-clear { color: var(--muted); }
.deadline-field .dl-clear.active { background: var(--brand-50); border-color: #D9D0FF; color: var(--brand-700); }

.tpl-card.is-locked .tpl-thumb img { filter: grayscale(.55); opacity: .75; }
.plan-tpls { gap: 2px 14px; }

/* Сравнение тарифов */
.cmp-h1 { font-size: 40px; font-weight: 800; letter-spacing: -.025em; }
.cmp-periods { display: flex; justify-content: center; gap: 6px; margin: -16px 0 26px; flex-wrap: wrap; }
.cmp-periods button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cmp-periods button small { color: var(--success); font-weight: 700; margin-left: 2px; }
.cmp-periods button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.cmp-periods button.on small { color: #7EF0C0; }
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; min-width: 760px; }
.cmp th, .cmp td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); text-align: center; vertical-align: middle; }
.cmp thead th { position: sticky; top: 0; background: #fff; z-index: 2; vertical-align: top; padding-top: 38px; border-bottom: 1px solid var(--line); }
.cmp thead th.popular { background: var(--brand-50); }
.cmp .cmp-first { text-align: left; width: 34%; position: sticky; left: 0; background: #fff; z-index: 1; }
.cmp thead .cmp-first { z-index: 3; }
.cmp .cmp-first b { display: block; color: var(--ink); font-weight: 600; }
.cmp .cmp-first span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.4; }
.cmp-name { font-size: 18px; font-weight: 800; color: var(--ink); }
.cmp-price { margin: 6px 0 4px; }
.cmp-price b { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.cmp-price small { color: var(--muted); margin-left: 4px; }
.cmp-desc { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.cmp-pop { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.cmp-group td { background: var(--bg); text-align: left; font-weight: 800; color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 18px; }
.cmp-group td:first-child { position: sticky; left: 0; }
.cmp-sub td { padding-top: 9px; padding-bottom: 9px; }
.cmp-sub .cmp-first { padding-left: 30px; font-size: 14px; }
.cmp-sub .cmp-first a { color: var(--text); border-bottom: 1px dashed var(--line); cursor: zoom-in; }
.modal.tpl-modal .dialog { max-width: 720px; }
.tpl-modal-view { position: relative; padding: 16px 22px; background: var(--bg, #f6f7fb); }
.tpl-modal-view img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 12px; background: #fff; box-shadow: 0 6px 24px rgba(11, 15, 58, .12); }
.tpl-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--text); box-shadow: 0 4px 14px rgba(11, 15, 58, .18); cursor: pointer; display: grid; place-items: center; }
.tpl-nav:hover { color: var(--brand); }
.tpl-nav.prev { left: 6px; } .tpl-nav.next { right: 6px; }
.modal .tpl-modal-foot { justify-content: space-between; font-size: 13px; }
.cmp-yes { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--success-bg); color: var(--success); }
.cmp-yes .icon { width: 15px; height: 15px; }
.cmp-no { color: #B8BBCB; font-weight: 700; }
.cmp tbody tr:hover td { background: #FAFAFE; }
.cmp tbody tr:hover td.cmp-first { background: #FAFAFE; }
.cmp tfoot td { border-bottom: 0; padding: 18px; }
.cmp-note { text-align: center; color: var(--muted); font-size: 13.5px; max-width: 720px; margin: 18px auto 0; }
.cmp-swipe { display: none; }
@media (max-width: 700px) {
  .cmp-h1 { font-size: 28px; }
  .cmp { min-width: 520px; font-size: 13px; }
  .cmp .cmp-first { width: 130px; min-width: 130px; box-shadow: 6px 0 10px -8px rgba(11, 15, 58, .25); }
  .cmp .cmp-first span, .cmp-desc { display: none; }
  .cmp th, .cmp td { padding: 10px 8px; }
  .cmp thead th { padding-top: 32px; } .cmp-pop { top: 8px; }
  .cmp-name { font-size: 15px; } .cmp-price b { font-size: 19px; }
  .cmp-sub .cmp-first { padding-left: 14px; font-size: 13px; }
  .cmp-group td { padding: 8px; font-size: 11.5px; }
  .cmp-swipe { display: block; text-align: center; color: var(--muted); font-size: 12.5px; margin: -14px 0 10px; }
}

/* Страница «О программе» */
.sw-table { overflow-x: auto; margin: 18px 0 26px; }
.sw-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #fff; }
.sw-table th, .sw-table td { border: 1px solid var(--line); padding: 10px 14px; vertical-align: top; text-align: left; }
.sw-table th { width: 38%; font-weight: 500; color: var(--muted); background: #FBFBFD; }
.sw h3 { font-size: 16px; margin-top: 18px; }
.sw ul, .sw ol { padding-left: 22px; } .sw li { margin-bottom: 6px; }
.sw-docs li { margin-bottom: 8px; }
.sw-nav { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 640px) { .sw-table th { width: 42%; } .sw-table th, .sw-table td { padding: 8px 10px; font-size: 13.5px; } }

/* Телефон: ничего не выходит за край экрана */
.stat, .stats > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .ref-hero > * { min-width: 0; }
@media (max-width: 700px) {
  .tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex: none; }
  .page-head > * { min-width: 0; max-width: 100%; }
  .page-head .btn-row { flex-wrap: wrap; }
}
.stat .value { overflow-wrap: anywhere; }
.n-sum { min-width: 0; }
.n-sum .badge { white-space: normal; height: auto; min-height: 24px; padding-top: 2px; padding-bottom: 2px; }
@media (max-width: 700px) {
  .n-edit span { display: none; }
  .share-box { flex-wrap: wrap; }
  .share-box input { flex: 1 1 100%; min-width: 0; }
}
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .stats.stats-3 { grid-template-columns: repeat(2, 1fr); } }

/* Поля в ряд с подписями разной длины: поля ввода выравниваются по нижнему краю */
.fields-bottom { align-items: end; }

/* Фотобанк отелей: страны → курорты → отели, фильтры */
.pb-filter { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(4, minmax(130px, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.pb-filter .field { margin: 0; }
.pb-btns { display: flex; gap: 8px; }
.pb-flag { width: 24px; height: 18px; border-radius: 4px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); vertical-align: -3px; }
.pb-flag.lg { width: 36px; height: 27px; border-radius: 6px; }
.pb-noflag { display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); box-shadow: none; }
.pb-stars { color: #E8A33D; font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.pb-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; font-size: 14px; color: var(--muted); }
.pb-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.pb-crumbs b { color: var(--ink); }
.pb-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pb-country { overflow: hidden; display: flex; flex-direction: column; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.pb-country:hover { transform: translateY(-2px); border-color: var(--brand-100); box-shadow: 0 12px 30px rgba(20, 23, 46, .1); }
.pb-mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; height: 150px; background: var(--brand-50); }
.pb-mosaic span { background: center / cover no-repeat; }
.pb-mosaic span:first-child { grid-row: span 2; }
.pb-mosaic span:only-child { grid-column: span 2; }
.pb-mosaic .pb-empty { grid-column: span 2; grid-row: span 2; display: grid; place-items: center; color: var(--brand-100); }
.pb-ch { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.pb-ch > div { flex: 1; min-width: 0; }
.pb-ch b { display: block; font-size: 16px; color: var(--ink); }
.pb-ch span { font-size: 12.5px; color: var(--muted); }
.pb-go { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand) !important; display: grid; place-items: center; flex: none; }
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
.pb-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.pb-head h3 { margin: 10px 0 0; }
.pb-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pb-region { display: flex; align-items: center; gap: 12px; padding: 10px; color: inherit; transition: border-color .2s, box-shadow .2s; }
.pb-region:hover { border-color: var(--brand-100); box-shadow: 0 8px 20px rgba(20, 23, 46, .08); }
.pb-rcover { width: 64px; height: 48px; border-radius: 10px; background: var(--brand-50) center / cover no-repeat; flex: none; display: grid; place-items: center; color: var(--brand-100); }
.pb-region b { display: block; color: var(--ink); font-size: 14.5px; }
.pb-region small { color: var(--muted); font-size: 12px; }
.pb-hotel { margin-bottom: 14px; }
.pb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pb-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--brand-50); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.pb-chip .pb-flag { width: 18px; height: 13px; border-radius: 3px; }
@media (max-width: 1100px) { .pb-filter { grid-template-columns: 1fr 1fr 1fr; } .pb-q { grid-column: 1 / -1; } }
@media (max-width: 640px) { .pb-filter { grid-template-columns: 1fr 1fr; } .pb-btns { grid-column: 1 / -1; } }

/* Вариант без фото: метка на превью и плашка с действиями */
.item-card .photo .nophoto { position: absolute; left: 8px; bottom: 8px; background: #FFF4E5; color: #9A5B00; border: 1px solid #F6D9A3; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.item-card .photo .ph-mark { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(11,15,58,.72); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; backdrop-filter: blur(4px); }
.item-card .photo.is-placeholder::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.12); pointer-events: none; }
.nophoto-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: #FFF8EC; border: 1px solid #F6E0B5; font-size: 13px; color: #7a4a05; }
.nophoto-bar > span { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.nophoto-bar form { margin: 0; }
.alert.nophoto-sum { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.alert.nophoto-sum .ic { flex: none; margin-top: 3px; }
/* Фотобанк: склейка, правка, главное фото, похожие пары */
.pb-pick { display: inline-flex; vertical-align: -2px; margin-right: 4px; cursor: pointer; }
.pb-pick input { width: 17px; height: 17px; accent-color: var(--brand); }
.pb-edit { position: relative; }
.pb-edit > summary { list-style: none; }
.pb-edit > summary::-webkit-details-marker { display: none; }
.pb-edit-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 360px; box-shadow: 0 16px 40px rgba(20, 23, 46, .16); }
.pb-add .pb-edit-form { width: 440px; }
.pb-edit-form textarea { min-height: 0; }
.photo-tile .pb-pin { position: absolute; top: 6px; left: 6px; opacity: 0; transition: opacity .15s; }
.photo-tile:hover .pb-pin { opacity: 1; }
.photo-tile.is-pinned { box-shadow: 0 0 0 3px #E8A33D; }
.pb-main { position: absolute; left: 6px; top: 6px; background: #E8A33D; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.pb-reason { position: absolute; left: 6px; bottom: 6px; right: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10.5px; padding: 2px 6px; border-radius: 6px; text-align: center; }
.pb-mergebar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 16px; background: #14172E; color: #fff; box-shadow: 0 16px 40px rgba(20, 23, 46, .35); }
.pb-mergebar[hidden] { display: none; }
.pb-pair { margin-bottom: 12px; }
.pb-pair-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pb-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pb-pair-h b { color: var(--ink); }
.pb-pair-ph { display: flex; gap: 6px; margin-top: 8px; }
.pb-pair-ph span { width: 84px; height: 62px; border-radius: 8px; background: var(--brand-50) center / cover no-repeat; }
.pb-pair-ph .pb-none { display: grid; place-items: center; font-size: 11px; color: var(--muted); width: 84px; }
@media (max-width: 700px) { .pb-pair-grid { grid-template-columns: 1fr; } .pb-edit-form, .pb-add .pb-edit-form { width: min(360px, 86vw); } .pb-add .pb-edit-form { left: 0; right: auto; } }

/* Аналитика: воронка продаж */
.funnel-card { margin-bottom: 18px; }
.funnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: start; }
.fs { min-width: 0; }
.fs-bar { height: 120px; display: flex; align-items: flex-end; background: var(--brand-50); border-radius: 12px; overflow: hidden; }
.fs-bar i { display: block; width: 100%; background: linear-gradient(180deg, var(--brand), #8B6CFF); border-radius: 12px 12px 0 0; }
.fs:last-child .fs-bar i { background: linear-gradient(180deg, #0E9F6E, #34C38F); }
.fs-n { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 8px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.fs-l { font-weight: 600; font-size: 13.5px; }
.fs-p { font-size: 12.5px; color: var(--ink); margin-top: 2px; }
.fd { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.fd.up { color: var(--success); } .fd.down { color: var(--danger); }
.funnel-foot { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.funnel-table td, .funnel-table th { white-space: nowrap; }
.table th.right, .table td.right { text-align: right; }
.funnel-table td { vertical-align: middle; }
.funnel-table .num { font-variant-numeric: tabular-nums; }
.funnel-table .pc { display: inline-block; min-width: 42px; text-align: right; font-size: 12px; color: var(--faint, #9A9DB0); }
@media (max-width: 900px) { .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fs-bar { height: 80px; } }

/* --- Сводка владельца: выручка, зона риска, журнал ошибок --- */
.od-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.od-alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid; text-decoration: none; color: var(--ink); }
.od-alert span { flex: 1; font-size: 14px; }
.od-alert.warn { background: #FFF8EB; border-color: #F6D9A3; } .od-alert.warn > .icon:first-child { color: #C27803; }
.od-alert.danger { background: #FFF1F1; border-color: #F5C2C4; } .od-alert.danger > .icon:first-child { color: var(--danger); }
.od-alert:hover { filter: brightness(.98); }
.od-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.od-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.od-legend span { display: inline-flex; align-items: center; gap: 6px; }
.od-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.od-k-new { background: #5B2EFF; } .od-k-renewal { background: #9C85FF; } .od-k-seats { background: #34C38F; } .od-k-fees { background: #F2B544; }
.od-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; align-items: end; height: 220px; margin-top: 18px; }
.od-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; min-width: 0; }
.od-v { font-size: 11.5px; font-weight: 700; color: var(--ink); margin-bottom: 4px; white-space: nowrap; }
.od-bar { display: flex; flex-direction: column-reverse; min-height: 3px; background: var(--brand-50); border-radius: 8px 8px 3px 3px; overflow: hidden; }
.od-bar i { display: block; width: 100%; }
.od-m { font-size: 12px; color: var(--muted); margin-top: 6px; }
.od-col.cur .od-m { color: var(--brand); font-weight: 700; }
.od-li { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.od-li:last-child { border-bottom: 0; }
.rk-gifts { position: relative; }
.rk-gifts summary { list-style: none; cursor: pointer; }
.rk-gifts summary::-webkit-details-marker { display: none; }
.rk-gifts form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 280px; box-shadow: var(--shadow); }
.rk-card { display: flex; gap: 18px; padding: 16px 18px; margin-bottom: 12px; align-items: flex-start; }
.rk-card.done { opacity: .62; }
.rk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rk-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rk-who .small { flex-basis: 100%; }
.rk-why { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-why .badge { gap: 5px; }
.rk-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); }
.rk-facts b { color: var(--ink); font-weight: 600; }
.rk-note { color: var(--success); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rk-act { display: flex; flex-direction: column; gap: 6px; width: 250px; flex-shrink: 0; }
.rk-act .btn { width: 100%; justify-content: center; }
.rk-mark { display: flex; gap: 6px; }
.rk-mark input { flex: 1; min-width: 0; height: 32px; font-size: 13px; padding: 0 10px; }
.rk-mark .btn { width: auto; }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; font: inherit; }
.er-table .er-msg { max-width: 460px; white-space: normal; word-break: break-word; }
.er-title { font-size: 20px; word-break: break-word; margin-top: 6px; }
.er-tb { background: #14172E; color: #E6E8F2; border-radius: 12px; padding: 14px; font-size: 12px; line-height: 1.5; overflow: auto; max-height: 520px; margin-top: 10px; white-space: pre; }
@media (max-width: 900px) {
  .od-chart { gap: 4px; height: 180px; } .od-v { font-size: 9.5px; } .od-m { font-size: 10.5px; }
  .rk-card { flex-direction: column; } .rk-act { width: 100%; }
}

details > summary.btn, details > summary.linklike { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details > summary.btn::-webkit-details-marker, details > summary.linklike::-webkit-details-marker { display: none; }
.adm-email { margin-top: 4px; }
.adm-email summary { text-decoration: none; }
.adm-email form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px; background: var(--line-2); border-radius: 10px; max-width: 360px; white-space: normal; }
.adm-email input[type=email] { height: 34px; }
/* Единое окно оплаты: СБП / банковская карта / счёт */
.modal.pm-modal .dialog { max-width: 440px; }
.pm-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--brand-50); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.pm-sum b { font-size: 20px; color: var(--text); white-space: nowrap; }
.pm-list { display: flex; flex-direction: column; gap: 10px; }
.pm-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pm-opt:hover, .pm-opt:focus-visible { border-color: var(--brand); box-shadow: 0 6px 18px rgba(91, 46, 255, .12); outline: none; transform: translateY(-1px); }
.pm-opt.busy { opacity: .6; pointer-events: none; }
.pm-logo { flex: none; width: 64px; height: 40px; border-radius: 10px; background: #F6F7FB; display: grid; place-items: center; }
.pm-logo img { display: block; max-width: 54px; height: auto; }
.pm-logo-inv { color: var(--brand); }
.pm-logo-inv .icon { width: 22px; height: 22px; }
.pm-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-text b { font-size: 15px; }
.pm-text small { font-size: 12.5px; color: var(--muted); }
.pm-go { flex: none; color: var(--muted); }
.pm-opt:hover .pm-go { color: var(--brand); }
.pm-note { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.pay-brands { display: inline-flex; align-items: center; gap: 12px; vertical-align: middle; }
.pay-brands img { display: block; width: auto; }
.pay-foot .pay-brands { margin-right: 6px; }
.pm-toggles { display: flex; flex-direction: column; gap: 8px; }
.pm-toggle { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.pm-toggle:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.pm-toggle input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.pm-toggle .pm-logo { width: 54px; height: 34px; background: #fff; }
.pm-toggle .pm-logo img { max-width: 44px; }
.pm-toggle > span:last-child { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.pm-toggle small { color: var(--muted); font-size: 12px; }
/* Логотипы платёжных систем на белых плашках (тёмный подвал сайта): все плашки одной высоты — 34px */
.pay-brands.chips { gap: 8px; flex-wrap: wrap; }
.pay-brands.chips img { box-sizing: content-box; background: #fff; border-radius: 8px; width: auto; max-width: none; }
.pay-brands.chips img[alt="СБП"] { height: 24px; padding: 5px 14px; }
.pay-brands.chips img[alt="МИР"] { height: 16px; padding: 9px 12px; }
.pay-brands.chips img[alt="Visa"] { height: 13px; padding: 10.5px 12px; }
.pay-brands.chips img[alt="Mastercard"] { height: 22px; padding: 6px 12px; }
.pay-brands.chips img[alt="Яндекс Сплит"] { height: 20px; padding: 7px 12px; }

/* Админка: база знаний — список статей и редактор */
.kbadm-filter { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.kbadm-sec { margin-bottom: 16px; --c: var(--brand); }
.kbadm-sec-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.kbadm-sec-head h3 { margin: 0; font-size: 16px; }
.kbadm-sec-head small { color: var(--muted); }
.kbadm-sec-head .btn { margin-left: auto; }
.kbadm-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.kbadm-table td { vertical-align: middle; }
.kbadm-table tr.is-hidden td { opacity: .55; }
.kbadm-table tr.is-hidden td.kbadm-act { opacity: 1; }
.kbadm-act { white-space: nowrap; text-align: right; }
.kbadm-act > * { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.kbadm-crumbs { margin: 4px 0 14px; font-size: 14px; }
.kbadm-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; text-decoration: none; }
.kbe { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.kbe .kbe-title { width: 100%; height: auto; border: 0 !important; box-shadow: none !important; background: transparent !important; font: inherit; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); padding: 4px 2px 14px !important; outline: none; border-radius: 0; }
.kbe-title::placeholder { color: var(--faint); }
.kbe-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 6px 18px rgba(16, 20, 60, .05); }
.kbe-group { display: flex; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--line-2); }
.kbe-group:last-of-type { border-right: 0; }
.kbe-right { margin-left: auto; }
.kbe-toolbar button { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.kbe-toolbar button:hover { background: var(--bg); color: var(--ink); }
.kbe-toolbar button.on { background: var(--brand-50); color: var(--brand); }
.kbe-toolbar button:disabled { opacity: .35; cursor: default; background: transparent; }
.kbe-paper { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; }
.kbe-area { min-height: 520px; padding: 28px 34px; outline: none; }
.kbe-area:empty::before { content: attr(data-placeholder); color: var(--faint); }
.kbe-area .kb-shot a { cursor: default; }
.kbe-code { display: block; width: 100%; min-height: 520px; border: 0; border-radius: 0 0 14px 14px; padding: 20px 24px; font: 13px/1.55 "JetBrains Mono", ui-monospace, Menlo, monospace; color: var(--ink); background: #FBFBFE; resize: vertical; outline: none; }
.kbe-hint { margin: 10px 2px 0; }
.kbe-side { position: sticky; top: 16px; display: grid; gap: 14px; }
.kbe-side .field { margin-bottom: 14px; }
.kbe-side small { display: block; margin-top: 5px; line-height: 1.45; }
.kbe-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); background: #EEF6FF; border: 1px solid #D3E6FF; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.kbe-note .icon { flex: none; margin-top: 2px; color: #2F6BFF; }
.kbe-status { display: flex; gap: 6px; }
.kbe-status label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.kbe-status label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.kbe-status input { accent-color: var(--brand); margin: 0; }
.kbe-slug { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.kbe-slug span { padding: 0 4px 0 12px; color: var(--muted); font-size: 14px; }
.kbe-slug input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; }
.kbe-actions { display: grid; gap: 8px; }
.kbe-danger { display: grid; gap: 6px; }
.kbe-danger small + .btn { margin-top: 8px; }
.danger-text { color: var(--danger) !important; }
@media (max-width: 1100px) { .kbe { grid-template-columns: 1fr; } .kbe-side { position: static; } }

/* Комментарии менеджера к подборке (видны только сотрудникам) */
.notes .note-form textarea { min-height: 72px; width: 100%; }
.note-link-list { display: grid; gap: 6px; margin-top: 6px; }
.note-link-list:empty { display: none; }
.note-link-row { display: flex; gap: 4px; align-items: center; }
.note-link-row input { flex: 1; min-width: 0; height: 34px; font-size: 13.5px; }
.note-form-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.note-list { margin-top: 14px; }
.note { padding: 12px 0; border-top: 1px solid var(--line-2); }
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.note-head b { color: var(--ink); font-weight: 600; }
.note-tools { margin-left: auto; display: inline-flex; gap: 2px; }
.note-tools form { margin: 0; }
.note-tools .btn.sm.icon-only { width: 28px; height: 28px; }
.note-body { margin-top: 4px; font-size: 14px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.note-links a { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 10px; border-radius: 99px;
  background: var(--brand-50); color: var(--brand-700); font-size: 12.5px; font-weight: 500; }
.note-links a:hover { background: var(--brand-100); }
.note-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-links .icon { flex: none; }
.note .note-edit { display: none; margin-top: 8px; }
.note.editing .note-edit { display: block; }
.note.editing .note-view, .note.editing .note-tools { display: none; }
.note-empty { margin: 0; padding-top: 12px; border-top: 1px solid var(--line-2); }

/* Проверка цен туров из Турвизора: строка под ценой варианта и предупреждение над вариантами */
.tv-check { margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--faint); text-align: right; }
.tv-check .icon { vertical-align: -2px; margin-right: 2px; }
.tv-check.warn { color: var(--warning); font-weight: 600; }
.tv-alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.tv-access-res { display: grid; gap: 6px; margin-top: 10px; }
.tv-access-res:empty { display: none; }

/* Уведомления: куда присылать — почта, Telegram, MAX */
.ch-list { display: flex; flex-direction: column; gap: 10px; }
.ch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border, #E7E8F2); border-radius: 14px; cursor: pointer; margin: 0; }
.ch-row .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ch-row input { flex: none; width: 18px; height: 18px; }
.ch-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; overflow: hidden; }
.ch-ico .icon { width: 18px; height: 18px; }
.ch-ico.mail { background: var(--brand, #5B2EFF); }
.ch-ico.telegram { background: #229ED9; }
.ch-ico .mx, .ch-ico .mx svg { display: block; width: 100%; height: 100%; }
.ch-row .btn { flex: none; }
@media (max-width: 560px) { .ch-row { flex-wrap: wrap; } .ch-row .grow { flex-basis: calc(100% - 90px); } .ch-row .btn { margin-left: 78px; } }
/* Вариант распознан не полностью: «Проверьте вариант: перелёт не найден; цена не распознана…» */
.warn-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: #FFF1F1; border: 1px solid #F8CACA; font-size: 13px; color: #8a1c1c; }
.warn-bar .grow { flex: 1 1 220px; min-width: 0; }
.warn-bar form { margin: 0; }

/* --- Кабинет на телефоне ------------------------------------------------------------------- */
.m-only { display: none; }
.quick-price { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.quick-price .qp-ico { opacity: 0; transition: opacity .15s; color: var(--muted); }
.quick-price .qp-ico .icon { width: 14px; height: 14px; }
.quick-price:hover .qp-ico, .quick-price:focus-visible .qp-ico { opacity: 1; }
.qp-form { display: flex; gap: 6px; justify-content: flex-end; margin: 2px 0 4px; }
.qp-form input { width: 130px; height: 34px; text-align: right; font-weight: 700; }
@media (max-width: 720px) {
  .m-only { display: flex; }
  .m-seen { align-items: center; gap: 8px; margin: -8px 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--soft, #F4F2FF); color: var(--text); font-size: 13.5px; text-decoration: none; }
  .m-seen .icon { flex: none; color: var(--brand, #5B2EFF); }
  .sel-main { display: flex; flex-direction: column; }
  .sel-main > .sel-settings { order: 9; margin-top: 18px; }   /* сначала варианты, настройки подборки — ниже */
  .quick-price .qp-ico { opacity: .6; }
  /* Таблицы-списки (заявки) — карточками: подпись поля слева, значение справа */
  table.m-cards, table.m-cards tbody, table.m-cards tr, table.m-cards td { display: block; width: 100%; }
  table.m-cards thead { display: none; }
  table.m-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--border, #EEE); }
  table.m-cards td { padding: 4px 0; border: 0; max-width: none !important; }
  table.m-cards td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  table.m-cards td:first-child::before { display: none; }
  table.m-cards td.m-empty { display: none; }
  .items-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .items-head .btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
}
