:root {
  --ink: #0F172A;
  --muted: #55607A;
  --soft: #3D4659;
  --ground: #EEF2F8;
  --card: #FFFFFF;
  --line: #E2E8F2;
  --line-2: #C3CCDB;
  --track: #E5EAF2;
  --navy: #0E1E4A;
  --navy-2: #13296A;
  --yellow: #FFC93C;
  --side: #0E1E4A;
  --side-active: #1F6FEB;
  --side-ink: #C7D2EE;
  --blue: #1F6FEB; --blue-ink: #1559C9; --blue-bg: #E3EDFF;
  --green: #16A34A; --green-ink: #13803B; --green-bg: #DDF6E5;
  --orange: #F08A00; --orange-ink: #B45309; --orange-bg: #FFF0D6;
  --red: #E5322D; --red-ink: #C81E1E; --red-bg: #FFE4E2;
  --gray: #64748B; --gray-bg: #EDF1F6;
  --shadow: 0 1px 2px rgba(14,30,74,0.06), 0 8px 24px rgba(14,30,74,0.07);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Onest, system-ui, sans-serif; color: var(--ink); background: var(--ground); font-size: 15px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-ink); }
.boot { padding: 48px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* layout */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--side); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; padding: 0 6px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--blue); display: grid; place-items: center; font-size: 14px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 600; }
.nav a:hover { background: #262D3B; color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; font-weight: 700; }
.nav .badge { margin-left: auto; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.nav .soon { margin-left: auto; font-size: 11px; color: #8A909B; font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--side-ink); padding: 0 6px; }
.side-foot button { background: transparent; border: 1px solid #3A4252; color: var(--side-ink); border-radius: 10px; min-height: 40px; cursor: pointer; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 56px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 800px) {
  .side { padding: 14px 12px; gap: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { min-height: 40px; padding: 0 10px; font-size: 14px; }
  .side-foot { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 0; }
}

/* common */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); }
h1 { margin: 2px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 18px; font-weight: 800; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.g-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 30px; font-weight: 800; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar > div { height: 100%; border-radius: 4px; background: var(--blue); }
.bar.green > div { background: var(--green); }
.empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; background: var(--ground); border-radius: 12px; }
.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.t-blue { background: var(--blue-bg); color: var(--blue-ink); }
.t-green { background: var(--green-bg); color: var(--green-ink); }
.t-orange { background: var(--orange-bg); color: var(--orange-ink); }
.t-red { background: var(--red-bg); color: var(--red-ink); }
.t-gray { background: var(--gray-bg); color: var(--soft); }
.link { background: none; border: 0; padding: 0; color: var(--blue-ink); font-weight: 700; cursor: pointer; text-decoration: none; font-size: 14px; }

/* buttons & forms */
.btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { border-color: var(--soft); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--red-ink); border-color: #E2B9B3; }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.seg { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; }
.input, .field input, .field select, .field textarea, select.input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 15px; width: 100%; }
.field textarea { min-height: 88px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.capture { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 8px 8px 18px; }
.capture input { flex: 1 1 220px; min-width: 0; min-height: 44px; border: 0; outline: none; font-size: 16px; background: transparent; }
.kbd { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input { min-height: 40px; width: auto; }

/* task rows */
.task { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; border-bottom: 1px solid #F0F1F4; }
.task:last-child { border-bottom: 0; }
.task input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); flex: none; cursor: pointer; }
.task .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.task .title { font-weight: 700; font-size: 14px; }
.task.done .title { color: var(--muted); text-decoration: line-through; }
.task .meta { font-size: 12px; color: var(--muted); }
.task .meta.late { color: var(--red-ink); font-weight: 700; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--red-bg); color: var(--red-ink); font-size: 14px; font-weight: 700; }

/* projects */
.pcard { cursor: pointer; text-align: left; }
.pcard:hover { border-color: var(--line-2); }
.pcard h3 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; }
.prow { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.kanban { overflow-x: auto; padding-bottom: 8px; }
.kanban-cols { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; min-width: 1160px; }
.kcol { background: var(--gray-bg); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.kcol.over { outline: 2px dashed var(--blue); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; padding: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.kitem { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: grab; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 16px; }
td { padding: 12px 16px; border-top: 1px solid #F0F1F4; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #FAFAFB; }

/* inbox */
.inbox-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.inbox-list { flex: 1 1 320px; }
.matrix { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.quads { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.quad { border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; border: 1px solid transparent; }
.quad.over { outline: 2px dashed var(--ink); }
.q1 { background: var(--red-bg); border-color: #EDCFCA; } .q1 .qt { color: var(--red-ink); }
.q2 { background: var(--blue-bg); border-color: #CBD7EC; } .q2 .qt { color: var(--blue-ink); }
.q3 { background: var(--orange-bg); border-color: #EBD8C6; } .q3 .qt { color: var(--orange-ink); }
.q4 { background: var(--gray-bg); border-color: #DDE1E6; } .q4 .qt { color: var(--soft); }
.qt { font-weight: 800; font-size: 15px; }
.qitem { background: #fff; border-radius: 10px; padding: 6px 6px 6px 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: grab; }
.qitem .txt { flex: 1; min-width: 0; cursor: pointer; }
.qitem.done .txt { text-decoration: line-through; color: var(--muted); }
.iitem { border: 1px solid #F0F1F4; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: grab; }
.moves { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 6px; }
.moves button { min-height: 34px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; border: 1px solid transparent; padding: 0 4px; }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--gray-bg); color: var(--ink); }

/* modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(30,36,48,0.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; z-index: 50; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 720px; padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 60px rgba(30,36,48,0.25); }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.modal-foot .right { display: flex; gap: 10px; margin-left: auto; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
#toast.err { background: var(--red-ink); }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; gap: 16px; }


/* ---------- яскрава тема ---------- */
.nav a:hover { background: #1A2D63; }
.nav .badge { background: var(--yellow); color: var(--navy); }
.brand-mark { background: var(--yellow); color: var(--navy) !important; }
.side-foot button { border-color: #2A3F7A; }
.head { background: linear-gradient(0deg, var(--navy), var(--navy)); color: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); align-items: center; }
.head h1 { color: #fff; font-size: 32px; text-transform: uppercase; letter-spacing: 0.01em; }
.head .eyebrow { color: var(--yellow); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.head .btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.kpi { flex-direction: row; align-items: center; gap: 14px; padding: 16px; }
.kpi-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.k-blue { background: var(--blue); } .k-green { background: var(--green); } .k-orange { background: var(--orange); } .k-red { background: var(--red); } .k-navy { background: var(--navy); }
.kpi .kpi-value { font-size: 30px; line-height: 1.1; }
.kpi .kpi-label { color: var(--ink); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: 0.03em; }
.bar.blue > div { background: var(--blue); } .bar.green > div { background: var(--green); } .bar.orange > div { background: var(--orange); } .bar.red > div { background: var(--red); } .bar.gray > div { background: var(--gray); }
.t-blue { border: 1px solid #A9C6FF; } .t-green { border: 1px solid #9FDDB4; } .t-orange { border: 1px solid #FFCF85; } .t-red { border: 1px solid #FFB4AE; } .t-gray { border: 1px solid #D3DAE5; }
.s-red, .s-orange, .s-green, .s-blue, .s-gray { color: #fff; border: 0; }
.s-red { background: var(--red); } .s-orange { background: var(--orange); } .s-green { background: var(--green); } .s-blue { background: var(--blue); } .s-gray { background: var(--gray); }
.pill.s-red, .pill.s-orange, .pill.s-green { border-radius: 6px; padding: 4px 10px; }
.card-head h2, .matrix h2 { text-transform: uppercase; font-size: 15px; letter-spacing: 0.03em; }
.kcol { background: #fff; border: 1px solid var(--line); padding: 0 10px 12px; overflow: hidden; }
.kcol-head { color: #fff; margin: 0 -10px 4px; padding: 12px 14px; border-radius: 0; text-transform: uppercase; font-size: 13px; letter-spacing: .03em; }
.kcol-head .count, .qhead .count { min-width: 24px; height: 24px; border-radius: 12px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.kitem { box-shadow: 0 1px 3px rgba(14,30,74,0.08); }
.quad { background: #fff !important; border: 1px solid var(--line) !important; padding: 0 12px 12px; overflow: hidden; box-shadow: var(--shadow); }
.qhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin: 0 -12px 4px; padding: 12px 14px; color: #fff; }
.qhead .qt { color: #fff !important; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; }
.qhead .small { color: rgba(255,255,255,0.9); font-weight: 600; }
.q1 .qhead { background: var(--red); } .q2 .qhead { background: var(--blue); } .q3 .qhead { background: var(--orange); } .q4 .qhead { background: var(--gray); }
.qitem { border: 1px solid var(--line); }
.moves button.s-red, .moves button.s-orange, .moves button.s-blue, .moves button.s-gray { color: #fff; }
.alert { background: var(--red); color: #fff; }
.seg button.on { background: var(--navy); }
.btn.primary { background: var(--blue); border-color: var(--blue); }
.btn.dark { background: var(--navy); border-color: var(--navy); }
.tg-card { background: linear-gradient(0deg, #E8F4FD, #E8F4FD); border: 1px solid #B9DDF5; }
.tg-card .tg-ic { width: 40px; height: 40px; border-radius: 50%; background: #229ED9; color: #fff; display: grid; place-items: center; flex: none; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 700; background: #fff; border: 1px dashed #229ED9; border-radius: 8px; padding: 6px 10px; user-select: all; }

/* weekly review & journal */
.week-focus { background: var(--navy); color: #fff; border-color: var(--navy); }
.week-focus h2 { color: #fff; }
.wf-item { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,0.08); border-radius: 12px; padding: 12px; font-weight: 700; font-size: 15px; }
.wf-n { width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--navy); display: grid; place-items: center; font-weight: 800; flex: none; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.step { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 14px; background: #fff; }
.step input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--gray-bg); display: grid; place-items: center; font-size: 13px; flex: none; }
.step.on { background: var(--green-bg); border-color: #9FDDB4; color: var(--green-ink); }
.step.on .step-n { background: var(--green); color: #fff; }
.decision { all: unset; cursor: pointer; display: flex; gap: 14px; padding: 12px 4px; border-bottom: 1px solid #F0F1F4; }
.decision:last-child { border-bottom: 0; }
.decision:hover { background: #FAFBFD; }
.decision:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.d-date { width: 64px; flex: none; font-size: 13px; font-weight: 800; color: var(--muted); padding-top: 2px; }
.head .btn:not(.primary) { color: var(--ink); }

/* personal */
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.hgrid { display: grid; grid-template-columns: minmax(160px, 2fr) repeat(7, minmax(44px, 1fr)) minmax(56px, 1fr); gap: 6px; align-items: center; min-width: 640px; }
.egrid { display: grid; grid-template-columns: minmax(90px, 1.3fr) repeat(7, minmax(40px, 1fr)); gap: 6px; align-items: center; min-width: 460px; }
.hday { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); line-height: 1.2; }
.hday span { font-weight: 600; }
.hday.today { color: var(--blue-ink); }
.hday.pick { border: 0; background: transparent; cursor: pointer; border-radius: 8px; padding: 4px 0; min-height: 40px; }
.hday.pick.sel { background: var(--navy); color: #fff; }
.hname { all: unset; cursor: pointer; font-weight: 700; font-size: 14px; }
.hname:hover { color: var(--blue-ink); }
.hbtn { height: 44px; border-radius: 10px; border: 1px solid #DDE3EC; background: var(--gray-bg); cursor: pointer; font-weight: 800; color: #fff; font-size: 16px; }
.hbtn.on { background: var(--green); border-color: var(--green); }
.htotal { text-align: right; font-weight: 800; font-size: 14px; }
.htotal.ok { color: var(--green-ink); }
.hcell { height: 40px; border-radius: 10px; background: var(--gray-bg); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink); }
.elabel { font-size: 13px; font-weight: 700; }
.score { display: flex; gap: 6px; }
.score button { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-weight: 800; cursor: pointer; }
.score button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--blue-bg); color: var(--ink); font-size: 14px; }
.wbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 160px; padding: 0 4px; }
.wbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.wfill { width: 100%; max-width: 44px; border-radius: 8px; background: var(--orange); }
.hbtn.amt { color: var(--muted); font-size: 14px; }
.hbtn.amt.on { color: #fff; }
.htotal { font-size: 13px; }

/* finance */
.txseg button.on.red { background: var(--red); }
.txseg button.on.green { background: var(--green); }
.txseg button.on.blue { background: var(--blue); }
.saving { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid #F0F1F4; }
.catrow { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr minmax(90px, auto); gap: 12px; align-items: center; font-size: 14px; }
@media (max-width: 600px) {
  .kpi { gap: 10px; padding: 14px 12px; }
  .kpi > div { min-width: 0; }
  .kpi-icon { width: 40px; height: 40px; border-radius: 12px; }
  .kpi .kpi-value { font-size: 20px; }
  .kpi .kpi-label { font-size: 11px; }
}

/* інвестиції */
.inv-sum { display: flex; gap: 28px; flex-wrap: wrap; }
.inv-sum b { font-size: 18px; }
.inv-list { display: flex; flex-direction: column; }
.inv { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid #F0F1F4; }
.inv.closed { opacity: .6; }
.filters button.pill { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }

/* продажі */
.deal-cols { grid-template-columns: repeat(6, minmax(168px, 1fr)); min-width: 1060px; }
.deal-cols .kcol { min-height: 200px; }
.deal-cols .kitem .btn { align-self: flex-start; }
.split21 { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); align-items: start; }
[hidden] { display: none !important; }

/* Inbox: розбір */
.moves { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.moves.locked button { opacity: .35; }
.zpick { display: flex; gap: 6px; align-items: center; }
.zpick button:not(.icon-btn) { flex: 1; min-height: 34px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.zpick button.on { color: #fff; border-color: transparent; }
.zpick button.on.business { background: var(--blue); }
.zpick button.on.personal { background: var(--green); }
.moves button { white-space: nowrap; font-size: 11.5px; }
.zpick .icon-btn { margin-left: 4px; }
.zmark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; font-weight: 800; color: #fff; margin-right: 6px; vertical-align: 1px; }
.zmark.business { background: var(--blue); }
.zmark.personal { background: var(--green); }
.howto { background: var(--yellow-bg, #FFF6DB); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.howto summary { cursor: pointer; font-weight: 800; }
.howto ol { margin: 8px 0 2px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.howto svg { vertical-align: -2px; }
.qhelp { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.qhelp .pill { color: #fff; }

/* рахунки: основний */
.accrow { display: flex; align-items: center; gap: 4px; }
.accrow .star { background: none; border: 0; font-size: 20px; line-height: 1; color: #CBD2DD; cursor: pointer; padding: 6px; border-radius: 8px; }
.accrow .star:hover { color: var(--yellow); }
.accrow .star.on { color: #F5B400; }

/* випадаючі списки: власна стрілка всередині поля */
select, select.input, .field select, .filters select {
  -webkit-appearance: none; appearance: none;
  max-width: 100%; min-width: 0;
  padding-right: 38px !important;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-color: #fff;
  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='%230E1E4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
  cursor: pointer;
}
select::-ms-expand { display: none; }
.field { min-width: 0; }

/* індикатор збереження */
#busy { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .15s; background: linear-gradient(90deg, transparent, var(--yellow), var(--blue), transparent); background-size: 50% 100%; background-repeat: no-repeat; }
#busy.on { opacity: 1; animation: busy 0.9s linear infinite; }
@keyframes busy { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { #busy.on { animation: none; background: var(--blue); } }
button, [data-act] { touch-action: manipulation; }
button:active:not(:disabled) { transform: translateY(1px); }

#perf { position: fixed; left: 8px; bottom: 8px; z-index: 2000; max-width: min(440px, calc(100vw - 16px)); margin: 0; padding: 10px 12px; background: rgba(14,30,74,.92); color: #fff; font: 12px/1.5 ui-monospace, Menlo, monospace; border-radius: 10px; white-space: pre-wrap; pointer-events: none; }

/* Inbox: матриця закріплена при прокрутці, кошик */
@media (min-width: 1000px) {
  .inbox-wrap .matrix { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}
.trash { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.trash summary { cursor: pointer; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.trash[open] { display: flex; flex-direction: column; gap: 8px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); }
.trow span { text-decoration: line-through; min-width: 0; overflow-wrap: anywhere; }
.trash .danger { align-self: flex-start; }

/* власні випадаючі списки */
select.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.field, .filters { position: relative; }
.dd { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 38px 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 15px; text-align: left; cursor: pointer; color: var(--ink);
  background: #fff 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='%230E1E4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px; }
.dd:hover { border-color: var(--blue); }
.dd:focus-visible, .dd[aria-expanded="true"] { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,235,.18); }
.dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filters .dd { width: auto; min-height: 40px; max-width: 100%; }
.dd-list { position: fixed; z-index: 3000; max-height: 320px; max-width: calc(100vw - 16px); overflow-y: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 12px 32px rgba(14,30,74,.18); padding: 6px; font-size: 15px; }
.dd-opt { padding: 9px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-opt.act { background: var(--blue-bg, #E8F0FE); }
.dd-opt.sel { font-weight: 700; color: var(--blue-ink, #1F6FEB); }
.dd-opt.sel::after { content: ' ✓'; }
.dd-opt.dis { opacity: .45; cursor: default; }

/* аналітика */
.an-zone { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 8px 0 -4px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .cg { stroke: var(--line); stroke-width: 1; }
.chart .cg.base { stroke: var(--line-2); }
.chart .ct { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit; }
.chart .cbar { cursor: default; }
.chart .cbar:hover rect { fill: rgba(15, 23, 42, .04); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--muted); }
.legend > span, #ctip div { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ctable summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.ctable table { margin-top: 8px; }
#ctip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.5; padding: 8px 10px; border-radius: 10px; box-shadow: 0 6px 20px rgba(15, 23, 42, .25); max-width: 260px; display: flex; flex-direction: column; }
#ctip[hidden] { display: none; }
.kpi-sub .up { color: var(--green-ink); font-weight: 700; }
.kpi-sub .down { color: var(--red-ink); font-weight: 700; }

/* ---------- полірування інтерфейсу ---------- */
.nav-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7F8FBF; padding: 14px 14px 4px; }
.nav-group:first-child { padding-top: 0; }
.nav a { min-height: 40px; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; flex: 0 0 236px; }
.head { padding: 18px 22px; }
.head h1 { font-size: 26px; }
.decision.tx { padding: 10px 4px; }
.tx-day { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); padding: 14px 4px 4px; border-bottom: 1px solid var(--line); }
.tx-day:first-of-type { padding-top: 0; }
.tabbar { display: none; }
@media (max-width: 1100px) { .split21 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .shell { display: block; }
  .side { display: none; }
  .shell.more .side { display: flex; position: fixed; inset: 0 0 64px 0; height: auto; z-index: 60; padding: 20px 16px; overflow-y: auto; }
  .shell.more .nav { flex-direction: column; flex-wrap: nowrap; }
  .shell.more .side-foot { margin-top: 16px; }
  .main { padding: 14px 16px 92px; gap: 14px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { all: unset; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; border-radius: 10px; }
  .tabbar .active { color: var(--blue); }
  .tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
  .tabbar :focus-visible { outline: 2px solid var(--blue); }
  .capture { flex-wrap: nowrap; padding: 6px 6px 6px 14px; }
  .capture .kbd { display: none; }
  .capture .btn { padding: 0 14px; }
  .head { padding: 16px 18px; }
  .head h1 { font-size: 22px; }
}
.capture .btn { white-space: nowrap; }
@media (max-width: 600px) { .g-kpi { grid-template-columns: 1fr 1fr; } .g-kpi > .kpi:last-child:nth-child(odd) { grid-column: span 2; } }

/* воронка угод: етапи згори донизу, угода в один рядок */
.funnel { display: flex; flex-direction: column; gap: 14px; }
.fstage { border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px 8px; background: #fff; }
.fstage.over { outline: 2px dashed var(--blue); background: #F5F8FF; }
.fhead { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; }
.fhead b { text-transform: uppercase; letter-spacing: .03em; font-size: 13px; }
.fhead .count { font-size: 12px; font-weight: 800; color: var(--muted); background: var(--ground); border-radius: 10px; padding: 1px 8px; }
.fdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fempty { padding: 6px 0 8px; }
.drow { display: grid; grid-template-columns: minmax(180px, 2.2fr) minmax(110px, 1fr) minmax(160px, 1.6fr) 90px auto; gap: 14px; align-items: center; padding: 10px 6px; border-top: 1px solid #F0F1F4; cursor: grab; border-radius: 8px; }
.drow:hover { background: #FAFBFD; }
.drow > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dr-main b, .dr-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-next { align-items: flex-start; }
.dr-act { flex-direction: row !important; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.dr-date { white-space: nowrap; }
@media (max-width: 800px) {
  .drow { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .dr-amt { text-align: right; align-items: flex-end; }
  .dr-next, .dr-act { grid-column: 1 / -1; }
  .dr-act { justify-content: flex-start; }
  .dr-date { grid-column: 1 / -1; }
}

/* аскеза */
.asc-card { gap: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.asc-timer { display: flex; flex-direction: column; gap: 2px; text-align: right; flex: none; }
.asc-timer .asc-tl { font-size: 12px; font-weight: 600; color: var(--muted); }
.asc-timer b { font-variant-numeric: tabular-nums; font-size: 16px; white-space: nowrap; }
.asc-timer.big { text-align: left; background: var(--ground); border-radius: 14px; padding: 14px 16px; }
.asc-timer.big b { font-size: 30px; letter-spacing: -0.02em; }
.asc-why { margin: 0; padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--blue-bg); border-radius: 0 12px 12px 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.asc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.asc-day { height: 34px; border-radius: 8px; border: 1px solid transparent; background: var(--gray-bg); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.asc-day:disabled { cursor: default; opacity: .55; }
.asc-day.on { background: var(--green); color: #fff; opacity: 1; }
.asc-day.today { border-color: var(--ink); }
.asc-day:not(:disabled):hover { filter: brightness(.95); }
.asc-mini { display: flex; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.asc-mini:first-of-type { border-top: 0; }
@media (max-width: 600px) { .asc-mini { flex-direction: column; align-items: stretch; gap: 8px; } .asc-mini .asc-timer { text-align: left; } .asc-timer.big b { font-size: 24px; } }

/* Inbox: покупки */
.head .seg { align-self: center; }
.buy-add { display: grid; grid-template-columns: minmax(0, 1fr) 110px 70px auto; gap: 8px; }
.buy-add .input, .buy-add select { min-height: 42px; }
.bsec { display: flex; flex-direction: column; gap: 10px; }
.bsec-h { font-size: 13px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .03em; }
.bitem { border: 1px solid #F0F1F4; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.bitem.ready { border-color: #F3C98B; background: #FFFBF3; box-shadow: 0 0 0 3px var(--orange-bg); }
.bitem.wait { background: #FAFBFD; }
.btitle { color: var(--ink) !important; text-align: left; font-weight: 700; font-size: 15px; }
.bprice { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bacts { display: flex; flex-wrap: wrap; gap: 6px; }
.bbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); }
.bbtn:hover { border-color: var(--line-2); }
.bbtn.need { background: var(--green); border-color: var(--green); color: #fff; }
.bbtn.no { background: var(--red-bg); border-color: transparent; color: var(--red-ink); }
.bbtn.dc-on { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-bg); }
.zpick button.on.business { background: var(--blue); }
.buy-timer, .buy-ready { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.buy-timer { background: var(--orange-bg); color: var(--orange-ink); }
.buy-timer b { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--ink); }
.buy-timer .link { margin-left: auto; font-size: 13px; }
.buy-ready { background: var(--orange); color: #fff; }
.bgroup { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.brow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #F0F1F4; }
.brow .btn.sm { flex: none; }
.bmini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #F0F1F4; border-radius: 12px; text-decoration: none; color: var(--ink); }
.bmini .btitle { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmini.ready { border-color: #F3C98B; background: #FFFBF3; }
.inbox-wrap.buy-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
/* квадрат Декарта */
.dc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-bottom: -10px; }
.dc-cols .yes { color: var(--blue-ink); } .dc-cols .no { color: var(--orange-ink); }
.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-cell { border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.dc-cell.yes { background: var(--blue-bg); } .dc-cell.no { background: var(--orange-bg); }
.dc-cell label { font-weight: 800; font-size: 14px; }
.dc-cell textarea { min-height: 96px; resize: vertical; border: 1px solid rgba(14,30,74,.12); border-radius: 10px; padding: 10px; background: #fff; font-size: 14px; }
@media (max-width: 800px) { .inbox-wrap.buy-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .buy-add { grid-template-columns: minmax(0, 1fr) 90px; }
  .buy-add #buy-title { grid-column: 1 / -1; }
  .buy-add .btn { grid-column: 1 / -1; }
  .dc-grid, .dc-cols { grid-template-columns: 1fr; }
  .dc-cols { display: none; }
  .head .seg { width: 100%; }
  .head .seg button { flex: 1; }
}
@media (max-width: 600px) { .head .seg button { padding: 0 8px; font-size: 13px; white-space: nowrap; } }

/* =====================================================================
   Тема «Скло» (2026-11-26): темні напівпрозорі панелі на розмитому
   синьо-фіолетово-бірюзовому фоні, тонкий світлий шрифт.
   Щоб повернути попередній вигляд, достатньо видалити цей блок.
   ===================================================================== */
:root {
  color-scheme: dark;
  --ink: #EEF2FF;
  --muted: rgba(214, 224, 255, 0.62);
  --soft: rgba(226, 233, 255, 0.78);
  --ground: rgba(255, 255, 255, 0.045);
  --card: rgba(17, 24, 48, 0.46);
  --line: rgba(255, 255, 255, 0.11);
  --line-2: rgba(255, 255, 255, 0.22);
  --track: rgba(255, 255, 255, 0.12);
  --navy: #0B1230;
  --side: rgba(8, 13, 32, 0.55);
  --side-active: rgba(255, 255, 255, 0.10);
  --side-ink: rgba(222, 230, 255, 0.78);
  --blue: #3B82F6; --blue-ink: #9CC0FF; --blue-bg: rgba(59, 130, 246, 0.18);
  --green: #22C55E; --green-ink: #86EFAC; --green-bg: rgba(34, 197, 94, 0.16);
  --orange: #F59E0B; --orange-ink: #FCD38A; --orange-bg: rgba(245, 158, 11, 0.16);
  --red: #EF4444; --red-ink: #FCA5A5; --red-bg: rgba(239, 68, 68, 0.17);
  --gray: #64748B; --gray-bg: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --radius: 6px;
  --glass: blur(18px) saturate(150%);
}
html { background: #10162E; }
body { background: transparent; font-weight: 400; letter-spacing: 0.005em; }
body::before {
  content: ''; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 15% 20%, rgba(46, 94, 214, 0.75), transparent 70%),
    radial-gradient(35% 40% at 85% 15%, rgba(126, 58, 190, 0.55), transparent 70%),
    radial-gradient(45% 40% at 70% 70%, rgba(190, 52, 110, 0.38), transparent 70%),
    radial-gradient(40% 45% at 20% 85%, rgba(20, 150, 160, 0.55), transparent 70%),
    linear-gradient(160deg, #18224A 0%, #1B1840 45%, #10303D 100%);
  filter: blur(40px);
}
::selection { background: rgba(59, 130, 246, 0.45); }
a { color: var(--blue-ink); }

/* панелі */
.card, .capture, .table-wrap, .kitem, .fstage {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass);
}
.card > .card-head:first-child {
  margin: -20px -20px 2px; padding: 13px 20px; align-items: center;
  background: rgba(255, 255, 255, 0.045); border-bottom: 1px solid var(--line);
}
.card-head h2, .matrix h2 { text-transform: none; font-size: 17px; font-weight: 400; letter-spacing: 0.01em; }
.card-head .small[style*="font-weight:700"] { font-weight: 500 !important; }
h1 { font-weight: 300; }
h2 { font-weight: 500; }
.empty { background: rgba(255, 255, 255, 0.035); border: 1px dashed var(--line); }
.link { font-weight: 500; }

/* сайдбар з «профілем» */
.side { background: var(--side); border-right: 1px solid var(--line); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); padding: 0 0 18px; gap: 0; }
.brand { flex-direction: column; gap: 12px; padding: 30px 16px 22px; font-weight: 300; font-size: 20px; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.brand-mark {
  width: 84px; height: 84px; border-radius: 50%; font-size: 24px; font-weight: 300; letter-spacing: 0.06em;
  background: radial-gradient(circle at 30% 25%, #5B8CFF, #2C3FA8 60%, #1C2466) !important; color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 7px rgba(59, 130, 246, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.nav { gap: 0; }
.nav-group { color: rgba(200, 212, 255, 0.45); font-weight: 600; padding: 18px 20px 8px; }
.nav-group:first-child { padding-top: 18px; }
.nav a { border-radius: 0; min-height: 48px; padding: 0 20px; font-weight: 400; border-bottom: 1px solid rgba(255, 255, 255, 0.06); position: relative; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, 0.11); color: #fff; font-weight: 500; }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.nav .badge { background: var(--blue); color: #fff; font-weight: 600; }
.side-foot { padding: 0 20px; }
.side-foot button { border-color: var(--line-2); border-radius: 4px; }

/* шапка сторінки: просто світлий заголовок, як «Dashboard» */
.head { background: transparent; box-shadow: none; padding: 6px 2px 4px; border-radius: 0; }
.head h1 { font-size: 34px; font-weight: 300; text-transform: none; letter-spacing: 0; }
.head .eyebrow { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; }
.head .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.head .btn:not(.primary) { color: var(--ink); }

/* KPI: тонкі кільця */
.kpi { gap: 16px; }
.kpi-icon { width: 58px; height: 58px; border-radius: 50%; background: transparent !important; border: 2px solid rgba(255, 255, 255, 0.14); }
.k-blue { border-top-color: var(--blue) !important; border-right-color: var(--blue) !important; color: #9CC0FF; }
.k-green { border-top-color: var(--green) !important; border-right-color: var(--green) !important; color: #86EFAC; }
.k-orange { border-top-color: var(--orange) !important; border-right-color: var(--orange) !important; color: #FCD38A; }
.k-red { border-top-color: var(--red) !important; border-right-color: var(--red) !important; color: #FCA5A5; }
.k-navy { border-top-color: #A78BFA !important; color: #C4B5FD; }
.kpi .kpi-value, .kpi-value { font-weight: 300; font-size: 32px; }
.kpi .kpi-label { color: var(--soft); font-weight: 400; text-transform: none; font-size: 14px; letter-spacing: 0; }

/* кнопки й поля */
.btn { background: rgba(255, 255, 255, 0.06); border-color: var(--line-2); color: var(--ink); font-weight: 500; border-radius: 4px; }
.btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.35); }
.btn.primary { background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 18px rgba(59, 130, 246, 0.35); }
.btn.dark { background: rgba(59, 130, 246, 0.22); border-color: rgba(120, 165, 255, 0.5); color: #fff; }
.btn.danger { color: var(--red-ink); border-color: rgba(239, 68, 68, 0.45); }
.input, .field input, .field select, .field textarea, select.input, .dd, select, .dc-cell textarea {
  background-color: rgba(4, 8, 24, 0.32) !important; border: 1px solid var(--line-2); color: var(--ink); border-radius: 4px;
}
.input::placeholder, input::placeholder, textarea::placeholder { color: rgba(214, 224, 255, 0.42); }
select, select.input, .field select, .filters select, .dd {
  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='%23DDE6FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
}
.dd-list { background: rgba(20, 27, 54, 0.96); border-color: var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
.dd-opt.act { background: rgba(59, 130, 246, 0.25); }
.capture input { color: var(--ink); }
.kbd { border-color: var(--line-2); }
.seg { background: rgba(4, 8, 24, 0.35); border-color: var(--line); border-radius: 4px; }
.seg button { font-weight: 500; border-radius: 3px; }
.seg button.on { background: var(--blue); color: #fff; }

/* списки й рядки */
.task, .decision, td, .saving, .inv, .drow, .brow, .asc-mini, .tx-day { border-color: var(--line) !important; }
.task .title { font-weight: 500; }
.decision:hover, .drow:hover, tr.click:hover td { background: rgba(255, 255, 255, 0.04); }
[style*="#F0F1F4"] { border-color: var(--line) !important; }
.pill { font-weight: 600; }
.t-blue { border-color: rgba(59, 130, 246, 0.4); } .t-green { border-color: rgba(34, 197, 94, 0.4); }
.t-orange { border-color: rgba(245, 158, 11, 0.4); } .t-red { border-color: rgba(239, 68, 68, 0.4); } .t-gray { border-color: var(--line-2); }
.alert { background: rgba(239, 68, 68, 0.2); color: #FFD3D0; border: 1px solid rgba(239, 68, 68, 0.45); font-weight: 500; }

/* Inbox і матриця */
.quad { background: var(--card) !important; border: 1px solid var(--line) !important; -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
.qhead { border-bottom: 1px solid var(--line); }
.q1 .qhead { background: linear-gradient(90deg, rgba(239, 68, 68, 0.55), rgba(239, 68, 68, 0.18)); }
.q2 .qhead { background: linear-gradient(90deg, rgba(59, 130, 246, 0.55), rgba(59, 130, 246, 0.18)); }
.q3 .qhead { background: linear-gradient(90deg, rgba(245, 158, 11, 0.55), rgba(245, 158, 11, 0.18)); }
.q4 .qhead { background: linear-gradient(90deg, rgba(148, 163, 184, 0.45), rgba(148, 163, 184, 0.12)); }
.qhead .qt { font-weight: 500; }
.kcol-head .count, .qhead .count { background: rgba(255, 255, 255, 0.9); color: #0B1230; }
.qitem, .iitem, .bitem, .bmini { background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); }
.zpick button:not(.icon-btn), .bbtn { background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); color: var(--ink); font-weight: 500; }
.zpick button.on { border-color: transparent; }
.bbtn.need { background: var(--green); border-color: var(--green); color: #05230F; font-weight: 600; }
.bbtn.no { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.45); color: #FFC9C5; }
.bbtn.dc-on { background: rgba(59, 130, 246, 0.2); border-color: var(--blue); color: #CFE0FF; }
.bitem.ready, .bmini.ready { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.55); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12); }
.bitem.wait { background: rgba(255, 255, 255, 0.03); }
.buy-timer { background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.3); }
.buy-timer b { font-weight: 400; }
.buy-ready { background: rgba(245, 158, 11, 0.85); color: #241400; }
.howto { background: rgba(255, 201, 60, 0.08); border: 1px solid rgba(255, 201, 60, 0.25); }
.trash { border-color: var(--line-2); }
.tg-card { background: rgba(34, 158, 217, 0.12) !important; border-color: rgba(34, 158, 217, 0.4) !important; }
.code { background: rgba(4, 8, 24, 0.4); }
.dc-cell.yes { background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.3); }
.dc-cell.no { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); }
.dc-cell label { font-weight: 500; }

/* Review, аскеза */
.week-focus { background: linear-gradient(120deg, rgba(59, 130, 246, 0.28), rgba(126, 58, 190, 0.22)) !important; border-color: rgba(120, 165, 255, 0.35); }
.wf-item { background: rgba(255, 255, 255, 0.07); font-weight: 400; }
.step { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); font-weight: 500; }
.step.on { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.5); }
.asc-timer.big { background: rgba(4, 8, 24, 0.3); border: 1px solid var(--line); }
.asc-timer.big b, .buy-timer b { font-weight: 300; }
.asc-day.today { border-color: #fff; }
.bar { height: 6px; }
.bar > div { box-shadow: 0 0 10px currentColor; }

/* вікна, сповіщення, мобільне меню */
.overlay { background: rgba(3, 6, 20, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal { background: rgba(22, 30, 60, 0.9); border: 1px solid var(--line-2); border-radius: var(--radius); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
#toast { background: rgba(14, 20, 44, 0.94); border: 1px solid var(--line-2); color: #fff; }
#toast.err { background: rgba(185, 28, 28, 0.95); }
#ctip { background: rgba(14, 20, 44, 0.96); color: #fff; }
@media (max-width: 800px) {
  .tabbar { background: rgba(10, 15, 36, 0.78); border-top: 1px solid var(--line); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
  .tabbar .active { color: #9CC0FF; }
  .shell.more .side { background: rgba(10, 15, 36, 0.92); padding: 0 0 16px; }
  .head h1 { font-size: 28px; }
  .card > .card-head:first-child { margin: -20px -20px 2px; }
}
@media (max-width: 600px) {
  .kpi-icon { width: 44px; height: 44px; }
  .kpi .kpi-value { font-size: 24px; }
  .kpi .kpi-label { font-size: 12px; }
}

/* згортання карток */
.col-btn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; opacity: .85; }
.col-btn:hover { background: rgba(255, 255, 255, 0.12); opacity: 1; }
.col-btn svg { transition: transform .2s; }
.collapsed .col-btn svg { transform: rotate(-90deg); }
.qhead { cursor: pointer; user-select: none; }
.quad.collapsed { min-height: 0; padding-bottom: 0; align-self: start; }
.quad.collapsed > :not(.qhead) { display: none; }
.quad.collapsed .qhead { margin-bottom: 0; border-bottom: 0; }
.ch-acts { display: inline-flex; align-items: center; gap: 10px; }
.card.collapsed > :not(.card-head) { display: none; }
.card.collapsed > .card-head:first-child { margin-bottom: -20px; border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .col-btn svg { transition: none; } }

/* ідеї */
.idea-add { display: flex; flex-direction: column; gap: 8px; }
.idea-add textarea { min-height: 60px; resize: vertical; }
.idea-add .btn { align-self: flex-start; }
.iitem.idea { cursor: default; }

/* фокус тижня: банер на Overview і віконце справа внизу */
.week-focus .card-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.wf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.wf-item { font-size: 16px; }
.wf-empty { padding: 16px 20px; }
.fw { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: min(320px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px;
  background: rgba(18, 26, 54, 0.82); border: 1px solid rgba(120, 165, 255, 0.35); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); color: var(--ink); }
.fw-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fw-head b { font-weight: 500; flex: 1; }
.fw-head .link { font-size: 13px; }
.fw-head .col-btn { width: 26px; height: 26px; }
.fw-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.35; }
.fw-item .wf-n { width: 22px; height: 22px; font-size: 12px; }
.fw-pill { position: fixed; right: 20px; bottom: 20px; z-index: 40; height: 46px; min-width: 46px; padding: 0 12px; border-radius: 23px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: rgba(18, 26, 54, 0.85); border: 1px solid rgba(120, 165, 255, 0.45); color: #CFE0FF; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); font-weight: 600; }
.fw-pill span { background: var(--yellow); color: #0B1230; border-radius: 10px; min-width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; }
@media (max-width: 800px) {
  .fw, .fw-pill { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) { .head .seg button { padding: 0 6px; font-size: 12.5px; } }
