/* Olipop CRM - design system
   Brand: deep green #16433d, fresh green #44BE70, sparing yellow #FBCA10 */
:root {
  --primary: #16433d;
  --primary-600: #1d554d;
  --primary-700: #102f2b;
  --primary-50: #eaf2f0;
  --accent: #44BE70;
  --accent-600: #36a35e;
  --accent-50: #e8f7ee;
  --accent-100: #d0efdc;
  --yellow: #FBCA10;
  --yellow-50: #fff8dc;
  --danger: #c23934;
  --danger-50: #fdecea;
  --warning: #b7791f;
  --info: #335eea;
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --surface-3: #eef2f0;
  --border: #e5e5e5;
  --border-strong: #d3d9d6;
  --text: #16241f;
  --text-2: #405768;
  --muted: #535353;
  --subtle: #9a9a9a;
  --link: #16433d;
  --shadow-sm: 0 1px 2px rgba(22, 67, 61, .08);
  --shadow: 0 2px 6px rgba(22, 67, 61, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 32px rgba(16, 47, 43, .18);
  --radius: 10px;
  --radius-sm: 6px;
  --pill: 25px;
  --header-h: 56px;
  --nav-h: 44px;
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --primary: #5fd18b;
  --primary-600: #79dca0;
  --primary-700: #4bc178;
  --primary-50: #17332c;
  --accent: #44BE70;
  --accent-600: #5fd18b;
  --accent-50: #163126;
  --accent-100: #1d4231;
  --yellow-50: #3a3210;
  --danger-50: #3b1c1b;
  --bg: #0d1916;
  --surface: #13221e;
  --surface-2: #172a25;
  --surface-3: #1d332d;
  --border: #25403a;
  --border-strong: #335048;
  --text: #e6efec;
  --text-2: #b4c6c0;
  --muted: #9fb2ad;
  --subtle: #6f8781;
  --link: #79dca0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .subtle { color: var(--subtle); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; } .spacer { flex: 1; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.pos { color: var(--accent-600); } .neg { color: var(--danger); }
::selection { background: var(--accent-100); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--pill); border: 2px solid var(--border-strong); background: var(--surface); color: var(--primary); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; text-decoration: none !important; }
.btn:hover { background: var(--surface-3); border-color: var(--primary); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-100); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #0d1916; }
.btn.primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-600); border-color: var(--accent-600); }
.btn.danger { color: var(--danger); border-color: var(--border-strong); }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.sm.icon-only { width: 26px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -2px; }
.btn-group .btn:first-child { border-radius: var(--pill) 0 0 var(--pill); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--pill) var(--pill) 0; }
.btn-group .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); z-index: 1; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-3); color: var(--primary); }
.icon-btn .badge { position: absolute; top: 2px; right: 0; }
.link-btn { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.input, select.input, textarea.input { width: 100%; height: 34px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 72px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-100); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-50); }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input.sm { height: 28px; padding: 3px 8px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field-label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.field .req { color: var(--danger); font-weight: 700; }
.field .err { color: var(--danger); font-size: 12px; }
.field .help { color: var(--subtle); cursor: help; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 20px; cursor: pointer; transition: .15s; }
.toggle span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::before { transform: translateX(16px); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; height: 34px; margin-left: -1px; border-width: 1px; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--subtle); }
.search-input .input { padding-left: 32px; }

