/* Oqeria CRM — live demo */
:root {
  --bg: #F5F6FA; --bg2: #FFFFFF; --s1: #FFFFFF; --s2: #F1F2F7; --s3: #E8EAF2;
  --line: #E6E8F0; --line2: #D8DBE6; --t: #0F1222; --t2: #4A4F66; --mu: #868BA1;
  --p: #5B4BFF; --p2: #7C5CFF; --pl: #EEEBFF; --c: #0EA5C6;
  --ok: #12B76A; --okl: #E7F8EF; --warn: #F79009; --warnl: #FEF4E6; --err: #F04438; --errl: #FEEDEC; --info: #2E90FA; --infol: #EAF3FF;
  --sh: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --sh2: 0 12px 32px -8px rgba(16,24,40,.18), 0 4px 8px -4px rgba(16,24,40,.08);
  --r: 14px; --ease: cubic-bezier(.2,.8,.2,1);
  --side: 248px; --bar: 38px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0B0D17; --bg2: #10131F; --s1: #141826; --s2: #1A1F30; --s3: #232a40;
  --line: #222842; --line2: #2E3554; --t: #EEF0FA; --t2: #B4B9D0; --mu: #7F86A3;
  --pl: rgba(124,92,255,.16); --okl: rgba(18,183,106,.14); --warnl: rgba(247,144,9,.14); --errl: rgba(240,68,56,.14); --infol: rgba(46,144,250,.14);
  --sh: 0 1px 2px rgba(0,0,0,.3); --sh2: 0 16px 40px -10px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif; color: var(--t); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3, h4 { font-family: Manrope, Inter, system-ui, sans-serif; margin: 0; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.mu { color: var(--mu); } .t2 { color: var(--t2); } .sm { font-size: 12.5px; } .xs { font-size: 11.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.boot { height: 100%; display: grid; place-items: center; }
.boot span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--p); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* demo bar */
.demo-bar { height: var(--bar); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: linear-gradient(90deg, #120E2E, #1B1446 50%, #0B2A36); color: #E6E3FF; font-size: 12.5px; position: relative; z-index: 40; }
.db-dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 4px rgba(52,211,153,.2); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }
.db-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-cta { background: linear-gradient(90deg, #7C5CFF, #22D3EE); color: #fff; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.db-back { color: #B9B4E8; white-space: nowrap; }
.db-back:hover { color: #fff; }

/* shell */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar)); }
.side { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand img { width: 32px; height: 32px; }
.brand b { font: 800 16px Manrope, Inter, system-ui, sans-serif; display: block; }
.brand small { color: var(--mu); font-size: 11.5px; display: block; margin-top: -2px; }
.ws { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--s2); }
.ws .lg { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; font: 700 13px Manrope, Inter, system-ui, sans-serif; }
.ws b { font-size: 13px; display: block; } .ws small { font-size: 11px; color: var(--mu); }
.nav-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--mu); padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--t2); font-weight: 500; transition: background .15s, color .15s; position: relative; }
.nav a:hover { background: var(--s2); color: var(--t); }
.nav a.on { background: var(--pl); color: var(--p); font-weight: 600; }
[data-theme="dark"] .nav a.on { color: #B7A8FF; }
.nav a .cnt { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--s3); color: var(--t2); padding: 1px 7px; border-radius: 999px; }
.nav a.on .cnt { background: var(--p); color: #fff; }
.side-foot { margin-top: auto; padding-top: 12px; }
.upsell { border-radius: 14px; padding: 14px; background: radial-gradient(120% 120% at 0% 0%, rgba(124,92,255,.25), transparent 60%), radial-gradient(120% 120% at 100% 100%, rgba(34,211,238,.2), transparent 60%), var(--s2); border: 1px solid var(--line); }
.upsell b { display: block; font: 700 14px Manrope, Inter, system-ui, sans-serif; margin-bottom: 4px; }
.upsell p { margin: 0 0 10px; font-size: 12.5px; color: var(--t2); }

.mainw { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 85%, transparent); backdrop-filter: blur(10px); flex: none; }
.top h1 { font-size: 18px; }
.ib.burger { display: none; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); color: var(--mu); width: 300px; cursor: pointer; margin-left: auto; }
.search span { flex: 1; text-align: left; }
kbd { font: 600 11px Inter; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2); background: var(--bg2); color: var(--mu); }
.ib { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; color: var(--t2); position: relative; }
.ib:hover { color: var(--t); border-color: var(--line2); }
.ib .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); border: 2px solid var(--bg2); }
.me { width: 36px; height: 36px; border-radius: 50%; }
.view { flex: 1; overflow-y: auto; padding: 24px; min-height: 0; scroll-behavior: smooth; }
.view > * { animation: vin .35s var(--ease) both; }
@keyframes vin { from { opacity: 0; transform: translateY(6px); } }

/* buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: var(--p); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .2s, background .2s; box-shadow: 0 1px 2px rgba(91,75,255,.3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn:hover { background: #4C3CF0; box-shadow: 0 6px 16px -4px rgba(91,75,255,.5); }
.btn:active { transform: translateY(1px); }
.btn.gh { background: var(--bg2); color: var(--t); border-color: var(--line2); box-shadow: var(--sh); }
.btn.gh:hover { background: var(--s2); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.ok { background: var(--ok); } .btn.wa { background: #25D366; }
.btn.danger { background: var(--bg2); color: var(--err); border-color: var(--line2); box-shadow: none; }
.inp, select.inp, textarea.inp { width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; }
.inp:focus { border-color: var(--p); box-shadow: 0 0 0 3px var(--pl); }
label.f { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--t2); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid .full { grid-column: 1 / -1; }

/* cards */
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-h h3 { font-size: 15px; }
.card-h .r { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 16px 18px 18px; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }
.hello { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hello h2 { font-size: 24px; }
.hello p { margin: 4px 0 0; color: var(--t2); }
.hello .r { margin-left: auto; display: flex; gap: 8px; }

.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .lb { display: flex; align-items: center; gap: 8px; color: var(--t2); font-weight: 500; font-size: 13px; }
.kpi .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--pl); color: var(--p); }
.kpi .ic.g { background: var(--okl); color: var(--ok); } .kpi .ic.o { background: var(--warnl); color: var(--warn); } .kpi .ic.b { background: var(--infol); color: var(--info); }
.kpi .v { font: 800 26px Manrope, Inter, system-ui, sans-serif; margin: 12px 0 2px; letter-spacing: -.02em; }
.kpi .d { font-size: 12.5px; color: var(--mu); }
.up { color: var(--ok); font-weight: 600; } .down { color: var(--err); font-weight: 600; }
.kpi svg.spark { position: absolute; right: 14px; bottom: 14px; width: 92px; height: 34px; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--mu); cursor: pointer; }
.seg button.on { background: var(--bg2); color: var(--t); box-shadow: var(--sh); }

