/* ===== AlfaTenders — современная тема поверх Bootstrap 5.3 ===== */
:root {
  --at-primary: #4f46e5;
  --at-primary-600: #4338ca;
  --at-primary-50: #eef2ff;
  --at-accent: #06b6d4;
  --at-success: #10b981;
  --at-warning: #f59e0b;
  --at-danger: #ef4444;
  --at-bg: #f5f7fb;
  --at-surface: #ffffff;
  --at-text: #0f172a;
  --at-muted: #64748b;
  --at-border: #e6e8f0;
  --at-sidebar: #0b1220;
  --at-sidebar-text: #a5b0c6;
  --at-radius: 14px;
  --at-radius-sm: 10px;
  --at-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --at-shadow-lg: 0 10px 40px rgba(15, 23, 42, .12);
  --sidebar-w: 260px;

  --bs-primary: var(--at-primary);
  --bs-primary-rgb: 79, 70, 229;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--at-bg);
  --bs-body-color: var(--at-text);
  --bs-border-color: var(--at-border);
  --bs-border-radius: var(--at-radius-sm);
  --bs-link-color: var(--at-primary);
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: var(--at-primary-600);
}

body { background: var(--at-bg); color: var(--at-text); font-size: .95rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.01em; color: var(--at-text); }
h1 { font-size: 1.75rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.2rem; }
a { text-decoration: none; }
.text-muted { color: var(--at-muted) !important; }

