/* Anytie Platform — светлая тема на фирменной системе anytie.ru
   Типографика: Unbounded (заголовки/бренд) + Onest (текст)
   Акцент действий: коралловый. Мята/лаванда — только семантика статусов.
   Радиусы: карточки 16px, контролы 12px, чипы pill. */

:root {
  --bg: #F4F4F2;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --ink: #141416;
  --muted: #6E6E73;
  --faint: #A3A3A8;
  --line: #E7E7E2;
  --line-strong: #D9D9D3;

  --coral: #FF8562;        /* заливки, крупные элементы */
  --coral-deep: #F26B45;   /* hover заливок */
  --coral-text: #C6491E;   /* текстовые ссылки/акценты на белом (AA) */
  --coral-soft: #FFEDE6;

  --lav-soft: #EFEDFE;
  --lav-text: #5B4FCF;
  --mint-soft: #E4F9E0;
  --mint-text: #1E7B34;
  --danger: #C03434;
  --danger-soft: #FBE9E9;

  --r-card: 16px;
  --r-ctl: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-card: 0 1px 2px rgba(20, 20, 22, .04), 0 8px 24px rgba(20, 20, 22, .05);
  --shadow-pop: 0 2px 6px rgba(20, 20, 22, .08), 0 16px 40px rgba(20, 20, 22, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 'Onest', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Шапка ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 22px; display: block; }
.brand .brand-tag {
  font: 500 10px/1 'Unbounded', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px 4px;
}
.topbar nav { display: flex; gap: 6px; flex: 1; }
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-ctl);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.topbar nav a:hover { color: var(--ink); background: var(--surface-2); }
.topbar nav a.active { color: var(--ink); background: var(--coral-soft); }
.topbar .user { color: var(--muted); font-size: 14px; display: flex; gap: 12px; align-items: center; }
.logout-form { display: inline; }
.linklike {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--coral-text); cursor: pointer; text-decoration: none;
}
.linklike:hover { text-decoration: underline; }

main { max-width: 1160px; margin: 32px auto 64px; padding: 0 20px; }

/* ---------- Типографика ---------- */
h1 {
  font: 500 22px/1.3 'Unbounded', sans-serif;
  letter-spacing: -.01em;
  margin: 0 0 4px;
}
h2 { font: 600 17px/1.35 'Onest', sans-serif; margin: 18px 0 10px; }
h3 {
  font: 600 12px/1.3 'Onest', sans-serif;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 18px 0 8px;
}
a { color: var(--coral-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.danger-text { color: var(--danger); }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.alert {
  background: var(--danger-soft);
  border: 1px solid #F1C7C7;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--r-ctl);
  margin-bottom: 20px;
  font-weight: 500;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  color: var(--ink);
  font: 500 14px/1.2 'Onest', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(255, 133, 98, .35);
}
.btn.primary:hover { background: var(--coral-deep); border-color: var(--coral-deep); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 10px; }
.btn:focus-visible,
a:focus-visible,
.linklike:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 133, 98, .45);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ---------- Таблицы ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
table.list th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
  border-bottom-color: var(--line-strong);
}
table.list tbody tr { transition: background .15s var(--ease); }
table.list tbody tr:hover { background: var(--surface-2); }
table.list tr:last-child td { border-bottom: none; }
table.list tr.inactive td { opacity: .45; }
table.list td a { font-weight: 500; color: var(--ink); }
table.list td a:hover { color: var(--coral-text); }

/* мини-прогресс набора */
.progress-cell { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.progress-track {
  display: block;
  width: 56px; height: 5px; border-radius: 999px;
  background: var(--line); overflow: hidden; flex: none;
}
.progress-fill {
  display: block;
  height: 100%; border-radius: 999px; background: var(--coral);
  transition: width .3s var(--ease);
}
/* Дискретная ширина шагами 10% — без inline-стилей, дружелюбно к строгому CSP */
.progress-fill.w-0  { width: 0; }
.progress-fill.w-1  { width: 10%; }
.progress-fill.w-2  { width: 20%; }
.progress-fill.w-3  { width: 30%; }
.progress-fill.w-4  { width: 40%; }
.progress-fill.w-5  { width: 50%; }
.progress-fill.w-6  { width: 60%; }
.progress-fill.w-7  { width: 70%; }
.progress-fill.w-8  { width: 80%; }
.progress-fill.w-9  { width: 90%; }
.progress-fill.w-10 { width: 100%; }
.progress-fill.full { background: var(--mint-text); }

/* ---------- Чипы статусов ---------- */
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font: 500 12.5px/1.2 'Onest', sans-serif;
  background: #ECECEA;
  color: var(--muted);
  white-space: nowrap;
}
.chip-collecting { background: var(--coral-soft); color: var(--coral-text); }
.chip-selection { background: var(--lav-soft); color: var(--lav-text); }
.chip-confirmed { background: var(--mint-soft); color: var(--mint-text); }
.chip-cancelled { background: var(--danger-soft); color: var(--danger); }

