/* ============================================================
   Appligator Company — ERP redesign · design system
   Slate + professional blue · IBM Plex · dense / table-driven
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #f1f4f9;
  --ink: #0f1b2d;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e4e9f0;
  --line-2: #d4dbe6;

  --primary: #2856c4;
  --primary-strong: #1e429f;
  --primary-soft: #eaf0fb;
  --primary-tint: #f4f7fd;

  --pos: #15803d;
  --pos-soft: #e7f5ec;
  --neg: #c0392b;
  --neg-soft: #fcecea;
  --warn: #b45309;
  --warn-soft: #fbf1e3;
  --info: #0e7490;

  --radius: 7px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06), 0 1px 1px rgba(15, 27, 45, .04);
  --shadow-md: 0 6px 22px rgba(15, 27, 45, .12);
  --shadow-pop: 0 18px 50px rgba(15, 27, 45, .22);

  --sb-bg: #0f1b2d;
  --sb-bg-2: #16263d;
  --sb-text: #aebccf;
  --sb-text-strong: #ffffff;
  --sb-active: #1d3c64;

  --row-py: 7px;
  --font: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#root { height: 100%; }

.app {
  display: grid;
  grid-template-columns: var(--sb-w, 246px) 1fr;
  height: 100%;
  min-height: 0;
}

h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--sb-bg);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(0,0,0,.2);
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar .mark {
  width: 32px; height: 32px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.sidebar .brand strong { color: var(--sb-text-strong); font-size: 12.5px; font-weight: 600; letter-spacing: -.02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .brand > div { min-width: 0; }
.sidebar .brand small { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }

.nav-group { padding: 12px 10px; }
.nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,.06); }
.nav-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: #5d7a9a; padding: 0 8px 7px; font-weight: 600; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 9px; margin-bottom: 1px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--sb-text); font-size: 12.5px; font-weight: 500;
  border-radius: 6px; text-align: left; letter-spacing: -.005em;
}
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-btn.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.nav-btn .ico { width: 15px; height: 15px; flex: none; opacity: .9; }
.nav-btn .badge { margin-left: auto; font-size: 10px; font-family: var(--mono); background: rgba(255,255,255,.14); color: #fff; padding: 1px 6px; border-radius: 20px; }
.nav-btn.active .badge { background: rgba(255,255,255,.22); }
.nav-btn .unread-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, .18); }
.nav-btn.active .unread-dot { background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.24); }

.sb-foot { margin-top: auto; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11px; color: var(--faint); }
.sb-foot .who { display: flex; align-items: center; gap: 9px; }
.sb-foot .who .meta { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-foot .who .meta > div { overflow: hidden; text-overflow: ellipsis; }
.sb-foot .avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg,#3b6fd4,#7d4fd4); color:#fff; display:grid; place-items:center; font-size: 11px; font-weight:600; flex:none; }

/* sidebar variants */
.app[data-sidebar="light"] {
  --sb-bg: #ffffff; --sb-bg-2: #f4f7fc; --sb-text: #475569; --sb-text-strong: #0f1b2d; --faint: #94a3b8;
}
.app[data-sidebar="light"] .sidebar { border-right: 1px solid var(--line-2); }
.app[data-sidebar="light"] .sidebar .brand { border-bottom: 1px solid var(--line); }
.app[data-sidebar="light"] .nav-group + .nav-group,
.app[data-sidebar="light"] .sb-foot { border-color: var(--line); }
.app[data-sidebar="light"] .nav-btn:hover { background: var(--surface-3); color: var(--ink); }
.app[data-sidebar="light"] .nav-label { color: var(--faint); }
.app[data-sidebar="light"] .nav-btn .badge { background: var(--surface-3); color: var(--muted); }

.app[data-sidebar="compact"] { --sb-w: 60px; }
.app[data-sidebar="compact"] .brand strong, .app[data-sidebar="compact"] .brand small,
.app[data-sidebar="compact"] .nav-btn span.label, .app[data-sidebar="compact"] .nav-label,
.app[data-sidebar="compact"] .sb-foot .meta, .app[data-sidebar="compact"] .nav-btn .badge { display: none; }
.app[data-sidebar="compact"] .nav-btn { justify-content: center; padding: 9px; }
.app[data-sidebar="compact"] .brand { justify-content: center; padding: 14px 0; }
.app[data-sidebar="compact"] .sb-foot { display: flex; justify-content: center; }

