/* myaftershow — standard wizualny wg wzorców Marka (design/wzorzec-1..3) */
:root{
  --bg:#F3F6FB; --card:#FFFFFF; --bg2:#F5F8FC; --bg3:#EAF1FB; --line:#E6ECF4; --line2:#EEF2F8;
  --ink:#0F1B2D; --ink2:#46566E; --muted:#8293A8;
  --accent:#1F6FEB; --accent2:#5B9BFF; --violet:#7C5CFF; --soft:rgba(31,111,235,.08);
  --hot:#E5484D; --warm:#E89A18; --cold:#A3B3C6; --pos:#1F9D55; --neg:#E5484D;
  --r:16px; --r2:12px; --r3:9px;
  --shadow:0 1px 2px rgba(20,50,100,.04),0 8px 24px -14px rgba(20,60,130,.22);
}
*{box-sizing:border-box;margin:0}
html,body{min-height:100%}
body{font-family:"Onest",system-ui,sans-serif;font-size:13px;line-height:1.4;color:var(--ink);background:var(--bg);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
a{color:var(--accent);text-decoration:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.hidden{display:none!important}
.muted{color:var(--muted)}.small{font-size:11.5px}
input[type=text],input[type=email],input[type=number],input[type=date],select,textarea{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r3);background:#fff;outline:none;font-size:13px}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--soft)}
textarea{resize:vertical;line-height:1.5}
label.f{display:grid;gap:4px;font-size:11.5px;color:var(--muted)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:34px;padding:0 14px;border-radius:10px;font-weight:600;font-size:13px;white-space:nowrap}
.btn svg{width:15px;height:15px;flex:none}
.btn.primary{background:var(--accent);color:#fff;box-shadow:0 8px 18px -10px var(--accent)}
.btn.primary:hover{background:#1A63D6}
.btn.ghost{background:#fff;border:1px solid var(--line);color:var(--ink)}
.btn.ghost:hover{border-color:#CFDAE8}
.btn.soft{background:var(--soft);color:var(--accent)}
.btn.sm{height:28px;padding:0 10px;font-size:12px;border-radius:8px}
.btn.lg{height:44px;font-size:14.5px;border-radius:12px;padding:0 18px}
.btn:disabled{opacity:.5;cursor:default}
.iconbtn{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:var(--muted)}
.iconbtn:hover{background:var(--bg2);color:var(--ink)}
.iconbtn svg{width:16px;height:16px}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.pad{padding:14px 16px}
.ph{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.ph h2{font-size:15px;font-weight:600;letter-spacing:-.01em}
.ph .sub{color:var(--muted);font-size:12px}
.grow{flex:1}
.row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
.pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:7px;font-size:11px;font-weight:700;white-space:nowrap}
.HOT,.MUST{background:rgba(229,72,77,.1);color:var(--hot)}
.WARM,.SHOULD{background:rgba(232,154,24,.13);color:#B87508}
.COLD,.MAYBE{background:#EEF2F7;color:#6B7C92}
.chip{display:inline-flex;align-items:center;padding:0 10px;height:26px;border-radius:7px;background:#F1F4F8;color:var(--ink2);font-size:12px;white-space:nowrap}
.seg{display:inline-flex;padding:3px;background:var(--bg2);border:1px solid var(--line);border-radius:10px;gap:2px}
.seg button{height:26px;padding:0 11px;border-radius:7px;color:var(--ink2);font-size:12.5px;font-weight:500;white-space:nowrap}
.seg button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(20,50,100,.12);font-weight:600}
.seg.dark button[aria-pressed=true]{background:var(--ink);color:#fff}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:none}
.bar{height:6px;border-radius:4px;background:#EEF2F7;overflow:hidden}
.bar i{display:block;height:100%;border-radius:4px;background:var(--accent)}
.spin{display:inline-block;width:14px;height:14px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--accent);animation:sp 1s linear infinite;vertical-align:-2px}
@keyframes sp{to{transform:rotate(360deg)}}

/* ── shell (wzorzec-4) */
body{background:radial-gradient(900px 520px at 72% -12%,rgba(124,92,255,.10),transparent 60%),radial-gradient(800px 480px at 30% -10%,rgba(31,111,235,.08),transparent 60%),var(--bg);background-attachment:fixed}
.shell{display:grid;grid-template-columns:210px 1fr;min-height:100vh}
.side{position:sticky;top:0;height:100vh;padding:16px 12px 14px;display:flex;flex-direction:column;gap:2px;z-index:20}
.side .brand{padding:4px 8px 22px;font-size:19px}
.nav{display:flex;align-items:center;gap:12px;height:42px;padding:0 14px;border-radius:12px;color:var(--ink2);font-size:14px;font-weight:500;position:relative}
.nav svg{width:19px;height:19px;flex:none;color:#7E8DA3}
.nav:hover{background:rgba(255,255,255,.7)}
.nav[aria-current=page]{background:#fff;color:var(--accent);font-weight:600;box-shadow:var(--shadow)}
.nav[aria-current=page] svg{color:var(--accent)}
.nav[aria-current=page]::before{content:"";position:absolute;left:-12px;top:9px;bottom:9px;width:3px;border-radius:3px;background:var(--accent)}
.side hr{border:0;border-top:1px solid var(--line);margin:10px 8px}
.side .current{margin-top:auto}
.side .current>small{display:block;color:var(--muted);font-size:11.5px;padding:0 6px 6px}
.fcard{padding:14px;display:grid;gap:8px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
.fcard b{font-size:14px}
.fcard .loc{display:flex;gap:6px;color:var(--ink2);font-size:12px;align-items:flex-start}
.fcard .loc svg{width:14px;height:14px;color:var(--muted);margin-top:1px;flex:none}
.fcard .img{height:56px;border-radius:10px;background:url(hero.webp) 30% 60%/cover}
.fcard .cd{font-size:12px;color:var(--ink2)}.fcard .cd b{font-size:12px;color:var(--pos)}
main{padding:12px 16px 120px 6px;min-width:0;width:100%;display:grid;gap:12px;align-content:start}
.topbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.fairsel{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);min-width:300px;cursor:pointer;position:relative}
.fairsel .badge{width:40px;height:40px;font-size:14px;border-radius:11px}
.fairsel b{display:block;font-size:17px;letter-spacing:-.02em}
.fairsel small{color:var(--muted);font-size:12.5px}
.fairsel>svg{width:16px;height:16px;margin-left:auto;color:var(--ink2)}
.phases{display:flex;gap:4px;margin:0 auto}
.phases button{height:34px;padding:0 14px;border-radius:10px;color:var(--ink2);font-weight:500;font-size:13.5px}
.phases button[aria-current=page]{background:#fff;color:var(--accent);font-weight:600;box-shadow:var(--shadow)}
.userchip{display:flex;align-items:center;gap:10px;padding:6px 12px 6px 6px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);cursor:pointer;position:relative}
.userchip b{display:block;font-size:13px}.userchip small{color:var(--muted);font-size:11px}
.langsel{width:auto!important;height:34px;border-radius:10px!important;font-weight:600;padding:0 8px!important}
.trial{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:8px;background:var(--soft);color:var(--accent);font-weight:600;font-size:12px}
.trial.frozen{background:rgba(229,72,77,.1);color:var(--hot)}
.banner{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 14px;border-radius:var(--r2);background:rgba(229,72,77,.07);border:1px solid rgba(229,72,77,.15)}
.dropdown{position:absolute;top:calc(100% + 6px);left:0;min-width:100%;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 40px -18px rgba(20,50,100,.35);padding:6px;z-index:35;display:grid;gap:2px}
.dropdown.right{left:auto;right:0}
.dropdown button{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:8px;text-align:left;white-space:nowrap}
.dropdown button:hover{background:var(--bg2)}
.dropdown button small{color:var(--muted);margin-left:auto;padding-left:14px}

/* kontakty + panel (wzorzec-4) */
.kpis4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.k4{display:grid;grid-template-columns:48px 1fr;gap:14px;align-items:center;padding:14px 16px;position:relative;overflow:hidden;min-height:96px}
.k4 .ic{width:48px;height:48px;border-radius:14px;display:grid;place-items:center}
.k4 .ic svg{width:22px;height:22px}
.k4 span{color:var(--ink2);font-size:12.5px}
.k4 .val{font-size:25px;font-weight:600;letter-spacing:-.025em;line-height:1.15}
.k4 svg.spark{position:absolute;right:14px;top:30px;width:72px;height:30px}
.contacts{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:12px;align-items:start}
.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.filters .search{height:38px;min-width:260px;flex:1;max-width:320px;border-radius:12px}
.fchip{height:34px;padding:0 13px;border-radius:9px;border:1px solid var(--line);background:#fff;color:var(--ink2);font-size:12.5px;font-weight:500;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.fchip[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.fchip svg{width:14px;height:14px}
.tbl input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}
.tbl select.stg{height:30px;padding:0 8px;width:110px;font-size:12px;border-radius:8px}
.flag{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.flag svg{width:20px;height:14px;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.06);flex:none}
.sc{display:grid;gap:4px;width:46px}.sc b{font-weight:600;font-size:12px}.sc .bar{height:4px}
.pager{display:flex;align-items:center;gap:6px;padding:12px 2px 0;font-size:12.5px;color:var(--ink2);flex-wrap:wrap}
.pager button{min-width:30px;height:30px;border-radius:8px;border:1px solid transparent}
.pager button[aria-current=page]{border-color:var(--line);background:#fff;font-weight:600;box-shadow:var(--shadow)}
.panel{position:sticky;top:12px;max-height:calc(100vh - 24px);display:flex;flex-direction:column;overflow:hidden}
.panel .dhead{padding:20px 20px 10px}
.panel .tabs{padding:0 20px;gap:22px}
.panel .dbody{padding:14px 20px 18px}
.panel .x{margin-left:auto;align-self:flex-start}
.empty{display:grid;place-items:center;gap:10px;padding:40px 20px;text-align:center;color:var(--muted)}
.empty svg{width:34px;height:34px;color:#B9C6D8}
.tags{display:flex;gap:6px;flex-wrap:wrap}
.tag{height:28px;padding:0 10px;border-radius:8px;border:1px solid var(--line);background:var(--bg2);font-size:12px;color:var(--ink2);display:inline-flex;align-items:center;gap:6px}
.tag button{color:var(--muted);font-size:13px;line-height:1}
.kvl{display:grid;gap:12px;font-size:13px}
.kvl div{display:grid;grid-template-columns:24px 110px 1fr;align-items:center;gap:6px}
.kvl svg{width:16px;height:16px;color:var(--muted)}
.kvl span{color:var(--ink2)}
.kvl b{font-weight:500;display:flex;align-items:center;gap:8px;min-width:0}
.task{display:grid;grid-template-columns:20px 1fr auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:12px}
.task input{width:17px;height:17px;accent-color:var(--pos)}
.task small{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:11.5px;margin-top:3px}
.task.done b{text-decoration:line-through;color:var(--muted)}
.quick{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.quick .btn{height:42px}
.quick .full{grid-column:1/-1}
.notecard{display:grid;grid-template-columns:36px 1fr;gap:12px;padding:14px;border-radius:14px;background:#EEF4FD}
.notecard .ic{width:36px;height:36px;border-radius:10px;background:#fff;display:grid;place-items:center;color:var(--accent)}
.notecard .ic svg{width:18px;height:18px}
.notecard b{display:block;margin-bottom:4px}
.notecard p{font-size:12.5px;color:var(--ink2);white-space:pre-wrap}
.act{display:grid;gap:10px}
.act div{display:grid;grid-template-columns:10px 1fr;gap:10px;font-size:12.5px}
.act div::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:5px}
.act small{color:var(--muted);display:block}
.modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:16px;background:rgba(15,27,45,.22)}
.modal .card{width:min(460px,100%);padding:20px;display:grid;gap:12px}
.modal h3{font-size:16px}

/* ── hero */
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);overflow:hidden;min-height:176px;position:relative}
.hero .info{padding:18px 20px;display:flex;flex-direction:column;gap:12px;z-index:1}
.hero .t{display:flex;gap:14px;align-items:center}
.badge{width:48px;height:48px;border-radius:13px;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700;font-size:16px;box-shadow:0 10px 20px -10px var(--accent);flex:none}
.hero h1{font-size:24px;letter-spacing:-.025em;font-weight:700;line-height:1.15}
.hero .meta{color:var(--muted);font-size:13px}
.hero .actions{display:flex;gap:8px;flex-wrap:wrap}
.hero .stats{display:flex;gap:34px;margin-top:auto;flex-wrap:wrap}
.hero .stats b{display:block;font-size:19px;letter-spacing:-.02em}
.hero .stats span{color:var(--muted);font-size:12px}
.hero .art{position:relative;background:url(hero.webp) center/cover no-repeat}
.hero .art::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,0) 22%)}
.hero .booth{position:absolute;left:83%;top:26%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;height:34px;padding:0 14px;border-radius:20px;background:#fff;box-shadow:0 6px 18px -8px rgba(20,60,130,.35);font-weight:500;font-size:13px;white-space:nowrap}
.hero .booth i{width:9px;height:9px;border-radius:50%;background:var(--accent)}
.menu{position:relative}
.menu .pop{position:absolute;top:calc(100% + 6px);left:0;min-width:240px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 40px -18px rgba(20,50,100,.35);padding:6px;z-index:30;display:grid}
.menu .pop button,.menu .pop label{display:flex;gap:10px;align-items:center;padding:9px 10px;border-radius:8px;text-align:left;cursor:pointer}
.menu .pop button:hover,.menu .pop label:hover{background:var(--bg2)}
.menu .pop svg{width:16px;height:16px;color:var(--accent)}
.menu .pop small{display:block;color:var(--muted);font-size:11.5px}

/* ── KPI */
.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.kpi{padding:12px 14px 10px;position:relative;overflow:hidden;min-height:96px}
.kpi .lbl{color:var(--ink2);font-size:12.5px;padding-right:30px}
.kpi .ic{position:absolute;right:12px;top:10px;width:26px;height:26px;border-radius:8px;display:grid;place-items:center}
.kpi .ic svg{width:15px;height:15px}
.kpi .val{font-size:24px;font-weight:600;letter-spacing:-.025em;margin-top:4px}
.kpi .val small{font-size:13px;color:var(--ink2);font-weight:500;margin-left:2px}
.kpi .d{font-size:11.5px;font-weight:600;display:flex;align-items:center;gap:3px}
.d.up{color:var(--pos)}.d.down{color:var(--neg)}.d.warn{color:#C07D0B}.d.flat{color:var(--muted)}
.kpi svg.spark{position:absolute;right:10px;bottom:10px;width:76px;height:30px}

/* ── funnel & quality */
.funnelwrap svg{width:100%;height:auto;display:block}
.alert{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:rgba(229,72,77,.06);border:1px solid rgba(229,72,77,.12);margin-top:12px;font-size:13px}
.alert svg{width:18px;height:18px;color:var(--hot);flex:none}
.alert b{color:var(--hot)}
.tiers{display:flex;height:10px;border-radius:6px;overflow:hidden;gap:3px;margin:2px 0 10px}
.legend{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.legend div{font-size:12px;color:var(--ink2);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.legend b{font-size:16px;color:var(--ink);width:100%;font-weight:600}
.legend b small{font-size:11.5px;color:var(--muted);font-weight:500;margin-left:4px}
.hbars{display:grid;gap:7px}
.hbar{display:grid;grid-template-columns:96px 1fr 34px;gap:10px;align-items:center;font-size:12.5px}
.hbar .bar{height:8px}
.hbar b{text-align:right;font-weight:500}
.roi{border-top:1px solid var(--line);margin-top:12px;padding-top:12px;display:grid;gap:8px}
.roi .hbar{grid-template-columns:110px 1fr 96px}
.roi b{font-weight:700}
.roi p{font-size:12.5px;color:var(--ink2)}
.roi p b{color:var(--pos)}

/* ── tables */
.tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.tbl th{text-align:left;font-weight:500;color:var(--muted);font-size:11.5px;padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap;position:sticky;top:0;background:#fff;z-index:1}
.tbl th.s{cursor:pointer;user-select:none}
.tbl td{padding:7px 10px;border-bottom:1px solid var(--line2);vertical-align:middle}
.tbl tbody tr{cursor:pointer}
.tbl tbody tr:hover td{background:#F8FAFD}
.tbl tbody tr.sel td{background:var(--soft)}
.tbl .r{text-align:right}
.scroll{overflow:auto;margin:0 -16px -14px;border-top:1px solid var(--line)}
.who{display:flex;align-items:center;gap:10px;min-width:0}
.who b{font-weight:600;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.who small{color:var(--muted);font-size:11.5px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.av{border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;flex:none;width:30px;height:30px;font-size:11px;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--ring,transparent)}
.av.lg{width:58px;height:58px;font-size:19px}
.av.md{width:40px;height:40px;font-size:14px}
.logo-c{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#fff;font-weight:700;font-size:10.5px;flex:none}
.score{display:flex;align-items:center;gap:8px}
.score .bar{width:48px;height:5px}
.stage{display:inline-flex;height:22px;align-items:center;padding:0 8px;border-radius:6px;background:#F1F4F8;color:var(--ink2);font-size:11.5px;white-space:nowrap}
.stage.late{background:rgba(229,72,77,.08);color:var(--hot);font-weight:600}
.search{display:flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:#fff;min-width:200px}
.search input{border:0;padding:0;box-shadow:none!important;height:28px}
.search svg{width:14px;height:14px;color:var(--muted);flex:none}

/* team */
.member{display:grid;grid-template-columns:40px 1fr auto;gap:12px;align-items:center;padding:9px 10px;border-radius:12px}
.member.top{background:var(--soft)}
.member b{font-weight:600}
.member .meta{font-size:11.5px;color:var(--muted);margin:1px 0 6px}
.member .big{text-align:right;font-size:17px;font-weight:600}
.member .big small{display:block;font-size:11px;color:var(--muted);font-weight:400}

/* ── AI */
.ask{position:fixed;left:calc(210px + (100vw - 210px)/2);transform:translateX(-50%);bottom:12px;width:min(760px,calc(100vw - 250px));z-index:15}
body.withpanel .ask{left:calc(210px + (100vw - 650px)/2);width:min(680px,calc(100vw - 690px))}
.ask .box{padding:10px 12px;border-radius:16px}
.ask .ans{display:flex;gap:12px;padding:4px 4px 10px;border-bottom:1px solid var(--line);margin-bottom:8px}
.ask .ans .sp{width:28px;height:28px;flex:none;border-radius:9px;background:linear-gradient(135deg,var(--accent),var(--violet));display:grid;place-items:center;color:#fff}
.ask .ans .sp svg{width:15px;height:15px}
.ask .ans b{display:block;font-size:12.5px;margin-bottom:2px}
.ask .ans p{font-size:12.5px;color:var(--ink2);white-space:pre-wrap}
.ask form{display:flex;gap:8px;align-items:center}
.ask input{border:1px solid var(--line);height:36px}
.ask .btn{height:36px}

/* ── drawer */
.scrim{position:fixed;inset:0;background:rgba(15,27,45,.22);z-index:40;animation:fi .2s}
@keyframes fi{from{opacity:0}}
.drawer{position:fixed;top:10px;right:10px;bottom:10px;width:min(560px,calc(100vw - 20px));z-index:41;display:flex;flex-direction:column;overflow:hidden;animation:si .28s cubic-bezier(.2,.8,.2,1)}
@keyframes si{from{transform:translateX(40px);opacity:0}}
.dhead{display:flex;gap:14px;align-items:center;padding:20px 20px 12px}
.dhead h3{font-size:19px;letter-spacing:-.02em}
.dhead p{color:var(--muted);font-size:12.5px}
.dbody{flex:1;overflow:auto;padding:0 20px 16px;display:grid;gap:12px;align-content:start}
.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.facts>div{padding:8px 10px;border-radius:10px;background:var(--bg2);min-width:0}
.facts small{display:block;color:var(--muted);font-size:11px;margin-bottom:3px}
.facts select,.facts input{border:0;background:transparent;padding:0;height:22px;font-weight:600;box-shadow:none!important}
.tabs{display:flex;gap:18px;border-bottom:1px solid var(--line)}
.tabs button{padding:9px 2px;color:var(--muted);font-weight:500;border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs button[aria-selected=true]{color:var(--accent);border-color:var(--accent);font-weight:600}
.sec{border:1px solid var(--line);border-radius:14px;padding:14px;display:grid;gap:8px}
.sec h4{font-size:13.5px;display:flex;gap:10px;align-items:center}
.sec h4 svg{width:18px;height:18px;color:var(--accent)}
.fit{display:grid;grid-template-columns:96px 1fr;gap:16px;align-items:center}
.fit ul{list-style:none;padding:0;display:grid;gap:5px;font-size:12.5px}
.fit li{display:flex;gap:8px}.fit li::before{content:"";width:7px;height:7px;border-radius:50%;margin-top:5px;flex:none;background:var(--pos)}
.fit li.no::before{background:var(--neg)}
.tl{display:grid;gap:12px;position:relative;padding-left:22px}
.tl::before{content:"";position:absolute;left:5px;top:6px;bottom:6px;width:1.5px;background:var(--line)}
.tl div{position:relative;font-size:12.5px}
.tl div::before{content:"";position:absolute;left:-21px;top:4px;width:9px;height:9px;border-radius:50%;background:#C4CFDD}
.tl div:first-child::before{background:var(--accent);box-shadow:0 0 0 3px var(--soft)}
.tl small{display:block;color:var(--muted)}
.hooks{display:grid;gap:6px;counter-reset:h}
.hooks div{display:flex;gap:10px;align-items:center;font-size:12.5px}
.hooks div::before{counter-increment:h;content:counter(h);width:22px;height:22px;border-radius:6px;background:var(--soft);color:var(--accent);display:grid;place-items:center;font-weight:600;font-size:11.5px;flex:none}
.compose{display:grid;gap:10px}
.compose .to{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px}
.compose textarea{min-height:240px}
.note{padding:10px 12px;border-radius:10px;background:#FFF8E8;border:1px solid #F5E3B8;font-size:12.5px;color:#6E5512;white-space:pre-wrap}
.info{display:flex;gap:8px;align-items:center;padding:9px 12px;border-radius:10px;background:var(--bg2);color:var(--ink2);font-size:12px}
.info svg{width:15px;height:15px;color:var(--accent);flex:none}
.dfoot{display:flex;gap:8px;padding:12px 20px;border-top:1px solid var(--line);align-items:center}

/* ── plan wizyt */
.planlayout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;align-items:start}
.exrow{display:grid;grid-template-columns:28px minmax(0,1fr) auto auto 112px;gap:10px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line2)}
.exrow:hover{background:#F8FAFD}
.exrow .why{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exrow .loc{font-size:11.5px;color:var(--ink2);background:#F1F4F8;border-radius:6px;padding:2px 7px;white-space:nowrap}
.planbtn{height:28px;border-radius:8px;font-size:12px;font-weight:600;border:1px solid var(--line);background:#fff;padding:0 10px;white-space:nowrap}
.planbtn.on{background:var(--soft);color:var(--accent);border-color:transparent}
.hallmap{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:12px}
.hall{border:1px solid var(--line);border-radius:10px;padding:8px;min-height:54px;background:var(--bg2);display:grid;align-content:space-between;cursor:pointer}
.hall.has{background:#fff;border-color:#CFDDF3}
.hall.must{border-color:rgba(229,72,77,.4);box-shadow:inset 0 0 0 1px rgba(229,72,77,.15)}
.hall b{font-size:13px}.hall small{font-size:11px;color:var(--muted)}
.hall.sel{outline:2px solid var(--accent)}
.stop{display:grid;grid-template-columns:24px 22px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 4px;border-bottom:1px solid var(--line2)}
.stop .n{width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center}
.stop.done .n{background:var(--pos)}
.stop.done .c{color:var(--muted);text-decoration:line-through}
.stop input{width:16px;height:16px;accent-color:var(--pos)}
.hallh{display:flex;align-items:center;gap:8px;margin:12px 0 2px;font-size:12px;font-weight:600;color:var(--ink2)}
.meet{display:grid;gap:8px;padding:10px;border-radius:10px;background:var(--bg2);margin:4px 0 8px 54px}
.steps3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}
.steps3 div{padding:14px;border-radius:12px;background:var(--bg2)}
.steps3 b{display:flex;gap:8px;align-items:center;margin-bottom:6px}
.steps3 b span{width:22px;height:22px;border-radius:7px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:12px}
.steps3 p{font-size:12.5px;color:var(--ink2)}

/* ── scan */
.scanlayout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
.camera{display:grid;place-items:center;gap:10px;padding:26px;border:2px dashed #CFDAE8;border-radius:16px;background:var(--bg2);cursor:pointer;text-align:center}
.camera svg{width:40px;height:40px;color:var(--accent)}
.camera b{font-size:16px}
.owners{display:flex;gap:6px;flex-wrap:wrap}
.owners button{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px 0 6px;border-radius:20px;border:1px solid var(--line);background:#fff;font-weight:500}
.owners button .av{width:20px;height:20px;font-size:9px;box-shadow:none}
.owners button.on{background:var(--accent);color:#fff;border-color:var(--accent)}
.result{padding:14px;border-radius:14px;border:1px solid var(--line);display:grid;gap:8px}
.kv{display:grid;grid-template-columns:110px 1fr;gap:4px 10px;font-size:12.5px}
.kv span{color:var(--muted)}

/* ── analytics & settings */
.prog{display:grid;gap:10px}
.prog .it{display:grid;grid-template-columns:150px 1fr 120px;gap:12px;align-items:center;font-size:12.5px}
.prog .bar{height:8px}
.prog .it b{text-align:right;font-weight:600}
.prog .it small{color:var(--muted);font-weight:400}
.chartbox svg{width:100%;height:280px;display:block}
.costrow{display:grid;grid-template-columns:1fr 130px 30px;gap:8px;align-items:center;margin-bottom:6px}
.setgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:9px 16px;border-radius:10px;z-index:60;font-size:13px;box-shadow:0 10px 30px -10px rgba(0,0,0,.4)}

/* ── auth / onboarding */
.center{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(900px 500px at 80% -10%,rgba(31,111,235,.12),transparent 60%),var(--bg)}
.auth{width:min(420px,100%);padding:28px;display:grid;gap:14px}
.auth h1{font-size:22px;letter-spacing:-.02em}
.brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:17px;letter-spacing:-.02em}
.brand i{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,var(--accent),var(--violet))}
.brand .my{color:var(--accent2);font-weight:500}
.chatwrap{width:min(660px,100%);height:min(740px,calc(100vh - 40px));display:flex;flex-direction:column}
.chat{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:10px}
.msg{max-width:84%;padding:10px 13px;border-radius:14px;white-space:pre-wrap;font-size:13.5px}
.msg.assistant{background:var(--bg2);border-top-left-radius:4px}
.msg.user{align-self:flex-end;background:var(--accent);color:#fff;border-top-right-radius:4px}
.chatbar{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line)}

@media (max-width:1280px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.contacts{grid-template-columns:1fr}.panel{position:fixed;top:10px;right:10px;bottom:10px;width:min(460px,calc(100vw - 20px));max-height:none;z-index:41}body.withpanel .ask{left:calc(210px + (100vw - 210px)/2);width:min(760px,calc(100vw - 250px))}}
@media (max-width:1000px){.shell{grid-template-columns:72px 1fr}.side .brand span,.nav span,.side .current{display:none}.nav{justify-content:center;padding:0}.ask,body.withpanel .ask{left:calc(72px + (100vw - 72px)/2);width:min(760px,calc(100vw - 100px))}.phases{order:3;width:100%;margin:0;overflow-x:auto}.kpis4{grid-template-columns:1fr 1fr}}
@media (max-width:1100px){.r-dash1,.r-dash2,.planlayout,.scanlayout,.r-an{grid-template-columns:1fr!important}.hero{grid-template-columns:1fr}.hero .art{min-height:130px}.hero .art::before{background:linear-gradient(180deg,#fff,rgba(255,255,255,0) 30%)}.setgrid{grid-template-columns:1fr 1fr}}
@media (max-width:720px){
  .shell{grid-template-columns:1fr}
  .side{position:fixed;top:auto;bottom:0;left:0;right:0;height:60px;flex-direction:row;justify-content:space-around;padding:6px;background:#fff;border-top:1px solid var(--line);overflow-x:auto}
  .side .brand,.side hr,.side .current{display:none}
  .nav{flex:none;width:48px;height:44px;padding:0;justify-content:center}.nav[aria-current=page]::before{display:none}
  main{padding:10px 12px 150px}.fairsel{min-width:0;flex:1}.userchip b,.userchip small{display:none}
  .ask,body.withpanel .ask{left:12px;right:12px;width:auto;transform:none;bottom:70px}
  .kpis4{grid-template-columns:1fr 1fr}.k4{grid-template-columns:1fr}.k4 .ic{display:none}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ask{left:12px;right:12px;width:auto;transform:none;bottom:70px}
  .facts{grid-template-columns:1fr 1fr}.setgrid{grid-template-columns:1fr}.steps3{grid-template-columns:1fr}
  .exrow{grid-template-columns:28px minmax(0,1fr) 96px}.exrow .loc,.exrow .pill{display:none}
  .hero .stats{gap:18px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ── Kontakty: panel na pełną wysokość obok KPI i tabeli (wzorzec-4) */
.contacts{grid-template-columns:minmax(0,1fr) 400px}
.ccol{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
.contacts .k4{grid-template-columns:42px 1fr;gap:12px;padding:14px;min-height:88px}
.contacts .k4 .ic{width:42px;height:42px;border-radius:12px}
.contacts .k4 .val{font-size:23px}
.contacts .k4 svg.spark{width:56px;right:10px;top:22px}
.contacts .tbl td{padding:7px 8px}.contacts .tbl th{padding:8px 8px}
.contacts .tbl .who b,.contacts .tbl .who small{max-width:150px}
.contacts .tbl select.stg{width:100px}
.contacts .filters .search{min-width:180px;max-width:260px}
.panel .dhead{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start}
.panel .dhead h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.panel .dhead .grow{display:none}
.panel .dhead .pill{align-self:center}
.panel .tabs{gap:14px;overflow-x:auto;scrollbar-width:none}
.panel .tabs button{white-space:nowrap;font-size:12.5px}
.row>*{min-width:0}
@media (max-width:1600px){.contacts .tbl .oname{display:none}.contacts .tbl select.stg{width:94px}.contacts .tbl .who b,.contacts .tbl .who small{max-width:130px}}
@media (max-width:1600px){.contacts .k4 svg.spark{display:none}}
@media (max-width:1600px){
  .contacts .tbl td,.contacts .tbl th{padding-left:6px;padding-right:6px}
  .contacts .tbl .who b,.contacts .tbl .who small{max-width:118px}
  .contacts .tbl td:nth-child(3) .who b{max-width:96px!important}
  .contacts .tbl select.stg{width:88px}
  .contacts .tbl .sc .bar{width:34px}
}
@media (max-width:1600px){.contacts .tbl th{white-space:normal;line-height:1.2}}

/* ── Onboarding: rozmowa z tłem (ilustracja stoiska), lewa kolumna z krokami */
.ob{position:relative;min-height:100vh;display:grid;grid-template-columns:minmax(300px,420px) minmax(0,760px);gap:28px;justify-content:center;align-items:center;padding:28px 24px;overflow:hidden}
.ob-bg{position:fixed;inset:0;z-index:-1;background:
  linear-gradient(180deg,rgba(243,246,251,.72),rgba(243,246,251,.94) 55%,var(--bg)),
  url(hero.webp) right -60px top -40px/min(1100px,95vw) auto no-repeat,
  radial-gradient(900px 600px at 10% 110%,rgba(124,92,255,.14),transparent 60%),
  radial-gradient(800px 500px at 90% -10%,rgba(31,111,235,.18),transparent 60%),var(--bg)}
.ob-side{display:grid;gap:16px;align-content:start}
.ob-side .brand{font-size:18px}
.ob-side h1{font-size:30px;line-height:1.12;letter-spacing:-.03em}
.ob-side>p{color:var(--ink2);font-size:14px;line-height:1.55}
.ob-steps{list-style:none;padding:0;display:grid;gap:6px;counter-reset:st}
.ob-steps li{counter-increment:st;display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:12px;background:rgba(255,255,255,.7);border:1px solid var(--line);color:var(--ink2);font-weight:500;backdrop-filter:blur(6px)}
.ob-steps li::before{content:counter(st);width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--bg3);color:var(--accent);font-size:11px;font-weight:700;flex:none}
.ob-steps li.ok{color:var(--ink)}
.ob-steps li.ok::before{content:"";display:none}
.ob-steps li.ok svg{width:22px;height:22px;padding:4px;border-radius:50%;background:var(--pos);color:#fff;flex:none}
.ob-drop{display:flex;gap:12px;align-items:center;padding:14px;border:1.5px dashed #B9CCEA;border-radius:14px;background:rgba(255,255,255,.75);cursor:pointer;transition:.15s}
.ob-drop:hover{border-color:var(--accent);background:#fff}
.ob-drop>svg{width:34px;height:34px;padding:8px;border-radius:10px;background:var(--soft);color:var(--accent);flex:none}
.ob-drop b{display:block}.ob-drop small{color:var(--muted);font-size:12px}
.ob-skip{font-size:12.5px;color:var(--muted)}
.ob-main{display:flex;flex-direction:column;height:min(820px,calc(100vh - 56px));overflow:hidden;border-radius:20px;box-shadow:0 30px 80px -40px rgba(20,60,130,.45)}
.ob-head{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line)}
.ob-head .sp{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--accent),var(--violet))}
.ob-head .sp svg{width:18px;height:18px}
.ob-head b{display:block;font-size:14px}.ob-head small{color:var(--pos);font-size:11.5px}
.ob-main .chat{flex:1;overflow:auto;padding:22px 22px 10px;display:flex;flex-direction:column;gap:12px;background:linear-gradient(180deg,#fff,#FAFCFF)}
.ob-main .msg{max-width:82%;padding:12px 15px;border-radius:16px;white-space:normal;font-size:14px;line-height:1.55}
.ob-main .msg.assistant{background:#F2F6FC;border:1px solid var(--line2);border-top-left-radius:5px}
.ob-main .msg.user{align-self:flex-end;background:#E9F1FF;color:var(--ink);border:1px solid #D3E3FD;border-top-right-radius:5px;max-height:320px;overflow:auto}
.ob-main .msg.wide{max-width:96%;width:100%;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.ob-main .msg.file{display:flex;align-items:center;gap:8px;font-weight:600}
.ob-main .msg.file svg{width:18px;height:18px;color:var(--accent)}.ob-main .msg.file small{color:var(--muted);font-weight:400}
.ob-main .msg.err{background:#FFF1F1;border-color:#F7CFD0;color:#A3282C}.ob-main .msg small{display:block;opacity:.75;margin-top:4px;font-size:11.5px}
.ob-main .msg.done{display:flex;gap:8px;align-items:center;background:#EAF7EF;border-color:#C9EBD6;color:#17703E;font-weight:600}
.ob-main .msg.done svg{width:16px;height:16px}
.msg.typing{display:flex;gap:5px;padding:14px 16px}
.msg.typing i{width:7px;height:7px;border-radius:50%;background:#9FB3CF;animation:tp 1.2s infinite ease-in-out}
.msg.typing i:nth-child(2){animation-delay:.15s}.msg.typing i:nth-child(3){animation-delay:.3s}
@keyframes tp{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-5px);opacity:1}}
.composer{display:flex;align-items:flex-end;gap:8px;margin:0 14px;padding:8px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 10px 30px -18px rgba(20,60,130,.35)}
.composer:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px var(--soft)}
.composer textarea{border:0;box-shadow:none!important;resize:none;min-height:44px;max-height:220px;padding:11px 6px;font-size:14.5px;line-height:1.5;background:transparent}
.composer .iconbtn{width:40px;height:40px;border-radius:12px;color:var(--accent);background:var(--soft);flex:none}
.composer .iconbtn svg{width:18px;height:18px}
.composer .btn{height:42px;border-radius:12px;padding:0 16px}
.composer textarea:disabled{opacity:.6}
.ob-note{padding:8px 18px 14px;color:var(--muted);font-size:11.5px}
@media (max-width:980px){.ob{grid-template-columns:1fr;padding:14px;gap:14px;align-items:start}.ob-side h1{font-size:22px}.ob-steps{grid-template-columns:1fr 1fr}.ob-side>p{display:none}.ob-main{height:calc(100vh - 28px)}}

/* ── import: postęp i wynik */
.imp{display:grid;gap:10px}
.imp-top{display:flex;align-items:center;gap:10px}.imp-top b{font-size:14px}
.imp.done .imp-top svg{width:22px;height:22px;padding:4px;border-radius:50%;background:var(--pos);color:#fff;flex:none}
.imp .bar{height:8px;border-radius:6px;background:var(--line2);overflow:hidden}
.imp .bar i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,var(--accent),var(--violet));transition:width .6s ease}
.imp small{color:var(--muted)}
.imp-chips{display:flex;flex-wrap:wrap;gap:6px}.imp-chips .chip svg{width:13px;height:13px;margin-right:5px;color:var(--accent)}
.imp p{color:var(--ink2);font-size:13px}
.imp details summary{cursor:pointer;color:var(--accent);font-weight:500;font-size:12.5px}
.imp-map{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.imp-map span{font-size:12px;padding:4px 9px;border-radius:8px;background:var(--bg2);border:1px solid var(--line2)}
.imp-map i{font-style:normal;font-weight:600;margin-right:4px}
.imp.err b{color:var(--neg)}
.modal .card:has(.imp){width:min(560px,100%)}
.dropov{position:fixed;inset:0;z-index:80;display:grid;place-items:center;background:rgba(31,111,235,.12);backdrop-filter:blur(3px);pointer-events:none}
.dropov>div{display:grid;justify-items:center;gap:8px;padding:34px 46px;border:2px dashed var(--accent);border-radius:20px;background:#fff;box-shadow:var(--shadow)}
.dropov svg{width:38px;height:38px;color:var(--accent)}.dropov b{font-size:16px}.dropov small{color:var(--muted)}
.ob-main .msg{flex-shrink:0}
@media (max-width:1600px){.contacts .tbl select.stg{width:100px;font-size:11.5px;padding:0 4px}}
.ob-main{padding:0!important;gap:0!important;width:100%}

/* ── Moje targi */
.fgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.fcardx{padding:16px;display:grid;gap:12px;align-content:start}
.fcardx.cur{border-color:#BFD5FA;box-shadow:0 0 0 3px var(--soft),var(--shadow)}
.fx-top{display:flex;align-items:center;gap:10px}
.fx-top .badge{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:700;background:linear-gradient(135deg,var(--accent),var(--violet));flex:none}
.fx-top b{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fx-top small{color:var(--muted);font-size:12px}
.fx-top .iconbtn{color:var(--muted)}.fx-top .iconbtn:hover{color:var(--neg);background:rgba(229,72,77,.08)}
.fx-brief{display:grid;gap:6px}.fx-brief .chip{justify-self:start;gap:6px}.fx-brief .chip svg{width:13px;height:13px}
.fx-brief p{color:var(--ink2);font-size:12.5px;line-height:1.45}
.fx-warn{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#B87508}.fx-warn svg{width:14px;height:14px}
.fx-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px;border-radius:12px;background:var(--bg2)}
.fx-stats div{display:grid}.fx-stats b{font-size:15px;letter-spacing:-.01em}.fx-stats span{font-size:11px;color:var(--muted)}
.fx-act{display:flex;gap:6px;flex-wrap:wrap}.fx-act svg{width:13px;height:13px}
.fnew{display:grid;place-items:center;align-content:center;gap:6px;min-height:260px;border:1.5px dashed #B9CCEA;background:rgba(255,255,255,.6);color:var(--ink2)}
.fnew svg{width:30px;height:30px;padding:6px;border-radius:10px;background:var(--soft);color:var(--accent)}.fnew small{color:var(--muted);max-width:240px;text-align:center}
.fnew:hover{border-color:var(--accent);background:#fff}
.btn.danger{background:var(--neg);color:#fff}.btn.danger:disabled{opacity:.45;cursor:not-allowed}
.btn.danger.ghostd{background:transparent;color:var(--neg);border:1px solid #F3C4C6}
.banner.soft{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:12px;background:#FFF8EA;border:1px solid #F5DDAE;color:#7A5304}
.banner.soft svg{width:16px;height:16px;flex:none}
