:root{color-scheme:dark;--bg:#101011;--panel:#181819;--line:#2b2b2e;--text:#ededee;--muted:#a0a0a6;--positive:#46c99a;--negative:#f07883;color:var(--text);background:var(--bg);font-family:Inter,'Segoe UI',sans-serif;font-size:14px}
body{background:var(--bg);line-height:1.5}button,input,select,textarea{transition:background .15s,border-color .15s}button:focus-visible,a:focus-visible{outline:2px solid #ccc;outline-offset:4px}::selection{background:#555;color:#fff}a{color:var(--text)}
.shell{grid-template-columns:238px minmax(0,1fr)}.sidebar{background:#0b0b0c;border-right:1px solid #232326;padding:30px 16px;gap:32px;position:sticky;top:0;height:100vh}.brand{font-size:21px;letter-spacing:-.8px;font-weight:650;color:#f4f4f5}.brand small{color:#77777e;font-size:10px;letter-spacing:2px;margin-top:9px}.nav{gap:6px}.nav:before{content:'РОБОЧИЙ ПРОСТІР';font-size:10px;letter-spacing:1.4px;color:#717178;padding:0 12px 10px}.nav button{color:#9999a1;font-weight:450;padding:11px 12px;border-radius:9px;display:flex;align-items:center;gap:12px}.nav button span{color:inherit;width:20px;display:flex;align-items:center;justify-content:center}.nav button svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}.nav button:hover{background:#141416;color:#eee}.nav button.active{background:#202023;color:#fff}.nav button:last-child{margin-top:25px}.sidefoot{font-size:11px;color:#82828a;background:#141416;border:1px solid #242427;border-radius:12px;padding:15px;line-height:1.8}
.topbar{background:#101011;border-bottom:1px solid #242427;height:76px;padding:0 36px}.topbar strong{color:#d8d8dc;font-weight:500}.topbar .muted{font-size:11px}.topbar .inline{font-size:12px}.content{padding:32px 36px 50px;max-width:1700px}.heading{margin-bottom:28px;align-items:center}.heading h1{color:#f5f5f6;font-size:28px;letter-spacing:-1px;font-weight:550}.heading p{color:#92929b;font-size:13px;max-width:760px}.btn{background:#1b1b1e;color:#d7d7dd;border:1px solid #35353a;border-radius:8px;font-weight:500;font-size:12px;padding:9px 14px;min-height:38px}.btn:hover{background:#2b2b30;border-color:#5a5a62}.btn.primary{background:#e9e9ec;border-color:#e9e9ec;color:#18181b}.btn.primary:hover{background:white;border-color:white}.btn.danger{color:var(--negative)}.btn.small{font-size:11px}.cards{gap:16px;margin-bottom:24px}.card,.panel{background:var(--panel);border:1px solid #222225;box-shadow:none;border-radius:14px}.card{padding:24px}.card .label{font-size:12px;color:#a6a6ad;font-weight:450}.card .value{font-size:clamp(22px,2.2vw,32px);letter-spacing:-1px;font-weight:550;color:#f1f1f3;margin-top:18px;line-height:1.25;font-variant-numeric:tabular-nums}.card .hint{color:#83838c;margin-top:10px;font-size:11px}.panel{padding:24px;margin-bottom:20px}.panel h2{color:#c5c5cc;font-size:13px;font-weight:500}.panel-head{margin-bottom:24px}.split{gap:20px;grid-template-columns:1.25fr 1fr}.muted,.field small{color:var(--muted)}
.field label{color:#b3b3bd;font-size:12px;font-weight:450}.field input,.field select,.field textarea,.filters input,.filters select{color:#ededf1;background:#131315;border-color:#36363c;border-radius:7px;font-size:13px}.field input:focus,.field select:focus,.field textarea:focus,.filters input:focus,.filters select:focus{outline:2px solid #ffffff25;border-color:#8b8b95}.filters{gap:12px;padding:16px;background:#18181b;border:1px solid #29292e;border-radius:10px}.filters label{color:#aaaab2;font-size:11px}.filters label input,.filters label select{margin-top:6px}.filters .btn{align-self:flex-end}.field input[type=checkbox]{accent-color:#d6d6dc}.field textarea{min-height:100px}input::placeholder,textarea::placeholder{color:#72727c}
table{font-size:12px}th{color:#8f8f99;background:transparent;font-size:10px;letter-spacing:.8px;font-weight:500}th,td{padding:15px 12px;border-bottom:1px solid #2a2a2f}td{color:#c7c7d0;font-variant-numeric:tabular-nums}tbody tr:hover{background:#202024}tbody tr:last-child td{border-bottom:0}.link{color:#e3e3e8;font-weight:500}.link:hover{color:#fff;text-decoration:underline;text-underline-offset:4px}.badge{background:#2a2a30;color:#c7c7d1;font-size:10px;font-weight:500}.empty{color:#91919a;font-size:13px;padding:36px 20px}.kanban{gap:16px}.column{background:#141416;border:1px solid #242428;border-radius:12px;padding:14px;min-width:280px;width:280px}.column h3{color:#a8a8b2;font-size:12px;font-weight:500;margin-bottom:18px}.leadcard{background:#1c1c1f;border:1px solid #303036;border-radius:9px;padding:16px;box-shadow:none;margin-bottom:12px}.leadcard:hover{border-color:#55555f}.leadcard button{font-size:13px}.leadcard p{color:#9999a4;font-size:11px}
.modal-back{background:#000a;backdrop-filter:blur(5px)}.modal{background:#19191c;border:1px solid #38383f;border-radius:16px;box-shadow:0 24px 90px #0009}.modal-head{border-color:#303036}.modal-head h2{font-size:18px;font-weight:500;color:#eee}.close{color:#aaa}.notice{background:#202024;border:1px solid #323238;color:#aaaab5;font-size:12px;border-radius:10px;line-height:1.7}.notice.warning{background:#29241b;color:#e6be74;border-color:#57462b}.error{color:var(--negative)}.auth{background:#0e0e10}.authbox{background:#19191c;border:1px solid #303036;box-shadow:0 30px 90px #0005;padding:36px;border-radius:16px}.authbox h1{color:#f1f1f4;font-weight:550}.authbox p{color:#a3a3ad;font-size:13px}.loading{color:#9999a3}.crumb{font-size:12px;color:#73737c;margin:22px 0}.crumb button{color:#c6c6ce;font-weight:450}.detail-list{font-size:12px;gap:10px}.detail-list div{border-color:#2d2d33;padding-bottom:10px;display:flex;justify-content:space-between;gap:12px;align-items:baseline}.detail-list strong{color:#9999a5;font-size:12px;min-width:0}.tabs button.active{background:#e1e1e5;color:#17171a;border-color:#e1e1e5}.comment{border-color:#2f2f35;color:#d2d2da}.comment small{color:#92929d}#toast{background:#303036;color:#f4f4f8;border:1px solid #4c4c55;box-shadow:0 10px 35px #0006}#toast.error-toast{background:#3c2329;border-color:#70404c}.positive{color:var(--positive)!important}.negative{color:var(--negative)!important}.neutral{color:#d8d8e0}.signed{font-variant-numeric:tabular-nums;white-space:nowrap}.chart-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.chart-total{font-size:30px;font-weight:550;letter-spacing:-1px;color:#efeff3;margin-top:5px}.chart-legend{color:#90909b;font-size:11px}.revenue-chart{width:100%;height:210px;display:block;margin-top:20px;overflow:visible}.revenue-chart text{fill:#93939d;font-size:11px}.chart-foot{display:flex;justify-content:space-between;color:#81818c;font-size:11px;gap:16px;margin-top:8px}.stage-bars{display:grid;gap:16px}.stage-row{display:grid;grid-template-columns:minmax(100px,1fr) 2fr 30px;align-items:center;gap:15px;font-size:12px;color:#a5a5af}.stage-track{height:5px;background:#29292e;border-radius:8px;overflow:hidden}.stage-fill{height:100%;background:#9b9ba5;border-radius:8px}.stage-row b{color:#dedee4;text-align:right;font-weight:500}
@media(min-width:1600px){.content{padding-top:40px}.card{padding:28px}.panel{padding:28px}}@media(max-width:1050px){.shell{grid-template-columns:200px minmax(0,1fr)}.sidebar{width:auto}.content{padding:26px 22px}.topbar{padding:0 22px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.split{grid-template-columns:1fr}.card .value{font-size:27px}}@media(max-width:650px){.shell{display:block}.sidebar{position:relative;height:auto;width:auto;padding:18px;gap:10px;border-bottom:1px solid #303036}.nav{display:flex;gap:6px;margin:8px 0 0}.nav:before,.sidefoot{display:none}.nav button{padding:9px 12px}.nav button:last-child{margin-top:0}.nav button span{display:flex}.topbar{padding:14px 18px;height:auto}.content{padding:24px 16px}.heading{align-items:flex-start}.heading h1{font-size:26px}.panel{padding:18px}.card{padding:18px}.card .value{font-size:23px}.card .label{font-size:11px}.cards{gap:10px}.filters{padding:12px}.chart-head{flex-direction:column;gap:8px}.chart-foot{font-size:10px}.grid2{grid-template-columns:1fr}.modal-body{padding:20px}.stage-row{grid-template-columns:110px 1fr 24px}}
.overview-filters{align-items:end}.overview-filters label{display:grid;gap:4px;min-width:150px}.overview-filters label select,.overview-filters label input{margin-top:0}.overview-period{color:#a5a5ae;font-size:13px;margin:0 0 20px}.overview-cards{grid-template-columns:repeat(5,minmax(0,1fr))}.overview-card{display:flex;flex-direction:column;text-align:left;width:100%;color:inherit;cursor:pointer}.overview-card:hover,.attention-tile:hover{border-color:#777780;background:#202024}.overview-card .hint{line-height:1.4}.overview-alerts{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 20px}.attention-tile{border:1px solid #3b3731;background:#1b1a19;border-radius:12px;text-align:left;color:#e5e1dc;padding:18px 20px;display:grid;grid-template-columns:1fr auto;gap:4px 12px;cursor:pointer}.attention-tile strong{font-size:23px;grid-column:2;grid-row:1 / 3;color:#e9bd79}.attention-tile small{color:#a8a3a0;font-size:12px}.queue-group+.queue-group{margin-top:20px}.queue-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #303036;padding-bottom:9px;color:#dfdfe5;font-size:13px}.queue-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #29292e;font-size:13px}.queue-row .muted{font-size:12px;margin-top:3px}.queue-row>span{color:#aaaab2;white-space:nowrap;font-size:12px}.queue-empty{padding:12px 0;color:#888892;font-size:12px}.overview-stage{width:100%;background:transparent;border:0;text-align:left;cursor:pointer;padding:4px;border-radius:5px}.overview-stage:hover{background:#27272b}.overview-stage .stage-fill{display:block}.finance-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:14px 0 20px}.finance-stat{display:grid;gap:8px;border-right:1px solid #303036;padding-right:12px}.finance-stat:last-child{border:0}.finance-stat span,.finance-stat small{color:#a4a4ad;font-size:12px}.finance-stat strong{font-size:22px;color:#ededf0;font-weight:550}.overview-disclaimer{font-size:12px;line-height:1.6;margin:0}.overview-card .label,.overview-card .hint{display:block}
@media(max-width:1200px){.overview-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.overview-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-alerts{grid-template-columns:1fr}.finance-grid{grid-template-columns:1fr}.finance-stat{border-right:0;border-bottom:1px solid #303036;padding-bottom:12px}.overview-filters label{flex:1 1 140px}.queue-row{flex-wrap:wrap}}
.overview-outcomes{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.order-tabs{margin-bottom:26px}.funnel-filters{align-items:end}.funnel-filters label{display:grid;gap:4px;min-width:200px;flex:1}.funnel-filters label input,.funnel-filters label select{margin-top:0;max-width:none}.funnel-scroll-controls{display:flex;gap:6px;align-self:end}.funnel-help{font-size:12px;margin:4px 0 16px}.funnel-board{scroll-behavior:smooth;scrollbar-width:auto}.funnel-column{min-width:290px;width:290px;min-height:150px;transition:border-color .15s,background .15s}.funnel-column.drop-target{border-color:#b8b8c2;background:#28282c}.funnel-card[draggable=true]{cursor:grab}.funnel-card.pending{opacity:.65}.funnel-card p{line-height:1.5;overflow-wrap:anywhere}.funnel-card .funnel-next{color:#d2c2a7}.funnel-empty{color:#8f8f99;font-size:12px;padding:8px 3px}.move-control{border-top:1px solid #33333a;margin-top:12px;padding-top:10px}.move-control label{display:block;font-size:11px;color:#a4a4ae;margin-bottom:5px}.move-control div{display:flex;gap:6px}.move-control select{min-width:0;flex:1;color:#ededf1;background:#141416;border:1px solid #45454c;border-radius:6px;padding:6px;font-size:12px}.move-control .btn{padding:6px 8px;min-height:32px}.funnel-board:focus-visible{outline:2px solid #ccc;outline-offset:4px}@media(max-width:650px){.funnel-filters label{min-width:140px}.funnel-column{min-width:275px;width:275px}}
.manager-pool{display:grid;gap:10px;margin:18px 0}.manager-pool label{display:flex;gap:10px;align-items:center;color:#dedee4}.integration-status{display:flex;flex-wrap:wrap;gap:10px 24px;color:#aaaab5;font-size:12px;margin:0 0 22px}.integration-divider{border:0;border-top:1px solid #36363c;margin:30px 0}.integration-period{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:15px}.integration-period label{display:grid;gap:5px;color:#aaaab5;font-size:12px}.integration-period input{background:#131315;color:#ededf1;border:1px solid #36363c;border-radius:7px;min-height:38px;padding:8px}.integration-period .btn{align-self:end}#fb-import-result{margin-top:18px}#fb-import-result .tablewrap{max-height:400px;overflow:auto}#fb-import-result thead{position:sticky;top:0;background:#19191c}
.contact-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:18px}.sheet-source{margin:16px 0;padding:14px;background:var(--surface,#191919);border:1px solid #333;border-radius:10px}.sheet-source summary{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.funnel-card .move-control{margin-top:8px}.funnel-card p:empty{display:none}.funnel-cards{max-height:65vh;overflow-y:auto}.funnel-filters select{max-width:220px}#quick-finance{padding-bottom:20px;border-bottom:1px solid #333;margin-bottom:20px}#paid-option input{width:auto;min-height:auto}#paid-option{display:flex;align-items:center;gap:8px}
.supplier-group{border:1px solid #333;border-radius:10px;margin-top:12px;overflow:hidden}.supplier-group summary{display:flex;gap:16px;align-items:center;padding:16px;cursor:pointer}.supplier-group summary strong{margin-left:auto}.supplier-group .table-wrap{border-top:1px solid #333}.supplier-group .positive{color:#64cba3}#supplier-receipt{padding:16px 0;border-block:1px solid #333;margin:18px 0}#supplier-content .cards .value{font-size:26px}

/* Live connection status and compact operational controls. */
.sync-status {padding:8px 28px;color:#92929b;font-size:12px;border-bottom:1px solid #29292f;min-height:32px}
.sync-status.sync-error {color:#f2b66b}
input,select,textarea {color-scheme:dark}
#pipeline-editor .inline {gap:8px;flex-wrap:wrap}
#pipeline-editor .inline strong {min-width:170px;flex:1}
#pipeline-editor .inline .field {min-width:220px;flex:1}
.funnel-card p {overflow-wrap:anywhere}
.funnel-card .link {text-align:left;line-height:1.4}
@media(max-width:700px){.sync-status{padding:8px 14px}.funnel-filters{gap:8px}}
.client-picker{position:relative}.client-results{position:absolute;top:100%;left:0;right:0;max-height:240px;overflow:auto;background:#202024;border:1px solid #414149;border-radius:10px;z-index:30;box-shadow:0 12px 30px #0007;padding:4px}.client-results[hidden]{display:none}.client-results button{display:block;width:100%;border:0;border-radius:6px;background:transparent;color:#ededf0;text-align:left;padding:10px;font:inherit;cursor:pointer}.client-results button:hover,.client-results button[aria-selected=true]{background:#36363e}.client-results>span{display:block;padding:12px}
