/* OwnerBoard: one stylesheet, no frameworks. Light and dark themes. */
:root {
  --brand: #007aa5;
  --brand-ink: color-mix(in srgb, var(--brand) 80%, black);
  --brand-soft: color-mix(in srgb, var(--brand) 11%, white);
  --brand-soft2: color-mix(in srgb, var(--brand) 22%, white);
  --fire: #b22222;
  --gold: #eee8aa;
  --bg: #fbfaf4;
  --card: #ffffff;
  --card-2: #f7f6f0;
  --ink: #000000;
  --ink-2: #1c1c1c;
  --muted: #5a5a55;
  --line: #e6e2d8;
  --line-2: #efece4;
  --ok: #157f3c; --ok-soft: #e6f4ea;
  --warn: #9a5b00; --warn-soft: #fdf1dc;
  --bad: #b22222; --bad-soft: #fbe9e9;
  --info: #0b5f86; --info-soft: #e5f2f8;
  --k2: #f2a33a; --k3: #2f9e6a; --k4: #7b5cc4; --k5: #d1495b; --k6: #4a90b8; --k7: #c9a227; --k8: #8a8a80; --lc: #23303f;
  --c1: var(--brand); --c2: #f7950f; --c3: #2f9e6a; --c4: #7b5cc4; --c5: #d1495b; --c6: #c9a227; --c7: #4a90b8; --c8: #8a8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .14);
  --r: 14px;
  --side: 248px;
  --hd: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
}
html.dark {
  --bg: #0f1215; --card: #171b20; --card-2: #1d2228; --ink: #f2f2ee; --ink-2: #e2e2dc; --muted: #a2a7ad; --line: #2a3038; --line-2: #222830;
  --brand-ink: color-mix(in srgb, var(--brand) 55%, white); --brand-soft: color-mix(in srgb, var(--brand) 22%, #171b20); --brand-soft2: color-mix(in srgb, var(--brand) 35%, #171b20);
  --ok: #5fd08f; --ok-soft: #173326; --warn: #f0b45a; --warn-soft: #3a2c14; --bad: #ff7b7b; --bad-soft: #3a1b1b; --info: #7cc4e8; --info-soft: #14303f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  --lc: #e8e6df;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Public Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--hd); margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; font-weight: 900; } h3 { font-size: 1.02rem; font-weight: 800; } h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
small { font-size: .8rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.late { color: var(--bad); font-weight: 700; } .up { color: var(--ok); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { flex: none; vertical-align: -3px; }
.inline { display: inline; }
.hp { position: absolute; left: -9999px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--card-2); }
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
html.dark .btn-brand:hover { background: color-mix(in srgb, var(--brand) 80%, black); }
.btn-fire { background: var(--fire); border-color: var(--fire); color: #fff; }
.btn-cta { background: #f7950f; border: 1.5px solid #000; color: #000; box-shadow: 2px 2px 0 #000; }
.btn-cta:hover { background: #e08200; color: #000; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { color: var(--bad); }
.btn-sm { padding: 6px 10px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--card-2); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 650; font-size: .86rem; }
input, select, textarea { font: inherit; font-size: .95rem; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); padding: 0; }
input[type=color] { padding: 2px; height: 44px; width: 80px; }
textarea { resize: vertical; }
.inline-check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2, .span2 { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-end { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { width: auto; padding: 8px 10px; font-size: .88rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0; }
legend { font-weight: 800; padding: 0 6px; font-family: var(--hd); }

/* ---------- Layout ---------- */
.demo-bar { position: sticky; top: 0; z-index: 30; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 9px 18px; background: var(--gold); color: #000; font-size: .88rem; border-bottom: 1.5px solid #000; }
.demo-bar .ic { color: #000; }
.side { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px 12px; z-index: 40; overflow-y: auto; }
body:has(.demo-bar) .side { top: 41px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 16px; color: var(--ink); text-decoration: none !important; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 3px; flex: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; font-family: var(--hd); font-weight: 900; display: grid; place-items: center; flex: none; font-size: 1rem; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-family: var(--hd); font-weight: 800; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .74rem; }
.nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 800; padding: 14px 10px 6px; }
.side-nav, .side-foot { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .92rem; text-decoration: none; width: 100%; text-align: left; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--line-2); }
.side-nav a.on, .side-foot a.on { background: var(--brand-soft); color: var(--brand-ink); }
.side-nav a.on .ic { color: var(--brand); }
.pill { margin-left: auto; background: var(--fire); color: #fff; font-size: .7rem; border-radius: 99px; padding: 1px 7px; font-weight: 800; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 26px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body:has(.demo-bar) .top { top: 41px; }
.top h1 { font-size: 1.25rem; font-weight: 900; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.menu-btn { display: none; }
.search { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; width: min(420px, 38vw); }
.search input { border: 0; padding: 10px 0; background: transparent; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; max-height: 60vh; overflow: auto; }
.search-pop a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-pop a:hover, .search-pop a.sel { background: var(--brand-soft); }
.search-pop small { color: var(--muted); display: block; }
.search-pop .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; padding: 8px 10px 4px; }
.me .avatar { width: 38px; height: 38px; }
.content { padding: 22px 26px 40px; flex: 1; width: 100%; max-width: 1480px; }
.foot { padding: 14px 26px 90px; }
.flash { margin: 14px 26px 0; padding: 11px 14px; border-radius: 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; animation: drop .3s ease-out; }
.flash-ok { background: var(--ok-soft); color: var(--ok); } .flash-error { background: var(--bad-soft); color: var(--bad); }
.flash-x { background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; }
.tabbar { display: none; }
.scrim { display: none; }

/* ---------- Menus and modals ---------- */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: flex; flex-direction: column; animation: drop .15s ease-out; }
.menu-list.right { left: auto; right: 0; }
.menu-list a, .menu-list button { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--brand-soft); }
dialog.modal { border: 0; border-radius: 18px; padding: 24px; width: min(560px, 94vw); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 14, 20, .45); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Cards and dashboard ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 18px; }
.dash .card + .card, .grid2 .card + .card, .kpis .card + .card { margin-top: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-h h3 .ic { color: var(--brand); }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.hero h2 { font-size: 2rem; margin: 2px 0 6px; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--brand-ink); margin: 0; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 14px; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--gold); color: var(--ink); text-decoration: none !important; overflow: hidden; transition: transform .15s, box-shadow .15s; animation: rise .4s ease-out both; }
html.dark .kpi { border-color: var(--line); box-shadow: 4px 4px 0 color-mix(in srgb, var(--brand) 40%, transparent); }
.kpi:nth-child(2) { animation-delay: .05s; } .kpi:nth-child(3) { animation-delay: .1s; } .kpi:nth-child(4) { animation-delay: .15s; }
.kpi:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--gold); }
.kpi-l { font-size: .8rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-l .ic { color: var(--brand); }
.kpi-v { font-family: var(--hd); font-weight: 900; font-size: 1.85rem; letter-spacing: -.03em; line-height: 1.1; }
.kpi-s { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.spark { display: block; width: 100%; height: 34px; margin-top: 6px; }
.spark-l { fill: none; stroke: var(--c1); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-a { fill: color-mix(in srgb, var(--c1) 14%, transparent); }
.spark.alt .spark-l { stroke: var(--c2); } .spark.alt .spark-a { fill: color-mix(in srgb, var(--c2) 16%, transparent); }
.spark.alt2 .spark-l { stroke: var(--c3); } .spark.alt2 .spark-a { fill: color-mix(in srgb, var(--c3) 16%, transparent); }
.spark.alt3 .spark-l { stroke: var(--c4); } .spark.alt3 .spark-a { fill: color-mix(in srgb, var(--c4) 16%, transparent); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: .76rem; padding: 2px 7px; border-radius: 99px; }
.delta.good { background: var(--ok-soft); color: var(--ok); } .delta.bad { background: var(--bad-soft); color: var(--bad); } .delta.flat { background: var(--line-2); color: var(--muted); }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* Charts */
.chart { width: 100%; height: 260px; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar { fill: color-mix(in srgb, var(--c1) 70%, transparent); transition: fill .15s; transform-origin: bottom; transform-box: fill-box; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; }
.chart .bar.now { fill: var(--c1); }
.chart .bar:hover { fill: var(--brand-ink); }
.chart .line { fill: none; stroke: var(--lc); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .dot { fill: var(--card); stroke: var(--lc); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .dot:hover { r: 6; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart .bar:nth-of-type(2n) { animation-delay: .04s; } .chart .bar:nth-of-type(3n) { animation-delay: .08s; }
.legend-inline { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin: -4px 0 4px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sw-bar { background: var(--c1); } .sw-line { background: var(--lc); height: 3px; vertical-align: 3px; }
.seg-toggle { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; }
.seg-toggle button, .seg-toggle a { border: 0; background: none; padding: 5px 11px; border-radius: 8px; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; text-decoration: none; }
.seg-toggle .on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 190px; height: 190px; flex: none; }
.donut .seg { transition: transform .15s; transform-origin: 90px 90px; cursor: pointer; animation: fade .6s ease-out both; }
.donut .seg:hover { transform: scale(1.05); }
.donut-empty { stroke: var(--line); }
.donut-c { font-family: var(--hd); font-weight: 900; font-size: 22px; fill: var(--ink); }
.donut-s { font-size: 11px; fill: var(--muted); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 150px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend span { flex: 1; }
.ring { width: 170px; height: 170px; display: block; margin: 0 auto 8px; }
.ring-bg { fill: none; stroke: var(--line-2); stroke-width: 14; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 14; stroke-linecap: round; animation: ring 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.ring-fg.done { stroke: var(--ok); }
@keyframes ring { from { stroke-dasharray: 0 400; } }
.ring-big { font-family: var(--hd); font-weight: 900; font-size: 30px; fill: var(--ink); }
.ring-small { font-size: 12px; fill: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hb-l { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; margin-bottom: 4px; }
.hb-l b { font-weight: 800; }
.hb-t { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.hb-f { height: 100%; background: var(--c1); border-radius: 99px; animation: widen .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * .06s); }
.hb-f.ok { background: var(--c3); } .hb-f.warn { background: var(--c2); } .hb-f.bad { background: var(--c5); }
.hb small { color: var(--muted); }
@keyframes widen { from { width: 0; } }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.mini-stats div { display: flex; flex-direction: column; }
.mini-stats b { font-family: var(--hd); font-weight: 900; font-size: 1.15rem; }
.mini-stats span { font-size: .75rem; color: var(--muted); }
.mini-stats .warn b { color: var(--warn); }
.insights { background: linear-gradient(0deg, var(--card), var(--card)); }
.ins-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ins { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; background: var(--card-2); color: var(--ink); font-size: .9rem; text-decoration: none !important; border: 1px solid var(--line-2); animation: rise .45s ease-out both; animation-delay: calc(var(--i) * .07s); transition: border-color .15s; }
.ins:hover { border-color: var(--brand); }
.ins-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--info-soft); color: var(--info); }
.ins-ok .ins-ic { background: var(--ok-soft); color: var(--ok); } .ins-warn .ins-ic { background: var(--warn-soft); color: var(--warn); } .ins-bad .ins-ic { background: var(--bad-soft); color: var(--bad); }
.goal p { margin: 0; }
.agenda, .feed, .people, .toplist { list-style: none; margin: 0 0 10px; padding: 0; }
.agenda li { display: flex; gap: 11px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-2); }
.agenda li:first-child { border-top: 0; }
.agenda li div { display: flex; flex-direction: column; min-width: 0; }
.agenda small { color: var(--muted); }
.agenda li div .tag { align-self: flex-start; }
.agenda li.done b { text-decoration: line-through; color: var(--muted); }
.agenda .time { width: 46px; font-family: var(--hd); font-weight: 800; font-size: .95rem; text-align: center; color: var(--brand-ink); line-height: 1; }
.agenda .time small { display: block; font-size: .68rem; font-weight: 600; }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); background: var(--card); cursor: pointer; flex: none; display: grid; place-items: center; transition: all .15s; padding: 0; }
.check:hover { border-color: var(--brand); }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.feed li { display: flex; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: .9rem; }
.feed li:first-child { border-top: 0; }
.feed small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.feed-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--muted); }
.t-call .ic, .t-email .ic, .t-text .ic, .t-meeting .ic { color: var(--brand); }
.feed-ic.t-call, .feed-ic.t-email, .feed-ic.t-text, .feed-ic.t-meeting, .feed-ic.t-campaign { background: var(--brand-soft); }
.feed-ic.t-payment { background: var(--ok-soft); color: var(--ok); } .feed-ic.t-view { background: var(--warn-soft); color: var(--warn); } .feed-ic.t-ticket { background: var(--bad-soft); color: var(--bad); } .feed-ic.t-deal { background: #efe8fb; color: #6b4bb8; }
html.dark .feed-ic.t-deal { background: #2a2140; color: #b9a2f0; }
.people li, .toplist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.people li:first-child, .toplist li:first-child { border-top: 0; }
.people .who { flex: 1; }
.toplist .rank { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: .75rem; display: grid; place-items: center; flex: none; }
.toplist .who { flex: 1; min-width: 0; }
.tl-v { width: 100px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tl-v i { display: block; height: 4px; background: var(--c3); border-radius: 9px; }

/* People */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--h) 55% 88%); color: hsl(var(--h) 45% 26%); display: inline-grid; place-items: center; font-weight: 800; font-size: .78rem; flex: none; }
html.dark .avatar { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 85%); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.who > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.who b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who:hover b { color: var(--brand-ink); }
.score { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .8rem; padding: 3px 9px 3px 4px; border-radius: 99px; background: var(--line-2); }
.score i { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--sc) calc(var(--s) * 1%), color-mix(in srgb, var(--sc) 18%, transparent) 0); }
.score-hot { --sc: #d1495b; color: #a3263a; background: #fbe9ec; } .score-warm { --sc: #e08200; color: #8a5200; background: #fdf1dc; } .score-cold { --sc: #4a90b8; color: #2e6688; background: #e6f1f8; }
html.dark .score-hot { background: #3a1b22; color: #ff9aa9; } html.dark .score-warm { background: #3a2c14; color: #f0b45a; } html.dark .score-cold { background: #14303f; color: #7cc4e8; }
.life { font-size: .74rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.life-lead { background: var(--info-soft); color: var(--info); } .life-customer { background: var(--ok-soft); color: var(--ok); } .life-repeat { background: #efe8fb; color: #6b4bb8; } .life-inactive { background: var(--line-2); color: var(--muted); }
html.dark .life-repeat { background: #2a2140; color: #b9a2f0; }
.tag { display: inline-block; font-size: .74rem; font-weight: 750; padding: 3px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); } .tag-bad { background: var(--bad-soft); color: var(--bad); } .tag-warn { background: var(--warn-soft); color: var(--warn); } .tag-info { background: var(--info-soft); color: var(--info); } .tag-mute { background: var(--line-2); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-ink); font-size: .78rem; font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--card-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr[data-href] { cursor: pointer; }

/* Tabs and filters */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 13px; color: var(--muted); font-weight: 700; font-size: .9rem; border-bottom: 2.5px solid transparent; margin-bottom: -1px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on { color: var(--ink); border-color: var(--brand); }
.tabs a .n { background: var(--line-2); border-radius: 99px; padding: 0 7px; font-size: .74rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.lists { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.lists a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: .84rem; font-weight: 650; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.lists a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.lists a .n { opacity: .75; font-weight: 800; }

/* Contact page */
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile h2 { margin: 0 0 4px; }
.profile .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.profile .meta a { color: var(--ink-2); }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--card-2); border-radius: 12px; padding: 11px 13px; }
.stat b { display: block; font-family: var(--hd); font-weight: 900; font-size: 1.2rem; }
.stat span { font-size: .76rem; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; display: flex; gap: 12px; padding: 9px 0; }
.timeline .feed-ic { position: relative; z-index: 1; border: 2px solid var(--card); }
.timeline .tl-b { flex: 1; min-width: 0; }
.timeline .tl-b small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.timeline .tl-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 12px; background: var(--card-2); }
.compose textarea { background: var(--card); }
.type-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.type-pick label { flex-direction: row; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: .82rem; cursor: pointer; }
.type-pick input { display: none; }
.type-pick label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.dupe-box { border: 1.5px solid var(--warn); background: var(--warn-soft); border-radius: 12px; padding: 14px; margin-bottom: 16px; }

/* Pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 220px; transition: background .15s, border-color .15s; }
.col.over { background: var(--brand-soft); border-color: var(--brand); }
.col-h { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 10px; }
.col-h b { font-family: var(--hd); font-weight: 800; }
.col-h span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.col-bar { height: 4px; border-radius: 9px; background: var(--line); margin: 0 6px 10px; overflow: hidden; }
.col-bar i { display: block; height: 100%; background: var(--brand); }
.col.won .col-bar i { background: var(--ok); } .col.lost .col-bar i { background: var(--bad); }
.dcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; display: block; color: var(--ink); text-decoration: none !important; }
.dcard:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .1); }
.dcard.dragging { opacity: .5; transform: rotate(2deg); }
.dcard b { display: block; font-size: .92rem; }
.dcard .v { font-family: var(--hd); font-weight: 900; font-size: 1.05rem; margin: 4px 0; }
.dcard small { color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.dcard .quiet { color: var(--warn); font-weight: 700; }
.dcard .soon { color: var(--bad); font-weight: 700; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.cal .dow { padding: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); background: var(--card-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background .1s; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day:hover { background: var(--card-2); }
.cal .day.other { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.cal .day.other .dn { color: var(--muted); opacity: .6; }
.cal .dn { font-weight: 800; font-size: .85rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .dn { background: var(--brand); color: #fff; }
.ev { font-size: .76rem; padding: 3px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; display: block; text-decoration: none !important; }
.ev.task { background: var(--line-2); color: var(--ink-2); }
.ev.task.hi { background: var(--warn-soft); color: var(--warn); }
.ev.done { text-decoration: line-through !important; opacity: .55; }
.ev-more { font-size: .72rem; color: var(--muted); font-weight: 700; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { margin: 0 8px 0 0; font-size: 1.4rem; }

/* Quotes and invoices */
.doc-paper { background: #fff; color: #000; border: 1px solid var(--line); border-radius: 14px; padding: 44px 48px; box-shadow: var(--shadow-lg); max-width: 860px; }
.doc-paper .dp-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 30px; }
.doc-paper .dp-logo { max-height: 70px; max-width: 220px; object-fit: contain; }
.doc-paper .dp-title { font-family: var(--hd); font-weight: 900; font-size: 2rem; letter-spacing: -.03em; color: var(--brand); text-align: right; }
.doc-paper .dp-meta { text-align: right; font-size: .88rem; }
.doc-paper .dp-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 26px; font-size: .9rem; }
.doc-paper .dp-parties h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #555; margin: 0 0 6px; font-family: inherit; }
.doc-paper table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc-paper th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--brand); padding: 9px 10px; }
.doc-paper th.num, .doc-paper td.num { text-align: right; }
.doc-paper td { padding: 10px; border-bottom: 1px solid #eee; }
.doc-paper .dp-tot { margin-left: auto; width: 290px; margin-top: 14px; font-size: .92rem; }
.doc-paper .dp-tot div { display: flex; justify-content: space-between; padding: 5px 0; }
.doc-paper .dp-tot .big { font-family: var(--hd); font-weight: 900; font-size: 1.25rem; border-top: 2px solid #000; margin-top: 6px; padding-top: 9px; }
.doc-paper .dp-notes { margin-top: 26px; font-size: .88rem; color: #333; white-space: pre-wrap; }
.doc-paper .stamp { display: inline-block; border: 3px solid var(--ok); color: var(--ok); font-family: var(--hd); font-weight: 900; font-size: 1.3rem; padding: 4px 14px; border-radius: 8px; transform: rotate(-6deg); letter-spacing: .05em; }
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: 6px 4px; letter-spacing: .06em; }
.lines td { padding: 4px; }
.lines td:first-child { width: 55%; }
.lines .x { width: 36px; }
.totals { margin-left: auto; width: min(320px, 100%); display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .big { font-family: var(--hd); font-weight: 900; font-size: 1.35rem; border-top: 1px solid var(--line); padding-top: 8px; }
.public { background: var(--bg); padding: 30px 14px 60px; }
.public .wrap { max-width: 880px; margin: 0 auto; }
.public .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* Empty states and misc */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { color: var(--brand); opacity: .7; margin-bottom: 8px; }
.empty h3 { color: var(--ink); }
.tip { position: fixed; z-index: 100; pointer-events: none; background: #111; color: #fff; padding: 7px 10px; border-radius: 8px; font-size: .8rem; font-weight: 600; max-width: 280px; box-shadow: var(--shadow-lg); }
html.dark .tip { background: #f2f2ee; color: #111; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: .9rem; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; background: var(--card-2); padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; user-select: all; display: block; }
.rule { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 10px; }
.rule.off { opacity: .55; }
.rule .when { font-weight: 800; }
.rule .arrow { color: var(--brand); }
.rule .grow { flex: 1; min-width: 0; }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-2); }
.msg.reply { background: var(--brand-soft); border-color: transparent; }
.msg.note { background: var(--warn-soft); border-color: transparent; }
.msg small { display: block; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.msg p { margin: 0; white-space: pre-wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.logo-preview { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: 16px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Auth and demo form */
body.auth { background: var(--bg); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: #00569b; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 32px 32px; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-art h1 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 900; letter-spacing: -.035em; margin: 0; }
.auth-art p { font-size: 1.08rem; max-width: 520px; color: #fff; }
.auth-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-art li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.auth-art li .ic { background: #fff; color: #00569b; border-radius: 6px; padding: 3px; width: 22px; height: 22px; }
.auth-art .mark { display: flex; align-items: center; gap: 10px; font-family: var(--hd); font-weight: 900; font-size: 1.3rem; }
.auth-art .mark i { width: 34px; height: 34px; border-radius: 9px; background: #007aa5; border: 2px solid #fff; display: grid; place-items: center; font-style: normal; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 34px 22px; }
.auth-card { width: min(470px, 100%); background: var(--card); border: 1.5px solid #000; border-radius: 20px; padding: 30px; box-shadow: 8px 8px 0 #eee8aa; }
html.dark .auth-card { border-color: var(--line); }
.auth-card h2 { margin-bottom: 4px; }

/* Welcome tour */
.tour { position: fixed; inset: 0; z-index: 90; background: rgba(10, 14, 20, .5); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.tour-card { background: var(--card); border-radius: 22px; width: min(600px, 100%); padding: 30px; box-shadow: var(--shadow-lg); animation: pop .25s ease-out; }
.tour-card h2 { font-size: 1.7rem; }
.tour-steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 10px; }
.tour-steps a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tour-steps a:hover { border-color: var(--brand); transform: translateX(3px); }
.tour-steps .n { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 900; flex: none; }


/* WhatsApp */
.btn-wa { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.btn-wa:hover { background: #165c3a; border-color: #165c3a; color: #fff; }
.btn.btn-wa .ic { color: #fff; }
.wa { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; height: calc(100vh - 230px); min-height: 520px; }
.wa-list { padding: 8px; overflow-y: auto; }
.wa-search { padding: 4px 4px 8px; }
.wa-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.wa-item:hover { background: var(--card-2); }
.wa-item.on { background: var(--brand-soft); }
.wa-item-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wa-item-b small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-item-m { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wa-item-m small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.wa-badge { background: #1f7a4d; color: #fff; border-radius: 99px; font-size: .72rem; padding: 1px 7px; }
.wa-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.wa-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wa-thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: #efeae2; background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 16px 16px; }
html.dark .wa-thread { background: #0b141a; background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px); }
.wa-day { text-align: center; margin: 6px 0; }
.wa-day span { background: var(--card); color: var(--muted); font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 8px; box-shadow: var(--shadow); }
.bubble { max-width: 72%; padding: 7px 10px 5px; border-radius: 10px; background: #fff; color: #111; box-shadow: 0 1px 1px rgba(0,0,0,.08); align-self: flex-start; animation: rise .25s ease-out; }
.bubble.out { background: #d9fdd3; align-self: flex-end; }
html.dark .bubble { background: #202c33; color: #e9edef; } html.dark .bubble.out { background: #005c4b; }
.bubble.tpl { border: 1px dashed #1f7a4d; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.bubble small { display: block; text-align: right; font-size: .68rem; color: #667781; margin-top: 2px; }
html.dark .bubble small { color: #8696a0; }
.tick.read, .tick.demo { color: #53bdeb; } .tick.failed { color: var(--bad); font-weight: 900; }
.wa-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card); }
.wa-compose textarea { resize: none; border-radius: 20px; padding: 10px 14px; }
.wa-compose .btn-wa { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex: none; }
.wa-compose.closed { display: block; }
.wa-mini { display: flex; flex-direction: column; gap: 6px; background: #efeae2; border-radius: 12px; padding: 10px; }
html.dark .wa-mini { background: #0b141a; }
.wa-mini .bubble { max-width: 88%; }
.wa-notice { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; background: #e3f6e9; color: #145c36; text-decoration: none !important; }
html.dark .wa-notice { background: #173326; color: #7fe0a5; }
/* Tailor my board */
.tailor { max-width: 860px; margin: 0 auto; }
.tailor-head { margin-bottom: 18px; }
.tailor-head h2 { font-size: 2rem; }
.tailor-bar { height: 8px; background: var(--line-2); border-radius: 9px; overflow: hidden; margin-top: 14px; }
.tailor-bar i { display: block; height: 100%; background: var(--brand); border-radius: 9px; transition: width .3s ease; }
.tq { border: 1px solid var(--line); padding: 20px 22px; }
.tq legend { font-family: var(--hd); font-weight: 800; font-size: 1.12rem; display: flex; gap: 10px; align-items: center; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.tq legend + * { clear: both; }
.tq-n { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .9rem; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; clear: both; }
.chip-opt { flex-direction: row; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 650; font-size: .92rem; transition: all .12s; }
.chip-opt:hover span { border-color: var(--brand); }
.chip-opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-opt input:checked + span::before { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-2px); }
.chip-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.chips.full .chip-opt input:not(:checked) + span { opacity: .45; }
.tq-money { flex-direction: row; align-items: center; gap: 8px; max-width: 280px; clear: both; margin-top: 8px; }
.tq-money span { font-family: var(--hd); font-weight: 900; font-size: 1.3rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.built { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.built li { display: flex; gap: 11px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; background: var(--card-2); animation: rise .45s ease-out both; animation-delay: calc(var(--i, 0) * .08s); }
.built-card { border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--gold); margin-bottom: 18px; }
@media (max-width: 900px) { .wa { grid-template-columns: 1fr; height: auto; } .wa-list { max-height: 260px; } .wa-thread { min-height: 380px; } }

/* ---------- Phones and tablets ---------- */
@media (max-width: 1180px) {
  .span-8, .span-4 { grid-column: span 12; } .span-6 { grid-column: span 12; }
  .dash > .span-4 { grid-column: span 6; }
  .ins-grid { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .side { transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); top: 0 !important; }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .top { padding: 10px 14px; gap: 8px; }
  .top h1 { display: none; }
  .search { width: auto; flex: 1; }
  .quick summary span { display: none; }
  .content { padding: 16px 14px 30px; }
  .flash { margin: 12px 14px 0; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted); font-size: .68rem; font-weight: 700; text-decoration: none; position: relative; }
  .tabbar a.on { color: var(--brand-ink); }
  .tabbar .pill { position: absolute; top: 3px; right: 22%; margin: 0; }
  .dash > .span-4 { grid-column: span 12; }
  .ins-grid { grid-template-columns: 1fr; }
  .stat-row, .mini-stats { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { padding: 30px 22px; }
  .demo-bar { font-size: .8rem; padding: 8px 12px; }
  .demo-bar > span { display: none; }
  .demo-bar { justify-content: center; }
  .doc-paper { padding: 24px 18px; }
  .doc-paper .dp-parties { grid-template-columns: 1fr; }
  .cal .day { min-height: 74px; }
  .cal .ev { font-size: .66rem; padding: 2px 4px; }
  .hide-sm { display: none !important; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .kpi-v { font-size: 1.45rem; }
  .hero h2 { font-size: 1.6rem; }
  .profile-actions { margin-left: 0; }
  .grid3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Print (quotes and invoices) ---------- */
@media print {
  .side, .top, .tabbar, .foot, .no-print, .flash, .demo-bar { display: none !important; }
  .main { margin: 0; } .content { padding: 0; } body, .public { background: #fff; padding: 0; }
  .doc-paper { box-shadow: none; border: 0; padding: 0; max-width: none; }
  .doc-paper th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