/* ---------- Main / topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; height: 54px; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm); z-index: 5;
}
.topbar > div:first-child { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.topbar .crumb { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 600; line-height: 1.4; }
.topbar h1 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); width: 230px;
}
.search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 12.5px; width: 100%; color: var(--ink); }
.search svg { flex: none; }

.content { flex: 1; overflow: auto; padding: 18px 20px 40px; min-height: 0; }
.content.flush { padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 31px; padding: 0 13px; border-radius: 6px; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--primary); color: #fff; letter-spacing: -.005em;
}
.btn:hover { background: var(--primary-strong); }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.btn:disabled:hover { background: var(--primary); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 11.5px; gap: 4px; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn.ghost:disabled:hover { background: var(--surface); border-color: var(--line-2); }
.btn.subtle { background: transparent; color: var(--muted); border-color: transparent; }
.btn.subtle:hover { background: var(--surface-3); color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--neg); border-color: var(--line-2); }
.btn.danger:hover { background: var(--neg-soft); border-color: #efc6c1; }
.btn svg { flex: none; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- Cards / panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.panel-head .sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.panel-head .actions { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.panel-body { padding: 14px; }
.panel-body.flush { padding: 0; }

.grid { display: grid; gap: 14px; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-family: var(--mono); font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin-top: 7px; color: var(--ink); }
.kpi .delta { font-size: 11px; margin-top: 4px; display: flex; align-items: center; gap: 5px; color: var(--muted); }
.kpi .accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.kpi.is-warn .accent { background: var(--warn); }
.kpi.is-neg .accent { background: var(--neg); }
.kpi.is-pos .accent { background: var(--pos); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th {
  text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; padding: 8px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
table.tbl th.num, table.tbl td.num { text-align: right; }
table.tbl td { padding: var(--row-py) 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 12.5px; }
table.tbl tbody tr { transition: background .08s; }
table.tbl tbody tr:hover { background: var(--primary-tint); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.subtle td { color: var(--muted); }
table.tbl tfoot td { padding: 9px 12px; border-top: 2px solid var(--line-2); font-weight: 600; background: var(--surface-2); }
.t-strong { font-weight: 600; color: var(--ink); }
.t-sub { font-size: 11px; color: var(--muted); }
.cellstack { display: flex; flex-direction: column; line-height: 1.3; }

.app[data-density="comfortable"] { --row-py: 11px; }
.app[data-density="compact"] { --row-py: 5px; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 8px;
  border-radius: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line-2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paid { background: var(--pos-soft); color: var(--pos); border-color: #bfe3cc; }
.pill.open { background: var(--primary-soft); color: var(--primary-strong); border-color: #c5d6f5; }
.pill.partial { background: var(--warn-soft); color: var(--warn); border-color: #f0d9b8; }
.pill.overdue { background: var(--neg-soft); color: var(--neg); border-color: #f0c7c1; }
.pill.draft { background: var(--surface-3); color: var(--muted); border-color: var(--line-2); }
.pill.cancelled { background: var(--surface-3); color: var(--faint); border-color: var(--line-2); text-decoration: line-through; }
.pill.active { background: var(--pos-soft); color: var(--pos); border-color: #bfe3cc; }
.pill.completed { background: var(--primary-soft); color: var(--primary-strong); border-color: #c5d6f5; }
.pill.inactive { background: var(--surface-3); color: var(--muted); border-color: var(--line-2); }
.pill.sm { height: 17px; font-size: 9.5px; padding: 0 6px; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 20px; font-size: 11px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }
.chip.pos { background: var(--pos-soft); color: var(--pos); border-color: #bfe3cc; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: #f0d9b8; }

/* ---------- Bars / charts ---------- */
.minibar { height: 7px; border-radius: 3px; background: var(--surface-3); overflow: hidden; display: flex; }
.minibar > span { display: block; height: 100%; }