/* ---------- Формы ---------- */
.form label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  font: 400 15px/1.4 'Onest', sans-serif;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 133, 98, .25);
}
.form ::placeholder { color: var(--faint); }
.form .row { display: flex; gap: 14px; }
.form .row label { flex: 1; }
.form label.inline {
  display: inline-flex; align-items: center; gap: 8px;
  margin-right: 18px; color: var(--ink); font-weight: 400; font-size: 14.5px;
}
.form label.inline input { width: auto; margin: 0; accent-color: var(--coral-deep); }
.form fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  margin: 0 0 14px;
  padding: 12px 14px;
}
.form fieldset legend { font-size: 13.5px; font-weight: 500; color: var(--muted); padding: 0 6px; }
.form .actions { display: flex; gap: 10px; margin-top: 20px; }

/* ---------- Доска мероприятия ---------- */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.position h2 { margin-top: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.position h2 .muted { font-size: 13.5px; font-weight: 500; }

.person {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: var(--r-ctl);
  transition: background .15s var(--ease);
}
.person:hover { background: var(--surface-2); }
.person + .person { border-top: 1px solid var(--line); }
.avatar {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font: 600 12.5px/1 'Onest', sans-serif;
  color: var(--muted);
  overflow: hidden;
}
.person-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 60%; }
.person-info > a { font-weight: 500; color: var(--ink); }
.person-info > a:hover { color: var(--coral-text); }
/* действия всегда на своей строке — карточки узкие, кнопки не должны теснить имя */
.inline-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  flex: 1 1 100%; justify-content: flex-end;
}

details { margin-top: 12px; }
details summary {
  cursor: pointer;
  font-size: 13.5px;
  padding: 6px 0;
  list-style: none;
  user-select: none;
}
details summary::before { content: "▸ "; color: var(--faint); }
details[open] summary::before { content: "▾ "; }
details summary::-webkit-details-marker { display: none; }

.bind-link {
  display: block;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-ctl);
  word-break: break-all;
  font-size: 13px;
  margin: 8px 0;
}

/* поиск + фильтры в базе */
.invite-hint { margin: -10px 0 18px; }
.invite-hint .inline { display: inline; }
.staff-controls { margin-bottom: 20px; }
.search-form { display: flex; gap: 8px; margin-bottom: 12px; max-width: 560px; }
.search-form input[type="search"] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  font: inherit;
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 133, 98, .25);
}

/* фильтры-пилюли */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-pills a {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-weight: 500;
  font-size: 13.5px;
  transition: all .2s var(--ease);
}
.filter-pills a:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.filter-pills a.active { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* уведомление об успехе */
.notice {
  background: var(--mint-soft);
  border: 1px solid #BEE9C8;
  color: var(--mint-text);
  padding: 12px 16px;
  border-radius: var(--r-ctl);
  margin-bottom: 20px;
  font-weight: 500;
}

/* строка дней мероприятия */
.day-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.day-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-card);
}
.day-chip-date { font-weight: 600; font-size: 14px; }
.day-chip-cov { font-size: 12px; color: var(--muted); }

/* требования позиции */
.req-line {
  font-size: 13px;
  color: var(--coral-text);
  background: var(--coral-soft);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 0 0 6px;
}

/* доступность по дням у человека */
.day-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.day-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--lav-soft); color: var(--lav-text);
}

/* сегментированная рассылка */
.broadcast summary {
  cursor: pointer; font-weight: 600; list-style: none;
}
.broadcast summary::before { content: "▸ "; color: var(--faint); }
.broadcast[open] summary::before { content: "▾ "; }
.broadcast summary::-webkit-details-marker { display: none; }
.broadcast .form { margin-top: 14px; }

