:root {
  --bg: #e8e8eb;
  --bg-blob1: rgba(255, 196, 170, .55);
  --bg-blob2: rgba(214, 242, 90, .35);
  --bg-blob3: rgba(255, 255, 255, .9);
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, .45);
  --border: rgba(20, 20, 25, .08);
  --border-strong: rgba(20, 20, 25, .16);
  --text: #111113;
  --muted: #8b8b93;
  --faint: #b9b9c0;
  --pill: #111113;
  --pill-text: #ffffff;
  --accent: #d6f24a;
  --accent-ink: #1d2400;
  --danger: #e2542b;
  --ok: #4fae3a;
  --warn: #f0a531;
  --shadow: 0 20px 50px -24px rgba(30, 30, 40, .25), 0 2px 6px rgba(30, 30, 40, .04);
  --r-xl: 30px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --s1: #6b7a1f; --s2: #c98a7a; --s3: #8b8b93;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d0e10;
  --bg-blob1: rgba(140, 80, 60, .28);
  --bg-blob2: rgba(160, 190, 40, .14);
  --bg-blob3: rgba(40, 42, 48, .6);
  --surface: rgba(28, 29, 33, .78);
  --surface-solid: #1b1c20;
  --surface-2: rgba(40, 41, 46, .55);
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f1f1f3;
  --muted: #8f9099;
  --faint: #5b5c64;
  --pill: #f1f1f3;
  --pill-text: #111113;
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .7);
  --s1: #c3dc4a; --s2: #e0a090; --s3: #6f7079;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4;
  background-image:
    radial-gradient(40vw 40vw at 62% 18%, var(--bg-blob1), transparent 60%),
    radial-gradient(38vw 38vw at 85% 70%, var(--bg-blob2), transparent 60%),
    radial-gradient(50vw 40vw at 15% 10%, var(--bg-blob3), transparent 60%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 76px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0; }