.pnl-chart { display: flex; align-items: flex-end; gap: 5px; height: 116px; padding: 0 2px; }
.pnl-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; position: relative; }
.pnl-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.pnl-bar { width: 40%; border-radius: 2px 2px 0 0; min-height: 1px; }
.pnl-bar.inc { background: var(--pos); }
.pnl-bar.exp { background: var(--neg); opacity: .82; }
.pnl-col .mlabel { font-size: 9.5px; color: var(--muted); font-family: var(--mono); }
.pnl-col.future { opacity: .45; }

.aging-bar { display: flex; height: 28px; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.aging-bar > span { display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; font-family: var(--mono); font-weight: 500; min-width: 0; }

/* ---------- Two-col dashboard ---------- */
.dash-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }

/* ---------- Cards grid (projects / customers) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 13px 14px; display: flex; flex-direction: column; gap: 9px; cursor: pointer; transition: border-color .1s, box-shadow .1s; }
.rec-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.rec-card .rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rec-card .rc-title { font-size: 13px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.rec-card .rc-meta { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.rc-id { min-width: 0; }
.rc-id .rc-title { line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-id .rc-meta { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-card .rc-stats { margin-top: 1px; }
.rc-stats { display: flex; gap: 16px; padding-top: 9px; border-top: 1px solid var(--line); }
.rc-stat .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; }
.rc-stat .v { font-family: var(--mono); font-size: 13px; font-weight: 500; margin-top: 1px; }

.project-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project-list-item {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(180px, .7fr) auto; gap: 18px; align-items: center;
  text-align: left; cursor: pointer; color: inherit; font: inherit; transition: background .1s;
}
.project-list-item:last-child { border-bottom: 0; }
.project-list-item:hover { background: var(--surface-2); }
.project-list-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.project-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-list-main { min-width: 0; display: grid; gap: 7px; }
.project-list-main .rc-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.project-list-main .rc-meta { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.project-list-customers { display: flex; align-items: center; gap: 6px; min-width: 0; }
.project-list-customers span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-list-progress { min-width: 0; display: grid; gap: 6px; }
.project-progress-top { display: flex; align-items: baseline; gap: 5px; }
.project-progress-pct { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.project-progress-label { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; }
.project-progress-meta { display: flex; gap: 9px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.project-list .rc-stats { border-top: 0; padding-top: 0; justify-content: flex-end; }

.customer-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.customer-list-item {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(190px, .75fr) auto; gap: 18px; align-items: center;
  text-align: left; cursor: pointer; color: inherit; font: inherit; transition: background .1s;
}
.customer-list-item:last-child { border-bottom: 0; }
.customer-list-item:hover { background: var(--surface-2); }
.customer-list-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.customer-list-main { min-width: 0; display: flex; align-items: center; gap: 10px; }
.customer-list-main .rc-id { flex: 1; }
.customer-list-main .pill { flex: none; }
.customer-list-meta { display: flex; gap: 9px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.customer-list .rc-stats { border-top: 0; padding-top: 0; justify-content: flex-end; }

.avatar-sq { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; flex: none; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.segmented { display: inline-flex; background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px; gap: 2px; }
.segmented button { border: 0; background: transparent; font: inherit; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 4px 10px; border-radius: 4px; cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.stepper button { width: 24px; height: 22px; border: 0; background: transparent; cursor: pointer; color: var(--muted); border-radius: 4px; display: grid; place-items: center; }
.stepper button:hover { background: var(--surface); color: var(--ink); }
.stepper .yr { font-family: var(--mono); font-size: 12.5px; font-weight: 600; padding: 0 8px; }

/* ---------- Drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,27,45,.4); z-index: 40; animation: fade .12s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(460px, 100vw); z-index: 41;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; animation: slidein .18s cubic-bezier(.2,.7,.3,1);
}
@keyframes slidein { from { transform: translateX(100%) } to { transform: translateX(0) } }
.drawer header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 14px; font-weight: 600; }
.drawer header .sub { font-size: 11px; color: var(--muted); }
.drawer .body { padding: 16px 18px; overflow: auto; flex: 1; }
.drawer footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 5px; margin-bottom: 13px; }
.field > label { font-size: 11px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.field .hint { font-size: 10.5px; color: var(--faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input.inp, select.inp, textarea.inp {
  width: 100%; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px;
  font: inherit; font-size: 12.5px; color: var(--ink); background: var(--surface); outline: none;
}
input.inp:focus, select.inp:focus, textarea.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.inp { min-height: 72px; resize: vertical; }
.inp.num { text-align: right; font-family: var(--mono); }
.checkrow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.checkrow input { width: 15px; height: 15px; accent-color: var(--primary); }
.todo-clusters { display: grid; gap: 9px; }
.todo-clusters.compact { gap: 8px; }
.todo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.todo-cluster { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--surface); }
.todo-cluster-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.todo-cluster-head strong { font-size: 12.5px; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.todo-category-input { flex: 1; min-width: 120px; height: 30px; padding: 5px 8px; }
.todo-items { display: grid; gap: 7px; }
.todo-item { display: grid; gap: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
.todo-line { display: grid; grid-template-columns: 15px minmax(120px, 1fr) minmax(118px, 150px) auto; align-items: center; gap: 7px; min-width: 0; }
.todo-line-full { grid-template-columns: 15px minmax(120px, 1fr) minmax(118px, 145px) minmax(130px, 170px) auto; }
.todo-line input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); }
.todo-line input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .45; }
.todo-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; color: var(--ink); }
.todo-status, .todo-milestone { height: 30px; padding: 5px 8px; }
.todo-actions { display: inline-flex; align-items: center; gap: 1px; justify-content: flex-end; }
.todo-meta-grid { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, .7fr); gap: 7px; padding-left: 22px; }
.todo-remarks-trigger {
  display: flex; align-items: center; gap: 6px; min-height: 30px; min-width: 0; width: 100%;
  border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 8px; background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left;
}
.todo-remarks-trigger:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.todo-remarks-trigger.empty { color: var(--faint); }
.todo-remarks-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-left: 22px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.todo-remarks-overlay { z-index: 42; }
.todo-remarks-drawer { z-index: 43; }
.todo-remarks-area { min-height: 260px; }

/* ---------- Misc ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kbd { font-family: var(--mono); font-size: 10px; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; color: var(--muted); }
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 4px 0 9px; }
.detail-grid { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 12.5px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; color: var(--ink); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; font-size: 12.5px; padding: 9px 16px; border-radius: 7px; box-shadow: var(--shadow-pop); animation: fade .15s; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #c3cdda; border: 3px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #a9b6c7; }
.content::-webkit-scrollbar-track { background: var(--bg); }

/* ---------- Landing ---------- */
.lp {
  --paper: #f5f6f0;
  --paper-2: #eeefe7;
  --surface: #ffffff;
  --surface-2: #fafbf7;

  --ink: #121b16;
  --ink-2: #3c4942;
  --muted: #6b7972;
  --faint: #9aa79f;
  --line: #e4e6dc;
  --line-2: #d3d7c9;

  --green: #1c7d49;
  --green-strong: #14603a;
  --green-bright: #34b24a;
  --green-soft: #e7f2ea;
  --green-tint: #f1f7f2;
  --on-accent: #ffffff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 40, 28, .06), 0 1px 1px rgba(18, 40, 28, .04);
  --shadow-md: 0 14px 40px rgba(18, 50, 32, .10);
  --shadow-lg: 0 30px 70px rgba(16, 48, 30, .16);

  --font: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 72px);
}

