:root {
  --bg: #0b0b0d;
  --panel: #161618;
  --panel-2: #1f1f22;
  --panel-3: #2a2a2e;
  --line: #2c2c31;
  --text: #f4f4f5;
  --muted: #8d8d96;
  --paper: #ffffff;
  --paper-2: #f4f4f6;
  --ink: #111113;
  --ink-muted: #6b6b75;

  --yellow: #f4f17a;
  --coral: #ff8a6b;
  --purple: #b88cff;
  --cyan: #5fe3f2;
  --green: #7ef08d;
  --pink: #ff6fa3;
  --red: #ff5a5a;

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
::selection { background: var(--yellow); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 1fr 84px; min-height: 100vh; gap: 14px; padding: 14px; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rail {
  position: sticky; top: 14px; height: calc(100vh - 28px);
  background: var(--yellow); color: var(--ink); border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 8px;
}
.rail .me { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font-weight: 700; cursor: pointer; }
.rail .plus { width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.08); display: grid; place-items: center; border: 0; cursor: pointer; margin-bottom: 10px; }
.rail .plus:hover { background: rgba(0,0,0,.16); }
.rail nav { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
.rail nav a { position: relative; width: 56px; height: 44px; border-radius: 999px; display: grid; place-items: center; transition: .15s; }
.rail nav a:hover { background: rgba(0,0,0,.08); }
.rail nav a.active { background: var(--ink); color: var(--yellow); }
.rail nav a .badge { position: absolute; top: 4px; right: 8px; background: var(--coral); color: var(--ink); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
.rail nav a[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; right: 68px; white-space: nowrap; background: var(--ink); color: var(--text);
  padding: 6px 10px; border-radius: 8px; font-size: 12px; pointer-events: none;
}
.rail .logout { border: 0; background: none; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.rail .logout:hover { background: rgba(0,0,0,.08); }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 8px; }
.page-head h1 { font-size: 30px; font-weight: 500; }
.page-head h1 b { font-weight: 700; }
.page-head h1 span { color: var(--muted); font-weight: 400; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border-radius: var(--r-xl); padding: 22px; min-width: 0; }
.card.paper { background: var(--paper); color: var(--ink); }
.card.flat { background: var(--panel-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 18px; font-weight: 500; }
.card-head .meta { color: var(--muted); font-size: 12px; }
.paper .card-head .meta, .paper .muted { color: var(--ink-muted); }

.grid { display: grid; gap: 14px; }
.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)); }
.g-main { grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); }
@media (max-width: 1200px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; } .rail { position: fixed; bottom: 10px; left: 10px; right: 10px; top: auto; height: 64px; flex-direction: row; padding: 0 10px; z-index: 50; } .rail nav { flex-direction: row; } .rail .plus, .rail .me { display: none; } .main { padding-bottom: 80px; } }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.big-num { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.big-num small { font-size: 18px; font-weight: 500; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 500; font-size: 13px; transition: .15s; white-space: nowrap;
}
.btn:hover { background: var(--panel-3); }
.btn.primary { background: var(--yellow); color: var(--ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(.95); }
.btn.blue { background: #5aa9ff; color: #fff; border-color: transparent; }
.btn.dark { background: var(--ink); color: var(--text); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--red); border-color: rgba(255, 90, 90, .35); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn.icon-only { width: 38px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.paper .btn { background: var(--paper-2); border-color: #e4e4ea; }
.paper .btn:hover { background: #e9e9ee; }
.paper .btn.primary { background: var(--ink); color: #fff; }
.circle-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; background: transparent; cursor: pointer; flex: none; color: inherit; }
.circle-btn:hover { background: rgba(0,0,0,.08); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--panel-3); color: var(--text); white-space: nowrap; }
.chip.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, currentColor); }
.chip.outline { background: transparent; border: 1px solid var(--line); }
.chip.dark { background: var(--ink); color: #fff; }
.chip.light { background: rgba(0,0,0,.08); color: var(--ink); }
.paper .chip { background: var(--paper-2); color: var(--ink); }

.seg { display: inline-flex; background: var(--ink); border-radius: 999px; padding: 4px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 16px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--paper); color: var(--ink); font-weight: 500; }
.paper .seg { background: var(--ink); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: transparent; color: var(--muted); height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--text); color: var(--ink); border-color: transparent; font-weight: 500; }
.tabs button .n { font-size: 11px; background: rgba(127,127,127,.25); padding: 1px 6px; border-radius: 8px; }

/* ---------- avatars ---------- */
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink); background: var(--c, var(--purple)); flex: none; border: 2px solid var(--panel); }
.av.lg { width: 44px; height: 44px; font-size: 14px; }
.av.xl { width: 64px; height: 64px; font-size: 20px; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -9px; }
.colored .av, .paper .av { border-color: rgba(255,255,255,.7); }
.avs .more { background: var(--ink); color: #fff; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .form .cols, .form .cols-3 { grid-template-columns: 1fr; } }
label.f { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.f .hint { font-weight: 400; font-size: 11px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; color: var(--text); outline: none; transition: .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
select.input[multiple] { height: auto; min-height: 110px; padding: 6px; }
.input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(244, 241, 122, .15); }
.search { position: relative; }
.search .input { padding-left: 38px; border-radius: 999px; height: 38px; }
.search svg { position: absolute; left: 13px; top: 10px; color: var(--muted); }
.check-list { display: flex; flex-wrap: wrap; gap: 6px; }
.check-list label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 12px; color: var(--text); }
.check-list input { display: none; }
.check-list label:has(input:checked) { background: var(--text); color: var(--ink); }
.swatches { display: flex; gap: 8px; }
.swatches label { width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; border: 3px solid transparent; }
.swatches input { display: none; }
.swatches label:has(input:checked) { border-color: var(--text); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 26px; animation: pop .18s; }
.modal.wide { width: min(880px, 100%); }
.modal h2 { font-size: 22px; font-weight: 500; margin-bottom: 4px; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--text); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: pop .2s; }
.toast.err { background: var(--red); color: #fff; }

/* ---------- colored task cards (like "Urgent Tasks") ---------- */
.ucard { border-radius: var(--r-lg); padding: 18px; color: var(--ink); background: var(--c, var(--coral)); display: grid; gap: 10px; position: relative; }
.ucard .t { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.ucard .time { font-size: 12px; opacity: .75; display: flex; align-items: center; gap: 6px; }
.ucard .kv { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; align-items: center; }
.ucard .kv span { opacity: .7; }
.ucard .desc { font-size: 13px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ucard .pbar { height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 3px, transparent 3px 5px); overflow: hidden; flex: 1; }
.ucard .pbar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 5px); }
.ucard .pill-dark { background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 8px; }
.ucard .btn { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.ucard .btn:hover { background: rgba(0,0,0,.08); }
.ucard .btn.dark { background: var(--ink); color: #fff; }

/* ---------- timeline (white paper) ---------- */
.timeline { position: relative; overflow-x: auto; }
.tl-head { display: grid; border-bottom: 1px solid #ececf1; padding-bottom: 10px; }
.tl-head div { font-size: 34px; font-weight: 300; color: #c9c9d1; letter-spacing: -0.03em; }
.tl-head div small { font-size: 12px; font-weight: 400; color: #a5a5b0; margin-left: 4px; }
.tl-head div.now { color: var(--ink); font-weight: 600; }
.tl-head div.now small { color: var(--ink); }
.tl-body { position: relative; display: grid; gap: 10px; padding: 14px 0 6px; min-height: 220px; }
.tl-col-bg { position: absolute; inset: 0; display: grid; pointer-events: none; }
.tl-col-bg div:nth-child(odd) { background: rgba(0,0,0,.015); }
.tl-today { position: absolute; top: -10px; bottom: 0; width: 2px; background: var(--ink); z-index: 2; }
.tl-today::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 2px; background: var(--ink); }
.tl-row { position: relative; height: 64px; }
.tl-bar { position: absolute; top: 0; height: 64px; border-radius: 18px; background: var(--c); padding: 10px 14px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: transform .15s; min-width: 46px; }
.tl-bar:hover { transform: translateY(-2px); }
.tl-bar .n { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-bar .s { font-size: 11px; opacity: .75; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.tl-bar .mini { height: 5px; flex: 1; background: rgba(0,0,0,.12); border-radius: 3px; overflow: hidden; max-width: 120px; }
.tl-bar .mini i { display: block; height: 100%; background: var(--ink); }
.tl-bar.striped { background: repeating-linear-gradient(135deg, var(--c) 0 10px, color-mix(in srgb, var(--c) 80%, #fff) 10px 20px); }

/* ---------- toolbar strip ---------- */
.strip { background: var(--panel-2); border-radius: 999px; padding: 8px 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.strip .sep { width: 1px; height: 20px; background: var(--line); }
.strip .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); display: inline-block; }
.strip b { font-weight: 600; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--panel); border-radius: var(--r-lg); padding: 12px; min-height: 200px; display: flex; flex-direction: column; gap: 8px; transition: background .15s; }
.kcol.over { background: var(--panel-3); }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; font-weight: 500; }
.kcol-head .chip { height: 22px; }
.kcard { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: grid; gap: 8px; cursor: grab; transition: .15s; }
.kcard:hover { border-color: #444; }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 500; }
.kcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.kcard .proj { font-size: 11px; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.kcard .proj::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.late { color: var(--coral) !important; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel-2); }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); }
.neg { color: var(--coral); }

/* ---------- bars ---------- */
.bar { height: 10px; background: var(--panel-3); border-radius: 6px; overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--green)); }
.bar.over i { background: repeating-linear-gradient(135deg, var(--coral) 0 6px, #ff6b4a 6px 12px); }
.bar .cap { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .6; }

.wl-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(160px, 2fr) repeat(5, minmax(64px, .5fr)); gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 12px; }
.wl-row:hover { background: var(--panel-2); }
.wl-row:last-child { border-bottom: 0; }
.wl-row .stat { text-align: right; font-variant-numeric: tabular-nums; }
.wl-row .stat small { display: block; color: var(--muted); font-size: 11px; }
.wl-head { font-size: 11px; color: var(--muted); cursor: default; padding-top: 0; }
.wl-head:hover { background: none; }
@media (max-width: 900px) { .wl-row { grid-template-columns: 1fr 1fr; } .wl-row .stat { display: none; } }

/* ---------- project cards ---------- */
.pcard { border-radius: var(--r-xl); padding: 20px; background: var(--c); color: var(--ink); display: grid; gap: 14px; cursor: pointer; transition: transform .15s; align-content: start; }
.pcard:hover { transform: translateY(-3px); }
.pcard .t { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.pcard .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pcard .kpis div { background: rgba(255,255,255,.35); border-radius: 12px; padding: 8px 10px; }
.pcard .kpis b { display: block; font-size: 16px; }
.pcard .kpis span { font-size: 11px; opacity: .7; }

.hero { border-radius: var(--r-xl); padding: 26px; background: var(--c); color: var(--ink); display: grid; gap: 18px; }
.hero h1 { font-size: 34px; font-weight: 500; }
.hero .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.hero .kpis div { background: rgba(255,255,255,.4); border-radius: 16px; padding: 12px 14px; }
.hero .kpis b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.hero .kpis span { font-size: 12px; opacity: .7; }
.hero .chip { background: rgba(0,0,0,.1); color: var(--ink); }

/* ---------- misc ---------- */
.kpi { display: grid; gap: 6px; }
.kpi .l { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.kpi .d { font-size: 12px; color: var(--muted); }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi-strip .card { padding: 18px 20px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--panel-2); cursor: pointer; transition: .15s; }
.list-item:hover { background: var(--panel-3); }

.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--panel-2); border-radius: 4px 16px 16px 16px; padding: 10px 14px; flex: 1; }
.comment.system .bubble { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }

.tooltip-host { position: relative; }
.chart-tip { position: absolute; background: var(--paper); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.35); transform: translate(-50%, -110%); z-index: 5; }

.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--yellow); color: var(--ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 0 40px 40px 0; position: relative; overflow: hidden; }
.login-art h1 { font-size: 56px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.login-art .blobs { position: absolute; right: -60px; bottom: -60px; display: grid; grid-template-columns: repeat(2, 160px); gap: 14px; transform: rotate(-12deg); }
.login-art .blobs div { height: 160px; border-radius: 36px; }
.login-form { display: grid; place-items: center; padding: 30px; }
.login-form form { width: min(380px, 100%); display: grid; gap: 14px; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

.skeleton { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-xl); min-height: 160px; }
@keyframes sk { to { background-position: -200% 0; } }

.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }

.roi-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.roi-calc div { background: var(--panel-2); border-radius: 14px; padding: 12px 14px; }
.roi-calc b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.roi-calc span { font-size: 11px; color: var(--muted); }
.formula { background: var(--panel-2); border-radius: 14px; padding: 14px 16px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.formula b { color: var(--text); font-weight: 500; }
.view { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- resumo diretoria ---------- */
.report { padding: 30px 32px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.report-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.report-head h2 { margin: 4px 0 0; font-size: 24px; font-weight: 700; }
.report-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 22px; }
.report-kpis > div { background: var(--paper-2); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.report-kpis .v { font-size: 26px; font-weight: 700; }
.report-kpis .l { font-size: 12px; color: var(--ink-muted); }
.paper table.t th { color: var(--ink-muted); border-color: #e4e4ea; }
.paper table.t td { border-color: #ececf1; }
.paper table.t tr.click:hover td { background: var(--paper-2); }
.paper .bar { background: #e6e6ec; }
.report-table tr.r-proj td { background: #fafafb; border-top: 2px solid #e4e4ea; }
.report-table tr.r-proj td:first-child { box-shadow: inset 4px 0 0 var(--c); }
.report-table tr.r-task td { padding-top: 8px; padding-bottom: 8px; font-size: 12.5px; }
.report-table tr.r-task td:first-child { padding-left: 30px; }
.report-table .tree { color: var(--ink-muted); margin-right: 8px; }
.paper .late { color: #d9452b !important; font-weight: 600; }
@media (max-width: 900px) { .report-kpis { grid-template-columns: repeat(2, 1fr); } }

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  html, body { background: #fff !important; height: auto; }
  .rail, .no-print, .toast, .modal-back { display: none !important; }
  .shell, .main, .view { display: block !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; height: auto !important; }
  .report { padding: 0 !important; border-radius: 0; }
  .table-wrap { overflow: visible !important; }
  .report-table tr { break-inside: avoid; }
  .report-table thead { display: table-header-group; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.hide-btn { border: 0; background: transparent; color: var(--ink-muted); width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; flex: none; opacity: .55; }
.hide-btn:hover { background: #ececf1; color: var(--ink); opacity: 1; }
tr:hover .hide-btn { opacity: 1; }

/* ---------- distribuição ---------- */
.input.sm { height: 32px; padding: 0 8px; font-size: 12.5px; border-radius: 8px; min-width: 0; }
select.input.sm { padding-right: 24px; max-width: 190px; }
.input.sm.warn { border-color: rgba(255,138,107,.55); color: var(--coral); }
.input.sm.late { color: var(--coral); }
.num-in { width: 72px; text-align: right; }
table.plan td { padding: 8px 10px; }
.click-title { cursor: pointer; }
.click-title:hover { text-decoration: underline; }
.badge-inline { background: var(--coral); color: var(--ink); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.seg button.on .badge-inline { background: var(--coral); }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.cap { padding: 16px 18px; display: grid; gap: 10px; }
.cap-bar { display: flex; height: 10px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.cap-bar i { display: block; height: 100%; }
.cap-nums { display: grid; gap: 3px; }
.cap-nums i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* ---------- projetos futuros ---------- */
.future-list { display: grid; gap: 8px; }
.future-item { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); cursor: pointer; }
.future-item:hover { background: var(--panel-3); }
.future-item .bar-c { align-self: stretch; border-radius: 4px; background: var(--c); }
.report-section { margin: 28px 0 10px; display: flex; align-items: baseline; gap: 12px; }
.report-section h3 { margin: 0; font-size: 17px; }
.report-table tr.r-fut td:first-child { box-shadow: inset 4px 0 0 var(--c); }