/* lookup */
.lookup { position: relative; }
.lookup .pill-value { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.lookup .pill-value .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lookup .obj-switch { flex: none; width: auto; height: 34px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: 0; padding: 0 6px; font-size: 12px; }
.lookup .with-switch { display: flex; }
.lookup .with-switch .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.dropdown-panel { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; padding: 4px; }
.option { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.option:hover, .option.active { background: var(--accent-50); }
.option .sub { font-size: 12px; color: var(--muted); }
.option-empty { padding: 10px; color: var(--muted); font-size: 13px; }

/* ---------- Header & nav ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.header { height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 16px; position: sticky; top: 0; z-index: 40; }
.header .logo { height: 30px; display: flex; align-items: center; }
.header .logo img { height: 28px; display: block; }
:root[data-theme="dark"] .header .logo img { filter: brightness(0) invert(1); opacity: .92; }
.header .global-search { flex: 1; max-width: 640px; margin: 0 auto; position: relative; }
.header .global-search .input { height: 36px; border-radius: var(--pill); background: var(--surface-2); padding-left: 36px; }
.header .global-search .icon { left: 13px; }
.header .actions { display: flex; align-items: center; gap: 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.nav { height: var(--nav-h); background: var(--primary); color: #fff; display: flex; align-items: stretch; padding: 0 8px 0 4px; position: sticky; top: var(--header-h); z-index: 39; box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .nav { background: #102a24; }
.nav .app-launcher { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 8px; color: #fff; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 15px; white-space: nowrap; }
.nav .app-launcher .grid { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.nav .app-launcher:hover .grid { background: rgba(255,255,255,.22); }
.nav .tabs { display: flex; align-items: stretch; overflow: hidden; flex: 1; }
.nav .tab { display: flex; align-items: center; gap: 6px; padding: 0 14px; color: rgba(255,255,255,.86); font-weight: 600; font-size: 13.5px; white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent; text-decoration: none !important; cursor: pointer; background: none; border-left: 0; border-right: 0; }
.nav .tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav .tab.active { color: #fff; border-bottom-color: var(--accent); background: rgba(255,255,255,.1); }
.nav .tab.more { position: relative; }

/* ---------- Menus / popovers ---------- */
.menu { position: fixed; z-index: 100; min-width: 200px; max-width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; color: var(--text); max-height: 70vh; overflow-y: auto; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu .item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; color: var(--text); text-decoration: none !important; }
.menu .item:hover { background: var(--accent-50); }
.menu .item.danger { color: var(--danger); }
.menu .item.checked::after { content: '✓'; margin-left: auto; color: var(--accent-600); font-weight: 700; }
.menu .item .icon { color: var(--muted); }
.menu .sep { height: 1px; background: var(--border); margin: 5px 0; }
.menu .heading { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); font-weight: 700; padding: 8px 10px 4px; }
.popover { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 380px; max-height: 76vh; display: flex; flex-direction: column; animation: pop .12s ease-out; }
.popover .pop-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; font-weight: 700; }
.popover .pop-body { overflow-y: auto; }