.lp, .lp * { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.lp {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.lp h1, .lp h2, .lp h3, .lp h4, .lp p { margin: 0; }
.lp a { color: inherit; text-decoration: none; }
.lp .mono { font-family: var(--mono); }

.lp .kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-strong);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lp .hero .kicker { white-space: normal; }
.lp .kicker::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--green-bright);
}

.lp .shell { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.lp .btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  height: 46px; padding: 0 22px; border-radius: 9px; border: 1px solid transparent;
  font-family: var(--font); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap; transition: transform .15s ease, background .15s, box-shadow .15s, border-color .15s;
  background: var(--green); color: var(--on-accent);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--green) 70%, transparent);
}
.lp .btn:hover { background: var(--green-strong); transform: translateY(-1px); }
.lp .btn:active { transform: translateY(0); }
.lp .btn .arr { transition: transform .2s ease; }
.lp .btn:hover .arr { transform: translateX(3px); }
.lp .btn.ghost {
  background: var(--surface); color: var(--ink); border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}
.lp .btn.ghost:hover { background: var(--surface-2); border-color: var(--green); color: var(--green-strong); }
.lp .btn.subtle { background: transparent; color: var(--ink-2); box-shadow: none; height: 40px; padding: 0 14px; }
.lp .btn.subtle:hover { background: var(--paper-2); transform: none; color: var(--ink); }
.lp .btn.sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.lp .btn.lg { height: 52px; padding: 0 28px; font-size: 15.5px; }

