:root{--bg:#f7f9fc;--ink:#172033;--muted:#526176;--line:#e2e8f0;--blue:#2457e6;--green:#06895d;--amber:#aa6000;--red:#c73438;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px;font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px}button:disabled{cursor:not-allowed;opacity:.5}a{color:var(--blue);text-decoration:none}img{max-width:100%;object-fit:contain}:focus-visible{outline:3px solid #8aafff;outline-offset:3px}svg.icon{width:21px;height:21px;flex:none;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}.hidden{display:none!important}.muted,.helper{color:var(--muted)}.helper{font-size:12px;margin:6px 0 0;line-height:1.55}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:700;color:var(--muted)}h1,h2,h3,p{margin-top:0}h1{font-size:32px;line-height:1.2;letter-spacing:-1.1px;margin-bottom:5px}h2{font-size:18px;line-height:1.35;letter-spacing:-.45px;margin-bottom:4px}h3{font-size:15px;margin:0 0 5px}p{margin-bottom:12px}small{font-size:12px}.grow{flex:1;min-width:0}.full{width:100%}.stack{display:grid;gap:16px}.row{display:flex;align-items:center;gap:12px;min-width:0}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.spacer{margin-top:20px}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;min-width:0}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.card-head p{margin:2px 0 0}
.primary,.secondary,.danger,.quiet{min-height:44px;border-radius:8px;padding:9px 16px;border:1px solid var(--line);background:white;font-weight:600;font-size:13px;line-height:1.35}.primary{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 3px 6px #2457e610}.primary:hover{background:#1746cd}.secondary{color:var(--blue);border-color:#7595f6}.secondary:hover{background:#f2f6ff}.danger{color:var(--red)}.quiet{color:var(--ink)}.text-button{border:0;background:transparent;color:var(--blue);padding:5px;font-size:13px}.icon-button{background:transparent;border:0;min-width:44px;min-height:44px;border-radius:8px}.icon-button:hover{background:#edf3ff}.actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.actions.start{justify-content:flex-start}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:7px;font-size:11px;padding:4px 8px;background:#f0f3f8;color:#526176;line-height:1.4}.badge.green{background:#e6f7ef;color:#08784f}.badge.amber{background:#fff3df;color:#a45c00}.badge.blue{background:#edf3ff;color:#2457e6}.badge.purple{background:#f2ecff;color:#7444c5}.dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block;flex:none}.icon-tile{width:43px;height:43px;border-radius:10px;display:grid;place-items:center;flex:none;background:#edf4ff;color:var(--blue)}.icon-tile.green{background:#e7f7ef;color:#069461}.icon-tile.amber{background:#fff4e3;color:#de8900}.icon-tile.purple{background:#f2edff;color:#8248e5}.avatar,.borky-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;flex:none;background:#e9edf6;font-size:14px;font-weight:700}.borky-avatar{width:57px;height:57px;font-size:35px;letter-spacing:-2px;background:#e8edf7;color:#202d46}.borky-avatar.small{width:32px;height:32px;font-size:22px}.brand{display:block;font-size:28px;font-weight:800;letter-spacing:-1.5px;line-height:1.05;color:#0f1d35}.brand small{display:block;font-size:10px;font-weight:650;letter-spacing:4.5px;margin-top:4px;margin-left:1px;color:#3c5074}
.app{min-height:100dvh;display:grid;grid-template-columns:212px minmax(0,1fr);grid-template-rows:68px 1fr;grid-template-areas:"side head" "side main"}.sidebar{grid-area:side;position:fixed;top:0;bottom:0;left:0;width:212px;z-index:30;background:#fff;border-right:1px solid var(--line);padding:25px 9px 14px;display:flex;flex-direction:column}.sidebar>.brand{padding:0 14px 29px}.sidebar nav{display:grid;gap:5px}.nav-item{border:0;background:transparent;padding:13px 16px;min-height:48px;border-radius:9px;text-align:left;justify-content:flex-start;gap:17px;font-size:14px;font-weight:500;position:relative;width:100%}.nav-item svg{color:#425776}.nav-item:hover{background:#f5f8fd}.nav-item.active{background:#edf3ff;color:var(--blue);font-weight:600}.nav-item.active svg{color:var(--blue)}.nav-item.active:before{content:"";position:absolute;left:-8px;top:8px;bottom:8px;width:3px;background:var(--blue);border-radius:0 4px 4px 0}.sidebar-bottom{margin-top:auto}.user-profile{border:0;border-top:1px solid var(--line);background:white;margin-top:14px;padding:18px 7px 4px;text-align:left;justify-content:flex-start;width:100%;gap:9px}.user-profile strong{font-size:12px;display:block}.user-profile small{display:block;color:var(--muted);font-size:11px}.user-profile>span:last-child{margin-left:auto}.topbar{grid-area:head;border-bottom:1px solid var(--line);height:68px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fff}.scope{background:#fff;border:1px solid var(--line);border-radius:8px;min-height:44px;padding:8px 15px;gap:12px;font-size:13px}.scope b{font-weight:600}.top-actions{display:flex;align-items:center;gap:17px}.workspace-lock{display:flex;align-items:center;gap:10px;border-left:1px solid var(--line);padding-left:18px;font-size:12px;color:#526176}.workspace-lock .icon{width:17px}.app>main{grid-area:main;padding:22px 24px 70px;min-width:0;width:100%;max-width:1680px;justify-self:center;align-self:start}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.page-head p{font-size:14px;color:var(--muted);margin:3px 0 0}.page-head .helper{font-size:11px}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.kpi{display:flex;align-items:flex-start;gap:14px;min-height:132px;padding:18px 20px}.kpi .metric{min-width:0}.kpi .label{font-size:13px;color:#435574;display:block;margin:2px 0 4px}.kpi strong{font-size:29px;line-height:1.25;letter-spacing:-.6px;font-variant-numeric:tabular-nums;font-weight:700;overflow-wrap:anywhere;display:block}.kpi small{font-size:11px;color:var(--muted);display:block;margin-top:5px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.92fr) minmax(290px,1fr);gap:14px}.chart-card{grid-column:1;min-height:344px}.insights-card{grid-column:2}.priorities{grid-column:1}.connections-card{grid-column:2}.chart-legend{display:flex;gap:12px;align-items:center;font-size:11px;color:#526176;flex-wrap:wrap}.chart-legend .dot{background:var(--blue)}.chart-container{width:100%;min-width:0;margin-top:16px}.chart-svg{width:100%;height:234px;display:block;overflow:visible}.chart-svg text{font-size:11px;fill:#697a90;font-family:inherit}.chart-svg line{stroke:#e8edf4;stroke-width:1}.chart-svg .area{fill:#edf3ff}.chart-svg .curve{stroke:var(--blue);stroke-width:2.5;fill:none}.chart-svg circle{fill:var(--blue);stroke:white;stroke-width:2}.chart-summary{margin-top:12px;font-size:11px;color:var(--muted)}.chart-summary summary{cursor:pointer}.chart-summary table{margin-top:12px}.insights-head{margin-bottom:15px}.insights-head p{margin:5px 0 0;font-size:11px;display:flex;gap:7px;align-items:center;color:var(--muted)}.insight-row{border:1px solid var(--line);border-radius:9px;padding:12px 10px;display:flex;align-items:center;gap:12px;margin-bottom:9px;min-height:66px}.insight-row p{font-size:11px;color:var(--muted);margin:3px 0 0}.insight-row h3{font-size:13px;margin:0}.insight-row .icon-tile{width:36px;height:36px}.insights-card>.secondary{margin-top:3px;width:100%}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:5px 0 10px}.section-heading p{font-size:12px;margin:0;color:var(--muted)}.product-row{padding:10px;display:flex;align-items:center;gap:16px;margin-bottom:9px}.product-thumb{width:96px;height:88px;background:#f3f5f8;border-radius:8px;display:flex;align-items:center;justify-content:center;flex:none;overflow:hidden}.product-thumb img{display:block;width:100%;height:100%;max-height:100%;min-height:0;object-fit:contain}.product-thumb .icon{width:32px;height:32px;color:#92a2b8}.product-row h3{font-size:14px;margin-bottom:4px}.product-row p{font-size:12px;color:var(--muted);margin:3px 0}.product-row .primary{min-height:44px;padding:6px 24px}.connection-row{display:flex;align-items:center;gap:10px;padding:11px 10px;border:1px solid var(--line);border-radius:8px;margin-top:8px}.provider-mark{width:32px;height:32px;display:grid;place-items:center;border-radius:8px;background:#f0f4fa;font-weight:750;font-size:18px;flex:none}.provider-mark.meta{color:#0866ff;font-size:29px;background:white}.provider-mark.google{color:#4285f4}.provider-mark.shopify{color:#719d30}.provider-mark.nebim{color:#0876df}.provider-mark.kive{color:#2457e6}.connection-row strong{font-size:12px;display:block}.connection-row small{display:block;font-size:10px;color:var(--muted)}.connection-row .badge{font-size:10px}.quick-borky{position:fixed;right:24px;bottom:16px;border:1px solid var(--line);border-radius:24px;padding:6px 10px;background:#fff;box-shadow:0 6px 24px #15223b12;color:var(--muted);width:330px;justify-content:flex-start;font-size:12px;z-index:20}.quick-borky>span:last-child{margin-left:auto;font-size:21px}.bottom-nav,.mobile-brand{display:none}
.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap}.search-field{position:relative;max-width:420px;flex:1;min-width:180px}.search-field input{padding-left:40px}.search-field>.icon{position:absolute;left:12px;top:12px;color:#66758b;width:18px;height:18px}input,select,textarea{border:1px solid #d2ddeb;border-radius:8px;padding:10px 12px;min-height:44px;background:#fff;width:100%;max-width:100%}input[type=checkbox]{width:18px;min-height:18px;height:18px;accent-color:var(--blue)}input[type=date]{min-width:0}textarea{resize:vertical;min-height:100px}label{display:grid;gap:7px;font-size:13px;font-weight:550;min-width:0}.form-fields{display:grid;gap:19px}.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field-row{display:flex;align-items:center;gap:9px}.field-row input{flex:1;min-width:0}.field-row .text-button{white-space:nowrap}.form-footer{margin-top:16px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;justify-content:space-between;gap:12px}.form-error,.error{color:var(--red);font-size:13px}.error:empty{display:none}.tabs{display:flex;gap:18px;border-bottom:1px solid var(--line);margin-bottom:20px;overflow-x:auto}.tabs button{background:transparent;border:0;border-bottom:3px solid transparent;color:#536580;font-weight:550;padding:12px 10px;min-height:45px;white-space:nowrap}.tabs button.active{color:var(--blue);border-bottom-color:var(--blue)}.settings-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:12px;margin-bottom:22px;background:white;overflow:hidden}.settings-tabs button{border:0;border-right:1px solid var(--line);min-height:59px;padding:12px;gap:14px;background:white;font-size:13px;font-weight:550}.settings-tabs button:last-child{border-right:0}.settings-tabs button.active{color:var(--blue);outline:1px solid var(--blue);outline-offset:-1px;border-radius:9px;background:#fcfdff}.settings-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px}.settings-layout .card{padding:24px}.settings-title{display:flex;gap:16px;align-items:center;margin-bottom:24px}.settings-title .provider-mark{width:51px;height:51px;font-size:30px}.settings-title h2{font-size:22px}.settings-title p{font-size:12px;color:var(--muted);margin:2px 0 0}.settings-title .badge{margin-left:auto}.settings-layout hr{border:0;border-top:1px solid var(--line);margin:24px 0}.settings-stack{display:grid;gap:16px;align-content:start}.settings-extra{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.mobile-category{display:none}.model-note{padding:12px;background:#f6f8fc;border-radius:8px;font-size:12px;color:var(--muted);margin-top:10px}.notice{border:1px solid #dce7fc;background:#f1f6ff;border-radius:9px;padding:14px 16px;color:#385780;font-size:12px}.notice.amber{border-color:#f2dfb7;background:#fffaf0;color:#906018}.notice.green{border-color:#c8e8dc;background:#f0faf6;color:#267551}.notice p:last-child{margin-bottom:0}.empty{padding:40px 24px;text-align:center;color:var(--muted)}.empty>.icon-tile{margin:0 auto 15px;width:56px;height:56px;border-radius:14px}.empty h2{color:var(--ink);font-size:18px;margin-bottom:8px}.empty p{max-width:440px;margin:0 auto 20px;font-size:13px}.empty.compact{padding:24px}.empty.compact p{margin-bottom:12px}.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.product-grid .product-thumb{width:100%;height:170px;margin-bottom:15px}.product-grid h3{min-height:44px}.product-grid .card{display:flex;flex-direction:column}.product-grid .actions{margin-top:auto;padding-top:14px}.product-detail .product-thumb{width:100%;height:280px}.detail-table{width:100%;border-collapse:collapse}.detail-table td{padding:12px 0;border-bottom:1px solid var(--line);font-size:13px;vertical-align:top}.detail-table td:first-child{color:var(--muted);width:35%;padding-right:12px}.detail-table td:last-child{overflow-wrap:anywhere}.pagination{display:flex;gap:14px;align-items:center;justify-content:center;margin-top:22px}.pagination button{min-width:105px}.data-table{width:100%;border-collapse:collapse;font-size:12px}.data-table th{text-align:left;background:#f5f7fb;font-weight:600}.data-table th,.data-table td{padding:11px 12px;border-bottom:1px solid var(--line)}.data-table td{overflow-wrap:anywhere}.table-wrap{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:8px}
.creative-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}.creative-preview{padding:12px}.creative-preview .preview-stage{aspect-ratio:1;background:#f3f5f8;display:grid;place-items:center;border-radius:8px;overflow:hidden;margin:12px 0}.preview-stage img,.preview-stage video{width:100%;height:100%;object-fit:contain}.preview-placeholder{text-align:center;color:#8998ac;padding:24px}.preview-placeholder .icon{width:48px;height:48px;margin-bottom:12px}.creative-info h2{font-size:24px;margin-bottom:13px}.creative-info .detail-table{margin-bottom:20px}.quality-list{display:grid;gap:8px;margin:17px 0 24px}.quality-item{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted)}.quality-item .icon{width:17px;height:17px;color:#94a3b8}.quality-item.pass .icon{color:var(--green)}.creative-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.creative-list .preview-stage{height:190px;background:#f3f5f8;border-radius:8px;margin-bottom:15px;display:grid;place-items:center;overflow:hidden}.creative-list h3{margin-bottom:9px}.creative-list .preview-placeholder .icon{width:36px;height:36px}.chat-layout{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(320px,1fr);gap:14px;align-items:start}.chat-panel{padding:22px;min-height:730px;display:flex;flex-direction:column}.chat-panel h1{font-size:28px}.chat-panel>.row{margin-bottom:20px}.chat-feed{min-height:300px;flex:1}.chat-welcome{border:1px solid var(--line);border-radius:11px;padding:19px;margin:8px 0 24px}.chat-welcome h2{font-size:20px}.chat-welcome .notice{margin-top:16px}.message{display:flex;gap:10px;margin:18px 0}.message-content{flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;padding:15px 17px}.message-content .text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;margin-top:10px}.message.user{justify-content:flex-end}.message.user .message-content{flex:none;max-width:85%;background:#edf3ff;border:0}.message-meta{display:flex;gap:12px;align-items:center;font-size:12px}.message-meta time{color:#73839b;font-size:10px}.source-chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.source-chips span{font-size:10px;border:1px solid var(--line);border-radius:6px;padding:5px 7px;color:var(--muted);background:#fafbfd}.quick-prompts{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 9px}.quick-prompts button{font-size:11px;padding:8px;min-height:34px}.composer{display:flex;align-items:flex-end;gap:10px}.composer textarea{resize:none;min-height:48px;max-height:150px;font-size:13px}.composer .primary{border-radius:50%;width:45px;height:45px;padding:0;flex:none}.report-panel h2{font-size:24px;margin-bottom:18px}.report-panel .notice{margin:14px 0}.report-panel .connection-row{margin-bottom:8px}.report-document{max-width:960px;margin:auto}.report-document .report-title{border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:22px}.report-document h2{margin:25px 0 10px}.report-document p,.report-document li{line-height:1.8}.report-list{display:grid;gap:12px}.report-list .card{display:flex;gap:18px;align-items:center}.report-list h3{font-size:16px}.audit-list{display:grid;gap:10px}.audit-item{padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}.checklist{display:grid;gap:14px}.checklist label{display:flex;align-items:center;gap:10px}.mobile-report-button{display:none}
.login-shell{min-height:100dvh;display:grid;place-items:center;padding:24px}.login-card{max-width:460px;width:100%;padding:36px;background:white;border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 50px #1d30500a}.login-intro{margin:32px 0 25px}.login-intro h1{font-size:29px;margin-top:8px;margin-bottom:10px}.login-intro p{color:var(--muted);font-size:13px}.login-card label{margin-bottom:16px}.login-card .helper{margin-top:17px}.modal{position:fixed;inset:0;background:#17203366;z-index:100;display:grid;place-items:center;padding:24px}.modal-card{width:min(690px,100%);max-height:90dvh;border:1px solid var(--line);border-radius:14px;box-shadow:0 25px 70px #11182733;background:white;display:flex;flex-direction:column;min-width:0}.modal-card>header{padding:18px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.modal-card>header h2{font-size:20px;margin:0}.modal-body{padding:24px;overflow:auto;overscroll-behavior:contain;min-height:0}.modal-card>footer{padding:16px 24px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.modal-card>footer:empty{display:none}.modal-open{overflow:hidden}.modal-menu{display:grid;gap:5px}.modal-menu button{justify-content:flex-start}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#172033;color:white;border-radius:10px;padding:13px 20px;z-index:150;max-width:calc(100vw - 32px);box-shadow:0 5px 20px #11182720;font-size:13px}.offline{position:fixed;top:0;left:0;right:0;background:#fff1db;color:#8b4d00;padding:8px;text-align:center;z-index:200;font-size:12px}.loading{padding:65px;text-align:center;color:var(--muted)}.skip-link{position:fixed;left:12px;top:-80px;z-index:300;background:white;padding:12px}.skip-link:focus{top:12px}
@media(min-width:1600px){.app>main{padding-top:25px}.chart-card{min-height:365px}.chart-svg{height:255px}.kpi strong{font-size:32px}}
@media(max-width:1199px){.app{grid-template-columns:72px minmax(0,1fr)}.sidebar{width:72px;padding:22px 6px 12px}.sidebar>.brand{font-size:0;padding:0 0 25px}.sidebar>.brand:before{content:"B";font-size:29px;text-align:center;display:block}.sidebar>.brand small{font-size:7px;letter-spacing:1px;text-align:center;margin-left:0}.nav-item{justify-content:center;padding:12px}.nav-item span,.user-profile>span:not(:first-child){display:none}.user-profile{justify-content:center;padding:18px 0 4px}.nav-item.active:before{left:-6px}.workspace-lock{display:none}.kpi{padding:16px;gap:9px}.kpi strong{font-size:24px}.kpi .icon-tile{width:33px;height:33px}.kpi .label{font-size:11px}.dashboard-grid{grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr)}.product-row{gap:10px}.product-row .product-thumb{width:70px;height:74px}.product-row .primary{padding:7px 12px}.chat-layout{grid-template-columns:1fr}.report-panel{display:none}.mobile-report-button{display:inline-flex}.settings-tabs button{font-size:12px;gap:7px}.settings-tabs button svg{width:18px}.settings-layout .card{padding:18px}.settings-title h2{font-size:19px}.settings-title{gap:10px}.settings-title .badge{font-size:10px}.product-grid,.creative-list{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-borky{width:280px}}
@media(max-width:900px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}.chart-card,.insights-card,.priorities,.connections-card{grid-column:1}.insights-card{grid-row:1}.settings-layout{grid-template-columns:1fr}.chart-svg{height:240px}.kpi strong{font-size:29px}.kpi .icon-tile{width:43px;height:43px}.kpi .label{font-size:13px}.quick-borky{display:none}}
@media(max-width:767px){.app{display:block;padding-bottom:calc(72px + env(safe-area-inset-bottom))}.sidebar{display:none}.topbar{height:66px;padding:0 16px;position:sticky;top:0;z-index:40}.mobile-brand{display:block;font-size:23px}.mobile-brand small{font-size:7px;letter-spacing:3px}.top-actions{gap:5px}.topbar #scopeButton{display:none}.topbar #dateButton{font-size:11px;padding:6px 8px;min-height:38px;gap:6px}.topbar #dateButton>.icon{width:16px}.topbar #dateButton .chevron{display:none}.app>main{padding:20px 16px 25px}.page-head{margin-bottom:17px;gap:12px;flex-wrap:wrap}.page-head h1{font-size:26px;letter-spacing:-.7px}.page-head p{font-size:13px}.page-head .actions{justify-content:flex-start}.card{padding:16px}.kpis{gap:10px}.kpi{padding:14px 12px;min-height:133px;display:block}.kpi .icon-tile{width:30px;height:30px;float:right}.kpi .icon-tile .icon{width:19px;height:19px}.kpi .label{font-size:11px;max-width:calc(100% - 33px);min-height:30px}.kpi strong{font-size:26px;margin-top:6px}.kpi small{font-size:10px}.dashboard-grid{gap:14px}.chart-card{min-height:300px}.chart-card .card-head{display:block;margin-bottom:4px}.chart-legend{margin-top:9px;font-size:10px}.chart-svg{height:210px}.chart-summary{font-size:10px}.product-row .product-thumb{width:73px;height:82px}.product-row{gap:11px;flex-wrap:wrap}.product-row .grow{min-width:130px}.product-row .primary{margin-left:auto}.product-row h3{font-size:13px}.product-row p{font-size:11px}.bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;height:calc(64px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);z-index:50}.bottom-nav button{border:0;background:white;color:#60718a;display:flex;flex-direction:column;gap:4px;font-size:10px;min-height:62px}.bottom-nav .icon{width:22px;height:22px}.bottom-nav button.active{color:var(--blue)}.bottom-nav button.active .icon{stroke-width:2.2}.product-grid,.creative-list{grid-template-columns:1fr}.product-grid .product-thumb{height:200px}.two-col{grid-template-columns:1fr}.creative-detail{grid-template-columns:1fr}.creative-info h2{font-size:23px}.detail-actions{position:sticky;bottom:0;background:white;padding:14px 0;z-index:10}.settings-layout{grid-template-columns:1fr}.settings-layout .card{padding:16px}.settings-title{flex-wrap:wrap;margin-bottom:22px}.settings-title h2{font-size:21px}.settings-title .provider-mark{width:44px;height:44px}.settings-title .badge{margin-left:auto}.settings-title .grow{flex-basis:55%}.settings-extra .quiet{flex:1}.form-footer{position:sticky;bottom:70px;z-index:15;padding:12px}.chat-panel{padding:16px;min-height:calc(100dvh - 175px)}.chat-panel h1{font-size:26px}.chat-panel>.row{align-items:flex-start}.chat-layout{gap:0}.chat-welcome{padding:15px}.chat-welcome h2{font-size:18px}.chat-feed{min-height:230px}.message{gap:7px}.message>.borky-avatar{width:25px;height:25px;font-size:17px}.message-content{padding:12px}.message-content .text{font-size:13px}.quick-prompts button{font-size:10px;min-height:36px}.composer{position:sticky;bottom:66px;background:white;padding:8px 0;z-index:14}.composer textarea{font-size:16px}.report-list .card{flex-wrap:wrap}.report-list .actions{width:100%}.report-list .actions button{flex:1}.report-document{padding:17px}.report-document h1{font-size:24px}.modal{padding:16px}.modal-card{max-height:90dvh}.modal-card>header{padding:14px 16px}.modal-body{padding:18px 16px}.modal-card>footer{padding:14px 16px}.modal-card>header h2{font-size:18px}.modal-card>footer button{flex:1}.modal.sheet{align-items:end;padding:0}.modal.sheet .modal-card{border-radius:18px 18px 0 0;max-height:85dvh;padding-bottom:env(safe-area-inset-bottom)}.toast{bottom:80px;width:max-content;max-width:calc(100vw - 32px)}input,select,textarea{font-size:16px}.toolbar select{width:100%}.login-card{padding:27px}.keyboard-open .bottom-nav{display:none}.keyboard-open .composer{bottom:0}.keyboard-open .quick-prompts{display:none}.keyboard-open .form-footer{bottom:0}}
@media(max-width:639px){.settings-tabs{display:none}.mobile-category{display:flex;width:100%;justify-content:space-between;margin-bottom:18px;min-height:48px;background:white;border:1px solid var(--line);border-radius:9px;padding:12px}.connection-row{flex-wrap:wrap}.connection-row .badge{margin-left:auto}.settings-extra{display:grid;grid-template-columns:1fr 1fr}.creative-info .actions .primary{width:100%}}
@media(max-width:359px){.kpi strong{font-size:23px}.kpi .icon-tile{display:none}.kpi .label{max-width:100%}.topbar #dateButton svg{display:none}.topbar #dateButton{font-size:10px}.primary,.secondary,.quiet{padding:9px 12px}}
@media print{.sidebar,.topbar,.bottom-nav,.quick-borky,.page-head .actions,.toast,.form-footer{display:none!important}.app{display:block}.app>main{padding:0;max-width:none}.card{box-shadow:none;break-inside:avoid}.report-document{border:0}.modal{display:none!important}}
/* Connection lifecycle and accessible touch targets. */
.tool-permission{padding:16px;border:1px solid var(--border,#e2e8f0);border-radius:12px}.tool-permission label{display:flex;gap:10px;align-items:center;overflow-wrap:anywhere}.tool-permission input[type=checkbox]{width:20px;height:20px}.model-search{margin:8px 0}.toolbar>select{width:auto;max-width:240px}.data-table small{display:block;max-width:350px;white-space:normal;overflow-wrap:anywhere}.model-note{overflow-wrap:anywhere}
@media(max-width:767px){button,input,select{min-height:44px}.toolbar>select{max-width:none;width:100%}.settings-extra{flex-wrap:wrap}.connection-row .actions{flex-wrap:wrap}}
.job-row{padding:16px;border:1px solid #e2e8f0;border-radius:12px}.job-preview{display:block;width:100%;max-height:65vh;object-fit:contain;border-radius:12px}.tool-result{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7f9fc;padding:16px;max-height:360px;overflow:auto;font-size:12px}.check-label{display:flex!important;align-items:center;gap:12px}.check-label input{width:20px;min-height:20px;flex-shrink:0}.message-content{white-space:pre-wrap;overflow-wrap:anywhere}
.security-secret{padding:16px;border:1px solid #d7e2f3;border-radius:12px;background:#f7f9fc;font-family:monospace;letter-spacing:2px;overflow-wrap:anywhere;user-select:all;white-space:pre-wrap}
@media(max-width:767px){.topbar{height:116px;flex-wrap:wrap;align-content:center;row-gap:8px;padding-top:10px;padding-bottom:10px}.topbar #scopeButton{display:flex;order:3;width:100%;justify-content:flex-start;font-size:12px;min-height:40px}.topbar #scopeButton .icon:last-child{margin-left:auto}.kpi .label,.kpi small{font-size:12px}.kpi .label{min-height:34px}.insight-row p,.insights-head p,.product-row p{font-size:12px}.bottom-nav button{font-size:11px}.quick-prompts button{font-size:12px;min-height:44px}.tabs{scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.product-row>.primary{width:100%;margin-left:0}.detail-actions{bottom:66px;box-shadow:0 -5px 12px #fff}.creative-info{padding-bottom:12px}.settings-title h2{font-size:19px}}
.form-fields label{align-content:start}.form-fields select,.form-fields input:not([type=checkbox]){height:44px}.form-fields textarea{min-height:96px}
@media(max-width:767px){.detail-view .bottom-nav{display:none}.detail-view .topbar{height:66px;flex-wrap:nowrap}.detail-view .topbar #scopeButton{display:none}.detail-view .app>main{padding-bottom:110px}.detail-view .detail-actions{position:fixed;bottom:0;left:0;right:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1.7fr 1fr 1fr;gap:8px;background:#fff;border-top:1px solid #e2e8f0;z-index:55;box-shadow:0 -6px 16px #1720330a}.detail-view .detail-actions button,.detail-view .detail-actions .primary{width:auto;font-size:12px;min-height:48px;padding:8px;gap:5px}.detail-view .detail-actions .icon{width:18px;height:18px}}
.update-notice{position:fixed;z-index:1000;right:24px;bottom:90px;max-width:440px;padding:18px;background:#172033;color:white;border-radius:14px;box-shadow:0 12px 40px #17203333;display:flex;gap:12px;flex-wrap:wrap}.update-notice p{font-size:13px;color:#e2e8f0;margin-top:5px}.update-notice button{padding:10px 16px;border:1px solid #526176;border-radius:8px;background:#2457e6;color:white;cursor:pointer}.update-notice button:last-child{background:transparent}@media(max-width:600px){.update-notice{left:12px;right:12px;bottom:90px}}
@media(max-width:639px){.mobile-category{flex-direction:row-reverse}}
@media(max-width:767px){.primary,.secondary,.danger,.quiet,.product-row .primary,.scope{min-height:44px}.check-label{min-height:44px}}
/* Chat owns a bounded viewport: only messages and the report rail scroll. */
body.chat-view{overflow:hidden}
.chat-view .app{height:var(--chat-viewport-height,100dvh);min-height:0;grid-template-rows:68px minmax(0,1fr);overflow:hidden}
.chat-view .app>main{height:100%;min-height:0;align-self:stretch;padding-bottom:20px;overflow:hidden}
.chat-view .chat-layout{height:100%;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch}
.chat-view .chat-panel{height:100%;min-height:0;overflow:hidden}
.chat-view .chat-panel>.row{flex:none;margin-bottom:12px}
.chat-view .chat-feed{min-height:0;flex:1 1 0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:6px}
.chat-view .chat-feed:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.chat-view .quick-prompts{flex:none;margin:10px 0 8px}
.chat-view .composer{position:static;flex:none;background:white;padding:8px 0 0;border-top:1px solid var(--line)}
.chat-view .report-panel{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.chat-view .message-meta{flex-wrap:wrap;gap:6px 12px}
.chat-job-control{display:flex}
@media(max-width:767px){
 .chat-view .app{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "main";grid-template-rows:116px minmax(0,1fr);padding-bottom:calc(64px + env(safe-area-inset-bottom))}
 .chat-view .app>main{padding:10px 10px 12px}
 .chat-view .chat-panel{padding:12px}
 .chat-view .chat-panel>.row{gap:8px}
 .chat-view .chat-panel h1{font-size:24px}
 .chat-view .chat-feed{padding-right:3px}
 .chat-view .quick-prompts{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%}
 .chat-view .quick-prompts button,.chat-job-control{flex:none;white-space:nowrap}
 .chat-view .composer textarea{min-height:48px}
 .chat-view.keyboard-open .app{grid-template-rows:66px minmax(0,1fr);padding-bottom:0}
 .chat-view.keyboard-open .topbar{height:66px;flex-wrap:nowrap}
 .chat-view.keyboard-open #scopeButton,.chat-view.keyboard-open .chat-panel>.row p{display:none}
}
.agent-settings{border:1px solid var(--border,#dce4ef);border-radius:12px;padding:18px;display:grid;gap:12px;min-width:0}
.agent-settings legend{font-weight:700;padding:0 6px}
.agent-check{display:flex!important;align-items:center;gap:10px}
.agent-check input{width:18px!important;min-height:18px!important;flex:none}
.agent-capabilities{margin:4px 0 8px;font-size:11px}
.agent-proposal{border:1px solid #dce4ef;border-radius:10px;padding:12px;background:#f8faff}
.agent-proposal summary{cursor:pointer;font-weight:600}
.agent-proposal .text{margin:12px 0;white-space:pre-wrap}
.source-chips a,.inline-citation{color:#3157da;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.source-chips a{border:1px solid #dce4ef;border-radius:5px;padding:4px 7px;font-size:11px;background:#f8faff}
.chat-view.keyboard-open .agent-capabilities{display:none}
.chat-creative-card{border:1px solid #dce4ef;border-radius:14px;padding:16px;background:#fff;display:grid;gap:12px;min-width:0;white-space:normal}
.chat-creative-card p{margin:0}
.chat-creative-card .actions{flex-wrap:wrap;gap:8px}
.chat-creative-image{display:block;width:min(100%,460px);aspect-ratio:1;border-radius:12px;overflow:hidden;background:#f4f6fa}
.chat-creative-image img{display:block;width:100%;height:100%;object-fit:contain}
.chat-creative-reference{display:flex;align-items:center;gap:14px;min-width:0}
.chat-creative-reference img{width:88px;height:88px;object-fit:contain;background:#f5f7fb;border:1px solid #e5ebf4;border-radius:10px;flex:none}
.chat-creative-reference div{min-width:0;overflow-wrap:anywhere}
.chat-creative-card details .text{white-space:pre-wrap;margin-top:8px}
.model-access-summary{font-size:12px;border:1px solid #dce4ef;border-radius:8px;padding:10px;background:#f8faff;line-height:1.6}
@media(max-width:600px){.chat-creative-card{padding:12px}.chat-creative-card>.row{align-items:flex-start;gap:8px;flex-wrap:wrap}.chat-creative-reference img{width:64px;height:64px}}
.image-reference-review{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}
.image-reference-review figure{position:relative;margin:0;padding:12px;border:1px solid var(--border,#dce4ef);border-radius:12px;background:#fff}
.image-reference-remove{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #dce4ef;border-radius:50%;background:#fff;color:#52617a;box-shadow:0 2px 8px #18243b14;cursor:pointer;opacity:0;transition:opacity .15s,background .15s}
.image-reference-review figure:hover .image-reference-remove,.image-reference-review figure:focus-within .image-reference-remove{opacity:1}
.image-reference-remove:hover:not(:disabled){background:#fff0f0;color:#b42318;border-color:#f3b9b9}
.image-reference-remove:focus-visible{opacity:1;outline:2px solid #2856ed;outline-offset:2px}
.image-reference-remove:disabled{cursor:not-allowed;color:#a4adba}
@media(hover:none),(pointer:coarse){.image-reference-remove{opacity:1;width:40px;height:40px}}
.image-reference-review img{display:block;width:100%;height:240px;object-fit:contain}
.image-reference-review figcaption{font-size:12px;margin-top:10px;overflow-wrap:anywhere;color:#52617a}
@media(max-width:520px){.image-reference-review{grid-template-columns:1fr}.image-reference-review img{height:210px}}
.security-qr{display:flex;justify-content:center;margin:16px 0;background:#fff;border-radius:12px;padding:8px}.security-qr img{width:265px;height:auto;max-width:100%;image-rendering:pixelated}.security-steps{padding-left:24px;line-height:1.7}.security-manual{margin:16px 0}.security-manual summary{cursor:pointer;color:#345cff;font-weight:600}.security-manual p{margin-top:12px}
.stock-check-detail{display:block;margin-top:5px;line-height:1.5;color:var(--muted,#64748b);overflow-wrap:anywhere}
/* Quiet, theme-aligned scrollbars for chat, pages, tables and dialogs. */
*{scrollbar-width:thin;scrollbar-color:#b8c2d2 #f4f6fa}
@supports selector(::-webkit-scrollbar){*{scrollbar-width:auto;scrollbar-color:auto}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#f4f6fa}::-webkit-scrollbar-thumb{background:#b8c2d2;border:2px solid #f4f6fa;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:#8797b0}::-webkit-scrollbar-thumb:active{background:#5575ad}::-webkit-scrollbar-button{display:none;width:0;height:0}::-webkit-scrollbar-corner{background:#f4f6fa}}
@media(forced-colors:active){*{scrollbar-color:auto}}
:root{--creative-picker-ring:#2857ed}
.modal-card:has(.creative-product-picker){width:min(1080px,100%)}
.creative-picker-toolbar{position:sticky;top:-24px;background:#fff;z-index:2;padding:0 0 14px}
.creative-picker-toolbar label{display:grid;gap:8px;font-size:14px}.creative-picker-toolbar input{width:100%;margin-bottom:10px}
.creative-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.creative-picker-product{display:flex;flex-direction:column;align-items:stretch;text-align:left;min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;gap:7px;color:var(--text,#172033);font:inherit;cursor:pointer}
.creative-picker-product.is-selected{border-color:var(--creative-picker-ring);box-shadow:0 0 0 2px var(--creative-picker-ring);background:#f7f9ff}
.creative-picker-product:focus-visible{outline:3px solid var(--creative-picker-ring);outline-offset:3px}
.creative-picker-product:disabled:not(.is-selected){opacity:.48;cursor:not-allowed}
.creative-picker-photo{aspect-ratio:1;position:relative;background:#f7f8fa;border-radius:9px;display:grid;place-items:center;width:100%;overflow:hidden}
.creative-picker-photo img{width:100%;height:100%;object-fit:contain}.creative-picker-check{position:absolute;right:8px;top:8px;width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:white;border:1px solid var(--line)}
.is-selected .creative-picker-check{background:var(--creative-picker-ring);color:#fff;border-color:var(--creative-picker-ring)}
.creative-picker-product strong{font-size:13px;line-height:1.45;overflow-wrap:anywhere}.creative-picker-product small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.creative-selected-products{display:grid;gap:9px}.creative-selected-product{display:flex;align-items:center;gap:12px;border:1px solid var(--line);padding:10px;border-radius:12px}.creative-selected-product img{width:64px;height:64px;object-fit:contain;border-radius:8px;background:#f7f8fa}.creative-selected-product>div{flex:1;min-width:0}.creative-selected-product strong,.creative-selected-product small{display:block;overflow-wrap:anywhere}.creative-selected-product strong{font-size:13px}.creative-selected-product small{font-size:11px;color:var(--muted)}
@media(max-width:767px){.creative-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.creative-picker-toolbar{top:-18px}.creative-picker-product{padding:8px}.creative-picker-product strong{font-size:12px}.creative-picker-product small{font-size:10px}}
