/* ─────────────────────────────────────────────────────────────
   TeamDash — тёмная зелёно-чёрная тема
   ───────────────────────────────────────────────────────────── */

:root {
  /* поверхности */
  --bg:          #070b09;
  --surface:     #0d1411;
  --surface-2:   #121b17;
  --surface-3:   #17231d;
  --border:      #1e2b24;
  --border-soft: #16211c;

  /* текст */
  --ink:      #e9f2ec;
  --ink-2:    #9fb5a9;
  --ink-3:    #6b8175;

  /* акцент */
  --green:      #22c55e;
  --green-soft: #34d67a;
  --green-deep: #16a34a;
  --green-ink:  #052e16;
  --glow:       0 0 0 1px rgba(34,197,94,.25), 0 8px 32px -12px rgba(34,197,94,.45);

  /* статусы */
  --danger:  #f43f5e;
  --warn:    #f59e0b;
  --info:    #38bdf8;
  --violet:  #a78bfa;

  /* палитра графиков (проверена на CVD для тёмной поверхности) */
  --c1: #16a34a;
  --c2: #0284c7;
  --c3: #d97706;
  --c4: #8b5cf6;
  --c5: #e11d90;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
  --topbar-h: 56px;

  --ff: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

body {
  background-image:
    radial-gradient(900px 420px at 50% -10%, rgba(34,197,94,.10), transparent 70%),
    radial-gradient(600px 340px at 100% 100%, rgba(34,197,94,.05), transparent 70%);
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--green); text-decoration: none; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 0; height: 0; }

/* ───────────── Splash / Gate ───────────── */

.splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg);
}
.splash__logo { color: var(--green); filter: drop-shadow(0 0 22px rgba(34,197,94,.5)); }
.splash__title { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--ink-2); }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(34,197,94,.2); border-top-color: var(--green);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gate {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 24px calc(20px + env(safe-area-inset-left, 0px));
}
.gate__card {
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 30px 24px 24px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.03);
  animation: pop .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.gate__logo { color: var(--green); margin-bottom: 16px; filter: drop-shadow(0 0 18px rgba(34,197,94,.45)); }
.gate__title { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.gate__sub { margin: 0 0 22px; color: var(--ink-2); font-size: 14px; }
.gate__form { display: grid; gap: 14px; }
.gate__error {
  background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.3);
  color: #fda4af; border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px;
}

/* ───────────── Формы ───────────── */

.field { display: grid; gap: 7px; }
.field__label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; letter-spacing: .01em; }

.input, .select, .textarea {
  width: 100%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 3px rgba(34,197,94,.13);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b8175' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 38px;
}
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.65) sepia(.4) saturate(4) hue-rotate(80deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r);
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--ink); font-weight: 600; font-size: 14.5px;
  transition: transform .12s, filter .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #04140a; border-color: transparent;
  box-shadow: 0 10px 26px -12px rgba(34,197,94,.85);
}
.btn--ghost { background: transparent; }
.btn--danger { background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.3); color: #fda4af; }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ───────────── Каркас ───────────── */