.lp-nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.lp-nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(18,40,28,.02), var(--shadow-sm);
}
.lp-nav .row {
  display: flex; align-items: center; gap: 24px;
  height: 72px;
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
}
.lp .brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.lp .brand .mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
}
.lp .brand .mark img { width: 30px; height: 30px; object-fit: contain; }
.lp .brand .tag { color: var(--faint); font-weight: 500; font-size: 10px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; padding-left: 9px; margin-left: 2px; border-left: 1px solid var(--line-2); align-self: center; }

.lp-nav nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lp-nav nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  padding: 8px 13px; border-radius: 8px; transition: background .15s, color .15s;
}
.lp-nav nav a:hover { background: var(--paper-2); color: var(--ink); }
.lp-nav .nav-actions { display: flex; align-items: center; gap: 8px; }

.lp .hero { position: relative; padding-top: clamp(54px, 8vw, 104px); padding-bottom: clamp(20px, 4vw, 40px); }
.lp .hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.lp .hero-copy { display: grid; gap: 24px; max-width: 620px; }
.lp .hero h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.02; letter-spacing: -.03em; font-weight: 700;
}
.lp .hero h1 .accent { color: var(--green); }
.lp .hero .lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); line-height: 1.6; max-width: 540px; }
.lp .hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lp .hero-trust { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 13px; }
.lp .hero-trust .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-bright); }
.lp .hero-trust span { display: inline-flex; align-items: center; gap: 8px; }

.lp .peek-wrap { position: relative; }
.lp .peek {
  position: relative;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.lp .peek-bar {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.lp .peek-bar .dots { display: flex; gap: 6px; }
.lp .peek-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); display: block; }
.lp .peek-bar .url {
  margin-left: 8px; flex: 1; height: 24px; max-width: 280px;
  display: flex; align-items: center; gap: 7px; padding: 0 11px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.lp .peek-body { padding: 16px; display: grid; gap: 12px; background: var(--surface); }
.lp .peek-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp .peek-row > div:first-child { min-width: 0; }
.lp .peek-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp .peek-sub { font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.lp .peek-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; flex: none;
  background: var(--green-soft); color: var(--green-strong);
}
.lp .peek-pill .pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-bright); }
.lp .peek-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lp .peek-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.lp .peek-col h5 { margin: 0; font-size: 11px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lp .peek-col h5 b { font-family: var(--mono); font-weight: 500; color: var(--faint); }
.lp .peek-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; font-size: 12px; color: var(--ink-2); box-shadow: var(--shadow-sm);
  display: grid; gap: 7px;
}
.lp .peek-card .cl { display: flex; align-items: center; gap: 7px; white-space: nowrap; min-width: 0; }
.lp .peek-card .cl span { min-width: 0; }
.lp .peek-card .cl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); flex: none; }
.lp .peek-card.done .cl { color: var(--muted); }
.lp .peek-card .bar { height: 4px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.lp .peek-card .bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.lp .peek-meter { display: flex; align-items: center; gap: 10px; padding-top: 2px; }
.lp .peek-meter .track { flex: 1; height: 6px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.lp .peek-meter .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: 4px; }
.lp .peek-meter b { font-family: var(--mono); font-size: 12px; color: var(--green-strong); }

.lp .peek-float {
  position: absolute; left: -14px; bottom: -24px; z-index: 3;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 15px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 11px; white-space: nowrap;
}
.lp .peek-float .pf-ic { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #9fd3b0; }
.lp .peek-float .pf-txt { display: grid; gap: 1px; }
.lp .peek-float .pf-k { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #9fd3b0; }
.lp .peek-float .pf-v { font-size: 13px; font-weight: 600; }

.lp .pipeline-section { padding-block: clamp(48px, 7vw, 92px); }
.lp .pipeline-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 52px); }
.lp .pipeline-head h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.06; letter-spacing: -.025em; max-width: 600px; margin-top: 14px; }
.lp .pipeline-head .pl-note { color: var(--ink-2); font-size: 15px; max-width: 320px; }

