/* ============================================================
   Платформа проектов.
   Стиль как у квиза Abaya Dental: белая основа, серые плашки без рамок,
   чёрные заголовки, тёмно-серый текст, синий — только для цифр и акцентов,
   цветные круглые иконки, чёрная кнопка с бликом, плавные переходы.
   ============================================================ */

:root {
  color-scheme: light;
  --ground: #ffffff;
  --surface: #f4f4f6;
  --surface-2: #ffffff;
  --plate-hover: #ececf0;
  --line: #e7e7ec;
  --line-strong: #d8d8de;

  --ink: #0a0a0b;
  --muted: #4e4e56;
  --faint: #9c9ca4;

  --side: #ffffff;
  --side-ink: #0a0a0b;
  --side-muted: #5d5d65;
  --side-line: #e7e7ec;
  --nav-on: #0a0a0b;
  --nav-on-ink: #ffffff;

  --accent: #1f5bd8;
  --accent-tint: #e8effd;
  --dark: #1c1c1e;

  --good: #148a45;
  --good-tint: #e3f6ea;
  --bad: #d23b30;
  --bad-tint: #fdecea;
  --warn: #8f5f10;
  --warn-tint: #fbf1dc;

  --r-card: 22px;
  --r-ctl: 14px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, select, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------------- Каркас ---------------- */

.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 24px 14px 20px; background: var(--side); border-right: 1px solid var(--side-line); overflow-y: auto; }
.main { min-width: 0; padding: 30px 40px 64px; max-width: 1360px; width: 100%; }
.view { animation: rise 0.45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.brand { padding: 0 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-weight: 600; letter-spacing: -0.01em; }
.brand-meta { font-size: 12px; color: var(--faint); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--side-muted); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); font-weight: 600; }
.nav-item .ic { width: 22px; height: 22px; margin: 0; }
.nav-label { margin: 6px 10px -10px; font-size: 13px; color: var(--faint); font-weight: 500; }
.nav-projects .nav-item { font-size: 14.5px; }

.sidebar-foot { margin-top: auto; padding: 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--faint); display: flex; flex-direction: column; gap: 8px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--side-muted); text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.link-btn:hover { color: var(--ink); }

.menu-btn { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--r-ctl); border: 0; background: var(--surface); margin-bottom: 14px; }

/* ---------------- Шапка ---------------- */

.topbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px 24px; margin-bottom: 24px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--faint); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.back:hover { color: var(--ink); }
.page-title { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.14; letter-spacing: -0.028em; text-wrap: balance; display: flex; align-items: center; gap: 12px; }
.page-sub { margin: 8px 0 0; color: var(--muted); font-size: 16px; max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Кнопки: главная — чёрная с пробегающим бликом, остальные — серая плашка */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); border: 0; background: var(--surface); color: var(--ink); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; transition: transform 0.3s var(--ease), background-color 0.2s ease; }
.btn:hover { background: var(--plate-hover); }
.btn:active:not([disabled]) { transform: scale(0.975); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #26262a; }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; z-index: -1; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.26) 50%, rgba(255, 255, 255, 0) 100%); transform: translateX(-120%) skewX(-20deg); animation: shine 3.8s var(--ease) infinite 1.2s; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-20deg); } 45%, 100% { transform: translateX(320%) skewX(-20deg); } }
.btn[disabled] { background: #dcdce1; color: #fff; cursor: default; }
.btn[disabled]::after { display: none; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn.danger { color: var(--bad); background: transparent; }
.btn.danger:hover { background: var(--bad-tint); }
.btn.ghost { background: transparent; color: var(--faint); }
.btn.ghost:hover { color: var(--ink); background: var(--surface); }
.card .btn:not(.primary):not(.ghost) { background: var(--surface-2); }
.card .btn:not(.primary):not(.ghost):hover { background: var(--plate-hover); }

.notice { margin: 0 0 22px; padding: 14px 18px; border-radius: var(--r-ctl); background: var(--warn-tint); color: var(--warn); font-weight: 500; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------------- Цветные иконки ---------------- */

.ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 8px -3px var(--glow); }
.ic svg { width: 58%; height: 58%; }
.ic.lg { width: 34px; height: 34px; }
.ic.blue { background: linear-gradient(150deg, #5d97ff, #1f5bd8); --glow: rgba(31, 91, 216, 0.6); }
.ic.teal { background: linear-gradient(150deg, #4fdcc0, #13a58b); --glow: rgba(19, 165, 139, 0.6); }
.ic.purple { background: linear-gradient(150deg, #b9a4ff, #7a5cf0); --glow: rgba(122, 92, 240, 0.6); }
.ic.pink { background: linear-gradient(150deg, #ff9ccf, #e4479a); --glow: rgba(228, 71, 154, 0.6); }
.ic.orange { background: linear-gradient(150deg, #ffc56b, #f08a17); --glow: rgba(240, 138, 23, 0.6); }
.ic.green { background: linear-gradient(150deg, #5fe28f, #1fae58); --glow: rgba(31, 174, 88, 0.6); }
.ic.red { background: linear-gradient(150deg, #ff8f86, #d23b30); --glow: rgba(210, 59, 48, 0.6); }
.ic.dark { background: linear-gradient(150deg, #4a4a52, #0a0a0b); --glow: rgba(10, 10, 11, 0.5); }

/* ---------------- Вкладки проекта ---------------- */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 26px; }
.tab { border: 0; background: var(--surface); padding: 8px 15px; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 0.2s ease, color 0.2s ease; }
.tab:hover { background: var(--plate-hover); color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; }
.tab .count { margin-left: 6px; font-size: 12px; opacity: 0.6; font-variant-numeric: tabular-nums; }

/* ---------------- Плашки ---------------- */

.card { background: var(--surface); border-radius: var(--r-card); }
.card.pad { padding: 22px 24px; }
.hover { transition: transform 0.35s var(--ease), background-color 0.2s ease, box-shadow 0.25s ease; }
.hover:hover { background: var(--plate-hover); }
.hover:active { transform: scale(0.985); }

.section { margin-top: 34px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 16px; }
.section-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.section-sub { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 6px; min-height: 124px; }
.kpi-label { font-size: 14px; color: var(--muted); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value.empty { color: var(--faint); }
.kpi-sub { color: var(--faint); font-size: 13.5px; margin-top: auto; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.good { background: var(--good-tint); color: var(--good); }
.chip.bad { background: var(--bad-tint); color: var(--bad); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.blue { background: var(--accent-tint); color: var(--accent); }
.chip.dark { background: var(--ink); color: #fff; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.empty-state { padding: 30px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r-card); }

/* ---------------- Обзор проектов ---------------- */

.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { padding: 12px 10px 12px; min-height: 108px; display: flex; flex-direction: column; gap: 6px; }
.day.today { background: var(--ground); box-shadow: 0 0 0 2px var(--ink), 0 14px 30px -18px rgba(10, 10, 11, 0.35); }
.day-head { font-size: 13px; color: var(--faint); font-weight: 600; padding: 0 2px; }
.day.today .day-head { color: var(--ink); }
.meet-pill { display: block; padding: 7px 9px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 1.3; text-decoration: none; transition: transform 0.3s var(--ease); }
.day.today .meet-pill { background: var(--surface); }
.meet-pill:hover { transform: translateY(-1px); }
.meet-pill b { display: block; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.proj { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; }
.proj-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.proj-title { display: flex; gap: 12px; align-items: center; }
.proj-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.proj-meta { font-size: 13.5px; color: var(--faint); margin-top: 2px; }
.proj-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; padding: 16px; background: var(--surface-2); border-radius: 16px; }
.mini-label { font-size: 12.5px; color: var(--faint); font-weight: 500; }
.mini-value { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.35; }
.mini-value.empty { color: var(--faint); font-weight: 500; }
.mini-value .chip { font-size: 15px; padding: 1px 8px; }
.proj-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-now { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-now b { color: var(--ink); font-weight: 600; }

.alert-row { align-items: center; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.alert-chips .chip { white-space: normal; text-decoration: none; }

/* ---------------- Паспорт ---------------- */

.passport { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.passport-main { display: flex; flex-direction: column; gap: 14px; }
.passport-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.start-here { position: relative; overflow: hidden; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--r-card); color: #fff; background: radial-gradient(120% 150% at 100% 0%, rgba(93, 151, 255, 0.32), transparent 55%), var(--dark); }
.start-here h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.02em; }
.start-here p { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 14.5px; max-width: 58ch; }
.start-here .btn { background: #fff; color: var(--ink); }
.start-here .btn::after { background: linear-gradient(100deg, rgba(10, 10, 11, 0) 0%, rgba(10, 10, 11, 0.08) 50%, rgba(10, 10, 11, 0) 100%); }
.fill-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); margin-top: 12px; max-width: 320px; overflow: hidden; }
.fill-bar i { display: block; height: 100%; border-radius: inherit; background: #fff; transform-origin: left center; animation: grow 0.9s var(--ease) both 0.15s; }
@keyframes grow { from { transform: scaleX(0); } }

.block-title { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.block-title .grow { flex: 1; }
.prose { white-space: pre-wrap; margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.prose.empty { color: var(--faint); }
.segments { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.segment { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.segment b { display: block; margin-bottom: 4px; font-weight: 600; }
.segment p { margin: 0; font-size: 14px; color: var(--muted); white-space: pre-wrap; }
.targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.target { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.target .mini-value { color: var(--accent); }
.target .mini-value.empty { color: var(--faint); }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.list-row .t { font-weight: 600; }
.list-row .s { font-size: 13.5px; color: var(--faint); }
.clickable { cursor: pointer; }
.clickable:hover .t { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Таблицы ---------------- */

.table-wrap { overflow-x: auto; padding: 6px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: right; font-size: 12.5px; color: var(--faint); font-weight: 500; padding: 10px 12px; white-space: nowrap; }
.tbl td { text-align: right; padding: 11px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tbody tr { transition: background-color 0.15s ease; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tbody tr:hover td:first-child { border-radius: 12px 0 0 12px; }
.tbl tbody tr:hover td:last-child { border-radius: 0 12px 12px 0; }
.tbl td.wrap { white-space: normal; text-align: left; min-width: 200px; }

/* ---------------- Канбан ---------------- */

.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; }
.col { background: var(--surface); border-radius: var(--r-card); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; transition: box-shadow 0.2s ease; }
.col-head { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; padding: 6px 6px 4px; }
.col-head .faint { margin-left: auto; font-weight: 500; }
.col-head .ic { width: 22px; height: 22px; }
.col.drop { box-shadow: 0 0 0 2px var(--ink); }
.task { padding: 13px 14px; border-radius: 16px; background: var(--surface-2); cursor: grab; display: flex; flex-direction: column; gap: 8px; transition: transform 0.3s var(--ease), box-shadow 0.25s ease; }
.task:hover { box-shadow: 0 10px 24px -16px rgba(10, 10, 11, 0.35); transform: translateY(-1px); }
.task-title { font-weight: 500; line-height: 1.4; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--faint); }
.task .chip { background: var(--surface); }
.task .chip.bad { background: var(--bad-tint); }

/* ---------------- Креативы ---------------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.seg-btn { border: 0; background: var(--surface); padding: 8px 15px; border-radius: 999px; font-weight: 500; color: var(--muted); transition: background-color 0.2s ease, color 0.2s ease; }
.seg-btn:hover { background: var(--plate-hover); color: var(--ink); }
.seg-btn.active { background: var(--ink); color: #fff; }
.input { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid transparent; background: var(--surface); transition: border-color 0.2s ease; }
.input:focus { outline: none; border-color: var(--ink); background: var(--ground); }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239c9ca4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cr { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.cr-thumb { position: relative; margin: -8px -10px 4px; aspect-ratio: 9 / 12; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.cr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr-play { position: absolute; left: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; background: rgba(10, 10, 11, 0.6); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cr-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.cr-title { font-weight: 600; font-size: 16.5px; line-height: 1.3; letter-spacing: -0.015em; }
.cr-hyp { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cr-nums { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--faint); padding: 12px 14px; margin-top: auto; background: var(--surface-2); border-radius: 14px; }
.cr-nums b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

.batch { padding: 20px; border-radius: var(--r-card); background: var(--surface); }
.batch + .batch { margin-top: 14px; }
.batch .cr { background: var(--surface-2); }
.batch .cr:hover { background: var(--surface-2); box-shadow: 0 10px 24px -16px rgba(10, 10, 11, 0.35); }
.batch .cr-nums { background: var(--surface); }
.batch .empty-state { background: var(--surface-2); }
.batch .btn:not(.primary) { background: var(--surface-2); }
.batch .btn:not(.primary):hover { background: var(--plate-hover); }
.batch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.batch-head > div:first-child { flex: 1; min-width: 260px; }
.batch-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.batch-meta { margin-top: 4px; color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.batch-idea { margin-top: 10px; font-size: 15px; max-width: 80ch; }

.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.step { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--faint); }
.step.on { background: var(--good-tint); color: var(--good); }

.report { display: flex; flex-direction: column; gap: 14px; }
.report-head { padding: 4px 0 6px; }
.report-title { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.15; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------------- Хроника и планёрки ---------------- */

.timeline { display: flex; flex-direction: column; }
.ev { display: block; padding: 12px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; padding-top: 0; }
.ev .ic { width: 24px; height: 24px; }
.ev-text { font-size: 14.5px; font-weight: 500; }
.ev-meta { font-size: 12.5px; color: var(--faint); font-weight: 400; margin-top: 1px; }

.meeting { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.meeting h4 { margin: 0; font-size: 17px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.meeting .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.meeting .lbl { font-size: 13px; color: var(--faint); font-weight: 500; margin-bottom: 4px; }
.meeting .part { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }

/* ---------------- Модалка и формы ---------------- */

.modal-back { position: fixed; inset: 0; background: rgba(10, 10, 11, 0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade 0.25s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(640px, 100%); background: var(--ground); border-radius: 26px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.35); padding: 26px 26px 22px; animation: pop 0.4s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.025em; }
.modal .hint { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { min-height: 46px; padding: 10px 14px; border-radius: var(--r-ctl); border: 1.5px solid transparent; background: var(--surface); width: 100%; transition: border-color 0.2s ease, background-color 0.2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--ground); }
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field .help { font-size: 12.5px; color: var(--faint); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.checks label:has(input:checked) { background: var(--ink); color: #fff; }
.checks input { position: absolute; opacity: 0; pointer-events: none; }
.modal-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal-foot .right { display: flex; gap: 10px; margin-left: auto; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(420px, 100%); padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { margin: 0; font-size: 28px; letter-spacing: -0.028em; }
.login .field input { background: var(--ground); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 60; box-shadow: 0 14px 30px -12px rgba(10, 10, 11, 0.5); animation: pop 0.35s var(--ease) both; }

@media print {
  @page { margin: 14mm; }
  body { font-size: 12.5px; }
  .sidebar, .tabs, .topbar, .menu-btn, .no-print, .toast { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .view { animation: none; }
  .card { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .report-cols { grid-template-columns: 1fr 1fr; }
}

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

/* ---------------- Адаптив ---------------- */

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .passport { grid-template-columns: 1fr; }
  .passport-side { position: static; }
  .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 40; width: 280px; transform: translateX(-100%); transition: transform 0.35s var(--ease); box-shadow: 0 0 60px -10px rgba(0, 0, 0, 0.3); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .main { padding: 18px 16px 48px; }
  .page-title { font-size: 27px; }
  .week-strip { grid-template-columns: repeat(7, minmax(120px, 1fr)); overflow-x: auto; padding: 3px; }
  .proj-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
  .form { grid-template-columns: 1fr; }
  .meeting .grid2, .report-cols { grid-template-columns: 1fr; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .alert-row { flex-direction: column; align-items: flex-start; }
  .alert-chips { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .proj-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
