/* 17-refresh-2026.css — The 2026 page refresh: task cards, summary strip, onboarding, rankings, the filter
   bar, stage strip, page header, sticky form actions, sign-in, field spacing, the visit bar, the platform page.
   Part of the CRM stylesheet: the files load in number order (components/app_styles.html) and later
   rules win, exactly as when this was one file. */

/* Task cards: tick the circle to finish, tap the title to open; nothing said twice. */
.board { grid-auto-columns: minmax(280px, 1fr); gap: 14px; }
.column { padding: 12px; border-radius: var(--radius-lg); min-height: 420px; }
.column-head { margin-bottom: 12px; padding: 0 2px; }
.column-count { font-size: 13px; }
.column-body { gap: 10px; }
.kcard { padding: 12px 14px; border-radius: 12px; }
.task-card-main { display: flex; gap: 10px; align-items: flex-start; }
.task-check { flex: none; width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; padding: 0; border: 2px solid #c3cad5; border-radius: 50%; background: var(--surface); color: transparent; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.task-check svg { width: 12px; height: 12px; stroke-width: 3; }
.task-check:hover { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.task-check.is-checked { border-color: var(--success); background: var(--success); color: #fff; }
.task-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.task-open { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 650; line-height: 1.35; color: var(--text); text-align: left; cursor: pointer; }
.task-open:hover { color: var(--accent-strong); }
.task-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
.task-link { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--accent-strong); }
.task-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-link:hover span { text-decoration: underline; }
.task-card .kcard-foot { margin-top: 10px; padding-left: 32px; }
.task-chips { gap: 6px; flex-wrap: wrap; }
.task-tools { gap: 4px; }
.task-card .due { gap: 5px; font-size: 12.5px; }
.task-card .badge svg { width: 12px; height: 12px; }
.task-card.is-overdue { border-left: 3px solid var(--danger); }
@media (hover: hover) { .task-delete { opacity: 0; transition: opacity .15s; } .task-card:hover .task-delete, .task-delete:focus-visible { opacity: 1; } }
.summary-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.summary-item { display: inline-flex; align-items: baseline; gap: 6px; height: 34px; padding: 0 14px; align-items: center; border-radius: 999px; background: var(--surface-3); font-size: 13.5px; color: var(--text-2); }
.summary-item b { font-size: 15px; font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.summary-item.tone-red { background: var(--red-bg); } .summary-item.tone-red b { color: var(--red); }
.summary-item.tone-amber { background: var(--amber-bg); } .summary-item.tone-amber b { color: var(--amber); }
.summary-item.tone-green { background: var(--green-bg); } .summary-item.tone-green b { color: var(--green); }

/* Onboarding: one clear next step. */
.onboarding { background: linear-gradient(120deg, var(--accent-soft) 0%, var(--surface) 55%); border-color: var(--accent-soft-2); }
.onboarding-hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
.onboarding-ring { --p: 0; flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--accent-soft-2) 0); }
.onboarding-ring b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 13px; font-weight: 750; }
.onboarding-copy { flex: 1; min-width: 0; }
.onboarding-kicker { font-size: 12.5px; font-weight: 650; color: var(--accent-strong); }
.onboarding-title { margin-top: 2px; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.onboarding-hint { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.onboarding-actions { display: flex; align-items: center; gap: 6px; }
.onboarding-more { border-top: 1px solid var(--border-soft); padding: 0 22px; }
.onboarding-more > summary { display: flex; align-items: center; gap: 6px; height: 44px; list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.onboarding-more > summary::-webkit-details-marker { display: none; }
.onboarding-more[open] > summary svg { transform: rotate(180deg); }
.onboarding-more[open] { padding-bottom: 16px; }
.onboarding-steps { margin-top: 4px; }
.onboarding-steps li.is-done .onboarding-mark { background: var(--success); }
@media (max-width: 640px) {
  .onboarding-hero { flex-wrap: wrap; padding: 16px; gap: 14px; }
  .onboarding-actions { width: 100%; }
  .onboarding-actions .btn-primary { flex: 1; height: 42px; }
  .onboarding-more { padding: 0 16px; }
}

/* Tables and rankings: sentence-case column names (uppercase 10px read as noise). */
.leader.head { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.compare .box h5 { font-size: 12.5px; letter-spacing: 0; text-transform: none; }
/* Data colours follow the brand: blues for "how much", status colours keep their meaning. */
.heatmap .l1 { background: #dbe6fe; } .heatmap .l2 { background: #a9c3fb; } .heatmap .l3 { background: #6c98f5; } .heatmap .l4 { background: #2563eb; }
[data-theme=dark] .heatmap .l1 { background: #172a52; } [data-theme=dark] .heatmap .l2 { background: #1f3d7a; } [data-theme=dark] .heatmap .l3 { background: #2f5cb8; }

/* Filters: the few everyone uses in one row, the rest behind "Filtrlar". */
.filters-bar { padding: 0; border: 0; background: none; }
.filters-bar .toolbar { gap: 10px; }
.filters-bar .toolbar .input[name=q] { flex: 1 1 260px; max-width: 360px; }
.filters-bar .filters-extra { margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.filters-bar:not(.filters-open) .filters-extra { display: none; }
@media (min-width: 641px) {
  form[data-desktop-fold] .filters-toggle { display: inline-flex; }
  form[data-desktop-fold].filters-open .filters-toggle { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-strong); }
  .filters-toggle b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; }
}
@media (max-width: 640px) {
  .filters-bar .filters-extra { display: contents; }
}

/* Lead stages as one row of chips above the table. */
.stage-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stage-strip::-webkit-scrollbar { display: none; }
.stage-pill { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: border-color .15s, background .15s; }
.stage-pill:hover { border-color: var(--accent-soft-2); }
.stage-pill .dot { width: 8px; height: 8px; }
.stage-pill b { min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-3); font-size: 12.5px; color: var(--text); }
.stage-pill.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.stage-pill.active b { background: var(--accent); color: #fff; }
@media (max-width: 640px) { .stage-strip { margin: 0 -12px 14px; padding: 0 12px 2px; } }

/* Page header: the title takes what is left, the actions stay on one line on a wide screen. */
.page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
@media (min-width: 1180px) { .page-actions { flex-wrap: nowrap; flex: none; } }
.filters-bar { margin-bottom: 16px; }
.filters-bar .chip-count { height: 30px; padding: 0 12px; font-size: 13px; }

/* Long forms: Save stays on screen, so nobody scrolls to the bottom to find it. */
.form-actions { position: sticky; bottom: 0; z-index: 5; margin: 8px -22px -20px; padding: 14px 22px; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }
.form-actions .btn { height: 42px; padding: 0 20px; }
@media (max-width: 820px) {
  .form-actions { bottom: calc(64px + env(safe-area-inset-bottom)); margin: 8px -22px -20px; padding: 12px 22px; border-radius: 0; }
  body.in-telegram .form-actions { bottom: calc(64px + max(var(--tg-safe-bottom, 0px), env(safe-area-inset-bottom, 0px))); }
  .form-actions .btn { flex: 1; }
  .summary-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .summary-item { flex: none; }
}

/* Sign-in: a confident title, generous fields. */
.auth-form > form h1, .auth-form > form h2 { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.auth-form .input { height: 46px; font-size: 15px; }
.auth-form .btn-block { height: 48px !important; font-size: 15px; }
.auth-feats div { padding: 14px; }
@media (max-width: 640px) {
  /* Scope and view on one row: the view switch shows icons only. */
  .page-actions:has(> .view-toggle) > .segmented:not(.view-toggle) { flex: 1; width: auto; }
  .page-actions > .segmented.view-toggle { flex: none; width: auto; }
  .page-actions > .segmented.view-toggle > * { flex: none; padding: 7px 12px; }
  .view-toggle span { display: none; }
}
/* Fields stacked one under another get room to breathe; the required mark reads as "required", not as a link. */
:is(form, .card, .drawer-body) > .field + :is(.field, .form-grid),
:is(form, .card, .drawer-body) > .form-grid + .field { margin-top: 14px; }
.field > label .accent { color: var(--danger); }
@media (max-width: 640px) { .filters-bar .chip-count { display: none; } }
.filters-extra .input[type="number"], .filters-extra .input[inputmode] { width: 116px; min-width: 0; }

/* The platform owner inside an agency: always clear whose eyes the page is seen through, and one click back. */
.visit-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 0 0; padding: 10px 28px; background: #fff7e6; border-top: 1px solid #fde3a7; border-bottom: 1px solid #fde3a7; color: #7a4b00; font-size: 13.5px; }
.visit-bar > span { flex: 1 1 260px; }
.visit-bar form { margin: 0; }
[data-theme=dark] .visit-bar { background: #2a2110; border-color: #4a3a14; color: #f5d48a; }
@media (max-width: 820px) { .visit-bar { top: calc(56px + var(--tg-safe-top, 0px)); padding: 8px 12px; } }

/* The platform page */
.platform { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.platform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.platform-head img { height: 26px; width: auto; }
.platform-agency { margin-bottom: 14px; }
.platform-agency > summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.platform-agency > summary::-webkit-details-marker { display: none; }
.platform-agency[open] > summary { border-bottom: 1px solid var(--border-soft); }
.platform-agency > summary b { font-size: 16px; }
.platform-people { list-style: none; margin: 0; padding: 6px 10px 10px; }
.platform-people li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.platform-people li:hover { background: var(--surface-2); }
.platform-people .person { flex: 1; }
.platform-people form { margin: 0; }