.lp .pipeline {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.lp .pipeline::before {
  content: ""; position: absolute; left: 0; right: 0;
  top: 23px; height: 2px;
  background: var(--line-2);
  border-radius: 2px;
}
.lp .pipeline .pl-progress {
  content: ""; position: absolute; left: 0;
  top: 23px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--green-strong), var(--green-bright));
  border-radius: 2px; z-index: 1;
  transition: width 1.4s cubic-bezier(.4, 0, .1, 1);
}
.lp .pipeline.lit .pl-progress { width: calc(100% - 75%); }
.lp .pipeline.lit .pl-progress { width: 100%; }

.lp .pl-node { position: relative; padding-top: 0; display: grid; gap: 12px; }
.lp .pl-dot {
  position: relative; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line-2);
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: border-color .4s, color .4s, background .4s, box-shadow .4s;
}
.lp .pipeline.lit .pl-node:nth-child(2) .pl-dot { transition-delay: .15s; }
.lp .pipeline.lit .pl-node:nth-child(3) .pl-dot { transition-delay: .35s; }
.lp .pipeline.lit .pl-node:nth-child(4) .pl-dot { transition-delay: .55s; }
.lp .pipeline.lit .pl-node:nth-child(5) .pl-dot { transition-delay: .75s; }
.lp .pipeline.lit .pl-dot {
  border-color: var(--green); color: var(--green-strong); background: var(--green-tint);
  box-shadow: 0 0 0 6px var(--green-soft);
}
.lp .pl-body { display: grid; gap: 6px; padding-right: 12px; }
.lp .pl-body h3 { font-size: 18px; letter-spacing: -.01em; }
.lp .pl-body p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.lp .pl-week { font-family: var(--mono); font-size: 11px; color: var(--green-strong); font-weight: 500; letter-spacing: .04em; }

.lp .section { padding-block: clamp(54px, 7vw, 96px); }
.lp .section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.lp .section-head { max-width: 640px; display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 48px); }
.lp .section-head h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.04; letter-spacing: -.025em; }
.lp .section-head p { font-size: 16.5px; color: var(--ink-2); line-height: 1.6; }

.lp .services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp .svc {
  position: relative; display: grid; gap: 14px; align-content: start;
  padding: 26px 24px 28px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s, border-color .2s;
  overflow: hidden;
}
.lp .section.alt .svc { background: var(--paper); }
.lp .svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.lp .svc::after {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  transition: width .3s ease;
}
.lp .svc:hover::after { width: 100%; }
.lp .svc .ic {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-strong);
}
.lp .svc h3 { font-size: 19px; letter-spacing: -.01em; }
.lp .svc p { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.lp .svc .svc-num { position: absolute; top: 18px; right: 20px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

.lp .lean { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: clamp(36px, 5vw, 76px); align-items: center; }
.lp .lean-points { display: grid; gap: 12px; }
.lp-point {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}
.lp-point:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.lp-point .n {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 14px;
  background: var(--ink); color: #fff;
}
.lp-point h4 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 3px; }
.lp-point p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.lp .lean-copy { display: grid; gap: 20px; }
.lp .lean-copy h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.06; letter-spacing: -.025em; }
.lp .lean-copy p { font-size: 16.5px; color: var(--ink-2); line-height: 1.62; }
.lp .own-chip {
  display: inline-flex; align-items: center; gap: 10px; align-self: start;
  padding: 10px 16px; border-radius: 999px; background: var(--green-soft);
  color: var(--green-strong); font-size: 14px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
}