.app { display: flex; flex-direction: column; min-height: 100%; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  background: rgba(7,11,9,.82);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
}
.topbar__back {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
}
.topbar__titles { flex: 1; min-width: 0; }
.topbar__title {
  font-size: 18px; font-weight: 700; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.userchip {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #04140a; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
  border: 1px solid rgba(34,197,94,.4);
  overflow: hidden;
}
.userchip img { width: 100%; height: 100%; object-fit: cover; }

.view {
  flex: 1;
  /* запас снизу, чтобы плавающая кнопка не перекрывала последнюю строку */
  padding: 16px 14px calc(var(--tabbar-h) + var(--safe-bottom) + 84px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.view--flush { padding-left: 0; padding-right: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; justify-content: space-around; align-items: center;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(9,14,11,.9);
  backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--border-soft);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; color: var(--ink-3); font-size: 10.5px; font-weight: 600;
  transition: color .15s;
}
.tab svg { width: 21px; height: 21px; }
.tab.is-active { color: var(--green); }
.tab.is-active svg { filter: drop-shadow(0 0 8px rgba(34,197,94,.55)); }
.tab__badge {
  position: absolute; transform: translate(14px, -6px);
  background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px; padding: 0 4px;
  display: grid; place-items: center;
}

/* ───────────── Карточки / общее ───────────── */

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.section { margin-bottom: 20px; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 0 2px 11px;
}
.section__title { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.section__action { font-size: 13px; color: var(--green); font-weight: 600; }

.empty {
  text-align: center; padding: 34px 20px; color: var(--ink-3);
  border: 1px dashed var(--border); border-radius: var(--r-lg); background: rgba(18,27,23,.4);
}
.empty__emoji { font-size: 30px; display: block; margin-bottom: 8px; }

.muted { color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────────── Статистика (KPI-плитки) ───────────── */

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.kpis--2 { grid-template-columns: repeat(2, 1fr); }
.kpi {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px 12px 11px; min-width: 0;
}
.kpi__val { font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.kpi__label { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.kpi__delta { font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.up { color: var(--green); } .down { color: var(--danger); }

/* ───────────── Проекты ───────────── */

.projects { display: grid; gap: 11px; }
.project {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--r-lg);
  position: relative; overflow: hidden;
  transition: transform .13s, border-color .15s;
  text-align: left; width: 100%;
}
.project::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--pc, var(--green));
}
.project:active { transform: scale(.985); border-color: rgba(34,197,94,.35); }
.project__icon {
  width: 44px; height: 44px; flex: none; border-radius: var(--r);
  display: grid; place-items: center; font-size: 21px;
  background: color-mix(in srgb, var(--pc, #22c55e) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc, #22c55e) 30%, transparent);
}
.project__name { display: block; font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.project__meta { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.project__ring { flex: none; }

.ring { position: relative; width: 48px; height: 48px; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: -.03em;
}

.bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar__fill {
  display: block; height: 100%; border-radius: 99px;
  background: var(--pc, var(--green));
  transition: width .5s cubic-bezier(.2,.8,.3,1);
}

/* ───────────── Канбан ───────────── */

.board {
  display: flex; gap: 12px; align-items: stretch;
  overflow-x: auto; overflow-y: visible;
  padding: 4px 14px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  min-height: 34vh;
}
.col {
  /* ровно две колонки в ширину экрана: половина доски минус зазор */
  flex: 0 0 calc((100% - 12px) / 2);
  min-width: 146px;
  max-width: 320px;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: rgba(13,20,17,.7);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  min-height: 200px;
  transition: border-color .15s, background .15s;
}
.col.is-over { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.05); }
.col__head {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 10px 8px;
  position: sticky; top: 0;
}
.col__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.col__name {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.col__count {
  margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  background: var(--surface-3); border-radius: 7px; padding: 1px 6px; flex: none;
}
.col__body { display: flex; flex-direction: column; gap: 7px; padding: 0 7px 8px; min-height: 60px; }
.col__add {
  margin: 0 7px 9px; padding: 8px; border-radius: var(--r-sm);
  border: 1px dashed var(--border); color: var(--ink-3); font-size: 12px; font-weight: 600;
  transition: color .15s, border-color .15s;
}
.col__add:active { color: var(--green); border-color: rgba(34,197,94,.4); }

.tcard {
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 11px; position: relative;
  touch-action: pan-y;
  transition: transform .12s, box-shadow .15s, opacity .15s;
}
.tcard:active { transform: scale(.98); }
.tcard.is-ghost { opacity: .25; }
.tcard--drag {
  position: fixed; z-index: 60; pointer-events: none; margin: 0;
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.95), 0 0 0 1px rgba(34,197,94,.4);
  transform: rotate(1.6deg) scale(1.03);
  transition: none;
}
.tcard__ph {
  border: 1px dashed rgba(34,197,94,.45); border-radius: var(--r);
  background: rgba(34,197,94,.06);
}
.tcard__prio { position: absolute; top: 11px; right: 11px; width: 7px; height: 7px; border-radius: 50%; }
.tcard__title { font-size: 13.5px; font-weight: 600; line-height: 1.32; padding-right: 13px; overflow-wrap: anywhere; }
.tcard__desc {
  font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcard__foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; flex-wrap: wrap; }

/* ───────────── Идеи ───────────── */

.idea {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--r);
  transition: transform .12s, border-color .15s;
}
.idea:active { transform: scale(.985); }
.idea.is-archived { opacity: .5; }
.idea__title { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.idea__desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12.5px; color: var(--ink-3); margin-top: 3px;
}
.idea__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.vote {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 40px; padding: 7px 6px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface-3);
  color: var(--ink-3); transition: background .15s, color .15s, border-color .15s;
}
.vote.is-on {
  background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.4); color: var(--green-soft);
}
.vote__num { font-size: 12.5px; font-weight: 700; letter-spacing: -.02em; }

/* ───────────── Чек-лист подзадач ───────────── */

.subprog { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.subprog .bar { flex: 1; height: 4px; }
.subprog__num { font-size: 10.5px; font-weight: 700; color: var(--ink-3); flex: none; }

.checklist { display: grid; gap: 6px; }
.checklist__row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.checklist__row.is-done .checklist__title { color: var(--ink-3); text-decoration: line-through; }
.checklist__title { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.check {
  flex: none; width: 21px; height: 21px; border-radius: 7px;
  border: 1.5px solid var(--border); background: var(--surface-3);
  display: grid; place-items: center; color: #04140a;
  transition: background .15s, border-color .15s;
}
.checklist__row.is-done .check {
  background: var(--green); border-color: var(--green);
}
.checklist__del {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  color: var(--ink-3); font-size: 12px; line-height: 1;
}
.checklist__del:active { color: var(--danger); }

.avatars { display: flex; }
.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; color: #04140a;
  background: linear-gradient(135deg, var(--green-soft), var(--green-deep));
  border: 1.5px solid var(--surface-2);
  margin-left: -6px; flex: none; overflow: hidden;
}
.avatar:first-child { margin-left: 0; }
.avatar--lg { width: 34px; height: 34px; font-size: 13px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 8px;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--ink-2);
  white-space: nowrap;
}
.chip--due     { background: rgba(56,189,248,.1);  border-color: rgba(56,189,248,.25);  color: #7dd3fc; }
.chip--today   { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3);   color: #fcd34d; }
.chip--overdue { background: rgba(244,63,94,.13);  border-color: rgba(244,63,94,.32);   color: #fda4af; }
.chip--done    { background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.3);    color: var(--green-soft); }
.chip--pick { cursor: pointer; }
.chip--pick.is-on { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.45); color: var(--green-soft); }

/* ───────────── Листы (модалки) ───────────── */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,.65); backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
  display: flex; align-items: flex-end; justify-content: center;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 18px calc(22px + var(--safe-bottom));
  animation: slideUp .3s cubic-bezier(.2,.9,.3,1.05);
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.9);
}
@keyframes slideUp { from { transform: translateY(100%); } }
.sheet__grab { width: 38px; height: 4px; border-radius: 99px; background: var(--border); margin: 0 auto 14px; }
.sheet__title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
.sheet__sub { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }
.sheet__form { display: grid; gap: 13px; }
.sheet__actions { display: flex; gap: 9px; margin-top: 6px; }
.sheet__actions .btn { flex: 1; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.picker { display: flex; flex-wrap: wrap; gap: 7px; }

/* ───────────── Список задач / строки ───────────── */

.list { display: grid; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--r);
  transition: transform .12s;
}
.item:active { transform: scale(.985); }
.item__title { font-size: 14.5px; font-weight: 600; }
.item__sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.item__val { font-size: 15px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }

.divider { height: 1px; background: var(--border-soft); margin: 14px 0; }

/* ───────────── Графики ───────────── */

.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--ff); }
.axis-label { font-size: 10px; fill: var(--ink-3); }
.grid-line { stroke: var(--border-soft); stroke-width: 1; }
.spark { display: block; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.legend__swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }

.hbar { display: grid; gap: 9px; }
.hbar__row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.hbar__name { font-size: 13px; color: var(--ink-2); }
.hbar__val { font-size: 13px; font-weight: 700; }
.hbar__track {
  display: block; grid-column: 1 / -1; height: 9px;
  border-radius: 99px; background: var(--surface-3); overflow: hidden;
}
.hbar__fill { display: block; height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.3,1); }

/* ───────────── Соцсети / финансы ───────────── */

.social {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  padding: 13px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--r);
}
.social__icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--surface-3); border: 1px solid var(--border); }
.social__name { display: block; font-weight: 650; font-size: 14.5px; }
.social__sub { display: block; font-size: 11.5px; color: var(--ink-3); }
.social__num { text-align: right; }
.social__count { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.social__delta { font-size: 11.5px; font-weight: 600; }

.paycard {
  display: flex; gap: 12px; align-items: center;
  padding: 13px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--r);
  position: relative; overflow: hidden;
}
.paycard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pc, var(--ink-3)); }
.paycard__date {
  flex: none; width: 46px; text-align: center;
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 11px; padding: 5px 0;
}
.paycard__d { display: block; font-size: 17px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.paycard__m { display: block; font-size: 9.5px; text-transform: uppercase; color: var(--ink-3); letter-spacing: .06em; margin-top: 2px; }
.paycard__title { font-weight: 600; font-size: 14.5px; }
.paycard__sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.paycard__amt { font-size: 15px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }

/* ───────────── График выплат ───────────── */

.payouts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.payouts__item {
  font-size: 11px; padding: 2px 7px; border-radius: 7px;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--ink-2);
  white-space: nowrap;
}
.payouts__item b { color: var(--green-soft); font-weight: 700; }