/* ---------- Профиль (Tinder-style) ---------- */
.profile {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 28px;
  align-items: start;
}
.profile-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--line);
  box-shadow: var(--shadow-pop);
}
.profile-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 20px 18px;
  background: linear-gradient(to top, rgba(20,20,22,.82), rgba(20,20,22,0));
  color: #fff;
}
.profile-hero-overlay h1 { color: #fff; font-size: 24px; margin: 0 0 2px; }
.profile-hero-overlay p { margin: 0; color: rgba(255,255,255,.85); font-size: 14px; }
.profile-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--danger); color: #fff;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.profile-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.profile-thumb {
  width: 60px; height: 76px; border-radius: 12px; object-fit: cover;
  border: 2px solid transparent; cursor: pointer; background-size: cover; background-position: center;
}
.profile-thumb.active { border-color: var(--coral); }

.profile-bio { font-size: 15.5px; line-height: 1.6; margin: 0 0 20px; }
.profile-stats {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.pstat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-ctl); padding: 10px 16px; min-width: 76px;
  font-size: 12px; color: var(--muted); text-align: center;
}
.pstat span { display: block; font: 600 20px/1.1 'Unbounded', sans-serif; color: var(--ink); margin-bottom: 3px; }

.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: #ECECEA; color: var(--muted);
}
.tag-lav { background: var(--lav-soft); color: var(--lav-text); }
.tag-mint { background: var(--mint-soft); color: var(--mint-text); }

.profile-meta-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.profile-meta-row:last-child { border-bottom: none; }
.profile-meta-row > span:first-child {
  color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; min-width: 92px; flex: none;
}

/* медиа в редакторе */
.media-edit-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.media-edit-item { width: 120px; }
.media-thumb {
  width: 120px; height: 150px; border-radius: 12px; object-fit: cover;
  display: block; background: var(--line); background-size: cover; background-position: center;
}
.media-video { position: relative; }
.media-video .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 26px; background: rgba(20,20,22,.32); border-radius: 12px;
}
.media-edit-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.media-edit-actions form { display: block; }
.media-add { margin-top: 8px; }

.role-chip {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  background: var(--lav-soft); color: var(--lav-text);
  padding: 2px 8px; border-radius: 999px; margin-left: 4px;
}

/* флаги статусов в базе */
.flag { font-weight: 700; }
.flag-ok { color: var(--mint-text); }
.flag-no { color: var(--faint); }

.reminder-templates { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }

/* ---------- Публичная витрина клиента ---------- */
.client-page { background: var(--bg); }
.client-wrap { max-width: 520px; margin: 0 auto; padding: 24px 16px 60px; }
.client-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.client-head h1 { font-size: 20px; margin: 0; }
.client-hint { text-align: center; margin-bottom: 16px; }
.swipe-deck { position: relative; min-height: 560px; }
.swipe-card {
  display: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-pop);
}
.swipe-card.is-top { display: block; }
.swipe-photo { position: relative; aspect-ratio: 3 / 4; background: var(--line); }
.swipe-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swipe-overlay {
  position: absolute; inset: auto 0 0 0; padding: 40px 20px 18px; color: #fff;
  background: linear-gradient(to top, rgba(20,20,22,.82), rgba(20,20,22,0));
}
.swipe-overlay h2 { color: #fff; margin: 0 0 2px; font-size: 24px; }
.swipe-overlay p { margin: 0; color: rgba(255,255,255,.85); }
.swipe-stamp {
  position: absolute; top: 16px; right: 16px; padding: 5px 12px; border-radius: 999px;
  font-weight: 700; font-size: 13px; background: rgba(255,255,255,.9);
}
.swipe-stamp.like { color: var(--mint-text); }
.swipe-stamp.nope { color: var(--danger); }
.swipe-facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 4px; }
.swipe-facts span {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted);
}
.client-more { display: block; margin: 12px 18px; text-align: center; }
.swipe-actions { display: flex; gap: 16px; justify-content: center; padding: 8px 18px 22px; }
.swipe-btn {
  width: 64px; height: 64px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 26px; cursor: pointer;
  box-shadow: var(--shadow-card); transition: transform .15s var(--ease);
}
.swipe-btn:active { transform: scale(.92); }
.swipe-btn.nope { color: var(--danger); }
.swipe-btn.like { color: #fff; background: var(--coral); border-color: var(--coral); }
.swipe-card.fly-like { transform: translateX(60%) rotate(8deg); opacity: 0; transition: all .18s ease; }
.swipe-card.fly-nope { transform: translateX(-60%) rotate(-8deg); opacity: 0; transition: all .18s ease; }
.swipe-done { display: none; text-align: center; padding: 60px 20px; }
.swipe-done.is-visible { display: block; }

/* юридические документы */
.legal-wrap { max-width: 760px; }
.legal h2 { margin-top: 22px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 14px; }
.consent-check input { margin-top: 3px; width: auto; accent-color: var(--coral-deep); flex: none; }

/* публичная регистрация */
.join-wrap { max-width: 560px; }
.join-submit { width: 100%; padding: 12px; font-size: 16px; margin-top: 6px; }
.invite-links { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 14px; }
.invite-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.join-done { text-align: center; padding: 40px 28px; }
.join-done h1 { margin: 16px 0 10px; }
.join-tg-btn { margin: 14px 0 6px; font-size: 16px; padding: 12px 24px; }

/* бейдж в навигации */
.nav-badge {
  display: inline-block; min-width: 18px; padding: 1px 6px;
  border-radius: 999px; background: var(--coral); color: #fff;
  font-size: 11px; font-weight: 600; text-align: center; vertical-align: middle;
}

/* входящие */
.inbox-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.inbox-row:last-child { border-bottom: none; }
.inbox-row.unread { background: var(--coral-soft); margin: 0 -24px; padding: 12px 24px; }
.inbox-meta { display: flex; flex-direction: column; gap: 2px; }
.inbox-text { color: var(--ink); }

/* переписка (чат) */
.chat { margin-top: 20px; }
.chat-thread {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 340px; overflow-y: auto; padding: 4px 2px 12px;
}
.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-out { align-self: flex-end; align-items: flex-end; }
.chat-in { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45;
}
.chat-out .chat-bubble { background: var(--coral); color: #fff; border-bottom-right-radius: 4px; }
.chat-in .chat-bubble { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-time { font-size: 11px; color: var(--faint); margin-top: 3px; }
.chat-ack {
  display: block; margin-top: 5px; font-size: 11.5px;
  padding-top: 5px; border-top: 1px solid rgba(255,255,255,.35);
}
.chat-in .chat-ack { border-top-color: var(--line); color: var(--muted); }
.chat-ack.ack-done { font-weight: 600; }
.chat-send { margin-top: 12px; }
.chat-send textarea { width: 100%; }
.chat-send-row { align-items: flex-end; }
.chat-send-row label { flex: 1; }

/* документы */
.doc-list { list-style: none; padding: 0; margin: 0 0 14px; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: none; }
.doc-list .inline { display: inline; margin-left: auto; }

/* пустые состояния */
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}
.empty p { margin: 0 0 16px; }

/* ---------- Логин ---------- */
.login-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  background:
    radial-gradient(560px 420px at 82% -10%, rgba(198, 189, 254, .35), transparent 65%),
    radial-gradient(640px 480px at -12% 108%, rgba(180, 248, 175, .30), transparent 65%),
    var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-pop);
}
.login-card .login-logo { height: 26px; display: block; margin: 0 auto 8px; }
.login-card .login-sub {
  text-align: center;
  font: 500 10.5px/1 'Unbounded', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
}
.login-card label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.login-card input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  font: 400 15px/1.4 'Onest', sans-serif;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.login-card input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 133, 98, .25);
}
.login-card button {
  width: 100%; padding: 12px; margin-top: 10px;
  background: var(--coral); color: var(--ink);
  border: none; border-radius: var(--r-ctl);
  font: 500 15px/1.2 'Onest', sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 133, 98, .35);
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.login-card button:hover { background: var(--coral-deep); }
.login-card button:active { transform: translateY(1px) scale(.99); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .profile { grid-template-columns: 1fr; }
  .profile-hero { max-width: 380px; }
}

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 14px; flex-wrap: wrap; }
  .topbar nav { order: 3; flex-basis: 100%; }
  main { margin-top: 20px; padding: 0 14px; }
  .form .row { flex-direction: column; gap: 0; }
  .page-head { flex-direction: column; }
  .board { grid-template-columns: 1fr; }
  .person { flex-wrap: wrap; }
  .inline-actions { flex-basis: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