.lp .trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.lp .trust .ts { padding: 28px 26px; border-right: 1px solid var(--line); display: grid; gap: 6px; }
.lp .trust .ts:last-child { border-right: 0; }
.lp .trust .ts .v { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -.03em; color: var(--ink); font-family: var(--mono); }
.lp .trust .ts .v b { color: var(--green); font-weight: 700; }
.lp .trust .ts .k { font-size: 13px; color: var(--muted); line-height: 1.4; }

.lp .cta-wrap { padding-block: clamp(54px, 7vw, 96px); }
.lp .cta {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: clamp(40px, 5vw, 68px);
  background:
    radial-gradient(120% 140% at 88% 0%, color-mix(in srgb, var(--green-bright) 24%, transparent), transparent 55%),
    linear-gradient(140deg, var(--ink) 0%, var(--green-strong) 130%);
  color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 36px; align-items: center;
  box-shadow: var(--shadow-lg);
}
.lp .cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(120% 120% at 80% 20%, #000, transparent 70%);
}
.lp .cta-copy { position: relative; z-index: 1; display: grid; gap: 14px; }
.lp .cta-copy .kicker { color: #a7e0bb; }
.lp .cta-copy .kicker::before { background: var(--green-bright); }
.lp .cta-copy h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.04; letter-spacing: -.025em; }
.lp .cta-copy p { font-size: 16.5px; color: rgba(255,255,255,.78); max-width: 480px; line-height: 1.6; }
.lp .cta-actions { position: relative; z-index: 1; display: grid; gap: 12px; justify-items: stretch; min-width: 230px; }
.lp .cta .btn { background: #fff; color: var(--ink); box-shadow: none; }
.lp .cta .btn:hover { background: var(--green-bright); color: #fff; }
.lp .cta .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.32); }
.lp .cta .btn.ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); color: #fff; }