.paydays { display: grid; gap: 7px; }
.payday {
  display: grid; grid-template-columns: auto 62px auto 1fr auto;
  align-items: center; gap: 7px;
}
.payday__label { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.payday .input { padding: 9px 10px; }
.payday__day { text-align: center; }
.payday__del { width: 26px; height: 26px; }

.segmented {
  display: flex; gap: 3px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px;
}
.segmented button {
  flex: 1; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); transition: background .15s, color .15s;
}
.segmented button.is-on { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }

.fab {
  position: fixed; right: 16px; z-index: 22;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  width: 52px; height: 52px; border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #04140a; display: grid; place-items: center;
  box-shadow: 0 14px 34px -12px rgba(34,197,94,.9);
  transition: transform .13s;
}
.fab:active { transform: scale(.92); }

/* ───────────── Тосты ───────────── */

.toasts {
  position: fixed; left: 0; right: 0; z-index: 90;
  top: calc(var(--safe-top) + 10px);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  pointer-events: none; padding: 0 14px;
}
.toast {
  background: rgba(18,27,23,.97); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 15px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.95);
  animation: toastIn .28s cubic-bezier(.2,.9,.3,1.2);
  max-width: 100%;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } }
.toast--ok { border-color: rgba(34,197,94,.4); color: var(--green-soft); }
.toast--err { border-color: rgba(244,63,94,.4); color: #fda4af; }

/* ───────────── Прочее ───────────── */

.badge-role {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 7px;
}
.badge-role--owner { background: rgba(167,139,250,.15); color: #c4b5fd; border: 1px solid rgba(167,139,250,.3); }
.badge-role--admin { background: rgba(34,197,94,.14); color: var(--green-soft); border: 1px solid rgba(34,197,94,.3); }
.badge-role--basic { background: var(--surface-3); color: var(--ink-3); border: 1px solid var(--border); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r);
}
@keyframes shimmer { to { background-position: -200% 0; } }

@media (min-width: 620px) {
  .view { max-width: 720px; margin: 0 auto; width: 100%; }
  .board { max-width: 100%; }
}
