/* =====================================================================
   CRM «Городской сервис грузчиков» — оформление в стиле сайта
   Шрифт Montserrat, синий и жёлтый, белые карточки с большим скруглением
   ===================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #2B6BE8;
  --blue-dark: #1C4CC2;
  --accent: #2F74EE;
  --link: #1F5ED8;
  --link-hover: #163FA8;
  --bg: #EEF3FB;
  --card: #FFFFFF;
  --text: #0E1116;
  --text-2: #3A4252;
  --muted: #5B6475;
  --line: #E6EBF4;
  --line-soft: #EEF2F8;
  --field: #D5DDEB;
  --soft: #F3F6FC;
  --yellow: #F2B33D;
  --green: #3DA34E;
  --red: #D92D20;
  --radius: 28px;
  --radius-sm: 20px;
  --shadow: 0 10px 30px rgba(28, 76, 194, 0.07);
  --gradient: linear-gradient(90deg, var(--blue), var(--blue-dark));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid rgba(43, 107, 232, 0.45); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--card); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.accent { color: var(--accent); }
.inline-form { display: inline-flex; margin: 0; }

/* ---------------------------------------------------------------- каркас */
.page {
  max-width: 1440px; margin: 0 auto; padding: 24px;
  display: flex; flex-direction: column; gap: 24px;
}
.topbar {
  display: flex; align-items: center; gap: 12px 20px;
  background: var(--card); border-radius: 32px;
  padding: 12px 14px 12px 28px; box-shadow: var(--shadow);
}
.topbar-spacer { flex: 1; }
.brand {
  display: flex; flex-direction: column; line-height: 1.05;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand small { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; }
.brand strong { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.brand-lg small { font-size: 13px; }
.brand-lg strong { font-size: 28px; }

.user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; margin-right: 6px; }
.who-name { font-weight: 700; }
.user-chip small { font-size: 12px; color: var(--muted); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFF1D2; color: #7A5000; font-weight: 800; font-size: 15px;
}
.avatar-sm { width: 40px; height: 40px; font-size: 13px; }
.avatar-blue { background: #E3ECFD; color: #1F4FC4; }

.layout { display: flex; gap: 24px; align-items: flex-start; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; outline: none; }

/* ---------------------------------------------------------- меню разделов */
.sidebar {
  flex: 0 0 272px; background: var(--card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar-head { display: none; }
.nav-group {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 16px 14px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px;
  border-radius: 16px; color: var(--text); text-decoration: none; font-weight: 600;
}
.nav-link svg { color: var(--muted); flex-shrink: 0; }
.nav-link .grow { flex: 1; }
a.nav-link:hover { background: var(--soft); color: var(--text); }
.nav-link.active { background: var(--gradient); color: #FFFFFF; font-weight: 700; }
.nav-link.active svg { color: #FFFFFF; }
.nav-link.active:hover { color: #FFFFFF; }
.nav-link.is-later { color: var(--muted); cursor: default; }
.tag {
  height: 22px; padding: 0 8px; border-radius: 999px; background: #EEF0F4; color: #4A5262;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center;
}
.backdrop { display: none; }
.bottombar { display: none; }
.topbar .menu-btn { display: none; }

/* ------------------------------------------------------------- заголовки */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; padding: 8px 4px 0;
}
.page-title {
  font-size: 40px; line-height: 1.1; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.01em;
}
.page-title-sm { font-size: 28px; }
.page-sub { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---------------------------------------------------------------- карточки */
.card {
  background: var(--card); border-radius: var(--radius); padding: 24px 28px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.card-narrow { max-width: 640px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.card-title { font-size: 18px; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.cards-stack { display: flex; flex-direction: column; gap: 24px; max-width: 880px; }

.empty {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1.5px dashed #C9D3E6; border-radius: var(--radius-sm); color: var(--muted);
}
.empty strong { color: var(--text); font-weight: 700; }

.stub { display: flex; align-items: flex-start; gap: 18px; }
.stub-icon {
  width: 64px; height: 64px; border-radius: 20px; flex-shrink: 0;
  background: #E3ECFD; color: #1F4FC4; display: inline-flex; align-items: center; justify-content: center;
}
.stub p { margin-top: 6px; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--gradient); color: #FFFFFF; text-transform: uppercase; letter-spacing: 0.02em; }
.btn-primary:hover { color: #FFFFFF; filter: brightness(1.06); }
.btn-outline { background: #FFFFFF; border: 2px solid var(--blue); color: var(--link); }
.btn-soft { background: #E3ECFD; color: #1F4FC4; }
.btn-soft:hover { color: #1F4FC4; background: #D6E3FC; }
.btn-ghost { background: var(--soft); color: var(--text); }
.btn-ghost:hover { color: var(--text); background: #E8EEF8; }
.btn-danger-soft { background: #FDE7E4; color: #B42318; }
.btn-danger-soft:hover { color: #B42318; background: #FBD9D4; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: var(--soft); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.icon-btn:hover { background: #E8EEF8; color: var(--text); }

/* ----------------------------------------------------------------- метки */
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.chip-blue { background: #E3ECFD; color: #1F4FC4; }
.chip-green { background: #E3F5E1; color: #1D6B2E; }
.chip-yellow { background: #FFF1D2; color: #7A5000; }
.chip-red { background: #FDE7E4; color: #B42318; }
.chip-gray { background: #EEF0F4; color: #4A5262; }
.chip-outline { background: #FFFFFF; border: 1.5px solid #C9D3E6; color: #4A5262; }

/* --------------------------------------------------------- кнопки городов */
.city-filter {
  align-self: flex-start;
  display: flex; flex-wrap: wrap; gap: 4px; background: var(--card);
  border-radius: 26px; padding: 5px; box-shadow: var(--shadow);
}
.city-filter a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
  border-radius: 999px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
}
.city-filter a:hover { background: var(--soft); color: var(--text); }
.city-filter a[aria-current="true"] { background: var(--blue); color: #FFFFFF; font-weight: 700; }

/* ---------------------------------------------------------------- формы */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.input {
  width: 100%; min-height: 48px; padding: 0 16px;
  border: 1.5px solid var(--field); border-radius: 14px; background: #FFFFFF;
  color: var(--text); font-family: inherit; font-size: 16px; font-weight: 500;
}
select.input { appearance: auto; }
textarea.input { padding: 12px 16px; min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 107, 232, 0.18); }
.input-sm { min-height: 44px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.add-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }
.add-form .input { flex: 1 1 220px; }

/* --------------------------------------------------------- уведомления */
.flashes { display: flex; flex-direction: column; gap: 10px; }
.flash { border-radius: 18px; padding: 14px 18px; font-weight: 600; }
.flash-success { background: #E3F5E1; color: #1D6B2E; }
.flash-error { background: #FDE7E4; color: #B42318; }
.flash-info { background: #E3ECFD; color: #1F4FC4; }

/* ------------------------------------------------------------- списки */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: 0; }
.row.is-off { opacity: 0.6; }
.row-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.row-meta b { color: var(--text-2); font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-edit { display: flex; gap: 8px; flex: 1 1 240px; min-width: 0; }
.row-edit .input { flex: 1; min-width: 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 0 12px 12px; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }

/* ------------------------------------------------------- план запуска */
.roadmap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.roadmap li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.roadmap-num {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #EEF0F4; color: #4A5262; font-weight: 800; font-size: 13px;
}
.roadmap .is-done .roadmap-num { background: var(--green); color: #FFFFFF; }
.roadmap .is-next .roadmap-num { background: #FFF1D2; color: #7A5000; }
.roadmap-text { flex: 1 1 220px; font-weight: 600; }
.roadmap .is-done .roadmap-text { color: var(--muted); }

/* ------------------------------------------------------------- вход */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 440px; background: var(--card); border-radius: 32px;
  padding: 36px 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px;
}
.auth-title { font-size: 32px; line-height: 1.1; font-weight: 900; text-transform: uppercase; margin-top: 12px; }

/* ===================================================== планшет и телефон */
@media (max-width: 1023px) {
  .page { padding: 16px 16px 108px; gap: 20px; }
  .topbar { padding: 10px 10px 10px 12px; border-radius: 28px; gap: 10px; }
  .brand small { font-size: 11px; }
  .brand strong { font-size: 20px; }
  .topbar .menu-btn { display: inline-flex; }
  .btn-new { display: none; }
  .user-chip .who, .user-chip .avatar { display: none; }

  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
    width: min(320px, 86vw); border-radius: 0 28px 28px 0; overflow-y: auto;
    transform: translateX(-105%); visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s;
    padding-bottom: 24px;
  }
  body.menu-open .sidebar { transform: none; visibility: visible; }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 8px 14px; }
  .sidebar-title { font-size: 18px; font-weight: 800; text-transform: uppercase; }
  .backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(14, 17, 22, 0.35); }
  body.menu-open .backdrop { display: block; }
  body.menu-open { overflow: hidden; }

  .bottombar {
    display: flex; position: fixed; left: 12px; right: 12px; z-index: 40;
    bottom: calc(12px + env(safe-area-inset-bottom));
    background: #FFFFFF; border: 1.5px solid var(--blue); border-radius: 28px; padding: 6px;
    box-shadow: 0 10px 30px rgba(28, 76, 194, 0.14);
  }
  .bottombar a, .bottombar button {
    flex: 1; min-width: 0; min-height: 56px; border: 0; background: none; border-radius: 22px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #4A5262; text-decoration: none; font-size: 11px; font-weight: 600; cursor: pointer;
  }
  .bottombar .active { background: #E3ECFD; color: #1F4FC4; font-weight: 700; }
}

@media (max-width: 767px) {
  .page-title { font-size: 28px; }
  .page-sub { font-size: 15px; }
  .page-head { padding: 4px 4px 0; }
  .card { padding: 20px 18px; border-radius: 24px; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .cards-stack { gap: 16px; }
  .city-filter { width: 100%; }
  .city-filter a { flex: 1 1 auto; justify-content: center; }
  .page-head > .btn { width: 100%; }
  .auth-card { padding: 28px 22px; }
  .auth-title { font-size: 28px; }
}

/* =====================================================================
   Часть 2: клиенты, исполнители, поиск
   ===================================================================== */
[hidden] { display: none !important; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-size: 13px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.chip svg { margin-right: 4px; }
.chip-inline { height: 20px; padding: 0 8px; font-size: 10px; vertical-align: middle; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.num { text-align: right !important; }
.nowrap { white-space: nowrap; }
.text-red { color: #B42318; }
.pre { white-space: pre-line; }
.back-link { align-self: flex-start; font-weight: 700; text-decoration: none; padding: 4px; }
.card-tight { padding: 16px 18px; }
.card-form { max-width: 780px; }
.link-btn {
  background: none; border: 0; padding: 4px 0; color: var(--link);
  font-size: 12px; font-weight: 700; cursor: pointer;
}

/* поиск в шапке */
.topbar-search {
  flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; gap: 10px;
  background: var(--soft); border-radius: 999px; padding: 0 18px; height: 48px; color: var(--muted);
}
.topbar-search input, .search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--text);
}
.topbar .search-btn { display: none; }

/* фильтры */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search-field {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px; height: 48px;
  background: var(--soft); border-radius: 999px; padding: 0 18px; color: var(--muted);
}
.search-field-lg { height: 56px; }
.search-field-lg input { font-size: 17px; }
.select-inline { flex: 0 1 210px; }
.filters-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--soft);
  border-radius: 26px; padding: 4px;
}
.segmented a, .segmented label {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
}
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented a[aria-current="true"], .segmented label:has(input:checked) {
  background: var(--blue); color: #FFFFFF; font-weight: 700;
}
.segmented label:has(input:focus-visible) { outline: 3px solid rgba(43, 107, 232, 0.45); }
.segmented-lg a, .segmented-lg label { min-height: 48px; padding: 0 22px; font-size: 14px; }
.segmented .seg-b2b:has(input:checked) { background: #2E8B44; }
.segmented .seg-b2c:has(input:checked) { background: #C8402F; }
.city-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.add-city summary { list-style: none; min-height: 50px; }
.add-city summary::-webkit-details-marker { display: none; }
.add-city-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.add-city-form .input { width: 220px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 4px; }

/* кнопки связи */
.icon-btn-sm { width: 40px; height: 40px; }
.icon-btn-call { background: #E3ECFD; color: #1F4FC4; }
.icon-btn-call:hover { background: #D6E3FC; color: #1F4FC4; }
.icon-btn-wa { background: #E3F5E1; color: #1D6B2E; }
.icon-btn-wa:hover { background: #D3EFD0; color: #1D6B2E; }
.btn-wa { background: #E3F5E1; color: #1D6B2E; }
.btn-wa:hover { background: #D3EFD0; color: #1D6B2E; }

/* карточки клиентов: юрлицо — зелёная, физлицо — красная */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  border-radius: 24px; padding: 18px 20px; border: 1.5px solid transparent;
  box-shadow: var(--shadow); transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.client-card:hover { box-shadow: 0 14px 34px rgba(28, 76, 194, 0.13); }
.client-b2b { background: #F1FAF0; border-color: #CDEBC8; }
.client-b2c { background: #FFF5F3; border-color: #F7D4CE; }
.client-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.client-name { font-size: 16px; font-weight: 800; color: var(--text); text-decoration: none; line-height: 1.25; }
.client-name:hover { color: var(--text); }
.client-card-actions { position: relative; z-index: 1; display: flex; gap: 8px; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row-link { position: relative; }
.row-link .row-title a { color: var(--text); text-decoration: none; }
.row-link:hover .row-title a { color: var(--link); }
.row-actions-top { position: relative; z-index: 1; }

/* карточка клиента и исполнителя */
.client-hero { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; border: 1.5px solid transparent; }
.client-hero-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 280px; }
.client-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.regular-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 999px; border: 2px dashed #E3C27A; background: #FFFFFF; color: #7A5000;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.regular-toggle.is-on { background: #FFF1D2; border-style: solid; border-color: var(--yellow); }
.regular-toggle.is-on svg { fill: currentColor; }
.worker-hero { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.worker-hero-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-yellow { background: #FFF1D2; color: #7A5000; }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.split-side, .split-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
@media (min-width: 1100px) {
  .split { grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); align-items: start; }
}
.details { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.details dt { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.details dd { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.phone-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; }
.phone-line-actions { display: flex; gap: 6px; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notes li { background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.note-text { white-space: pre-line; overflow-wrap: anywhere; }
.note-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--soft); border-radius: 18px; padding: 14px 16px; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rating-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rating-list li { display: flex; align-items: center; gap: 12px; }
.rating-badge {
  width: 56px; height: 52px; border-radius: 16px; flex-shrink: 0;
  display: inline-flex; align-items: baseline; justify-content: center; padding-top: 12px;
  font-size: 20px; font-weight: 800;
}
.rating-badge small { font-size: 11px; font-weight: 700; }
.rating-high { background: #E3F5E1; color: #1D6B2E; }
.rating-mid { background: #FFF1D2; color: #7A5000; }
.rating-low { background: #FDE7E4; color: #B42318; }

/* форма клиента */
.repeat-list { display: flex; flex-direction: column; gap: 8px; }
.repeat-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.repeat-row .input { flex: 1 1 220px; }
.repeat-row .input-label { flex: 1 1 200px; }
.add-row { align-self: flex-start; margin-top: 4px; }
.phone-check:empty { display: none; }
.phone-check { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.phone-check div { border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 600; }
.phone-check .is-dup { background: #FDE7E4; color: #B42318; }
.phone-check .is-dup a { color: #B42318; }
.phone-check .is-cold { background: #FFF1D2; color: #7A5000; }
.check-lg { font-size: 15px; }
.b2b-only { display: flex; flex-direction: column; gap: 16px; }
.cards-search { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

@media (max-width: 1023px) {
  .topbar-search { display: none; }
  .topbar .search-btn { display: inline-flex; }
}
@media (max-width: 767px) {
  .client-grid { grid-template-columns: 1fr; }
  .select-inline { flex: 1 1 100%; }
  .filters .segmented { width: 100%; }
  .filters .segmented a { flex: 1; }
  .segmented-lg { width: 100%; }
  .segmented-lg label { flex: 1; padding: 0 10px; }
  .client-hero-actions .btn, .client-hero-actions form, .client-hero-actions .regular-toggle { flex: 1 1 auto; }
  .add-city-form .input { width: 100%; }
  .stat-value { font-size: 19px; }
}

/* =====================================================================
   Часть 3: заказы
   ===================================================================== */
.text-dark { color: var(--text); }
.tabs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tabs-row .segmented { background: var(--card); box-shadow: var(--shadow); }
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 999px; background: rgba(14, 17, 22, 0.08); font-size: 11px; font-weight: 700;
}
.segmented a[aria-current="true"] .count { background: rgba(255, 255, 255, 0.25); }
.date-field { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.date-field .input { width: 170px; }
.form-section {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent); padding-top: 8px; border-top: 1px solid var(--line-soft);
}
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.client-found {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px;
  background: #E3F5E1; color: #1D6B2E; font-weight: 600;
}
.client-found a { color: #1D6B2E; font-weight: 800; }
.new-client { background: var(--soft); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

/* список заказов */
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.order-item {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center; gap: 8px 14px;
  padding: 14px 16px; border-radius: 20px; border: 1.5px solid var(--line); background: #FFFFFF;
}
.order-item:hover { border-color: #C9D3E6; box-shadow: var(--shadow); }
.order-item.is-short { border-color: #F4C7C1; background: #FFF7F6; }
.order-item.status-done { background: #FAFCFF; }
.order-item.status-cancelled { opacity: 0.6; }
.order-time { display: flex; flex-direction: column; align-items: flex-start; }
.order-time b { font-size: 18px; font-weight: 800; }
.order-date { font-size: 12px; color: var(--muted); font-weight: 700; }
.order-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.order-main .row-title a { color: var(--text); text-decoration: none; }
.order-side { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.order-crew { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--text-2); }
.order-sum { font-weight: 800; min-width: 92px; text-align: right; white-space: nowrap; }
.list-caption { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

/* главный экран */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 28px; }
.kpi-value { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; }
.kpi-label { font-size: 14px; color: var(--muted); margin-top: 6px; }
.cards-dash { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); }
.attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attention a {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px;
  background: #FFF7F6; border: 1.5px solid #F4C7C1; color: #8A1C12; text-decoration: none; font-size: 13px;
}
.attention a svg { flex-shrink: 0; margin-top: 1px; color: #B42318; }
.all-good { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: #E3F5E1; color: #1D6B2E; font-weight: 600; }

/* карточка заказа */
.order-hero { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.order-hero-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.order-client { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.order-client a { color: var(--text); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps li {
  flex: 1 1 160px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: var(--soft); color: var(--muted); font-weight: 600;
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center;
  justify-content: center; background: #FFFFFF; font-weight: 800; font-size: 13px;
}
.steps li.is-done { background: #E3F5E1; color: #1D6B2E; }
.steps li.is-done .step-dot { background: var(--green); color: #FFFFFF; }
.steps li.is-current { background: #E3ECFD; color: #1F4FC4; font-weight: 700; }
.steps li.is-current .step-dot { background: var(--blue); color: #FFFFFF; }
.status-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.status-buttons { flex-wrap: wrap; gap: 10px; }
.cancel-box summary { list-style: none; }
.cancel-box summary::-webkit-details-marker { display: none; }
.cancel-box[open] { flex: 1 1 100%; }
.cancel-box .add-form { margin-top: 10px; }
.todo { background: #FFF1D2; color: #5C3D00; border-radius: 18px; padding: 14px 18px; }
.todo ul { margin: 6px 0 0; padding-left: 18px; }
.worker-rows { display: flex; flex-direction: column; gap: 10px; }
.worker-row { border: 1.5px solid var(--line); border-radius: 20px; background: #FFFFFF; }
.worker-row[open] { border-color: #C9D3E6; box-shadow: var(--shadow); }
.worker-row summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer;
}
.worker-row summary::-webkit-details-marker { display: none; }
.worker-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.worker-row-sum { font-weight: 800; font-size: 16px; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }
.worker-row-sum small { font-size: 11px; color: var(--muted); font-weight: 600; }
.mark { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.mark.ok { color: #1D6B2E; }
.mark.ok::before { content: "✓"; }
.mark.no { color: #B42318; }
.mark.no::before { content: "○"; }
.worker-form { padding: 4px 16px 8px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.worker-remove { padding: 0 16px 14px; }
.details-inline { padding: 4px 16px 16px; }
.times-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.times-form .field { flex: 0 1 180px; }
.total-box summary { list-style: none; font-size: 13px; }
.total-box summary::-webkit-details-marker { display: none; }
.total-box .form { margin-top: 12px; }

@media (max-width: 1023px) {
  .cards-dash { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .order-item { gap: 8px 12px; padding: 12px 14px; }
  .order-item { grid-template-columns: 56px minmax(0, 1fr); }
  .order-side { grid-column: 1 / -1; justify-content: space-between; }
  .order-sum { min-width: 0; }
  .kpi-value { font-size: 24px; }
  .steps li { flex: 1 1 140px; padding: 8px 10px; font-size: 13px; }
  .tabs-row .segmented { width: 100%; }
  .tabs-row .segmented a { flex: 1; padding: 0 8px; }
  .tabs-row > .btn { width: 100%; }
  .date-field { flex: 1 1 140px; }
  .date-field .input { width: 100%; }
  .worker-row summary { flex-wrap: wrap; }
  .times-form .field { flex: 1 1 120px; }
  .order-client { font-size: 16px; }
}

/* в узкой колонке главного экрана статус и сумма уходят под заказ */
.cards-dash .order-item { grid-template-columns: 64px minmax(0, 1fr); }
.cards-dash .order-side { grid-column: 2; justify-content: flex-start; }
.cards-dash .order-sum { text-align: left; min-width: 0; }

/* =====================================================================
   Часть 4: оплаты
   ===================================================================== */
.text-green { color: #1D6B2E; }
.kpi-link { display: block; color: inherit; text-decoration: none; border-radius: 16px; }
.kpi-link:hover { color: inherit; }
.kpi-link:hover .kpi-label { color: var(--link); }

/* три столбца оплаты заказчика */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board-col {
  background: rgba(255, 255, 255, 0.55); border: 1.5px solid #DCE5F3; border-radius: 26px;
  padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 220px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.board-col.is-drop { background: #E3ECFD; border-color: var(--blue); border-style: dashed; }
.board-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 6px; }
.board-title { font-size: 15px; font-weight: 800; text-transform: uppercase; }
.board-invoiced .board-title { color: #7A5000; }
.board-paid .board-title { color: #1D6B2E; }
.board-list { display: flex; flex-direction: column; gap: 10px; }
.board-empty { padding: 18px; text-align: center; color: var(--muted); border: 1.5px dashed #C9D3E6; border-radius: 18px; }
.board-more { font-size: 12px; text-align: center; }
.pay-card {
  background: #FFFFFF; border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; border: 1.5px solid transparent; cursor: grab;
}
.pay-card.is-dragging { opacity: 0.45; }
.pay-card.is-overdue { border-color: #F4C7C1; background: #FFF7F6; }
.pay-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pay-sum { font-weight: 800; font-size: 16px; white-space: nowrap; }
.pay-method { font-size: 13px; color: var(--text-2); }
.pay-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.paid-note { font-size: 12px; color: #1D6B2E; font-weight: 600; line-height: 1.35; }
.move-menu { position: relative; }
.move-menu summary { list-style: none; min-height: 36px; padding: 0 12px; }
.move-menu summary::-webkit-details-marker { display: none; }
.move-menu[open] { flex: 1 1 100%; }
.move-panel {
  margin-top: 8px; background: var(--soft); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 12px;
}
.move-form { display: flex; flex-direction: column; gap: 6px; }
.move-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.move-dialog {
  border: 0; border-radius: 26px; padding: 24px; width: min(420px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(14, 17, 22, 0.25);
}
.move-dialog::backdrop { background: rgba(14, 17, 22, 0.35); }
.pay-strip { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pay-strip-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pay-strip-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* оплата исполнителям */
.day-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-nav .icon-btn { font-weight: 800; }
.pay-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.pay-totals b { color: var(--text); font-size: 16px; }
.pay-workers { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.pay-worker { border: 1.5px solid var(--line); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; }
.pay-worker.is-settled { background: #FAFDFB; border-color: #D3EBD0; }
.pay-worker-head { display: flex; gap: 12px; align-items: flex-start; }
.pay-worker-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pay-worker-main .row-title a { color: var(--text); }
.pay-to { font-size: 13px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.pay-worker-total { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pay-big { font-size: 20px; font-weight: 800; white-space: nowrap; }
.pay-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.pay-row-order { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); text-decoration: none; font-size: 13px; }
.pay-row-order:hover { color: var(--link); }
.pay-row-sum { font-weight: 800; white-space: nowrap; }
.pay-row.is-paid .pay-row-sum { color: var(--muted); text-decoration: line-through; }
.pay-check {
  width: 44px; height: 44px; border-radius: 14px; border: 2px solid #C9D3E6; background: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.pay-check:hover { border-color: var(--green); }
.pay-check.is-on { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.pay-all { display: flex; justify-content: flex-end; }

@media (max-width: 1023px) {
  .board { grid-template-columns: 1fr; }
  .pay-card { cursor: default; }
}
@media (max-width: 767px) {
  .pay-workers { grid-template-columns: 1fr; }
  .day-nav { width: 100%; }
  .day-nav form { flex: 1; }
  .day-nav .input { width: 100%; }
}

/* =====================================================================
   Часть 5: финансовая аналитика и менеджеры
   ===================================================================== */
.tabs-main { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); }
.kpi-result { background: var(--soft); border-radius: 18px; padding: 12px 16px; margin: -12px -8px; }
.formula {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 14px 18px;
  border-radius: 18px; background: #FFF8E8; border: 1.5px solid #F6E0A8; font-size: 14px;
}
.formula-total { font-size: 18px; font-weight: 800; }
.cards-2col { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.row-total td { border-top: 2px solid var(--line); font-weight: 800; }
.row-current td { background: #F3F7FF; }
.cell-current { background: #F3F7FF; font-weight: 700; }
.table-compact td, .table-compact th { padding-left: 8px; padding-right: 8px; font-size: 13px; }
.split-bars { display: flex; flex-direction: column; gap: 16px; }
.split-bar { display: flex; flex-direction: column; gap: 6px; }
.split-bar-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bar-track { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.bar-green { background: #3DA34E; }
.bar-red { background: #D9574A; }
.bar-blue { background: var(--accent); }
.inline-bar { width: 110px; height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 10px; }
.inline-bar .bar { height: 8px; }
.stat-inline { color: var(--muted); }
.stat-inline b { color: var(--text); font-size: 16px; }
.expense-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; align-items: end; }
.expense-form .field-wide { grid-column: span 2; }
.expense-form .field-btn { align-self: end; }
.expense-row { padding: 0; }
.expense-item { width: 100%; }
.expense-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.expense-item summary::-webkit-details-marker { display: none; }
.expense-item[open] summary { border-bottom: 1px dashed var(--line); }
.expense-edit { padding: 12px 0; }
.expense-delete { padding-bottom: 12px; }
.today-line { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.today-line b { color: var(--text); }
.row-title a { color: var(--text); }
.transfer-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--soft); border-radius: 18px;
}
.transfer-bar label { font-weight: 700; font-size: 13px; }
.transfer-bar .input { width: auto; min-width: 200px; }

@media (max-width: 767px) {
  .expense-form .field-wide { grid-column: auto; }
  .tabs-main { width: 100%; }
  .tabs-main a { flex: 1; padding: 0 8px; }
  .kpi-result { margin: 0; }
  .transfer-bar .input { width: 100%; }
  .inline-bar { display: none; }
}

/* =====================================================================
   Часть 6: задачи, холодные звонки, источники, уведомления
   ===================================================================== */
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.bell { position: relative; }
.bell-count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #FFFFFF; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.row.is-new { background: #F3F7FF; border-radius: 14px; padding-left: 10px; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; flex-shrink: 0; }
.row.is-new .notif-dot { background: var(--blue); }

/* задачи */
.task-overview { display: flex; flex-wrap: wrap; gap: 10px; }
.task-ov {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 16px;
  background: var(--soft); color: var(--text); text-decoration: none; font-size: 13px; min-width: 170px;
  border: 1.5px solid transparent;
}
.task-ov:hover { color: var(--text); border-color: #C9D3E6; }
.task-ov.is-on { border-color: var(--blue); background: #E3ECFD; }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.task:last-child { border-bottom: 0; }
.task.is-late .row-title { color: #8A1C12; }
.task.is-done .row-title { color: var(--muted); text-decoration: line-through; }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.task-desc { white-space: pre-line; font-size: 14px; color: var(--text-2); }
.task-comment { font-size: 13px; background: #E3F5E1; color: #1D6B2E; border-radius: 12px; padding: 6px 10px; align-self: flex-start; }
.task-done-box summary { list-style: none; }
.task-done-box summary::-webkit-details-marker { display: none; }
.task-done-box[open] { flex: 1 1 100%; order: 3; }
.task-done-box[open] summary { display: none; }
.task-done-form { display: flex; flex-wrap: wrap; gap: 8px; }
.task-done-form .input { flex: 1 1 220px; }
.task-list-sm .task { padding: 10px 0; }

/* холодные звонки */
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.status-chips .chip { height: 32px; padding: 0 12px; text-decoration: none; }
.row.is-due { background: #FFF7F6; border-radius: 14px; padding-left: 10px; padding-right: 10px; }
.call-result { border: 2px solid transparent; }
.call-result.is-active { border-color: var(--blue); box-shadow: 0 0 0 6px rgba(43, 107, 232, 0.12); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 8px; }
.result-opt {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--field); background: #FFFFFF; font-weight: 600; cursor: pointer;
}
.result-opt input { width: 18px; height: 18px; accent-color: var(--blue); }
.result-opt:has(input:checked) { border-color: var(--blue); background: #E3ECFD; color: #1F4FC4; }
.result-converted:has(input:checked) { border-color: var(--green); background: #E3F5E1; color: #1D6B2E; }
.result-refused:has(input:checked) { border-color: #E08A80; background: #FDE7E4; color: #B42318; }
.import-hint { background: var(--soft); border-radius: 18px; padding: 14px 16px; line-height: 1.9; }
.input-file { padding: 10px 14px; }
.cold-line {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #FFF7F6;
  color: var(--text); text-decoration: none; font-size: 14px;
}
.cold-line svg { color: #B42318; }
tr.is-off td { opacity: 0.55; }

@media (max-width: 767px) {
  .head-actions { width: 100%; }
  .head-actions .btn, .head-actions form { flex: 1 1 auto; }
  .head-actions form .btn { width: 100%; }
  .task-ov { flex: 1 1 140px; min-width: 0; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-opt { padding: 0 10px; font-size: 13px; gap: 6px; }
}

/* аккаунт в меню разделов — на телефоне вместо кнопок в шапке */
.sidebar-account { display: none; }
.nav-button { width: 100%; border: 0; background: none; font-family: inherit; font-size: 14px; cursor: pointer; text-align: left; }
@media (max-width: 1023px) {
  .topbar .desktop-only { display: none; }
  .sidebar-account { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  .sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px; line-height: 1.3; }
  .sidebar-user small { color: var(--muted); }
}

.req { font-size: 11px; font-weight: 700; color: #B42318; background: #FDE7E4; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }

/* ============================================ приложение на телефоне (PWA) */
@media (max-width: 1023px) {
  .page { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
}
.install-banner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  background: #FFFFFF; border: 1.5px solid var(--blue); border-radius: 24px; padding: 10px 10px 10px 12px;
}
.install-banner[hidden] { display: none; }
.install-banner .grow { flex: 1; min-width: 0; line-height: 1.35; }
.install-banner small { color: var(--muted, #5B6474); }
.install-icon img { display: block; border-radius: 12px; }
@media (min-width: 1024px) { .install-banner { display: none !important; } }
@media (max-width: 420px) {
  .install-banner { flex-wrap: wrap; }
  .install-banner .grow { flex-basis: calc(100% - 120px); }
  .install-banner .btn { order: 3; flex: 1; }
}
.install-dialog {
  width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 28px; padding: 24px;
  box-shadow: var(--shadow); color: inherit;
}
.install-dialog::backdrop { background: rgba(14, 17, 22, 0.45); }
.install-dialog ol { margin: 6px 0 14px; padding-left: 22px; line-height: 1.5; }
.install-dialog p { margin: 0 0 6px; }
.install-dialog .card-title { margin-bottom: 14px; }
.install-dialog [hidden] { display: none; }
.offline-card .auth-title { margin-top: 4px; }
/* в установленном приложении нет кнопок браузера — подсказка не нужна */
@media (display-mode: standalone) { [data-install], .install-banner { display: none !important; } }