.lp .login-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, var(--ink) 52%, transparent);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
  animation: lo-fade .18s ease;
}
@keyframes lo-fade { from { opacity: 0; } to { opacity: 1; } }
.lp .login-card {
  width: min(420px, 100%);
  background: var(--surface); border-radius: 16px; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 28px;
  display: grid; gap: 18px;
  animation: lo-pop .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes lo-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.lp .login-card .lc-head { display: flex; align-items: center; gap: 12px; }
.lp .login-card .lc-head .mark { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.lp .login-card .lc-head .mark img { width: 32px; height: 32px; object-fit: contain; }
.lp .login-card .lc-head strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.lp .login-card .lc-head small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lp .login-card .lc-close { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--paper-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.lp .login-card .lc-close:hover { background: var(--line); color: var(--ink); }
.lp .field { display: grid; gap: 7px; }
.lp .field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lp .field input {
  height: 44px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface-2); font-family: var(--font); font-size: 14.5px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lp .field input:focus { border-color: var(--green); background: var(--surface); box-shadow: 0 0 0 4px var(--green-soft); }
.lp .login-card .lc-foot { font-size: 12.5px; color: var(--muted); text-align: center; }

.lp-foot { background: var(--ink); color: rgba(255,255,255,.72); padding-block: clamp(40px, 5vw, 64px); }
.lp-foot .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.lp-foot .brand { color: #fff; }
.lp-foot .brand .mark { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.lp-foot .f-blurb { max-width: 300px; font-size: 13.5px; line-height: 1.6; margin-top: 14px; color: rgba(255,255,255,.6); }
.lp-foot .f-cols { display: flex; gap: clamp(36px, 6vw, 80px); flex-wrap: wrap; }
.lp-foot .f-col { display: grid; gap: 10px; align-content: start; }
.lp-foot .f-col h5 { margin: 0 0 2px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); font-weight: 500; }
.lp-foot .f-col a { font-size: 14px; color: rgba(255,255,255,.74); white-space: nowrap; }
.lp-foot .f-col a:hover { color: #fff; }
.lp-foot .f-base { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,.5); }
.lp-foot .f-base .mono { letter-spacing: .04em; }

.lp .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.lp .reveal.in { opacity: 1; transform: none; }
.lp .reveal.d1 { transition-delay: .07s; }
.lp .reveal.d2 { transition-delay: .14s; }
.lp .reveal.d3 { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) {
  .lp .reveal { opacity: 1; transform: none; transition: none; }
  .lp .pipeline .pl-progress { transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 960px) {
  .lp .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .lp .hero-copy { max-width: 100%; }
  .lp .peek-float { left: 12px; }
  .lp .pipeline { grid-template-columns: repeat(2, 1fr); gap: 28px 18px; }
  .lp .pipeline::before, .lp .pipeline .pl-progress { display: none; }
  .lp .services { grid-template-columns: 1fr; }
  .lp .lean { grid-template-columns: 1fr; gap: 36px; }
  .lp .trust { grid-template-columns: repeat(2, 1fr); }
  .lp .trust .ts:nth-child(2) { border-right: 0; }
  .lp .trust .ts:nth-child(1), .lp .trust .ts:nth-child(2) { border-bottom: 1px solid var(--line); }
  .lp .cta { grid-template-columns: 1fr; gap: 28px; }
  .lp .cta-actions { min-width: 0; }
}
@media (max-width: 620px) {
  .lp-nav nav { display: none; }
  .lp-nav .row { height: 64px; }
  .lp .brand .tag { display: none; }
  .lp .hero h1 { font-size: 38px; }
  .lp .pipeline { grid-template-columns: 1fr; }
  .lp .trust { grid-template-columns: 1fr; }
  .lp .trust .ts { border-right: 0; border-bottom: 1px solid var(--line); }
  .lp .trust .ts:last-child { border-bottom: 0; }
  .lp .hero-actions .btn { flex: 1; }
  .lp .peek-board { grid-template-columns: 1fr; }
  .lp .peek-col:nth-child(2), .lp .peek-col:nth-child(3) { display: none; }
}

/* ---------- Boot / loading ---------- */
.boot { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); font-size: 13px; }
.boot-mark { width: 46px; height: 46px; border-radius: 11px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; animation: bootpulse 1.1s ease-in-out infinite; }
@keyframes bootpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(.94); } }

@media (max-width: 800px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    min-height: auto;
    flex-direction: row;
    align-items: stretch;
    border-right: 0;
    border-bottom: 1px solid rgba(0,0,0,.2);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar .brand {
    width: 190px;
    flex: none;
    padding: 10px 12px;
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,.07);
  }

  .sidebar .mark {
    width: 31px;
    height: 31px;
  }

  .nav-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 8px 6px;
  }

  .nav-group + .nav-group {
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,.06);
  }

  .nav-label,
  .sb-foot {
    display: none;
  }

  .nav-btn {
    width: auto;
    margin-bottom: 0;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .main {
    min-height: 0;
  }

  .topbar {
    height: auto;
    min-height: 54px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .topbar .spacer {
    flex: 1 1 auto;
  }

  .search {
    order: 5;
    flex: 1 0 100%;
    width: 100%;
  }

  .content {
    padding: 12px 12px 32px;
  }

  .kpis {
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px;
  }

  .dash-cols,
  .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-list-item,
  .customer-list-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .project-list .rc-stats,
  .customer-list .rc-stats {
    justify-content: flex-start;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-head .sub {
    white-space: normal;
  }

  .tbl-wrap {
    width: 100%;
    overflow-x: auto;
  }

  table.tbl {
    min-width: 660px;
  }

  .field-row,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .todo-line {
    grid-template-columns: 15px minmax(0, 1fr) auto;
  }

  .todo-line .todo-status {
    grid-column: 2 / 4;
  }

  .todo-line .todo-milestone {
    grid-column: 2 / 4;
  }

  .todo-line .icon-btn {
    grid-column: 3;
    grid-row: 1;
  }

  .todo-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