/* ---------- Layout ---------- */
.main { flex: 1; padding: 16px; max-width: 1680px; width: 100%; margin: 0 auto; }
.main.full { max-width: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 12px; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .grid-12 > .card + .card, .col > .card + .card, .setup-layout > .card + div, .list-layout > .card + .card, .report-builder > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); min-height: 52px; }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--border); text-align: center; }
.page-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 12px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 200px; }
.page-head .eyebrow { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.page-head h1 { display: flex; align-items: center; gap: 6px; }
.obj-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.obj-icon svg.icon { width: 20px; height: 20px; }
.obj-icon.sm { width: 24px; height: 24px; border-radius: 6px; }
.obj-icon.sm svg.icon { width: 14px; height: 14px; }
.obj-icon.xs { width: 20px; height: 20px; border-radius: 5px; }
.obj-icon.xs svg.icon { width: 12px; height: 12px; }
.obj-icon.lg { width: 48px; height: 48px; border-radius: 10px; }
.obj-icon.lg svg.icon { width: 26px; height: 26px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 12px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } .span-3, .span-4 { grid-column: span 6; } .span-6, .span-8 { grid-column: span 12; } }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } .span-3, .span-4 { grid-column: span 12; } .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } .header .global-search { display: none; } .main { padding: 10px; } }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 700; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; z-index: 1; user-select: none; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--primary); }
.table th .sort { color: var(--accent-600); margin-left: 2px; }
.table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.selected td { background: var(--accent-50) !important; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.wrap { white-space: normal; }
.table td.check, .table th.check { width: 34px; padding-right: 0; }
.table td.actions { width: 40px; padding: 0 4px; text-align: center; overflow: visible; }
.table td.rownum { width: 36px; color: var(--subtle); font-size: 12px; text-align: right; }
.table td.editable { cursor: cell; }
.table td.editable:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.table td.editing { padding: 2px 4px; overflow: visible; }
.table td.dirty { background: var(--yellow-50) !important; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border-strong); }
.table.compact td { padding: 5px 8px; }
.table .group-row td { background: var(--surface-3); font-weight: 700; cursor: pointer; }
.table .group-row.l1 td { background: var(--surface-2); }
.table .subtotal td { font-weight: 700; color: var(--muted); background: var(--surface-2); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 8px; stroke-width: 1.5; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------- Badges & pills ---------- */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 20px; }
.pill.green { background: var(--accent-50); color: var(--accent-600); }
.pill.dark { background: var(--primary-50); color: var(--primary); }
.pill.yellow { background: var(--yellow-50); color: #8a6a00; }
:root[data-theme="dark"] .pill.yellow { color: var(--yellow); }
.pill.red { background: var(--danger-50); color: var(--danger); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: var(--pill); background: var(--primary-50); color: var(--primary); font-size: 12.5px; font-weight: 600; }
.chip button { border: 0; background: none; cursor: pointer; color: inherit; display: inline-flex; padding: 1px; border-radius: 50%; }
.chip button:hover { background: rgba(0,0,0,.08); }
.chip.drag { cursor: grab; }
.star-on { color: var(--yellow); fill: var(--yellow); }

/* ---------- Record page ---------- */
.highlights { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 12px; overflow: hidden; }
.highlights .top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.highlights .top .titles { flex: 1; min-width: 220px; }
.highlights .top .eyebrow { font-size: 12px; color: var(--muted); font-weight: 600; }
.highlights .top h1 { font-size: 21px; line-height: 1.25; word-break: break-word; }
.highlights .fields { display: flex; gap: 32px; padding: 10px 16px 14px 78px; flex-wrap: wrap; border-top: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.highlights .fields .hf .lbl { font-size: 12px; color: var(--muted); }
.highlights .fields .hf .val { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--yellow-50); border-top: 1px solid var(--border); font-size: 13px; }
.path { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.path .steps { display: flex; flex: 1; min-width: 0; }
.path .step { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 12.5px; cursor: pointer; position: relative; margin-right: 4px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); padding: 0 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .12s; }
.path .step:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 16px 0 0 16px; }
.path .step:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%); border-radius: 0 16px 16px 0; margin-right: 0; }
.path .step:hover { background: var(--border-strong); }
.path .step.done { background: var(--accent-100); color: var(--primary); }
.path .step.done:hover { background: var(--accent); color: #fff; }
.path .step.current { background: var(--primary); color: #fff; }
.path .step.selected { background: var(--accent); color: #fff; }
.path .step.lost { background: var(--danger); color: #fff; }
.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 12px; }
.tabs-bar .t { padding: 12px 10px 10px; font-weight: 600; color: var(--muted); border: 0; background: none; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.tabs-bar .t:hover { color: var(--primary); }
.tabs-bar .t.active { color: var(--primary); border-bottom-color: var(--accent); }
.section { margin-bottom: 8px; }
.section-head { display: flex; align-items: center; gap: 6px; padding: 8px 6px; margin: 0 -6px 4px; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--surface-2); border-radius: var(--radius-sm); user-select: none; }
.section-head .icon { transition: transform .15s; color: var(--muted); }
.section.collapsed .section-head .icon { transform: rotate(-90deg); }
.section.collapsed .section-body { display: none; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.detail-grid.one { grid-template-columns: 1fr; }
.dfield { padding: 6px 0 6px; border-bottom: 1px solid var(--border); min-height: 52px; position: relative; min-width: 0; }
.dfield .lbl { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.dfield .val { padding-right: 28px; word-break: break-word; min-height: 20px; white-space: pre-wrap; }
.dfield .pencil { position: absolute; right: 0; bottom: 8px; opacity: 0; color: var(--subtle); border: 0; background: none; cursor: pointer; padding: 2px; }
.dfield:hover .pencil { opacity: 1; }
.dfield:hover { background: linear-gradient(90deg, transparent, var(--surface-2)); }
.dfield.ro .pencil { display: none; }
.dfield.ro .lock { position: absolute; right: 4px; bottom: 10px; color: var(--border-strong); }
.edit-footer { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 10px; display: flex; justify-content: center; gap: 8px; box-shadow: 0 -4px 12px rgba(0,0,0,.05); z-index: 5; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } .highlights .fields { padding-left: 16px; } }
.related-card .card-head { padding: 10px 14px; min-height: 46px; }
.related-card .count { color: var(--muted); font-weight: 600; }
.related-card .table td { max-width: 220px; }
.related-mini { display: flex; flex-direction: column; }
.related-mini .ri { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.related-mini .ri:last-child { border-bottom: 0; }
.related-mini .ri .kv { display: grid; grid-template-columns: 110px 1fr; gap: 2px 8px; font-size: 12.5px; margin-top: 4px; }
.related-mini .ri .kv .k { color: var(--muted); }

/* ---------- Activity timeline ---------- */
.composer-tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex-wrap: wrap; }
.composer-tabs .btn { flex: 1; }
.timeline { padding: 4px 14px 14px; }
.timeline h4 { margin: 14px 0 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; }
.tl-item { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 13px; top: 34px; bottom: -6px; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-item .tl-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; z-index: 1; }
.tl-item .tl-icon svg.icon { width: 14px; height: 14px; }
.tl-item .tl-body { flex: 1; min-width: 0; }
.tl-item .tl-title { display: flex; gap: 8px; align-items: center; }
.tl-item .tl-title a { font-weight: 600; }
.tl-item .tl-meta { font-size: 12px; color: var(--muted); }
.tl-item .tl-desc { font-size: 13px; color: var(--text-2); margin-top: 4px; white-space: pre-wrap; background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 8px; }
.tl-item.overdue .tl-meta .due { color: var(--danger); font-weight: 700; }
.tl-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.done-text { text-decoration: line-through; color: var(--muted) !important; }

/* ---------- Feed ---------- */
.feed-composer { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.feed-composer textarea { min-height: 44px; }
.feed-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .fi-body { flex: 1; min-width: 0; }
.feed-item .fi-head { font-size: 13px; }
.feed-item .fi-head b { font-weight: 700; }
.feed-item .fi-time { font-size: 12px; color: var(--muted); }
.feed-item .fi-text { margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.feed-item .fi-text .mention { color: var(--accent-600); font-weight: 600; background: var(--accent-50); border-radius: 4px; padding: 0 3px; }
.feed-item .fi-changes { margin-top: 6px; font-size: 13px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 10px; }
.feed-item .fi-actions { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; }
.feed-item .fi-actions button { border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 0; font-weight: 600; }
.feed-item .fi-actions button:hover, .feed-item .fi-actions button.on { color: var(--accent-600); }
.feed-item .comments { margin-top: 8px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px 10px; }
.feed-item .comment { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.feed-item .comment:last-of-type { border-bottom: 0; }
.mention-menu { position: absolute; z-index: 70; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding: 12px; align-items: flex-start; min-height: 400px; }
.kanban .kcol { flex: 0 0 272px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 260px); }
.kanban .kcol.drop { outline: 2px dashed var(--accent); background: var(--accent-50); }
.kanban .khead { padding: 10px 12px; border-bottom: 1px solid var(--border); border-top: 4px solid var(--primary); border-radius: var(--radius) var(--radius) 0 0; }
.kanban .khead .name { font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.kanban .khead .sum { font-size: 12px; color: var(--muted); }
.kanban .kbody { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban .kcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 10px; box-shadow: var(--shadow-sm); cursor: grab; font-size: 13px; }
.kanban .kcard:hover { border-color: var(--accent); }
.kanban .kcard.dragging { opacity: .4; }
.kanban .kcard .t { font-weight: 700; margin-bottom: 4px; display: block; }
.kanban .kcard .kv { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- List view ---------- */
.list-layout { display: flex; gap: 12px; align-items: flex-start; }
.list-layout > .card { flex: 1; min-width: 0; }
.filter-panel { width: 330px; flex: none; }
.filter-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; background: var(--surface-2); position: relative; cursor: pointer; }
.filter-row:hover { border-color: var(--accent); }
.filter-row .n { font-size: 11px; color: var(--subtle); font-weight: 700; }
.filter-row .x { position: absolute; top: 4px; right: 4px; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.toolbar .meta { font-size: 12px; color: var(--muted); }
.view-picker { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-size: 21px; font-weight: 700; color: var(--text); padding: 0; letter-spacing: -.01em; }
.view-picker:hover { color: var(--primary); }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--accent-50); border-bottom: 1px solid var(--border); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(13, 30, 27, .45); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; display: flex; flex-direction: column; animation: rise .16s ease-out; max-height: calc(100vh - 96px); }
.modal.lg { max-width: 920px; } .modal.xl { max-width: 1180px; } .modal.sm { max-width: 440px; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-head h2 { flex: 1; text-align: center; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.modal-error { background: var(--danger-50); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; font-size: 13px; display: flex; gap: 8px; }
.form-section-title { font-weight: 700; font-size: 13px; background: var(--surface-2); padding: 6px 10px; border-radius: var(--radius-sm); margin: 16px 0 10px; }
.form-section-title:first-child { margin-top: 0; }

/* ---------- Toast ---------- */
.toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 320px; max-width: 640px; padding: 12px 16px; border-radius: var(--radius); background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; animation: rise .18s ease-out; }
.toast.success { background: #2c8a52; }
.toast.error { background: var(--danger); }
.toast.warn { background: #8a6a00; }
.toast a { color: #fff; text-decoration: underline; }
.toast .x { margin-left: auto; color: #fff; }

/* ---------- Home ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi .lbl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .val { font-size: 26px; font-weight: 800; color: var(--primary); letter-spacing: -.02em; margin-top: 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi::after { content: ''; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-50); }
.kpi.hero { background: linear-gradient(135deg, #16433d 0%, #1f5a52 60%, #2a7a5b 100%); color: #fff; border: 0; }
.kpi.hero .lbl, .kpi.hero .sub { color: rgba(255,255,255,.8); }
.kpi.hero .val { color: #fff; }
.kpi.hero::after { background: rgba(68, 190, 112, .25); }
.progress { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s; }
.kpi.hero .progress { background: rgba(255,255,255,.18); margin-top: 8px; }
.greeting { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.greeting h1 { font-size: 24px; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.list-item .li-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Charts ---------- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .axis line, .chart .grid line { stroke: var(--border); }
.chart .bar:hover, .chart .slice:hover { opacity: .82; cursor: pointer; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; justify-content: center; }
.chart .legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-tip { position: fixed; z-index: 400; pointer-events: none; background: var(--primary-700); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; }
:root[data-theme="dark"] .chart-tip { background: #000; }
.metric { text-align: center; padding: 18px 0 10px; }
.metric .big { font-size: 40px; font-weight: 800; color: var(--primary); letter-spacing: -.03em; line-height: 1.1; }
.metric .cap { color: var(--muted); font-size: 12px; margin-top: 4px; }
.dash-comp .card-head h3 { font-size: 14px; }
.dash-comp .card-body { min-height: 120px; }

/* ---------- Reports ---------- */
.report-builder { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 960px) { .report-builder { grid-template-columns: 1fr; } }
.outline .block { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.outline .block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.outline .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.folder-list .item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; color: var(--text-2); }
.folder-list .item:hover { background: var(--surface-3); }
.folder-list .item.active { background: var(--accent-50); color: var(--primary); }

/* ---------- Calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.cal-grid .dow { padding: 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.cal-grid .day { min-height: 112px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; cursor: pointer; overflow: hidden; }
.cal-grid .day:hover { background: var(--surface-2); }
.cal-grid .day.other { background: var(--surface-2); color: var(--subtle); }
.cal-grid .day .num { font-size: 12px; font-weight: 700; padding: 2px 6px; display: inline-block; border-radius: 10px; }
.cal-grid .day.today .num { background: var(--accent); color: #fff; }
.cal-ev { display: block; font-size: 11.5px; padding: 2px 6px; border-radius: 4px; margin-top: 2px; background: var(--accent-50); color: var(--primary); border-left: 3px solid var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-decoration: none !important; }
.cal-ev:hover { background: var(--accent-100); }
.cal-ev.task { border-left-color: var(--yellow); background: var(--yellow-50); }
.week-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); position: relative; }
.week-grid .hcell { height: 48px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); position: relative; }
.week-grid .hlabel { font-size: 11px; color: var(--subtle); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.week-grid .whead { padding: 8px; text-align: center; font-weight: 700; font-size: 12px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.week-grid .whead.today { color: var(--accent-600); }
.week-ev { position: absolute; left: 2px; right: 2px; background: var(--primary); color: #fff; border-radius: 4px; font-size: 11px; padding: 2px 5px; overflow: hidden; z-index: 1; text-decoration: none !important; border-left: 3px solid var(--accent); }

/* ---------- Setup ---------- */
.setup-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .setup-layout { grid-template-columns: 1fr; } }
.setup-nav { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 16px); max-height: calc(100vh - 140px); overflow-y: auto; }
.setup-nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); font-weight: 700; padding: 12px 14px 4px; }
.setup-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 14px; color: var(--text-2); font-weight: 500; text-decoration: none !important; border-left: 3px solid transparent; }
.setup-nav a:hover { background: var(--surface-2); color: var(--primary); }
.setup-nav a.active { background: var(--accent-50); color: var(--primary); border-left-color: var(--accent); font-weight: 700; }
.perm-matrix th, .perm-matrix td { text-align: center; }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; }
.role-tree ul { list-style: none; margin: 0; padding-left: 22px; border-left: 1px dashed var(--border-strong); }
.role-tree > ul { border-left: 0; padding-left: 0; }
.role-tree li { margin: 4px 0; }
.role-tree .node { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.layout-editor .sec { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; background: var(--surface-2); }
.layout-editor .slot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-height: 40px; }
.layout-editor .fchip { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: grab; font-size: 13px; }
.layout-editor .fchip:hover { border-color: var(--accent); }
.layout-editor .fchip.drag-over { border-color: var(--accent); box-shadow: 0 -3px 0 var(--accent); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
pre.code-block { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 12px; border-radius: var(--radius-sm); overflow: auto; white-space: pre-wrap; }
.cond-row { display: grid; grid-template-columns: 24px 1.3fr 1fr 1.3fr 32px; gap: 6px; align-items: center; margin-bottom: 6px; }
.action-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 8px; background: var(--surface-2); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(circle at 20% 20%, #2a7a5b 0, transparent 40%), radial-gradient(circle at 80% 70%, #44BE70 0, transparent 35%), linear-gradient(140deg, #102f2b, #16433d 55%, #1d554d); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; max-width: 520px; }
.login-art p { color: rgba(255,255,255,.82); font-size: 16px; max-width: 460px; }
.login-art .bubbles span { position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.login-art .logo img { height: 40px; filter: brightness(0) invert(1); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--surface); }
.login-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-form .btn { height: 42px; font-size: 15px; }
.demo-users { font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; }
.demo-users button { border: 0; background: var(--surface-3); border-radius: var(--pill); padding: 3px 10px; margin: 3px 3px 0 0; cursor: pointer; font-size: 12px; }
.demo-users button:hover { background: var(--accent-50); color: var(--primary); }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- Misc ---------- */
.spinner { width: 22px; height: 22px; border: 3px solid var(--accent-100); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 24px auto; }
.spinner.inline { width: 14px; height: 14px; border-width: 2px; margin: 0; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notif { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-50); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.search-results .grp { margin-bottom: 12px; }
.tag-new { background: var(--yellow); color: #3a2f00; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 8px; letter-spacing: .04em; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--surface); }
.stat-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.stat-row:last-child { border-bottom: 0; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); cursor: pointer; transition: .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-50); color: var(--primary); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.file-ext { width: 32px; height: 38px; border-radius: 4px; background: var(--primary-50); color: var(--primary); font-size: 10px; font-weight: 800; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; flex: none; text-transform: uppercase; }
.steps-indicator { display: flex; gap: 8px; margin-bottom: 16px; }
.steps-indicator .s { flex: 1; padding: 8px; border-radius: var(--radius-sm); background: var(--surface-3); font-weight: 600; font-size: 12.5px; color: var(--muted); text-align: center; }
.steps-indicator .s.on { background: var(--primary); color: #fff; }
.steps-indicator .s.done { background: var(--accent-100); color: var(--primary); }
@media print {
  .header, .nav, .no-print { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; max-width: none; }
}
.print-doc { max-width: 860px; margin: 0 auto; background: #fff; color: #16241f; padding: 48px; border-radius: var(--radius); box-shadow: var(--shadow); }
.print-doc table { width: 100%; border-collapse: collapse; }
.print-doc th { text-align: left; border-bottom: 2px solid #16433d; padding: 8px 6px; font-size: 12px; color: #16433d; }
.print-doc td { padding: 8px 6px; border-bottom: 1px solid #e5e5e5; }
.print-doc .totals td { border: 0; padding: 4px 6px; }
@media print { .print-doc { box-shadow: none; padding: 0; } }

/* ---------- Small screens ---------- */
.grid-2 > *, .grid-12 > *, .grid-3 > *, .list-layout > *, .setup-layout > *, .report-builder > * { min-width: 0; }
@media (max-width: 720px) {
  .path { flex-direction: column; align-items: stretch; }
  .path .steps { overflow-x: auto; }
  .path .step { min-width: 120px; }
  .nav .tabs { overflow-x: auto; }
  .nav .app-launcher { padding-right: 6px; }
  .filter-panel { width: 100%; }
  .list-layout { flex-direction: column; }
  .highlights .fields { gap: 16px; }
  .page-head { padding: 12px; }
}