.logo { width: 44px; height: 44px; display: grid; place-items: center; font-weight: 800; letter-spacing: -.04em; font-size: 15px; margin-bottom: 18px; }
.logo svg { width: 34px; height: 34px; }
.rail .spacer { flex: 1; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; transition: .15s; }
.icon-btn:hover { background: var(--surface); }
.icon-btn.active { background: var(--pill); color: var(--pill-text); border-color: var(--pill); }
.icon-btn svg { width: 18px; height: 18px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #2a2d1a, #9bb53a); color: #fff; display: grid; place-items: center; font-weight: 600; }

.main { padding: 22px 28px 60px 8px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 15px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); cursor: pointer; text-decoration: none; font-size: 13px; transition: .15s; }
.tab svg { width: 15px; height: 15px; }
.tab:hover { background: var(--surface); }
.tab.active { background: var(--pill); color: var(--pill-text); border-color: var(--pill); box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.topbar .tabs { min-width: 0; }
.topbar .right { margin-left: auto; flex: none; display: flex; gap: 8px; align-items: center; }

/* ---------- typography ---------- */
.hello h1 { font-size: 30px; font-weight: 500; margin: 0; letter-spacing: -.02em; }
.hello p { font-size: 30px; margin: 2px 0 0; color: var(--faint); font-weight: 400; letter-spacing: -.02em; }
.big { font-size: 76px; font-weight: 300; letter-spacing: -.05em; line-height: 1; }
.big small { font-size: .38em; letter-spacing: -.02em; color: var(--muted); }
.num { font-weight: 300; letter-spacing: -.04em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.label { font-size: 12px; color: var(--muted); }
h2 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 14px; }
h3 { font-size: 15px; font-weight: 500; margin: 0; }
.up { color: var(--ok); } .down { color: var(--danger); }

/* ---------- layout ---------- */
.grid { display: grid; gap: 18px; }
.g-hero { grid-template-columns: minmax(320px, 1.05fr) 1.4fr; align-items: start; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.mt { margin-top: 22px; } .mt-s { margin-top: 10px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); position: relative; min-width: 0; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card .corner { position: absolute; top: 18px; right: 18px; }
.stat .value { font-size: 40px; white-space: nowrap; font-weight: 300; letter-spacing: -.04em; margin-top: 22px; line-height: 1; }
.stat .value small { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.chip-ico { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; position: relative; }
.chip-ico svg { width: 16px; height: 16px; }
.chip-ico .dot { position: absolute; top: -3px; right: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface-solid); }

.gcard { border-radius: var(--r-xl); padding: 20px; color: #fff; min-height: 190px; position: relative; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(40, 50, 0, .7); cursor: pointer; }
.gcard.olive { background: radial-gradient(120% 90% at 80% 110%, #d7f24a 0%, #8fa62a 30%, #4b561a 62%, #2b310f 100%); }
.gcard.rose { background: radial-gradient(120% 100% at 30% 110%, #e9b3a2 0%, #c98a7a 35%, #9b6a5c 70%, #6e4a40 100%); }
.gcard.slate { background: radial-gradient(120% 100% at 80% 110%, #9fb1c7 0%, #5d6f86 45%, #2e3846 100%); }
.gcard.sand { background: radial-gradient(120% 100% at 70% 110%, #f3d88f 0%, #c3a052 45%, #6b5424 100%); }
.gcard .gtitle { padding-right: 48px; display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.15; }
.gcard .ring { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); display: grid; place-items: center; flex: none; }
.gcard .ring svg { width: 16px; height: 16px; }
.gcard .go { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%; background: #151515; display: grid; place-items: center; }
.gcard .go svg { width: 14px; height: 14px; }
.gcard .glabel { font-size: 11px; opacity: .55; margin-top: 22px; }
.gcard .gvalue { font-size: 30px; font-weight: 300; letter-spacing: -.03em; }
.gcard .gvalue small { font-size: 14px; opacity: .7; }
.gcard .gfoot { display: flex; justify-content: space-between; font-size: 11px; opacity: .7; margin-top: 18px; }
.gcard .dots { position: absolute; left: 20px; right: 120px; bottom: 44px; height: 18px; background-image: radial-gradient(rgba(255,255,255,.45) 1px, transparent 1.4px); background-size: 7px 6px; opacity: .6; }

/* score bars like reference */
.scale { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; margin-top: 26px; }
.scale .seg { height: 54px; border-radius: 14px; position: relative; }
.scale .seg:nth-child(1) { background: linear-gradient(180deg, rgba(246, 196, 180, .55), rgba(246, 196, 180, .25)); }
.scale .seg:nth-child(2) { background: linear-gradient(180deg, rgba(248, 222, 170, .55), rgba(248, 222, 170, .25)); }
.scale .seg:nth-child(3) { background: linear-gradient(180deg, rgba(196, 236, 170, .6), rgba(196, 236, 170, .25)); }
.scale .marker { position: absolute; top: -10px; bottom: -6px; width: 2px; background: var(--text); }
.scale .marker::before { content: ""; position: absolute; top: -6px; left: -5px; border: 6px solid transparent; border-top-color: var(--text); }
.scale-labels { display: grid; grid-template-columns: 1.1fr 1fr 1fr; font-size: 11px; color: var(--muted); margin-top: 6px; }

.subtabs { display: flex; gap: 30px; border-bottom: 1px solid var(--border); margin: 30px 0 18px; }
.subtab { padding: 0 0 10px; cursor: pointer; color: var(--faint); background: none; border: 0; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.subtab.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pill); color: var(--pill-text); font-size: 10px; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-size: 13px; transition: .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--text); }
.btn.dark { background: var(--pill); color: var(--pill-text); border-color: var(--pill); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 500; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 7px 12px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; }
.seg-ctl { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg-ctl button { white-space: nowrap; border: 0; background: none; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 12px; color: var(--muted); }
.seg-ctl button.active { background: var(--pill); color: var(--pill-text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface-solid); outline: none; }
/* Своя стрелка у выпадающих списков: у системной в Safari нет отступа справа и она прилипает к краю */
select.input { -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer; text-overflow: ellipsis;
  background-image: var(--chev); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; }
select.input::-ms-expand { display: none; }
:root { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238b8b93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-theme="dark"] { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a4a5ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.input:focus { border-color: var(--text); }
textarea.input { min-height: 84px; resize: vertical; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 999px; }
.check input { accent-color: #6b7a1f; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .full { grid-column: 1 / -1; }
.search { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); min-width: 220px; }
.search input { border: 0; background: none; outline: none; width: 100%; }

/* ---------- kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; min-height: 200px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: .15s; }
.col.over { border-color: var(--text); background: var(--surface); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 12px; }
.col-head h3 { display: flex; gap: 8px; align-items: center; }
.col-head .sum { font-size: 12px; color: var(--muted); }
.kcard { background: var(--surface-solid); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); cursor: grab; box-shadow: 0 6px 18px -14px rgba(0,0,0,.4); transition: transform .12s; }
.kcard:hover { transform: translateY(-1px); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 500; }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.tag.lime { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tag.red { background: rgba(226, 84, 43, .12); color: var(--danger); border-color: transparent; }
.tag.dark { background: var(--pill); color: var(--pill-text); border-color: transparent; }
.kcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.kcard .money { font-size: 18px; font-weight: 300; letter-spacing: -.02em; color: var(--text); }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th.grp { text-align: center; color: var(--text); }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
td.click { cursor: pointer; } .edited { color: var(--p-medium, #e08a1e); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.pay-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border-strong); cursor: pointer; background: none; }
.pay-status.paid { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pay-status.overdue { color: var(--danger); border-color: rgba(226,84,43,.4); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: var(--fs, 11px); }
.chart .grid-line { stroke: var(--border); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 110px; gap: 12px; align-items: center; margin: 8px 0; font-size: 13px; }
.bar-track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--s1); }
.progress { height: 12px; border-radius: 8px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress > div { height: 100%; background: linear-gradient(90deg, #6b7a1f, var(--accent)); border-radius: 8px; }
.tooltip { position: fixed; pointer-events: none; background: var(--pill); color: var(--pill-text); padding: 8px 12px; border-radius: 12px; font-size: 12px; z-index: 100; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 10, 12, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; display: flex; justify-content: flex-end; }
.drawer { width: min(640px, 100%); height: 100%; overflow-y: auto; background: var(--surface-solid); border-radius: var(--r-xl) 0 0 var(--r-xl); padding: 28px; box-shadow: -30px 0 80px -40px rgba(0,0,0,.5); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer h2 { font-size: 24px; margin: 0; }
.dtabs { display: flex; gap: 6px; margin: 8px 0 20px; overflow-x: auto; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); }
/* у svg без размеров Safari растягивает иконку на всю строку */
.site-view { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 6px 6px 6px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); }
.site-view a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.file > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.file .tag, .file .label { flex: none; white-space: nowrap; }
.file a { flex: 1; min-width: 0; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--text); color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--pill); color: var(--pill-text); padding: 12px 18px; border-radius: 999px; z-index: 200; font-size: 13px; box-shadow: var(--shadow); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.note { font-size: 12px; color: var(--muted); padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: var(--r-sm); white-space: pre-wrap; word-break: break-all; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(420px, 100%); padding: 34px; text-align: center; }
.login .codebox { font-size: 48px; font-weight: 300; letter-spacing: .25em; margin: 16px 0; }

/* ---------- mobile ---------- */
.bottom-nav { display: none; }
@media (max-width: 1100px) {
  .g-hero, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-hero > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .main { padding: 16px 14px 110px; }
  .topbar { margin-bottom: 18px; flex-wrap: wrap; }
  .topbar .right { width: 100%; margin-left: 0; flex: 1 1 100%; }
  .topbar .right .seg-ctl { overflow-x: auto; max-width: 100%; }
  html, body { overflow-x: clip; }
  .main { max-width: 100vw; }
  .topbar .tabs { display: none; }
  .mobile-title { display: block !important; font-size: 22px; font-weight: 500; }
  .g-2, .g-3, .g-4, .g-hero { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .big { font-size: 60px; }
  .hello h1, .hello p { font-size: 24px; }
  .board { grid-auto-columns: 84%; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .drawer { border-radius: var(--r-xl) var(--r-xl) 0 0; margin-top: 6vh; height: 94vh; padding: 22px 18px 40px; }
  .overlay { align-items: flex-end; }
  .bar-row { grid-template-columns: 100px 1fr 90px; }
  .bottom-nav { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; background: var(--surface); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: 26px; padding: 8px; box-shadow: var(--shadow); justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; text-decoration: none; color: var(--muted); padding: 6px 8px; border-radius: 16px; min-width: 54px; }
  .bottom-nav a svg { width: 20px; height: 20px; }
  .bottom-nav a.active { color: var(--pill-text); background: var(--pill); }
  .search { min-width: 0; flex: 1; }
}
.mobile-title { display: none; }

.drawer .stack .tab { justify-content: flex-start; padding: 14px 18px; font-size: 15px; }
.env-badge { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 6px 10px; border-radius: 999px; background: #f0a531; color: #1b1300; vertical-align: middle; }
.qr { width: 200px; margin: 10px auto 6px; padding: 10px; background: #fff; border-radius: 18px; border: 1px solid var(--border); }
.qr svg { display: block; width: 100%; height: auto; }
.login-steps { text-align: left; color: var(--muted); font-size: 13px; padding-left: 20px; margin: 16px 0 6px; }
.login-steps li { margin: 4px 0; }

/* ---------- задачи ---------- */
/* задачи: приоритет, срок, подзадачи */
:root { --p-high: #e2542b; --p-medium: #e08a1e; --p-low: #4f86d1; }
.kcard.p-high, .trow.p-high { box-shadow: inset 3px 0 0 var(--p-high), 0 6px 18px -14px rgba(0,0,0,.4); }
.kcard.p-medium, .trow.p-medium { box-shadow: inset 3px 0 0 var(--p-medium), 0 6px 18px -14px rgba(0,0,0,.4); }
.kcard.p-low, .trow.p-low { box-shadow: inset 3px 0 0 var(--p-low), 0 6px 18px -14px rgba(0,0,0,.4); }
.tc-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.prio, .due { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.prio i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.prio.high { color: var(--p-high); background: color-mix(in srgb, var(--p-high) 16%, transparent); }
.prio.medium { color: var(--p-medium); background: color-mix(in srgb, var(--p-medium) 16%, transparent); }
.prio.low { color: var(--p-low); background: color-mix(in srgb, var(--p-low) 16%, transparent); }
.due { font-weight: 500; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 9px; }
.due::before { content: "⏰"; font-size: 10px; }
.due.overdue { color: #fff; background: var(--danger); border-color: transparent; }
.due.today { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.due.done { color: var(--muted); text-decoration: line-through; }
.tc-subs { margin-top: 9px; display: grid; gap: 4px; font-size: 12px; }
.tc-subs > div { display: flex; gap: 7px; align-items: flex-start; line-height: 1.35; color: var(--text); }
.tc-subs i { width: 12px; height: 12px; margin-top: 2px; border-radius: 4px; border: 1.5px solid var(--border-strong); flex: none; }
.tc-subs .done { color: var(--muted); text-decoration: line-through; }
.tc-subs .done i { background: #9bb53a; border-color: transparent; }
.tc-subs .more { color: var(--muted); padding-left: 19px; }
.tc-subs + .tc-sub { margin-top: 8px; }
.tcheck.on { display: grid; place-items: center; background: #9bb53a; border-color: transparent; color: #fff; font-size: 12px; cursor: default; }
.tc-sub { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.tc-sub .bar { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; min-width: 40px; }
.tc-sub .bar > div { height: 100%; background: var(--accent); border-radius: 4px; }
.tc-sub.full span { color: var(--text); }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.tc-foot .tmembers { margin-top: 0; }
.tc-extras { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.prio-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.prio-pick label { cursor: pointer; position: relative; }
.prio-pick input { position: absolute; opacity: 0; pointer-events: none; }
.prio-pick span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.prio-pick label:hover span { border-color: var(--text); }
.prio-pick input:checked + span { background: var(--pill); color: var(--pill-text); border-color: transparent; }
.prio-pick .p-high input:checked + span { background: var(--p-high); color: #fff; }
.prio-pick .p-medium input:checked + span { background: var(--p-medium); color: #fff; }
.prio-pick .p-low input:checked + span { background: var(--p-low); color: #fff; }
.prio-pick input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.tmembers { display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #2a2d1a, #9bb53a); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; flex: none; }
.add-card { display: flex; gap: 6px; align-items: center; }
.add-card .input { flex: 1; min-width: 0; background: transparent; border-style: dashed; padding: 9px 12px; font-size: 13px; }
.add-card button { display: none; }
.add-card:has(.input:not(:placeholder-shown)) button { display: inline-flex; }
.add-col { min-height: 0; }
.col-tools { display: flex; gap: 2px; }
.icon-btn.xs { width: 26px; height: 26px; font-size: 14px; line-height: 1; }
.icon-btn.xs svg { width: 14px; height: 14px; }
.trow { display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 12px 14px; }
.trow .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tcheck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: none; cursor: pointer; flex: none; padding: 0; }
.tcheck:hover { background: var(--accent); border-color: transparent; }
.scroll-x { overflow-x: auto; max-width: 100%; }
.citem { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.citem input { width: 18px; height: 18px; accent-color: #9bb53a; flex: none; cursor: pointer; }
.citem span { flex: 1; }
.citem.done span { text-decoration: line-through; color: var(--muted); }
.comment { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.pre { white-space: pre-wrap; margin-top: 4px; }
.event { font-size: 12px; color: var(--muted); padding: 0 4px; }
.link-btn { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
@media (max-width: 760px) { .trow { flex-wrap: wrap; } .trow .meta { width: 100%; justify-content: flex-start !important; padding-left: 34px; } }
/* кнопки действий в строке таблицы (✎ / ×): маленькие, без рамки, не спорят с суммой */
.icon-btn.row-del { width: 28px; height: 28px; border-color: transparent; color: var(--muted, #8a8a8a); font-size: 14px; }
.icon-btn.row-del svg { width: 14px; height: 14px; }
.icon-btn.row-del:hover { color: var(--text, #fff); border-color: var(--border-strong); }
.icon-btn.row-del[data-act^="del"]:hover { color: #ff6b6b; border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .08); }
.sec-head { align-items: center; } .sec-head h2 { margin: 0; }
/* отступ под заголовком раздела, чтобы кнопка не налезала на скругление таблицы */
.mb-s { margin-bottom: 12px; }
/* точки графиков: у пунктирных линий — невидимые, только для наведения */
.chart circle.ghost { fill-opacity: 0; }
.chart circle.ghost:hover { fill-opacity: 1; }
/* подсказки к метрикам */
.hint-q { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--muted); font-size: 10px; vertical-align: 1px; margin-left: 4px; }
.card.stat[data-tip] { cursor: help; }
.tooltip.wide { white-space: normal; max-width: 320px; line-height: 1.45; }
/* выпадающий список исполнителей */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding-right: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.dd[open] > summary::after { transform: translateY(-20%) rotate(225deg); }
.dd-menu { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 18px; padding: 6px; max-height: 280px; overflow: auto; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.dd-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.dd-item:hover { background: var(--surface); }
.dd-item input { width: 16px; height: 16px; accent-color: #9bb53a; }
.stat.compact { padding-top: 20px; padding-bottom: 20px; } .stat.compact .value { font-size: 34px; margin-top: 12px; }