.chart { position: relative; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tip { position: absolute; pointer-events: none; background: #0F1222; color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 12px; box-shadow: var(--sh2); transform: translate(-50%, -110%); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 3; }
.tip b { display: block; font-size: 13.5px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--t2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

.funnel .fr { display: grid; grid-template-columns: 96px 1fr 84px; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13px; }
.funnel .bar { height: 26px; border-radius: 8px; background: var(--s2); overflow: hidden; }
.funnel .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--p2), var(--c)); transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 12.5px Manrope, Inter, system-ui, sans-serif; flex: none; background: hsl(var(--h, 250) 70% 58%); }
.av.s { width: 26px; height: 26px; font-size: 10.5px; }
.av.l { width: 64px; height: 64px; font-size: 22px; }
.avs { display: flex; } .avs .av { border: 2px solid var(--s1); margin-left: -8px; } .avs .av:first-child { margin-left: 0; }
.chk { width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--line2); display: grid; place-items: center; cursor: pointer; flex: none; background: var(--bg2); transition: .15s; }
.chk.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.chk svg { width: 13px; height: 13px; stroke-width: 3; opacity: 0; } .chk.on svg { opacity: 1; }
.done-t { text-decoration: line-through; color: var(--mu); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--s2); color: var(--t2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.nodot::before { display: none; }
.st-0 { background: var(--infol); color: var(--info); }
.st-1 { background: #EEF4FF; color: #3E63DD; }
.st-2 { background: #F4EBFF; color: #7F56D9; }
.st-3 { background: var(--warnl); color: #C4690A; }
.st-4 { background: #FFF1E7; color: #E1580B; }
.st-5 { background: var(--okl); color: #08875A; }
.st-6 { background: var(--errl); color: var(--err); }
[data-theme="dark"] .st-1 { background: rgba(62,99,221,.18); color: #9DB4FF; }
[data-theme="dark"] .st-2 { background: rgba(127,86,217,.2); color: #C9B2FF; }
[data-theme="dark"] .st-4 { background: rgba(225,88,11,.16); color: #FFA370; }
[data-theme="dark"] .st-3 { color: #FDB022; } [data-theme="dark"] .st-5 { color: #32D583; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--s2); color: var(--t2); border: 1px solid var(--line); }
.score { display: flex; align-items: center; gap: 8px; }
.score .b { width: 54px; height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; }
.score .b i { display: block; height: 100%; border-radius: 6px; }

/* feed */
.feed .fi { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.feed .fi:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 42px; bottom: -4px; width: 2px; background: var(--line); }
.feed .fic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--s2); color: var(--t2); }
.feed .fic.call { background: var(--infol); color: var(--info); } .feed .fic.wa { background: #E7F9EE; color: #16A34A; } .feed .fic.won { background: var(--okl); color: var(--ok); } .feed .fic.note { background: var(--warnl); color: var(--warn); } .feed .fic.mail { background: var(--pl); color: var(--p); } .feed .fic.meet { background: #F4EBFF; color: #7F56D9; }
[data-theme="dark"] .feed .fic.wa { background: rgba(22,163,74,.16); }
.feed p { margin: 0; font-size: 13px; } .feed small { color: var(--mu); font-size: 12px; }

.tryit { background: radial-gradient(100% 140% at 0% 0%, rgba(124,92,255,.18), transparent 60%), var(--s1); }
.tryit ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: t; }
.tryit li { display: flex; gap: 10px; align-items: center; counter-increment: t; font-size: 13px; cursor: pointer; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line2); }
.tryit li:hover { border-color: var(--p); background: var(--pl); }
.tryit li::before { content: counter(t); width: 22px; height: 22px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font: 700 11.5px Inter; flex: none; }

.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font: 800 22px Manrope, Inter, system-ui, sans-serif; display: block; line-height: 1; } .ring .c small { font-size: 11px; color: var(--mu); }
.ring.sm { width: 64px; height: 64px; } .ring.sm .c b { font-size: 14px; }

/* toolbar + table */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .inp { width: auto; min-width: 140px; }
.toolbar .sbox { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.toolbar .sbox .inp { width: 100%; padding-left: 36px; }
.toolbar .sbox svg { position: absolute; left: 11px; top: 10px; color: var(--mu); }
.toolbar .r { margin-left: auto; display: flex; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chips button { border: 1px solid var(--line); background: var(--bg2); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--t2); cursor: pointer; }
.chips button.on { background: var(--t); color: var(--bg2); border-color: var(--t); }
.chips button span { opacity: .6; margin-left: 4px; }
.tbl-w { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mu); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--s2); white-space: nowrap; user-select: none; position: sticky; top: 0; z-index: 1; }
.tbl th:first-child { border-top-left-radius: var(--r); } .tbl th:last-child { border-top-right-radius: var(--r); }
.tbl th.s { cursor: pointer; } .tbl th.s:hover { color: var(--t); } .tbl th .ar { opacity: .5; margin-left: 3px; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--s2); }
.tbl tbody tr.sel { background: var(--pl); }
.tbl tr:last-child td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; font-weight: 600; } .who small { color: var(--mu); font-size: 12px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--t2); }
.pager .r { margin-left: auto; display: flex; gap: 6px; }
.bulk { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0F1222; color: #fff; padding: 8px 8px 8px 16px; border-radius: 14px; box-shadow: var(--sh2); display: flex; align-items: center; gap: 10px; z-index: 30; animation: bin .25s var(--ease); }
.bulk select { background: #1E2236; border: 1px solid #2E3554; color: #fff; height: 32px; border-radius: 8px; padding: 0 8px; }
@keyframes bin { from { transform: translate(-50%, 20px); opacity: 0; } }

/* pipeline */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: calc(100% - 70px); }
.col { flex: 0 0 286px; background: var(--s2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.col-h { padding: 12px 14px 10px; }
.col-h .t { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.col-h .t .n { font-size: 12px; color: var(--mu); font-weight: 600; background: var(--bg2); padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); }
.col-h .sum { font: 700 15px Manrope, Inter, system-ui, sans-serif; margin-top: 6px; } .col-h .sum small { font: 500 12px Inter; color: var(--mu); margin-left: 4px; }
.col-h .bar { height: 4px; border-radius: 4px; margin-top: 8px; }
.col-b { padding: 4px 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 80px; transition: background .15s; border-radius: 0 0 16px 16px; }
.col.over .col-b { background: var(--pl); }
.deal { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: grab; box-shadow: var(--sh); transition: transform .15s, box-shadow .15s, border-color .15s; }
.deal:hover { border-color: var(--line2); box-shadow: var(--sh2); transform: translateY(-1px); }
.deal.drag { opacity: .45; }
.deal.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(91,75,255,.6); } 100% { box-shadow: 0 0 0 14px rgba(91,75,255,0); } }
.deal b { display: block; font-size: 13.5px; } .deal .co { color: var(--mu); font-size: 12px; }
.deal .ft { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.deal .val { font: 700 14px Manrope, Inter, system-ui, sans-serif; margin-left: auto; }
.deal .due { font-size: 11.5px; color: var(--mu); display: flex; align-items: center; gap: 4px; }
.deal .due.late { color: var(--err); font-weight: 600; }
.deal .due svg { width: 13px; height: 13px; }
.deal .mv { border: 0; background: var(--s2); border-radius: 7px; height: 26px; font-size: 11.5px; padding: 0 6px; color: var(--t2); }

/* profile */
.prof { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.p-head { padding: 22px; text-align: center; }
.p-head h2 { font-size: 19px; margin-top: 12px; }
.p-head .av { margin: 0 auto; }
.p-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.p-acts button { border: 1px solid var(--line); background: var(--s2); border-radius: 12px; padding: 10px 0 8px; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--t2); cursor: pointer; transition: .15s; }
.p-acts button:hover { border-color: var(--p); color: var(--p); background: var(--pl); }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--mu); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.stepper { display: flex; gap: 4px; }
.stepper button { flex: 1; border: 0; padding: 9px 4px; font-size: 12px; font-weight: 600; color: var(--mu); background: var(--s2); cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); transition: .2s; }
.stepper button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.stepper button.done { background: color-mix(in srgb, var(--p) 22%, var(--s2)); color: var(--p); }
.stepper button.cur { background: var(--p); color: #fff; }
.stepper button.won { background: var(--ok); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--mu); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--t); border-color: var(--p); }
.ai-card { border: 1px solid transparent; background: linear-gradient(var(--s1), var(--s1)) padding-box, linear-gradient(120deg, #7C5CFF, #22D3EE) border-box; }
.ai-card .h { display: flex; align-items: center; gap: 8px; font: 700 14px Manrope, Inter, system-ui, sans-serif; }
.ai-card .h svg { color: var(--p); }
.ai-card p { margin: 8px 0 0; font-size: 13px; color: var(--t2); }
.nba { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--pl); font-size: 13px; }
.composer { display: flex; gap: 8px; margin-bottom: 14px; }

/* tasks */
.tgroup h4 { font-size: 13px; display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; color: var(--t2); }
.tgroup h4 .n { font: 600 11.5px Inter; color: var(--mu); }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .ty { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--s2); color: var(--t2); flex: none; }
.task b { font-weight: 600; display: block; }
.task small { color: var(--mu); font-size: 12px; }
.task .when { font-size: 12.5px; color: var(--t2); white-space: nowrap; }
.task .when.late { color: var(--err); font-weight: 600; }

/* quotes */
.q-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.items { width: 100%; border-collapse: collapse; font-size: 13px; }
.items th { text-align: left; color: var(--mu); font-size: 12px; font-weight: 600; padding: 6px 4px; }
.items td { padding: 4px; }
.items .inp { height: 34px; padding: 0 8px; }
.items .x { border: 0; background: none; color: var(--mu); cursor: pointer; width: 28px; height: 28px; border-radius: 8px; }
.items .x:hover { background: var(--errl); color: var(--err); }
.inv { background: #fff; color: #111827; border-radius: 14px; padding: 28px; box-shadow: var(--sh2); font-size: 12.5px; position: sticky; top: 0; border: 1px solid var(--line); }
.inv .ih { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.inv .lg { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; font: 800 16px Manrope, Inter, system-ui, sans-serif; }
.inv h2 { font-size: 22px; color: #111827; letter-spacing: .04em; }
.inv .mt2 { margin-top: 18px; }
.inv table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.inv th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6B7280; border-bottom: 1.5px solid #111827; padding: 6px 4px; }
.inv td { padding: 8px 4px; border-bottom: 1px solid #E5E7EB; }
.inv .rt { text-align: right; }
.inv .tot { margin-left: auto; width: 230px; margin-top: 12px; }
.inv .tot div { display: flex; justify-content: space-between; padding: 4px 0; }
.inv .tot .g { border-top: 1.5px solid #111827; margin-top: 4px; padding-top: 8px; font: 800 15px Manrope, Inter, system-ui, sans-serif; }
.inv .stamp { display: inline-block; margin-top: 18px; padding: 4px 10px; border: 2px solid #12B76A; color: #12B76A; font-weight: 800; border-radius: 8px; transform: rotate(-4deg); letter-spacing: .08em; font-size: 11px; }
.inv .muted { color: #6B7280; }

/* team */
.member { padding: 18px; }
.member .row { gap: 12px; }
.member .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; text-align: center; }
.member .stats div { background: var(--s2); border-radius: 10px; padding: 8px 4px; }
.member .stats b { display: block; font: 700 15px Manrope, Inter, system-ui, sans-serif; } .member .stats small { color: var(--mu); font-size: 11px; }
.lb .li .rk { width: 24px; font: 800 14px Manrope, Inter, system-ui, sans-serif; color: var(--mu); text-align: center; }
.lb .li:first-child .rk { color: #F59E0B; }
.pbar { height: 8px; border-radius: 8px; background: var(--s3); overflow: hidden; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--p2), var(--c)); border-radius: 8px; animation: grow .9s var(--ease) both; transform-origin: left; }

/* settings */
.set { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.set-nav button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 9px; font-weight: 500; color: var(--t2); cursor: pointer; display: flex; gap: 10px; align-items: center; }
.set-nav button.on { background: var(--pl); color: var(--p); font-weight: 600; }
.integ { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.integ .lg { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 800 15px Manrope, Inter, system-ui, sans-serif; flex: none; }
.integ p { margin: 2px 0 0; font-size: 12.5px; color: var(--mu); }
.sw { width: 40px; height: 23px; border-radius: 999px; background: var(--s3); position: relative; cursor: pointer; border: 0; flex: none; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.sw.on { background: var(--ok); } .sw.on::after { transform: translateX(17px); }
.stage-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stage-row .sw-c { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.stage-row .inp { height: 34px; }
.mini { border: 0; background: var(--s2); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--t2); display: grid; place-items: center; }
.mini:hover { color: var(--t); background: var(--s3); }

/* overlays */
.ov { position: fixed; inset: 0; background: rgba(10,12,24,.45); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fin .2s; }
@keyframes fin { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--s1); border-radius: 18px; box-shadow: var(--sh2); border: 1px solid var(--line); animation: min .28s var(--ease); }
.modal.wide { max-width: 640px; }
@keyframes min { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.m-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.m-h h3 { font-size: 17px; }
.m-h .x { margin-left: auto; }
.m-b { padding: 16px 20px; }
.m-f { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.wa-prev { background: #E5DDD5; border-radius: 12px; padding: 16px; background-image: radial-gradient(rgba(0,0,0,.04) 1px, transparent 1px); background-size: 12px 12px; }
.wa-prev .bub { background: #DCF8C6; color: #111; padding: 9px 12px; border-radius: 10px 0 10px 10px; margin-left: auto; max-width: 85%; font-size: 13px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.cmdk { width: 100%; max-width: 580px; align-self: start; margin-top: 10vh; background: var(--s1); border-radius: 16px; box-shadow: var(--sh2); border: 1px solid var(--line); overflow: hidden; animation: min .2s var(--ease); }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 16px 18px; font-size: 15px; outline: none; }
.cmdk .res { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cmdk .grp { font-size: 11px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px 4px; }
.cmdk a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.cmdk a.on, .cmdk a:hover { background: var(--pl); }
.cmdk a small { margin-left: auto; color: var(--mu); }
.pop { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh2); z-index: 50; animation: min .2s var(--ease); text-align: left; cursor: default; }
.pop .ph { display: flex; padding: 14px 16px 6px; font: 700 14px Manrope, Inter, system-ui, sans-serif; }
.pop .ph button { margin-left: auto; border: 0; background: none; color: var(--p); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.pop .ni { display: flex; gap: 10px; padding: 10px 16px; font-size: 13px; color: var(--t2); }
.pop .ni.u { background: var(--pl); }
.pop .ni p { margin: 0; color: var(--t); }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: #0F1222; color: #fff; padding: 11px 14px; border-radius: 12px; box-shadow: var(--sh2); display: flex; gap: 10px; align-items: center; font-size: 13px; animation: tin .3s var(--ease); max-width: 360px; }
.toast svg { color: #34D399; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
.empty { text-align: center; padding: 40px 20px; color: var(--mu); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* responsive */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .q-wrap { grid-template-columns: 1fr; }
  .search { width: 220px; }
}
@media (max-width: 900px) {
  :root { --side: 270px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; top: var(--bar); bottom: 0; left: 0; width: var(--side); z-index: 55; transform: translateX(-105%); transition: transform .3s var(--ease); box-shadow: var(--sh2); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: var(--bar) 0 0 0; background: rgba(10,12,24,.4); z-index: 54; }
  .ib.burger { display: grid; }
  .top { padding: 0 14px; gap: 8px; }
  .top h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .search { width: 38px; padding: 0; justify-content: center; margin-left: auto; }
  .search span, .search kbd { display: none; }
  .view { padding: 16px; }
  .prof, .set, .g3, .g2 { grid-template-columns: 1fr; }
  .db-txt { font-size: 11.5px; }
  .db-back { display: none; }
  .hello h2 { font-size: 20px; }
  .col { flex-basis: 260px; max-height: none; }
  .tbl .hm { display: none; }
  .fgrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; } .kpi .v { font-size: 20px; } .kpi svg.spark { display: none; }
  .db-txt b ~ * { display: none; }
  .db-txt { display: none; } .db-cta { margin-right: auto; }
  .hello .r { margin-left: 0; width: 100%; } .hello .r .btn { flex: 1; }
  .toolbar .r { margin-left: 0; width: 100%; } .toolbar .r .btn { flex: 1; }
  .inv { padding: 18px; }
  .p-acts { grid-template-columns: repeat(4, 1fr); }
}
@media print {
  body { overflow: visible; background: #fff; }
  .demo-bar, .side, .top, .q-edit, .toasts, .no-print { display: none !important; }
  .shell { display: block; height: auto; }
  .view { overflow: visible; padding: 0; }
  .q-wrap { display: block; }
  .inv { box-shadow: none; border: 0; position: static; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* layout safety: grid children may shrink */
.grid > *, .prof > *, .q-wrap > *, .set > * { min-width: 0; }
.stepper { overflow-x: auto; scrollbar-width: none; }
.stepper button { min-width: 84px; }
.inv .lg { flex: none; }
.items input[type=number] { min-width: 58px; }
@media (max-width: 560px) {
  .items th:nth-child(2), .items td:nth-child(2) { width: 64px; }
  .items td:first-child { width: auto !important; }
  .top [data-new] { display: none; }
  .inv .ih { flex-direction: column; }
  .inv .ih > div:last-child { text-align: left !important; }
}