/* ---------- Каркас ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--at-sidebar); color: var(--at-sidebar-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 1030;
}
.app-sidebar > * { flex-shrink: 0; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  height: 64px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--at-border);
  display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 1020;
}
.app-content { padding: 28px; flex: 1; }
.app-content > .container, .app-content > .container-fluid { padding-left: 0; padding-right: 0; }
.app-footer { padding: 18px 28px; color: var(--at-muted); font-size: .85rem; border-top: 1px solid var(--at-border); }

.brand { display: flex; align-items: center; gap: 10px; padding: 20px 22px; color: #fff; font-weight: 800; font-size: 1.1rem; }
.brand:hover { color: #fff; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 18px rgba(79,70,229,.45);
}
.brand-logo img { display: block; width: 34px; height: 34px; }
.nav-section { padding: 14px 22px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #5d6a85; font-weight: 600; }
.side-link {
  display: flex; align-items: center; gap: 12px; margin: 2px 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--at-sidebar-text); font-weight: 500; transition: background .15s, color .15s;
}
.side-link i { font-size: 1.05rem; opacity: .9; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: rgba(79,70,229,.22); color: #fff; }
.side-link.active i { color: #a5b4fc; }
.sidebar-bottom { margin-top: auto; padding: 16px; }

.quota-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px; color: #dbe2f0; }
.quota-card .progress { height: 6px; background: rgba(255,255,255,.1); }
.quota-card .progress-bar { background: linear-gradient(90deg, var(--at-primary), var(--at-accent)); }
.quota-card small { color: var(--at-sidebar-text); }

.user-chip { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--at-primary), #8b5cf6); font-size: .85rem;
}
.sidebar-toggle { display: none; border: 0; background: transparent; font-size: 1.4rem; }

@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s; }
  body.sidebar-open .app-sidebar { transform: none; box-shadow: var(--at-shadow-lg); }
  .sidebar-toggle { display: inline-block; }
  .app-content { padding: 18px; }
  .app-topbar { padding: 0 16px; }
}

/* ---------- Компоненты ---------- */
.card { border: 1px solid var(--at-border); border-radius: var(--at-radius); box-shadow: var(--at-shadow); background: var(--at-surface); }
.card-header { background: transparent; border-bottom: 1px solid var(--at-border); font-weight: 600; padding: 14px 18px; }
.card-body { padding: 18px; }
.card-footer { background: transparent; border-top: 1px solid var(--at-border); }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head .subtitle { color: var(--at-muted); margin: 4px 0 0; }
.pricing-header { padding: 0 0 18px !important; text-align: left !important; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pricing-header h1 { width: 100%; margin: 6px 0 8px; }

.btn { border-radius: 10px; font-weight: 600; padding: .5rem 1rem; transition: all .15s; }
.btn-sm { padding: .3rem .7rem; border-radius: 8px; }
.btn-lg { padding: .7rem 1.3rem; font-size: 1rem; }
.btn-primary { background: var(--at-primary); border-color: var(--at-primary); box-shadow: 0 4px 14px rgba(79,70,229,.25); }
.btn-primary:hover, .btn-primary:focus { background: var(--at-primary-600); border-color: var(--at-primary-600); }
.btn-success { background: var(--at-success); border-color: var(--at-success); }
.btn-warning { background: #fff7e6; border-color: #fde3b0; color: #9a5b00; }
.btn-warning:hover { background: #ffedc7; color: #7c4800; border-color: #f8cf7f; }
.btn-info { background: #e0f7fb; border-color: #b6ecf5; color: #0b6a7a; }
.btn-info:hover { background: #c8f0f7; color: #075866; border-color: #93e0ee; }
.btn-danger { background: var(--at-danger); border-color: var(--at-danger); }
.btn-secondary { background: #eef0f5; border-color: #eef0f5; color: var(--at-text); }
.btn-secondary:hover { background: #e2e5ee; border-color: #e2e5ee; color: var(--at-text); }
.btn-outline-primary { color: var(--at-primary); border-color: #c7c9f7; }
.btn-outline-primary:hover { background: var(--at-primary); border-color: var(--at-primary); }
.btn-outline-secondary { color: var(--at-muted); border-color: var(--at-border); background: #fff; }
.btn-outline-secondary:hover { background: #f1f3f8; color: var(--at-text); border-color: var(--at-border); }
.btn-gradient { color: #fff; border: 0; background: linear-gradient(135deg, var(--at-primary), #7c3aed); box-shadow: 0 8px 24px rgba(79,70,229,.35); }
.btn-gradient:hover { color: #fff; filter: brightness(1.07); transform: translateY(-1px); }

.form-control, .form-select { border-radius: 10px; border-color: var(--at-border); padding: .55rem .8rem; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.form-group { margin-bottom: 1rem; }
label, .form-label { font-weight: 600; font-size: .85rem; color: #334155; margin-bottom: .35rem; }
form p { margin-bottom: .9rem; }
form p > input:not([type=checkbox]):not([type=radio]):not([type=file]), form p > select, form p > textarea {
  display: block; width: 100%; border: 1px solid var(--at-border); border-radius: 10px; padding: .55rem .8rem; background: #fff;
}
.errorlist { color: var(--at-danger); list-style: none; padding: 0; font-size: .85rem; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { background: #f8fafc; color: var(--at-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; border-bottom-width: 1px; }
.table td, .table th { padding: .8rem .9rem; vertical-align: middle; border-color: var(--at-border); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #fafbfd; }
.table-hover tbody tr:hover > * { --bs-table-bg-state: #f5f6ff; }
.table-responsive, .table-wrap { background: #fff; border: 1px solid var(--at-border); border-radius: var(--at-radius); box-shadow: var(--at-shadow); overflow: auto; }
.table-bordered { border-radius: var(--at-radius); overflow: hidden; }

.alert { border-radius: 12px; border: 1px solid transparent; }
.alert-info { background: #eef6ff; border-color: #cfe3ff; color: #1e4f91; }
.alert-success { background: #ecfdf5; border-color: #c6f2de; color: #065f46; }
.alert-warning { background: #fffbeb; border-color: #fde9b5; color: #8a5300; }
.alert-danger { background: #fef2f2; border-color: #fcd5d5; color: #991b1b; }
.badge { font-weight: 600; border-radius: 999px; padding: .4em .7em; }
.badge-soft { background: var(--at-primary-50); color: var(--at-primary); }
.dropdown-menu { border: 1px solid var(--at-border); border-radius: 12px; box-shadow: var(--at-shadow-lg); padding: 6px; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; }
.progress { border-radius: 999px; background: #eef0f5; }
.list-group-item { border-color: var(--at-border); }

/* Статистика */
.stat { background: #fff; border: 1px solid var(--at-border); border-radius: var(--at-radius); padding: 18px; box-shadow: var(--at-shadow); height: 100%; }
.stat .label { color: var(--at-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.6rem; font-weight: 800; margin-top: 4px; }
.icon-pill { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--at-primary-50); color: var(--at-primary); font-size: 1.2rem; }

/* Тендеры */
.tenders-container { display: block; max-height: 80vh; overflow-y: auto; }
.tender-card { background: #fff; border: 1px solid var(--at-border); border-radius: var(--at-radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--at-shadow); transition: all .15s; }
.tender-card:hover { border-color: #c7d2fe; transform: translateY(-1px); }
.tender-card p { margin-bottom: 4px; }
.doc-row.is-tz { background: #f5f6ff; }

/* ИИ-отчёт */
.ai-report { white-space: pre-wrap; line-height: 1.6; font-size: .92rem; }
.ai-panel { border: 1px solid #dfe3ff; background: linear-gradient(180deg, #f7f8ff, #fff); border-radius: var(--at-radius); }

/* ---------- Лендинг и тарифы ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 64px 48px; color: #fff;
  background: radial-gradient(1200px 400px at 10% -10%, rgba(6,182,212,.35), transparent 60%),
              radial-gradient(800px 400px at 110% 10%, rgba(124,58,237,.5), transparent 60%), #0b1220; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; line-height: 1.1; max-width: 760px; }
.hero p.lead { color: #c7d0e3; max-width: 640px; font-size: 1.15rem; }
.hero .badge-glow { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #c7d2fe; font-weight: 600; font-size: .8rem; }
.feature { padding: 22px; border-radius: var(--at-radius); background: #fff; border: 1px solid var(--at-border); height: 100%; box-shadow: var(--at-shadow); }
.feature h5 { margin: 12px 0 6px; }
.feature p { color: var(--at-muted); margin: 0; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--at-primary); color: #fff; display: grid; place-items: center; font-weight: 700; }
.pricing-card { position: relative; background: #fff; border: 1px solid var(--at-border); border-radius: 20px; padding: 28px; height: 100%; box-shadow: var(--at-shadow); display: flex; flex-direction: column; }
.pricing-card.featured { border: 2px solid var(--at-primary); box-shadow: 0 20px 50px rgba(79,70,229,.18); }
.pricing-card .ribbon { position: absolute; top: -12px; left: 28px; background: var(--at-primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pricing-card .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.pricing-card .price small { font-size: .95rem; color: var(--at-muted); font-weight: 500; }
.pricing-card ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.pricing-card li { padding: 6px 0; display: flex; gap: 8px; }
.pricing-card li::before { content: "✓"; color: var(--at-success); font-weight: 800; }

/* ---------- Авторизация ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: radial-gradient(900px 500px at 0% 0%, rgba(6,182,212,.35), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(124,58,237,.5), transparent 60%), #0b1220; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 2.2rem; font-weight: 800; line-height: 1.15; }
.auth-side p { color: #c7d0e3; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* Плавное появление */
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* ---------- Шапка: кнопки, колокольчик ---------- */
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--at-border); background: #fff; color: var(--at-muted); display: inline-grid; place-items: center; font-size: 1.05rem; transition: all .15s; }
.icon-btn:hover { color: var(--at-primary); border-color: #c7d2fe; background: var(--at-primary-50); }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--at-primary); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.bell-badge.urgent { background: var(--at-danger); animation: wiggle 2.5s ease-in-out infinite; }
.bell-menu { width: 340px; max-height: 70vh; overflow-y: auto; }
.bell-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; white-space: normal; border-left: 3px solid transparent; border-radius: 0; }
.bell-item.urgent { border-left-color: var(--at-warning); }
.bell-item.overdue { border-left-color: var(--at-danger); background: #fff8f8; }
.min-w-0 { min-width: 0; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(12deg); } }

/* Пульсация — привлечь внимание к главному действию */
.pulse { position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--at-primary); opacity: 0; animation: pulseRing 1.8s ease-out infinite; pointer-events: none; }
@keyframes pulseRing { 0% { transform: scale(.92); opacity: .7; } 100% { transform: scale(1.15); opacity: 0; } }

/* Тосты */
.app-toast { position: fixed; right: 24px; bottom: 24px; z-index: 2000; padding: 12px 16px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: var(--at-shadow-lg); font-size: .9rem; animation: toastIn .25s ease both; transition: opacity .4s, transform .4s; }
.app-toast.ok i { color: #34d399; } .app-toast.err i { color: #f87171; }
.app-toast.hide { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Формы ---------- */
.form-text { font-size: .78rem; color: var(--at-muted); }
.section-toggle { cursor: pointer; user-select: none; }
.section-toggle .chevron { transition: transform .2s; color: var(--at-muted); }
.section-toggle.collapsed .chevron { transform: rotate(-90deg); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; padding: 14px 0; margin-top: 8px; background: linear-gradient(180deg, rgba(245,247,251,0), var(--at-bg) 35%); }
.work-row { border: 1px solid var(--at-border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fbfcfe; }
.work-row select, .contact-row input { width: 100%; }
.contact-row input[type=checkbox] { width: auto; }
.choice-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border: 2px solid var(--at-border); border-radius: 14px; cursor: pointer; transition: all .15s; position: relative; background: #fff; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card i { font-size: 1.4rem; color: var(--at-muted); }
.choice-card small { color: var(--at-muted); }
.choice-card:hover { border-color: #c7d2fe; }
.choice-card.active { border-color: var(--at-primary); background: var(--at-primary-50); box-shadow: 0 6px 20px rgba(79,70,229,.12); }
.choice-card.active i { color: var(--at-primary); }

/* ---------- Чек-лист «Начало работы» ---------- */
.checklist-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--at-text); transition: background .15s; }
.checklist-item:hover { background: #f5f6ff; color: var(--at-text); }
.checklist-item .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--at-border); display: grid; place-items: center; flex-shrink: 0; color: transparent; transition: all .3s; }
.checklist-item.done .dot { background: var(--at-success); border-color: var(--at-success); color: #fff; animation: pop .4s ease; }
.checklist-item.done .ttl { text-decoration: line-through; color: var(--at-muted); }
.checklist-item.next { background: var(--at-primary-50); }
.checklist-item.next .dot { border-color: var(--at-primary); }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ---------- Ганта ---------- */
.gantt-wrap { overflow-x: auto; padding: 8px 0 4px; }
.gantt .bar-wrapper.bar-object .bar { fill: #6366f1; }
.gantt .bar-wrapper.bar-object .bar-progress { fill: #4338ca; }
.gantt .bar-wrapper.bar-work .bar { fill: #a5b4fc; }
.gantt .bar-wrapper.bar-bid .bar { fill: #f59e0b; }
.gantt .bar-wrapper.bar-guess .bar { fill-opacity: .45; stroke: #6366f1; stroke-dasharray: 4 3; }
.gantt .bar-label { font-weight: 600; font-family: var(--bs-body-font-family); }
.gantt .grid-header, .gantt .grid-background { fill: #fff; }
.gantt .today-highlight { fill: rgba(79,70,229,.08); }
.gantt-container .popup-wrapper { background: transparent; padding: 0; }
.gantt-pop { background: #fff; color: var(--at-text); border: 1px solid var(--at-border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--at-shadow-lg); min-width: 220px; }
.gantt-legend .lg { display: inline-block; width: 14px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.lg-object { background: #6366f1; } .lg-work { background: #a5b4fc; } .lg-bid { background: #f59e0b; } .lg-guess { border: 1px dashed #6366f1; background: rgba(99,102,241,.3); }
.deadline-item.urgent { border-left: 3px solid var(--at-warning); }
.deadline-item.overdue { border-left: 3px solid var(--at-danger); background: #fff8f8; }

/* ---------- Тур (driver.js) ---------- */
.driver-popover.app-tour { border-radius: 16px; padding: 18px 20px; box-shadow: var(--at-shadow-lg); font-family: var(--bs-body-font-family); max-width: 340px; }
.driver-popover.app-tour .driver-popover-title { font-size: 1rem; font-weight: 700; }
.driver-popover.app-tour .driver-popover-description { color: #475569; font-size: .9rem; line-height: 1.5; }
.driver-popover.app-tour .driver-popover-footer button { border-radius: 8px; padding: 6px 12px; font-weight: 600; text-shadow: none; border: 1px solid var(--at-border); }
.driver-popover.app-tour .driver-popover-next-btn { background: var(--at-primary); color: #fff; border-color: var(--at-primary); }
.driver-popover.app-tour .driver-popover-progress-text { color: var(--at-muted); }
select.form-control { -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right .75rem center / 12px 10px; }

/* ================= «Живой» интерфейс ================= */
/* Переключатель рабочих столов в меню */
.ws-switch { margin: 4px 12px 6px; }
.ws-switch-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: #e2e8f0; transition: background .15s, border-color .15s; }
.ws-switch-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(165,180,252,.35); }
.ws-switch-btn small { color: var(--at-sidebar-text); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.ws-switch-btn b { font-size: .9rem; }
.ws-avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, #22d3ee, #6366f1); }
.ws-avatar.sm { width: 24px; height: 24px; border-radius: 7px; font-size: .75rem; }
.side-link { position: relative; }
.side-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #818cf8; animation: growY .3s ease; }
.side-link:hover i { transform: translateX(2px); }
.side-link i { transition: transform .15s; }
.pulse-soft { animation: softGlow 2.2s ease-in-out infinite; }
@keyframes softGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(129,140,248,0); } 50% { box-shadow: 0 0 0 4px rgba(129,140,248,.25); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Кнопки: нажатие и волна */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.ripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: currentColor; opacity: .25; pointer-events: none; animation: ripple .6s ease-out forwards; }
@keyframes ripple { to { transform: scale(30); opacity: 0; } }

/* Появление при прокрутке и «лесенкой» */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
.stagger { animation: riseIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(min(var(--i, 0), 12) * 60ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.card:not(.kanban-card) { transition: box-shadow .2s, transform .2s, opacity .5s, border-color .2s; }
.filter-card:hover, .row .card.h-100:hover { transform: translateY(-3px); box-shadow: var(--at-shadow-lg); }

/* ---------- Фильтр тендеров ---------- */
.preset-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.preset { text-align: left; border: 1px solid var(--at-border); background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; transition: all .18s cubic-bezier(.2,.8,.2,1); box-shadow: var(--at-shadow); }
.preset small { color: var(--at-muted); font-size: .75rem; }
.preset-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; background: var(--at-primary-50); color: var(--at-primary); margin-bottom: 6px; transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .2s, color .2s; }
.preset.active .preset-ico, .preset:hover .preset-ico { background: var(--at-primary); color: #fff; }
.preset:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: var(--at-shadow-lg); }
.preset:hover .preset-ico { transform: scale(1.2) rotate(-8deg); }
.preset.active { border-color: var(--at-primary); background: var(--at-primary-50); }
.step-num.sm { width: 24px; height: 24px; font-size: .8rem; display: inline-grid; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--at-muted); pointer-events: none; }
.input-icon > input { padding-left: 2.2rem; }
.chip-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid #dfe3f0; background: #fff; color: #334155; border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 500; transition: all .15s; }
.chip:hover { border-color: var(--at-primary); color: var(--at-primary); transform: translateY(-1px); }
.chip.active, .chip.used { background: var(--at-primary-50); border-color: #c7d2fe; color: var(--at-primary); }
.chip-muted { color: var(--at-muted); }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chips ul { display: contents; list-style: none; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--at-border); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: .85rem; font-weight: 500; transition: all .15s; background: #fff; margin: 0; }
.check-chip input { accent-color: var(--at-primary); }
.check-chip:has(input:checked) { background: var(--at-primary-50); border-color: var(--at-primary); color: var(--at-primary); }
.auto-box { border: 1px solid #dfe3ff; background: linear-gradient(180deg, #f7f8ff, #fff); border-radius: 14px; padding: 14px 16px; }
.auto-box .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.auto-days { transition: opacity .25s; }
.auto-days.disabled { opacity: .45; pointer-events: none; }
.summary-text { line-height: 1.6; min-height: 72px; }
.flash { animation: flash .8s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(79,70,229,.5); background: #eef2ff; } 100% { box-shadow: 0 0 0 8px rgba(79,70,229,0); } }
.bump { animation: bump .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes bump { 50% { transform: scale(1.02); } }
.empty-illustration { font-size: 3.4rem; display: inline-block; animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-4deg); } }

/* Лендинг: медленно «дышащий» фон героя */
.hero { background-size: 160% 160%; animation: heroShift 14s ease-in-out infinite alternate; }
@keyframes heroShift { from { background-position: 0% 0%; } to { background-position: 100% 60%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* ---------- Пустые состояния: иконка вместо картинки ---------- */
.empty-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; color: var(--at-primary); background: linear-gradient(135deg, #eef2ff, #e0f2fe); animation: floaty 3.2s ease-in-out infinite; }

/* ---------- Вердикт ИИ ---------- */
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: .9rem; border: 1px solid; }
.verdict-go { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.verdict-caution { background: #fffbeb; color: #a16207; border-color: #fde68a; }
.verdict-stop { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* ---------- Лендинг ---------- */
.hero-facts { display: flex; flex-wrap: wrap; gap: 18px; color: #aab4cc; font-size: .9rem; }
.hero-facts i { color: #67e8f9; margin-right: 6px; }
.section-title { margin-bottom: 18px; }
.section-title span { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--at-primary); margin-bottom: 4px; }
.section-title h2 { margin: 0; }
.mock { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; transform: perspective(1200px) rotateY(-8deg) rotateX(4deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.mock:hover { transform: perspective(1200px) rotateY(-2deg) rotateX(1deg); }
.mock-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.2); }
.mock-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.mock-col { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px; min-height: 230px; }
.mock-h { color: #cbd5e1; font-size: .72rem; font-weight: 700; display: flex; justify-content: space-between; margin-bottom: 8px; }
.mock-h i { font-style: normal; color: #94a3b8; }
.mock-card { background: #fff; border-radius: 8px; padding: 8px 9px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.18); animation: mockIn .6s cubic-bezier(.2,.8,.2,1) both; }
.mock-card:nth-child(3) { animation-delay: .15s; } .mock-col:nth-child(2) .mock-card { animation-delay: .3s; } .mock-col:nth-child(3) .mock-card { animation-delay: .45s; }
.mock-card b { font-size: .74rem; color: #0f172a; }
.mock-card small { font-size: .64rem; color: #64748b; }
.mock-card em { font-style: normal; font-size: .62rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; align-self: flex-start; }
.mock-card em.go { background: #ecfdf5; color: #047857; } .mock-card em.caution { background: #fffbeb; color: #a16207; }
.mock-card.tilt { animation: mockFloat 4s ease-in-out infinite .8s; }
@keyframes mockIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mockFloat { 0%,100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(3deg) translateY(-6px); box-shadow: 0 16px 30px rgba(0,0,0,.3); } }
.faq .accordion-item { border: 1px solid var(--at-border); border-radius: 12px !important; margin-bottom: 8px; overflow: hidden; }
.faq .accordion-button { font-weight: 600; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { background: var(--at-primary-50); color: var(--at-primary); }
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding: 32px 36px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #4f46e5, #7c3aed 55%, #0891b2); }
.cta h2 { color: #fff; } .cta p { color: rgba(255,255,255,.8); }

/* ---------- Онбординг: выбор отрасли ---------- */
.onboarding { max-width: 980px; padding-top: 12px; }
.step-dots { display: inline-flex; gap: 6px; } .step-dots span { width: 28px; height: 5px; border-radius: 5px; background: #dfe3f0; } .step-dots span.on { background: var(--at-primary); }
.industry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.industry-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 18px; border: 2px solid var(--at-border); border-radius: 16px; background: #fff; cursor: pointer; transition: all .2s cubic-bezier(.2,.8,.2,1); box-shadow: var(--at-shadow); }
.industry-card input { position: absolute; opacity: 0; pointer-events: none; }
.industry-card small { color: var(--at-muted); line-height: 1.35; }
.industry-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; color: var(--at-primary); background: var(--at-primary-50); margin-bottom: 8px; transition: all .25s; }
.industry-card:hover { transform: translateY(-4px); border-color: #c7d2fe; box-shadow: var(--at-shadow-lg); }
.industry-card.active { border-color: var(--at-primary); box-shadow: 0 16px 40px rgba(79,70,229,.18); }
.industry-card.active .industry-icon { background: var(--at-primary); color: #fff; transform: scale(1.06); }
.industry-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--at-primary); color: #fff; font-size: .8rem; transform: scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.industry-card.active .industry-check { transform: scale(1); }
.onb-details { opacity: .55; transition: opacity .3s; }
.onb-details.show { opacity: 1; }
.preview-box:empty { display: none; }
.preview-box { border: 1px dashed #c7d2fe; background: #fafbff; border-radius: 14px; padding: 16px; }
.preview-box.pop { animation: riseIn .4s cubic-bezier(.2,.8,.2,1); }
.stage-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--at-border); font-size: .78rem; font-weight: 600; animation: riseIn .35s both; animation-delay: calc(var(--i, 0) * 50ms); }
.tender-tile:hover { border-color: #c7d2fe; }
/* ================= Календарь ================= */
:root { --k-bid: #f59e0b; --k-tender: #ef4444; --k-sign: #8b5cf6; --k-finish: #4f46e5; --k-work: #06b6d4; }
.k-bid { --k: var(--k-bid); } .k-tender { --k: var(--k-tender); } .k-sign { --k: var(--k-sign); } .k-finish { --k: var(--k-finish); } .k-work { --k: var(--k-work); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { min-width: 180px; text-align: center; font-size: 1.25rem; font-weight: 800; }
.cal-title span { color: var(--at-primary); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-filter { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--at-border); background: #fff; font-size: .82rem; font-weight: 600; color: var(--at-text); transition: all .18s; }
.cal-filter i { color: var(--k); }
.cal-filter .cnt { min-width: 20px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--k) 14%, white); color: var(--k); font-size: .72rem; }
.cal-filter:hover { border-color: var(--k); transform: translateY(-1px); }
.cal-filter.off { opacity: .45; background: #f4f5f9; text-decoration: line-through; }
.cal-card { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px 12px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--at-muted); background: #f8fafc; border-bottom: 1px solid var(--at-border); }
.cal-head .we { color: #c2410c; }
.cal-body { animation: calIn .45s cubic-bezier(.2,.8,.2,1) both; }
.cal-card.slide-left .cal-body { animation: calOutL .16s ease forwards; }
.cal-card.slide-right .cal-body { animation: calOutR .16s ease forwards; }
@keyframes calIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes calOutL { to { opacity: 0; transform: translateX(-30px); } }
@keyframes calOutR { to { opacity: 0; transform: translateX(30px); } }
.cal-day { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 118px; padding: 8px; text-align: left; border: 0; border-right: 1px solid var(--at-border); border-bottom: 1px solid var(--at-border); background: #fff; transition: background .15s, box-shadow .15s; animation: dayIn .4s both; animation-delay: calc(var(--w, 0) * 40ms + var(--d, 0) * 15ms); }
.cal-day:nth-child(7n) { border-right: 0; }
@keyframes dayIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.cal-day:hover { background: #f7f8ff; box-shadow: inset 0 0 0 2px #c7d2fe; z-index: 1; }
.cal-day.we { background: #fcfcfe; }
.cal-day.out { background: #f8f9fc; }
.cal-day.out .num, .cal-day.out .evs { opacity: .4; }
.cal-day .num { font-weight: 700; font-size: .85rem; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.past:not(.today) .num { color: var(--at-muted); }
.cal-day.today .num { background: var(--at-primary); color: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.15); animation: todayPulse 2.4s ease-in-out infinite; }
@keyframes todayPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(79,70,229,.15); } 50% { box-shadow: 0 0 0 8px rgba(79,70,229,.05); } }
.cal-day.today { background: linear-gradient(180deg, #f5f6ff, #fff); }
.evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev { display: flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 6px; font-size: .72rem; font-weight: 600; color: color-mix(in srgb, var(--k) 75%, black); background: color-mix(in srgb, var(--k) 12%, white); border-left: 3px solid var(--k); white-space: nowrap; overflow: hidden; transition: transform .15s; }
.ev span { overflow: hidden; text-overflow: ellipsis; }
.cal-day:hover .ev { transform: translateX(2px); }
.more { font-size: .7rem; color: var(--at-primary); font-weight: 600; padding-left: 4px; }
.dots { display: none; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--k); }
.hide-bid .k-bid, .hide-tender .k-tender, .hide-sign .k-sign, .hide-finish .k-finish, .hide-work .k-work { display: none !important; }
.cal-bars { display: flex; flex-direction: column; gap: 10px; }
.cal-bar { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .8rem; }
.cal-bar .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: #eef0f5; overflow: hidden; }
.cal-bar .fill { height: 100%; border-radius: 6px; background: var(--k); animation: fillIn 1s cubic-bezier(.2,.8,.2,1) both .3s; transform-origin: left; }
@keyframes fillIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.date-badge { flex-shrink: 0; width: 44px; height: 46px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: color-mix(in srgb, var(--k) 12%, white); color: color-mix(in srgb, var(--k) 80%, black); border: 1px solid color-mix(in srgb, var(--k) 30%, white); }
.date-badge b { font-size: 1.05rem; } .date-badge small { font-size: .62rem; text-transform: uppercase; margin-top: 2px; }
.upcoming-item { transition: background .15s, padding-left .15s; }
.upcoming-item:hover { padding-left: 1.3rem; }
.day-event { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--at-border); margin-bottom: 10px; color: var(--at-text); border-left: 4px solid var(--k); transition: transform .15s, box-shadow .15s; animation: riseIn .35s both; animation-delay: calc(var(--i, 0) * 60ms); }
.day-event:hover { transform: translateX(3px); box-shadow: var(--at-shadow); color: var(--at-text); }
.day-event .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--k) 14%, white); color: var(--k); }
@media (max-width: 767.98px) {
  .cal-day { min-height: 64px; padding: 6px; }
  .cal-day .evs { display: none; }
  .cal-day .dots { display: flex; }
  .cal-title { min-width: 0; font-size: 1.05rem; }
}

/* ================= Доска в стиле Trello ================= */
.kanban-board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 20px; min-height: calc(100vh - 230px); }
.kanban-board::-webkit-scrollbar { height: 12px; }
.kanban-board::-webkit-scrollbar-thumb { background: #cfd5e4; border-radius: 8px; border: 3px solid var(--at-bg); }
.kanban-column { flex: 0 0 290px; width: 290px; max-height: calc(100vh - 220px); display: flex; flex-direction: column; background: #ebedf3; border-radius: 14px; padding: 6px; animation: colIn .4s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 50ms); transition: background .2s, box-shadow .2s; }
@keyframes colIn { from { opacity: 0; translate: 0 12px; } }
.kanban-column.just-added { animation: colIn .35s cubic-bezier(.2,.8,.2,1) backwards; }
.kanban-column.drag-over { background: #e2e6f6; box-shadow: inset 0 0 0 2px rgba(99,102,241,.35); }
.kc-head { display: flex; align-items: center; gap: 4px; padding: 6px 4px 4px 2px; cursor: grab; user-select: none; }
.kc-head:active { cursor: grabbing; }
.col-grip { color: #a3abc0; opacity: 0; transition: opacity .15s; font-size: .9rem; }
.kanban-column:hover .col-grip { opacity: 1; }
.col-title { flex: 1; min-width: 0; margin: 0; padding: 4px 6px; font-size: .9rem; font-weight: 700; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; }
.col-title:hover { background: rgba(255,255,255,.6); }
.col-title[contenteditable=true] { background: #fff; box-shadow: 0 0 0 2px var(--at-primary); white-space: normal; cursor: text; user-select: text; }
.kanban-column .count { background: rgba(255,255,255,.75); color: var(--at-muted); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
.col-menu { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 6px; color: var(--at-muted); }
.col-menu:hover { background: rgba(9,30,66,.08); color: var(--at-text); }
.kanban-totals { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 8px 6px; font-size: .72rem; color: var(--at-muted); }
.kanban-totals b { color: var(--at-text); font-weight: 700; }
.kanban-cards { flex: 1 1 auto; min-height: 56px; overflow-y: auto; overflow-x: hidden; padding: 2px 2px 4px; display: flex; flex-direction: column; gap: 8px; border-radius: 10px; }
.kanban-cards::-webkit-scrollbar { width: 6px; } .kanban-cards::-webkit-scrollbar-thumb { background: #c9cfdd; border-radius: 6px; }
.kanban-cards.is-empty { min-height: 72px; }
.kanban-cards.is-empty::before { content: "Перетащите сюда карточку"; display: grid; place-items: center; height: 64px; border: 2px dashed #cbd2e3; border-radius: 10px; color: #98a1b6; font-size: .78rem; }
.kanban-column.drag-over .kanban-cards.is-empty::before { border-color: #818cf8; color: var(--at-primary); background: rgba(255,255,255,.6); }
body.is-dragging-card .kanban-column.drag-over .kanban-cards.is-empty::before { content: none; }

.kanban-card { position: relative; background: #fff; border-radius: 10px; padding: 9px 11px 8px; box-shadow: 0 1px 0 rgba(9,30,66,.18), 0 1px 3px rgba(9,30,66,.06); cursor: pointer; user-select: none; transition: background .12s, box-shadow .12s; }
.kanban-card:hover { background: #f8f9fc; box-shadow: 0 1px 0 rgba(9,30,66,.2), 0 4px 10px rgba(9,30,66,.08); }
.kanban-card .kc-open { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: rgba(9,30,66,.06); color: var(--at-muted); font-size: .75rem; opacity: 0; transition: opacity .12s; }
.kanban-card:hover .kc-open { opacity: 1; }
.kanban-card.fresh { animation: cardIn .35s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes cardIn { from { opacity: 0; translate: 0 -6px; scale: .97; } }
.kc-labels { display: flex; gap: 4px; margin-bottom: 6px; }
.kc-label { height: 8px; width: 40px; border-radius: 4px; }
.kc-label.go { background: #22c55e; } .kc-label.caution { background: #f59e0b; } .kc-label.stop { background: #ef4444; }
.kc-label.wait { background: linear-gradient(90deg, #c7d2fe, #818cf8, #c7d2fe); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.kc-title { display: block; color: var(--at-text); font-size: .88rem; font-weight: 600; line-height: 1.35; padding-right: 24px; word-break: break-word; }
.kc-title:hover { color: var(--at-text); text-decoration: underline; text-decoration-color: #c7cede; }
.kc-customer { color: var(--at-muted); font-size: .75rem; margin-top: 3px; line-height: 1.3; }
.kc-badges { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 7px; }
.kc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: #5e6c84; padding: 1px 0; border-radius: 4px; }
.kc-badge i { font-size: .75rem; }
.kc-badge.good { color: #047857; }
.kc-badge.due { background: #fff4e5; color: #b45309; padding: 1px 6px; }
.kc-badge.ai { padding: 1px 6px; font-weight: 700; background: var(--at-primary-50); color: var(--at-primary); }
.kc-badge.ai.go { background: #e8f8ee; color: #15803d; } .kc-badge.ai.caution { background: #fff7e6; color: #b45309; } .kc-badge.ai.stop { background: #fdecec; color: #b91c1c; }
.kc-badge .spinner-border { width: .6rem; height: .6rem; border-width: .12em; }

.kanban-card.kc-ghost { background: rgba(9,30,66,.1) !important; box-shadow: none !important; }
.kanban-card.kc-ghost > * { visibility: hidden; }
.kanban-card.kc-drag { opacity: 1 !important; rotate: 4deg; scale: 1.03; cursor: grabbing !important; box-shadow: 0 18px 40px rgba(9,30,66,.28), 0 4px 10px rgba(9,30,66,.15) !important; background: #fff !important; z-index: 9999; }
.kanban-card.kc-drag .kc-open { display: none; }
.kanban-card.kc-chosen:not(.kc-drag):not(.kc-ghost) { box-shadow: 0 0 0 2px #a5b4fc; }
.kanban-card.kc-dropped { animation: settle .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes settle { 0% { rotate: 3deg; scale: 1.03; } 60% { rotate: -1deg; scale: .99; } 100% { rotate: 0deg; scale: 1; } }
body.is-dragging-card, body.is-dragging-card * { cursor: grabbing !important; }

.kanban-column.col-ghost { background: rgba(9,30,66,.08) !important; box-shadow: none; }
.kanban-column.col-ghost > * { visibility: hidden; }
.kanban-column.col-drag { rotate: 2deg; box-shadow: 0 24px 50px rgba(9,30,66,.3) !important; opacity: 1 !important; animation: none; }

.kc-foot { padding: 4px 2px 2px; }
.kc-add { width: 100%; text-align: left; border: 0; background: transparent; color: #5e6c84; padding: 7px 8px; border-radius: 8px; font-size: .85rem; font-weight: 500; transition: background .12s, color .12s; }
.kc-add:hover { background: rgba(9,30,66,.08); color: var(--at-text); }
.kc-composer textarea { resize: none; border: 0; box-shadow: 0 1px 0 rgba(9,30,66,.18), 0 2px 6px rgba(9,30,66,.08); border-radius: 10px; font-size: .88rem; animation: cardIn .2s backwards; }
.kc-composer textarea:focus { box-shadow: 0 0 0 2px var(--at-primary); }
.kanban-add-column { flex: 0 0 290px; animation: colIn .4s backwards .2s; }
.kc-add-col { width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 12px 14px; background: rgba(79,70,229,.08); color: var(--at-primary); font-weight: 600; transition: background .15s; }
.kc-add-col:hover { background: rgba(79,70,229,.14); }
.kanban-add-column.open { background: #ebedf3; border-radius: 14px; padding: 8px; }
/* ================= Аналитика прибыли ================= */
.an-filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--at-border); border-radius: var(--at-radius); box-shadow: var(--at-shadow); }
.segmented { display: inline-flex; padding: 3px; background: #eef0f5; border-radius: 10px; }
.segmented label { padding: 6px 12px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--at-muted); cursor: pointer; transition: all .15s; margin: 0; }
.segmented .btn-check:checked + label { background: #fff; color: var(--at-text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
body.an-loading .app-content { opacity: .6; pointer-events: none; transition: opacity .2s; }
.icon-pill.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; }
.stat.kpi { transition: transform .2s, box-shadow .2s; }
.stat.kpi:hover { transform: translateY(-3px); box-shadow: var(--at-shadow-lg); }
.stat.kpi .value { font-size: 1.45rem; }
.stat.kpi.neg .profit-value { color: #dc2626; }
.share-meter { display: flex; gap: 2px; height: 8px; border-radius: 6px; overflow: hidden; }
.share-meter .seg { height: 100%; border-radius: 4px; }
.share-meter .paid { background: #0891b2; animation: fillIn .9s cubic-bezier(.2,.8,.2,1) both .2s; transform-origin: left; }
.share-meter .rest { flex: 1; background: #4f46e5; opacity: .85; }
.ring { width: 64px; height: 64px; flex-shrink: 0; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: #eef0f5; }
.ring-fg { stroke: #4f46e5; stroke-linecap: round; stroke-dasharray: 100.53; stroke-dashoffset: calc(100.53 - 100.53 * min(var(--p), 100) / 100); animation: ringIn 1.1s cubic-bezier(.2,.8,.2,1) both .2s; }
.ring-fg.neg { stroke: #dc2626; }
@keyframes ringIn { from { stroke-dashoffset: 100.53; } }
.chart-box { position: relative; }
.chart-empty { text-align: center; color: var(--at-muted); font-size: .88rem; padding: 36px 12px; }
.legend-inline { font-size: .78rem; color: var(--at-muted); display: inline-flex; align-items: center; gap: 6px; }
.legend-inline .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend-inline .s1 { background: #4f46e5; } .legend-inline .s2 { background: #0891b2; }
.funnel-row { margin-bottom: 14px; animation: riseIn .4s backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.funnel-track { height: 10px; background: #eef0f5; border-radius: 6px; overflow: hidden; }
.funnel-fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #6366f1, #4f46e5); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.funnel-row:nth-child(2n) .funnel-fill { background: linear-gradient(90deg, #818cf8, #6366f1); }
.an-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.an-table th[data-sort]:hover { color: var(--at-text); }
.an-table th[data-sort]::after { content: "\2195"; margin-left: 4px; opacity: .35; font-size: .7rem; }
.an-table th[data-dir="asc"]::after { content: "\2191"; opacity: 1; color: var(--at-primary); }
.an-table th[data-dir="desc"]::after { content: "\2193"; opacity: 1; color: var(--at-primary); }
.an-table tfoot td { border-top: 2px solid var(--at-border); background: #fafbfd; }
.margin-bar { width: 70px; height: 8px; border-radius: 6px; background: #4f46e5; overflow: hidden; display: flex; }
.margin-bar .mb-paid { height: 100%; background: #0891b2; border-right: 2px solid #fff; }
/* ---------- График: выбор объектов ---------- */
.gantt-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.picker-btn { background: #fff; max-width: 360px; display: inline-flex; align-items: center; }
.picker-btn #picker-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.picker-menu { width: 380px; max-width: 92vw; }
.picker-list { max-height: 320px; overflow-y: auto; padding: 4px; }
.picker-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; margin: 0; font-size: .87rem; font-weight: 500; }
.picker-item:hover { background: #f5f6ff; }
.picker-item small { font-size: .72rem; }
.only-btn { margin-left: auto; border: 0; background: transparent; font-size: .72rem; color: var(--at-primary); font-weight: 600; opacity: 0; padding: 2px 6px; border-radius: 6px; }
.picker-item:hover .only-btn { opacity: 1; }
.only-btn:hover { background: var(--at-primary-50); }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.picker-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--at-primary-50); color: var(--at-primary); font-size: .8rem; font-weight: 600; animation: cardIn .25s backwards; }
.picker-chip button { border: 0; background: transparent; color: inherit; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.picker-chip button:hover { background: rgba(79,70,229,.15); }
.card.swap .gantt-wrap { animation: calIn .35s cubic-bezier(.2,.8,.2,1); }

/* ---------- Подтверждение удаления ---------- */
.confirm-wrap { display: grid; place-items: center; min-height: 55vh; }
.confirm-card { max-width: 520px; width: 100%; animation: riseIn .35s backwards; }
.confirm-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; color: #dc2626; background: #fef2f2; animation: shake .5s ease .25s; }
.confirm-name { font-weight: 700; font-size: 1.05rem; word-break: break-word; }
@keyframes shake { 0%,100% { translate: 0; } 25% { translate: -4px; } 50% { translate: 4px; } 75% { translate: -2px; } }

/* ---------- Оплаты ---------- */
a.pay-kpi { display: block; color: inherit; text-decoration: none; border: 1px solid var(--at-border); }
a.pay-kpi.active { border-color: var(--at-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.stat.kpi.danger .value { color: #dc2626; }
.icon-pill.ok { background: #ecfdf5; color: #059669; } .icon-pill.warn { background: #fffbeb; color: #d97706; } .icon-pill.bad { background: #fef2f2; color: #dc2626; }
.pay-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pay-badge.paid { background: #ecfdf5; color: #047857; }
.pay-badge.pending { background: #fffbeb; color: #b45309; }
.pay-badge.overdue { background: #fef2f2; color: #b91c1c; }
.pay-row { animation: riseIn .35s backwards; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }
.pay-row.is-overdue > td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.pay-row.just-paid > td { animation: paidFlash 1.2s ease; }
@keyframes paidFlash { 0% { background: #d1fae5; } 100% { background: transparent; } }
/* ---------- Подрядчики ---------- */
.ct-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; color: #fff; background: linear-gradient(135deg, #22d3ee, #6366f1); }
.ct-row { animation: riseIn .35s backwards; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }
.ct-desc { line-height: 1.35; }
/* ---------- Документы объекта ---------- */
.count-pill { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: var(--at-primary-50); color: var(--at-primary); font-size: .72rem; font-weight: 700; text-align: center; }
.doc-list { max-height: 460px; overflow-y: auto; }
.doc-group-title { padding: 10px 16px 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--at-muted); display: flex; justify-content: space-between; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; border: 0; }
.doc-item:hover { background: #f7f8fc; }
.doc-ext { flex-shrink: 0; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: .6rem; font-weight: 800; letter-spacing: .02em; background: #eef2ff; color: var(--at-primary); }
.doc-ext.tz { background: #ecfeff; color: #0e7490; } .doc-ext.ct { background: #fef3c7; color: #b45309; }
.icon-btn.sm { width: 28px; height: 28px; font-size: .8rem; border-radius: 8px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; border: 2px dashed #cbd2e3; border-radius: 12px; cursor: pointer; text-align: center; transition: all .15s; color: var(--at-muted); margin: 0; }
.drop-zone i { font-size: 1.6rem; color: var(--at-primary); }
.drop-zone:hover, .drop-zone.over { border-color: var(--at-primary); background: var(--at-primary-50); color: var(--at-primary); }

/* ---------- Первичная документация ---------- */
.primary-progress { display: flex; align-items: center; gap: 8px; }
.primary-side { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #334155; padding: 10px 0 6px; border-bottom: 1px solid var(--at-border); margin-bottom: 4px; }
.primary-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; transition: background .15s; }
.primary-row:hover { background: #f8f9fc; }
.pr-check { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; border: 2px dashed #cbd2e3; font-size: .8rem; }
.primary-row.done .pr-check { border: 0; background: #22c55e; color: #fff; animation: pop .35s ease; }
.primary-row.wait .pr-check { border: 0; background: #fef3c7; color: #b45309; }
.primary-row.missing .fw-semibold { color: var(--at-muted); }
.pr-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 3px; }
.flow-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 6px; }
.flow-badge.edo { background: #ecfeff; color: #0e7490; }
.flow-badge.paper { background: #f1f5f9; color: #475569; }
.status-pill { border: 0; border-radius: 999px; padding: 3px 10px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.status-pill i { font-size: .65rem; }
.status-pill.static { display: inline-block; }
.status-pill.s-expected { background: #f1f5f9; color: #475569; }
.status-pill.s-received { background: #fffbeb; color: #b45309; }
.status-pill.s-signed { background: #ecfdf5; color: #047857; }
.status-pill.s-archived { background: #eef2ff; color: #4338ca; }
.flow-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 767.98px) { .flow-choice { grid-template-columns: 1fr; } }
.completeness { animation: riseIn .35s backwards; animation-delay: calc(min(var(--i, 0), 12) * 40ms); }
/* ---------- Гибкие параметры ---------- */
.param-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.2fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--at-border); }
.param-row:last-child { border-bottom: 0; }
.param-name { margin: 0; font-weight: 600; font-size: .88rem; }
.param-name small { font-weight: 500; font-size: .72rem; }
.chip-new { border-style: dashed; color: var(--at-primary); }
.param-new { display: flex; gap: 8px; margin-top: 10px; animation: riseIn .25s backwards; }
@media (max-width: 575.98px) { .param-row { grid-template-columns: 1fr auto; } .param-row .input-group { grid-column: 1 / -1; grid-row: 2; } }
/* ================= Чат поддержки ================= */
.sp-widget { position: fixed; right: 22px; bottom: 22px; z-index: 1900; }
.sp-bubble { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; color: #fff; font-size: 1.35rem; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--at-primary), #7c3aed); box-shadow: 0 10px 30px rgba(79,70,229,.45); transition: transform .2s; }
.sp-bubble:hover { transform: scale(1.06); }
.sp-bubble .sp-ico-close, .sp-widget.open .sp-ico-open { display: none; }
.sp-widget.open .sp-ico-close { display: inline; }
.sp-bubble.ring { animation: spRing 1.6s ease-in-out infinite; }
@keyframes spRing { 0%,100% { box-shadow: 0 10px 30px rgba(79,70,229,.45), 0 0 0 0 rgba(79,70,229,.5); } 50% { box-shadow: 0 10px 30px rgba(79,70,229,.45), 0 0 0 12px rgba(79,70,229,0); } }
.sp-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.sp-panel { position: absolute; right: 0; bottom: 70px; width: 360px; max-width: calc(100vw - 32px); height: 500px; max-height: calc(100vh - 120px); background: #fff; border-radius: 18px;
  box-shadow: var(--at-shadow-lg), 0 0 0 1px var(--at-border); display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(12px) scale(.97); transform-origin: bottom right; transition: opacity .2s, transform .2s; }
.sp-widget.open .sp-panel { opacity: 1; pointer-events: auto; transform: none; }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, #312e81, #4f46e5); }
.sp-head small { color: #c7d2fe; font-size: .74rem; }
.sp-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.15); font-size: 1.1rem; }
.sp-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: 5px; }
.sp-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f8fc; }
.sp-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: .87rem; line-height: 1.4; word-break: break-word; }
.sp-msg small { display: block; font-size: .66rem; opacity: .65; margin-top: 3px; }
.sp-msg.staff, .sp-msg.them { background: #fff; border: 1px solid var(--at-border); border-bottom-left-radius: 4px; align-self: flex-start; }
.sp-msg.me { background: var(--at-primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.sp-msg.fresh { animation: cardIn .25s backwards; }
.sp-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--at-border); }
.sp-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--at-border); background: #fff; }
.sp-form textarea { flex: 1; resize: none; border: 1px solid var(--at-border); border-radius: 12px; padding: 8px 12px; font-size: .88rem; outline: none; max-height: 120px; }
.sp-form textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.app-toast { right: 92px; }

/* Поддержка: рабочее место */
.side-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 700; text-align: center; }
.seg-link { padding: 6px 12px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--at-muted); text-decoration: none; }
.seg-link.on { background: #fff; color: var(--at-text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.st-threads { max-height: calc(100vh - 220px); overflow-y: auto; }
.active-thread { background: var(--at-primary-50) !important; }
.st-chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 420px; }
.st-body { flex: 1; }

/* Лента действий */
.timeline { padding: 6px 18px 16px; max-height: 70vh; overflow-y: auto; }
.tl-day { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--at-muted); padding: 14px 0 6px; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; padding: 5px 0 5px 4px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: -6px; width: 2px; background: #eef0f5; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: #c7d2fe; margin-top: 5px; flex-shrink: 0; position: relative; z-index: 1; }
.tl-item.k-action .tl-dot { background: #0891b2; } .tl-item.k-event .tl-dot { background: #f59e0b; }
.tl-time { font-size: .76rem; color: var(--at-muted); width: 40px; flex-shrink: 0; padding-top: 1px; }
.tl-text { font-size: .86rem; }
/* ---------- Команда и права ---------- */
.team-table th { font-size: .68rem; white-space: nowrap; }
.team-table .form-check-input { width: 2.2em; height: 1.15em; cursor: pointer; }
.member-row.fade-out { opacity: 0; transition: opacity .3s; }
.invite-modal { border-radius: 18px; border: 0; box-shadow: var(--at-shadow-lg); }
.preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 767.98px) { .preset-grid { grid-template-columns: repeat(2, 1fr); } }
.preset-role { text-align: left; border: 2px solid var(--at-border); background: #fff; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; transition: all .15s; }
.preset-role small { color: var(--at-muted); font-size: .72rem; line-height: 1.3; }
.preset-role:hover { border-color: #c7d2fe; }
.preset-role.active { border-color: var(--at-primary); background: var(--at-primary-50); }
.perm-list { display: flex; flex-direction: column; gap: 6px; }
.perm-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--at-border); border-radius: 12px; margin: 0; cursor: pointer; transition: background .15s; }
.perm-item:hover { background: #f8f9fc; }
.perm-item > i:first-child { font-size: 1.1rem; color: var(--at-primary); width: 22px; text-align: center; }
.perm-item b { display: block; font-size: .88rem; }
.perm-item small { color: var(--at-muted); font-size: .75rem; }
.perm-item.always { background: #f8fafc; cursor: default; }
.perm-item.off { opacity: .55; }
.perm-item .form-check-input { width: 2.4em; height: 1.25em; cursor: pointer; }

/* ---------- Калькулятор цены ---------- */
.calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 767.98px) { .calc-results { grid-template-columns: 1fr; } }
.calc-results .cr { padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--at-border); display: flex; flex-direction: column; }
.calc-results .cr span { font-size: .75rem; color: var(--at-muted); font-weight: 600; }
.calc-results .cr b { font-size: 1.15rem; }
.calc-results .cr small { color: var(--at-muted); font-size: .72rem; }
.calc-results .cr.main { background: var(--at-primary-50); border-color: #c7d2fe; }
.calc-results .cr.main b { color: var(--at-primary); font-size: 1.3rem; }

/* ---------- Задачи и обсуждение ---------- */
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--at-border); }
.task-item.fresh, .cm-item.fresh { animation: cardIn .3s backwards; }
.task-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #cbd2e3; background: #fff; color: transparent; display: grid; place-items: center; flex-shrink: 0; font-size: .8rem; transition: all .15s; }
.task-check:hover { border-color: var(--at-primary); }
.task-item.done .task-check { background: #22c55e; border-color: #22c55e; color: #fff; animation: pop .3s ease; }
.task-item.done .task-title { text-decoration: line-through; color: var(--at-muted); }
.task-item.overdue .task-due { color: #dc2626; font-weight: 600; }
.task-title { font-size: .88rem; font-weight: 600; }
.cm-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cm-item { display: flex; gap: 10px; }
.cm-text { font-size: .87rem; background: #f8fafc; border: 1px solid var(--at-border); border-radius: 4px 12px 12px 12px; padding: 8px 12px; margin-top: 3px; word-break: break-word; }
.ct-avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .75rem; }

/* ---- длинные названия: переносим слова без пробелов, не ломая сетку ---- */
h1, h2, h3, h4, .card-title, .card-body, .stat, .kcard, .list-group-item, .alert, .modal-body, .dropdown-item,
.page-head, .subtitle, .breadcrumb, .badge-wrap { overflow-wrap: anywhere; word-break: normal; }
.table td { overflow-wrap: anywhere; }
.page-head > div { min-width: 0; }
.clamp-title { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.clamp-title.open { display: block; -webkit-line-clamp: unset; }

/* ---- периоды аналитики (как в банковских приложениях) ---- */
.period-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.period-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #eef0f5; border-radius: 12px; }
.period-tabs a, .period-tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--at-muted); text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.period-tabs a:hover, .period-tabs button:hover { color: var(--at-text); }
.period-tabs .active { background: #fff; color: var(--at-text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.period-nav { display: inline-flex; align-items: center; gap: 6px; }
.period-label { font-weight: 700; font-size: 1.05rem; min-width: 150px; text-align: center; }
.period-arrow { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--at-border); background: #fff; color: var(--at-text); text-decoration: none; transition: background .15s, transform .15s; }
.period-arrow:hover { background: var(--at-primary-50); color: var(--at-primary); transform: translateY(-1px); }
.period-arrow.disabled { opacity: .35; pointer-events: none; }
.period-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--at-border); border-radius: var(--at-radius); }
.period-custom.collapse:not(.show) { display: none; }
.delta { display: inline-flex; align-items: center; padding: 1px 7px 1px 3px; border-radius: 999px; font-size: .75rem; font-weight: 700; margin-left: 4px; }
.delta.up { background: #dcfce7; color: #15803d; }
.delta.down { background: #fee2e2; color: #b91c1c; }
@media (max-width: 575px) { .period-bar { flex-direction: column; align-items: stretch; } .period-nav { justify-content: space-between; } }
.share-meter.empty .rest { background: #e5e7eb; opacity: 1; }

/* ---- панель «Рынок» ---- */
.market-skeleton { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.market-skeleton span { height: 90px; border-radius: 12px; background: linear-gradient(90deg, #f1f3f8 25%, #e6e9f2 37%, #f1f3f8 63%); background-size: 400% 100%; animation: mkShimmer 1.3s ease infinite; }
.market-skeleton span:last-child { grid-column: span 2; height: 60px; }
@keyframes mkShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.market-box.loaded { animation: toastIn .3s ease both; }
.market-empty { color: var(--at-muted); padding: 6px 0; }
.market-chance { border-radius: 14px; padding: 16px; background: #f1f3f8; }
.market-chance .label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--at-muted); }
.market-chance .big { font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.market-chance.high { background: #dcfce7; } .market-chance.high .big { color: #15803d; }
.market-chance.mid { background: #fef9c3; } .market-chance.mid .big { color: #a16207; }
.market-chance.low { background: #fee2e2; } .market-chance.low .big { color: #b91c1c; }
.market-chance .rec { font-size: .85rem; }
.market-reasons { margin: 10px 0 0; padding-left: 18px; font-size: .82rem; color: var(--at-muted); }
.market-reasons li + li { margin-top: 4px; }
.market-block h4 { font-size: .95rem; font-weight: 700; }
.market-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.market-kpis div { background: #f7f8fc; border-radius: 10px; padding: 8px 10px; font-size: .75rem; color: var(--at-muted); }
.market-kpis span { display: block; font-size: 1.15rem; font-weight: 700; color: var(--at-text); }
.market-table td, .market-table th { font-size: .82rem; vertical-align: top; }

/* отчёт ИИ из Markdown */
.ai-md h5 { font-size: 1rem; font-weight: 700; margin: 14px 0 6px; }
.ai-md h5:first-child { margin-top: 0; }
.ai-md p { margin: 0 0 6px; }
.ai-md ul { margin: 0 0 8px; padding-left: 20px; }
.ai-md li + li { margin-top: 2px; }
.ai-report.ai-md { white-space: normal; }

.prompt-editor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.55; resize: vertical; }

/* ---- юридические страницы ---- */
.legal-page { max-width: 860px; background: #fff; border: 1px solid var(--at-border); border-radius: var(--at-radius); padding: 32px; line-height: 1.65; }
.legal-page h1 { margin-bottom: 4px; }
.legal-page h2 { font-size: 1.1rem; font-weight: 700; margin: 26px 0 8px; }
.legal-page p, .legal-page li { font-size: .95rem; }
.legal-req { display: grid; gap: 6px; padding: 16px; background: #f7f8fc; border-radius: 12px; }
.legal-req div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legal-req span { color: var(--at-muted); min-width: 120px; }
@media (max-width: 575px) { .legal-page { padding: 18px; } }

.precheck-report { max-height: 420px; overflow: auto; padding-right: 6px; }

/* ---- ИИ-подсветка подходящих тендеров ---- */
.rel-badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.rel-badge.high { background: #dcfce7; color: #15803d; }
.rel-badge.mid { background: #fef9c3; color: #a16207; }
.rel-badge.low { background: #f1f3f8; color: var(--at-muted); }
.tender-tile.rel-top { border-color: #86efac; box-shadow: 0 0 0 2px rgba(34,197,94,.25), var(--at-shadow); }
.rel-why { min-height: 1.2em; }

/* ================= Отчёт тестировщика: новые блоки и мобильная вёрстка ================= */
html { scrollbar-gutter: stable; }
.app-footer { padding-right: 96px; }
.email-wrap { overflow-wrap: anywhere; }

/* меню: подсветка только у активного пункта, фокус — тонкая рамка (UX-14) */
.app-sidebar a:focus:not(:focus-visible), .app-sidebar button:focus:not(:focus-visible) { background: transparent; box-shadow: none; outline: none; }
.app-sidebar a:focus-visible { outline: 2px solid rgba(129,140,248,.7); outline-offset: -2px; }
.sidebar-close { display: none; position: absolute; right: 10px; top: 12px; border: 0; background: rgba(255,255,255,.08); color: #dbe2f0; width: 34px; height: 34px; border-radius: 10px; }

/* пустые состояния — контрастнее (UX-14) */
.chart-empty, .empty-inline .small, .param-empty { color: #475569 !important; }
.empty-icon { color: #64748b; }

/* компактное напоминание про имя (UX-4) */
.name-nudge { background: var(--at-primary-50); border: 1px solid #c7d2fe; border-radius: 12px; padding: 8px 12px; margin-bottom: 14px; font-size: .9rem; }
.name-nudge .btn-close { font-size: .7rem; }

/* тур: «Больше не показывать» */
.driver-popover.app-tour .tour-off { margin-right: auto; border: 0; background: transparent; color: #64748b; font-size: .8rem; text-decoration: underline; padding: 0 6px; }

/* доска: тип этапа, свёрнутые колонки, сроки, «Переместить в…» */
.kind-ico { font-size: .85rem; }
.kanban-column.kind-lost .kc-head h2 { color: #64748b; }
.kanban-column.collapsed { width: 54px !important; min-width: 54px !important; cursor: pointer; }
.kanban-column.collapsed .kanban-cards, .kanban-column.collapsed .kanban-totals, .kanban-column.collapsed .kc-foot,
.kanban-column.collapsed .col-grip, .kanban-column.collapsed .dropdown, .kanban-column.collapsed .kind-ico { display: none !important; }
.kanban-column.collapsed .kc-head { flex-direction: column; gap: 8px; }
.kanban-column.collapsed .col-title { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.orphan-column { border: 2px dashed #f59e0b !important; }
.kc-badge.overdue { background: #fee2e2 !important; color: #b91c1c !important; }
.kc-badge.soon { background: #ffedd5 !important; color: #c2410c !important; }
.kc-move { display: none; margin-top: 8px; }
.board-tools .btn.active { background: var(--at-primary-50); border-color: #c7d2fe; color: var(--at-primary); }
.kanban-board { scrollbar-width: auto; scrollbar-color: #94a3b8 #e2e8f0; }
.kanban-board::-webkit-scrollbar { height: 12px; }
.kanban-board::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 8px; }
.kanban-board::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 8px; }

/* параметры объекта и пометки ИИ */
.param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.param-cell { border: 1px solid var(--at-border); border-radius: 12px; padding: 10px 12px; background: #fff; }
.param-cell.empty { background: #fffbeb; border-color: #fde68a; }
.pc-name { font-size: .8rem; color: var(--at-muted); }
.pc-value { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.param-marks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; grid-column: 1 / -1; }
.pm { font-size: .72rem; border-radius: 999px; padding: 1px 8px; background: #f1f5f9; color: #475569; }
.pm-ai { background: #eef2ff; color: #4338ca; cursor: help; }
.pm-warn { background: #fef3c7; color: #92400e; }
.pm-muted { background: #f1f5f9; color: #64748b; }
.param-card .form-label { margin-bottom: 2px; }

/* виды работ и расчёт цены в карточке */
.rate-input { width: 92px; display: inline-block; padding: 1px 6px; height: auto; }
.comp-input { width: 74px; padding: 1px 6px; height: auto; }
.price-table td, .price-table th { vertical-align: middle; }
.price-table tr.off td { opacity: .55; }
.price-table .total-row td { border-top: 2px solid var(--at-text); font-size: 1.02rem; }
.min-price { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 14px; }
.add-comp summary { list-style: none; }
.empty-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 14px; }
.empty-inline > i { font-size: 1.5rem; color: var(--at-primary); }

/* форма вида работ: строки «параметр × цена» */
.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 160px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.rate-row .x { color: var(--at-muted); font-weight: 700; }
.rate-row .extra { grid-column: 1 / -1; display: flex; gap: 8px; padding-left: 14px; }
.rate-row .extra.d-none { display: none !important; }

/* оплаты: группы «К оплате» */
.pay-group-head { background: #f8fafc; }
.pay-group-head.overdue { color: #b91c1c; }
.pay-group-head.nodate { color: #92400e; }
.date-badge.k-overdue { background: #fee2e2; color: #b91c1c; }
.date-badge.k-none { background: #fef3c7; color: #92400e; display: grid; place-items: center; }

/* Гант: закреплённые названия и подсказка */
.gantt-names { position: absolute; left: 0; top: 0; width: 230px; z-index: 3; pointer-events: none; }
.gantt-name { position: absolute; left: 0; width: 230px; height: 26px; display: flex; flex-direction: column; justify-content: center; pointer-events: auto;
  padding: 0 10px; background: rgba(255,255,255,.94); border-right: 1px solid var(--at-border); color: var(--at-text); text-decoration: none; line-height: 1.1; }
.gantt-name .gn-title { font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-name small { font-size: .66rem; color: var(--at-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-name.bar-work .gn-title { font-weight: 500; padding-left: 10px; }
.gantt-hint { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 12px; font-size: .88rem; }

/* аналитика */
.stage-filter .dropdown-item { white-space: normal; }

/* общие: суммы не переносятся, заголовки — с переносами по слогам (MOB-2) */
.value, .stat .value, .kc-badge, .pc-value { white-space: nowrap; }
h1, h2, h3, h4, h5, .stat .label { overflow-wrap: normal; word-break: normal; }
@media (max-width: 767.98px) { h1, h2, h3, h4, h5, .stat .label { hyphens: auto; -webkit-hyphens: auto; } }

/* ---------- телефон ---------- */
@media (max-width: 991.98px) {
  body.sidebar-open::before { content: ""; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1990; }
  .app-sidebar { z-index: 2000; }
  .sidebar-close { display: grid; place-items: center; }
  body.sidebar-open .sp-widget { display: none; }
}
@media (max-width: 767.98px) {
  .app-footer { padding-right: 0; padding-bottom: 72px; }
  .sp-widget { right: 12px; bottom: 12px; }
  .sp-bubble { width: 46px; height: 46px; font-size: 1.1rem; }
  body:has(.sticky-actions) .sp-widget { bottom: 86px; }
  .app-content { padding-bottom: 96px; }
  .sticky-actions { flex-wrap: wrap; }
  .page-head h1 { font-size: clamp(1.25rem, 6vw, 1.6rem); }
  .stat .value { font-size: clamp(1.05rem, 5.2vw, 1.5rem); }
  .stat .label { font-size: .68rem; letter-spacing: .02em; }

  /* таблицы → карточки (MOB-1) */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tfoot { display: block; width: 100%; }
  .table-cards tr { display: block; border: 1px solid var(--at-border); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; background: #fff; }
  .table-cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0 !important; padding: 4px 0 !important; text-align: right !important; white-space: normal; }
  .table-cards td::before { content: attr(data-label); color: var(--at-muted); font-size: .8rem; text-align: left; flex-shrink: 0; }
  .table-cards td.tc-title { display: block; text-align: left !important; padding-bottom: 6px !important; }
  .table-cards td.tc-title::before, .table-cards td:not([data-label])::before { content: none; }
  .table-cards td.tc-actions { justify-content: flex-end; gap: 6px; padding-top: 8px !important; }
  .table-cards tfoot tr { background: #f8fafc; }
  .table-cards tfoot td { justify-content: space-between; }
  .table-responsive:has(.table-cards) { border: 0; box-shadow: none; background: transparent; overflow: visible; }
  .team-table td.text-center { justify-content: space-between; }

  /* доска: колонки на всю ширину с прилипанием, «Переместить в…» вместо перетаскивания (MOB-4) */
  .kanban-board { scroll-snap-type: x mandatory; }
  .kanban-column { width: 86vw !important; min-width: 86vw !important; scroll-snap-align: start; }
  .kc-move { display: block; }

  .rate-row { grid-template-columns: minmax(0, 1fr) 130px auto; }
  .rate-row .x, .rate-row .js-more { display: none; }
  .price-table .comp-input { width: 60px; }
  .gantt-names, .gantt-name { width: 150px; }
}
@media (max-width: 399.98px) {
  .row > [class*="col-sm-6"][class*="col-xl-3"] { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 767.98px) {
  .doc-list { max-height: none; overflow: visible; }
  .mobile-fold { max-height: 220px; overflow: hidden; position: relative; }
  .mobile-fold::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, #fff); }
  .mobile-fold.open { max-height: none; }
  .mobile-fold.open::after { display: none; }
}
@media (max-width: 575.98px) {
  .feature { padding: 14px 10px; }
  .feature h5 { font-size: clamp(.86rem, 4vw, 1rem); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .feature p { font-size: .8rem; }
}

.price-table th { white-space: nowrap; }
.price-table td:first-child { min-width: 190px; }
.price-table td:first-child label span { overflow-wrap: normal; word-break: normal; }
.price-table td:nth-child(2) { white-space: nowrap; }
#works-box .table th { white-space: nowrap; }
.driver-popover.app-tour .driver-popover-footer { flex-wrap: wrap; gap: 6px; }
.driver-popover.app-tour .tour-off { order: 10; flex-basis: 100%; text-align: left; margin: 2px 0 0; padding: 0; }

/* свёрнутый разбор ИИ (R2-10, FEAT-6) */
.fold { max-height: 260px; overflow: hidden; position: relative; }
.fold::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.fold.open { max-height: none; }
.fold.open::after { display: none; }
/* расчёт по тендеру */
.profit-plaque { border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.profit-plaque.good { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.profit-plaque.edge { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.profit-plaque.loss { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.profit-plaque.unknown { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.draft-param { margin-bottom: 10px; }
.draft-param.missing .form-control { border-color: #f59e0b; background: #fffbeb; }
.draft-price .total-row td { border-top: 2px solid var(--at-text); }
.decision-panel { border: 1px dashed #c7d2fe; background: var(--at-primary-50); border-radius: 14px; padding: 14px 16px; }
.draft-line { font-size: .8rem; border-radius: 8px; padding: 3px 8px; display: inline-block; }
.draft-line.good { background: #dcfce7; color: #166534; }
.draft-line.edge { background: #fef9c3; color: #854d0e; }
.draft-line.loss { background: #fee2e2; color: #991b1b; }
.draft-line.unknown { background: #f1f5f9; color: #475569; }

/* первичка: вкладки этапов и карточки объектов */
.acc-toolbar { display: flex; flex-direction: column; gap: 10px; }
.stage-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.stage-tabs .chip { white-space: nowrap; padding: 6px 12px; font-size: .82rem; }
.stage-tabs .chip b { margin-left: 4px; color: var(--at-muted); font-weight: 600; }
.stage-tabs .chip.active b { color: var(--at-primary); }
.acc-tabs .nav-link { color: var(--at-muted); font-weight: 600; }
.acc-tabs .nav-link.active { color: var(--at-text); }
.acc-card { border-left: 4px solid #e2e8f0; }
.acc-card.missing { border-left-color: #f59e0b; }
.acc-card.signing { border-left-color: var(--at-primary); }
.acc-card.done { border-left-color: #10b981; }
.acc-title { font-weight: 600; line-height: 1.3; display: block; margin: 4px 0 2px; }
.acc-title:hover { color: var(--at-primary) !important; }
.acc-count { font-size: .82rem; font-weight: 700; white-space: nowrap; color: var(--at-muted); }
.acc-side { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--at-muted); font-weight: 600; margin-top: 4px; }
.acc-miss { font-size: .75rem; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 999px; padding: 1px 8px; }
/* график: вкладки этапов и цвет типа этапа */
.gantt-stages { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gantt-stages .gs-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--at-muted); font-weight: 600; }
.gantt-stages .stage-tabs { flex: 1; min-width: 0; }
.stage-tabs a.chip { text-decoration: none; display: inline-flex; align-items: center; }
.kd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #cbd5e1; vertical-align: middle; flex: none; }
.kd-tender { background: var(--at-primary); }
.kd-contract { background: #f59e0b; }
.kd-done { background: #10b981; }
.kd-lost { background: #94a3b8; }
.gantt-name { border-left: 3px solid transparent; }
.gantt-name.k-tender { border-left-color: var(--at-primary); }
.gantt-name.k-contract { border-left-color: #f59e0b; }
.gantt-name.k-done { border-left-color: #10b981; }
.gantt-name.k-lost { border-left-color: #94a3b8; opacity: .75; }

/* график: виды работ внутри объекта, исполнители */
.gantt-name.has-fold { padding-left: 26px; }
.gantt-name .gn-fold { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; padding: 0; border: 0;
  background: transparent; color: var(--at-muted); border-radius: 4px; line-height: 1; font-size: .75rem; }
.gantt-name .gn-fold:hover { background: var(--at-primary-50); color: var(--at-primary); }
.gantt-name.bar-work { background: rgba(248,250,252,.96); }
.gantt-name.bar-work .gn-title { padding-left: 14px; }
.gantt-name.bar-work small { padding-left: 14px; color: #475569; }
.gantt-name.no-who small { color: #b45309; }
.gantt-name.bar-bid .gn-title { padding-left: 14px; font-weight: 500; }
.gantt .bar-wrapper.bar-summary .bar { fill: #818cf8; }
.gantt-who-filter { background: var(--at-primary-50); border: 1px solid #c7d2fe; border-radius: 10px; padding: 6px 12px; font-size: .88rem; display: inline-block; }
.people-item.active-person { background: var(--at-primary-50); border-left: 3px solid var(--at-primary); }
.people-item.no-who .fw-semibold { color: #b45309; }
.gs-hint { margin-top: -4px; }

/* ИИ-автопилот */
.ap-panel { border: 1px solid #c7d2fe; background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%); }
.ap-panel .ap-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; padding: 2px 10px;
  border-radius: 999px; background: #fff; border: 1px solid var(--at-border); }
.ap-chip.take { color: #047857; border-color: #a7f3d0; }
.ap-chip.edge { color: #b45309; border-color: #fde68a; }
.ap-chip.skip { color: #b91c1c; border-color: #fecaca; }
.ap-chip.no_params, .ap-chip.no_tz { color: #475569; }
.ap-chip.error, .ap-chip.limit { color: #9a3412; border-color: #fed7aa; }
.ap-mark { font-size: .8rem; font-weight: 600; border-radius: 10px; padding: 6px 10px; border: 1px solid var(--at-border); background: #f8fafc; color: #334155; }
.ap-mark.take { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.ap-mark.edge { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.ap-mark.skip { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.ap-mark.no_params, .ap-mark.no_tz { background: #f1f5f9; color: #475569; }
.ap-mark.error, .ap-mark.limit { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.order-item:has(.ap-mark.skip) .tender-tile { opacity: .72; }
.ap-locked { opacity: .65; }

/* чат поддержки: ответы ИИ-помощника */
.sp-msg .sp-ai { display: block; font-size: .7rem; font-weight: 700; color: var(--at-primary); margin-bottom: 2px; }
.sp-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.sp-dots i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: spDot 1s infinite ease-in-out; }
.sp-dots i:nth-child(2) { animation-delay: .15s; } .sp-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes spDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.sp-msg.ai-handoff { border-left: 3px solid #f59e0b; }
.staff-pay-row td { vertical-align: middle; }

.segmented .seg-link { padding: 6px 12px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--at-muted); text-decoration: none; }
.segmented .seg-link.active { background: #fff; color: var(--at-text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* SEO-страницы */
.seo-crumbs { color: var(--at-muted); } .seo-crumbs a { color: var(--at-muted); text-decoration: none; } .seo-crumbs a:hover { color: var(--at-primary); }
.seo-crumbs .bi { font-size: .7rem; margin: 0 4px; }
.seo-h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .6rem; }
.seo-lead { font-size: 1.08rem; color: #334155; margin-bottom: 1.2rem; }
.seo-body h2 { font-size: 1.35rem; font-weight: 700; margin: 1.6rem 0 .6rem; }
.seo-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
.seo-body p, .seo-body li { line-height: 1.65; color: #1e293b; }
.seo-body ul, .seo-body ol { padding-left: 1.3rem; margin-bottom: 1rem; }
.seo-live { background: linear-gradient(135deg, #eef2ff, #f0fdfa); border: 1px solid #c7d2fe; border-radius: 14px; padding: 14px 16px; }
.seo-live-list { list-style: none; padding: 0; margin: 0 0 8px; }
.seo-live-list li { padding: 8px 0; border-bottom: 1px dashed #c7d2fe; display: flex; flex-direction: column; }
.seo-live-list li:last-child { border-bottom: 0; }
.seo-live-name { font-weight: 600; font-size: .92rem; line-height: 1.35; }
.seo-live-meta { font-size: .8rem; color: var(--at-muted); }
.seo-tile { transition: transform .15s, box-shadow .15s; } .seo-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
