:root{
  --blue:#1268e8;--blue2:#0b54c6;--navy:#10274a;--ink:#15233b;--muted:#6a7890;--line:#dfe7f1;
  --soft:#f5f8fc;--softblue:#edf5ff;--green:#15965c;--orange:#e97715;--purple:#7356e8;--shadow:0 8px 24px rgba(31,64,110,.08);
}
*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--ink);background:#f7f9fc}
button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.login-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#f7fbff,#eef4fb)}
.login-card{width:min(430px,92vw);background:#fff;border:1px solid var(--line);border-radius:18px;padding:36px;box-shadow:var(--shadow)}
.login-logo{width:225px;max-width:100%;margin-bottom:18px}.login-card h1{margin:4px 0 8px;font-size:29px}.login-card p{color:var(--muted);line-height:1.5;margin:0 0 24px}
label{display:block;font-size:13px;font-weight:700;margin:14px 0 6px}label input,label select,label textarea{display:block;width:100%;margin-top:7px}
input,select,textarea{border:1px solid #cfd9e6;border-radius:9px;padding:11px 12px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:#6fa8ff;box-shadow:0 0 0 3px rgba(18,104,232,.1)}
.btn{border:0;border-radius:9px;padding:11px 16px;font-weight:700}.btn.primary{background:var(--blue);color:#fff}.btn.primary:hover{background:var(--blue2)}.btn.secondary{background:#fff;color:var(--blue);border:1px solid #bfd4ef}.btn.ghost{background:#edf4fe;color:#1d5da8}.btn.full{width:100%;margin-top:18px}.form-error{color:#c63c3c;font-size:13px;margin-top:10px}.demo-note{font-size:12px;color:var(--muted);margin-top:20px;background:var(--soft);padding:10px;border-radius:8px}
.app-shell{min-height:100vh;display:grid;grid-template-columns:220px 1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:220px;background:#fff;border-right:1px solid var(--line);padding:18px 12px;display:flex;flex-direction:column;z-index:10}.brand-wrap{padding:0 10px 18px}.brand{width:185px;max-width:100%}
nav{display:flex;flex-direction:column;gap:6px}.nav-item{width:100%;border:0;background:transparent;color:#4b5f7c;text-align:left;padding:11px 12px;border-radius:9px;display:flex;gap:12px;align-items:center;font-weight:650}.nav-item span{width:20px;text-align:center;font-size:17px}.nav-item:hover{background:#f2f6fb}.nav-item.active{background:#eaf3ff;color:#0d5fcf}.sidebar-bottom{margin-top:auto;border-top:1px solid #edf0f5;padding-top:12px}.nav-item.muted{font-weight:600;color:#66778e}
.main{grid-column:2;min-width:0;padding:0 22px 28px}.topbar{height:78px;display:flex;align-items:center;justify-content:space-between;gap:24px}.topbar h2{margin:2px 0 0;font-size:24px;color:#14284c}.topbar #pageEyebrow{font-size:12px;color:#7b8a9f}.topbar-right{display:flex;align-items:center;gap:12px;font-size:13px}.source-badge{background:#ecf7ef;color:#256f43;border:1px solid #cce7d5;border-radius:999px;padding:7px 10px}.country{color:#53667f}.bell{font-size:16px}.avatar{width:36px;height:36px;border-radius:50%;background:#0e6578;color:#fff;display:grid;place-items:center;font-weight:800}.user-meta{display:flex;flex-direction:column;line-height:1.2}.user-meta small{color:#7c899c;margin-top:3px}
.dashboard-grid{display:grid;grid-template-columns:minmax(520px,1.35fr) minmax(390px,.85fr);gap:16px}.summary-row{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.card{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 3px 12px rgba(31,64,110,.04)}.summary-card{padding:17px;display:flex;align-items:center;gap:13px}.summary-icon{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;font-size:21px}.summary-icon.blue{background:#e7f1ff;color:var(--blue)}.summary-icon.green{background:#e9f8f0;color:var(--green)}.summary-icon.orange{background:#fff0e5;color:var(--orange)}.summary-icon.purple{background:#f0ecff;color:var(--purple)}.summary-card small{display:block;color:#718198;margin-bottom:3px}.summary-card strong{font-size:24px}
.panel-head{padding:15px 17px;border-bottom:1px solid #edf1f6;display:flex;align-items:center;justify-content:space-between}.panel-head h3{margin:0;font-size:16px;color:#172d51}.panel-head p{margin:3px 0 0;color:#74839a;font-size:12px}.product-panel{min-width:0}.product-controls{padding:14px 16px 0;display:flex;gap:10px;align-items:center}.product-controls select{flex:1;max-width:420px;font-weight:700}.quick-products{display:flex;gap:7px;overflow:auto;padding:11px 16px 5px}.chip{border:1px solid #d6e1ed;background:#f7f9fc;color:#4d617d;padding:8px 11px;border-radius:8px;white-space:nowrap}.chip.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.product-body{padding:15px}.product-overview{display:grid;grid-template-columns:115px 1fr;gap:16px;border:1px solid #e8edf3;border-radius:12px;padding:15px}.product-cover{height:128px;border-radius:11px;background:linear-gradient(155deg,#eef5ff,#15418d);color:#fff;padding:13px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}.product-cover strong{font-size:15px}.product-cover small{opacity:.82}.product-copy h3{margin:2px 0 4px;font-size:20px}.product-copy .alt{font-size:13px;color:#4c6b92;font-weight:700}.product-copy p{font-size:13px;color:#69798f;line-height:1.5;max-width:650px}.source-line{font-size:11px;color:#7890a9;margin-top:12px}
.price-strip{display:grid;grid-template-columns:repeat(6,1fr);margin-top:12px;background:#f7faff;border:1px solid #e3eaf4;border-radius:11px;overflow:hidden}.price-cell{padding:13px 12px;border-right:1px solid #e2e8f0}.price-cell:last-child{border-right:0}.price-cell small{display:block;color:#687a92;font-size:11px;font-weight:700}.price-cell strong{display:block;font-size:19px;margin:5px 0 1px;color:#112950}.price-cell span{font-size:11px;color:#7c8ba0}
.order-box{margin-top:14px;padding:15px}.order-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.order-fields{display:grid;grid-template-columns:110px 1fr;gap:10px}.order-fields label{margin:0}.totals{background:#f7faff;border-radius:10px;padding:12px 14px;font-size:13px}.total-row{display:flex;justify-content:space-between;padding:4px 0}.total-row.grand{font-size:16px;font-weight:800;color:#114d9d;border-top:1px solid #dfe8f3;margin-top:6px;padding-top:9px}.actions{display:flex;gap:9px;margin-top:12px}.actions .btn{flex:1}
.ai-panel{display:flex;flex-direction:column;min-height:760px;border:1px solid #cfe0f5;box-shadow:0 8px 28px rgba(18,104,232,.10)}.ai-dominant{grid-column:1}.ai-panel-head{padding:18px 20px;background:linear-gradient(135deg,#f5f9ff,#eef6ff)}.ai-panel-head h3{font-size:20px}.ai-panel-head p{font-size:13px;max-width:620px}.ai-kicker{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:800;color:#2b67ad;margin-bottom:4px}.ai-product-context{max-width:240px;background:#fff;border:1px solid #d9e6f4;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:750;color:#345d8d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-header-tag{font-size:10px;background:#ddebff;color:#0d5fcf;border-radius:999px;padding:3px 7px;margin-left:6px}.chat{padding:18px;display:flex;flex-direction:column;gap:12px;flex:1;max-height:590px;overflow:auto;background:linear-gradient(#fff,#fbfdff)}.bubble{max-width:91%;padding:13px 14px;border-radius:13px;font-size:14px;line-height:1.48;white-space:pre-wrap}.bubble.ai{background:#f0f4f9;align-self:flex-start}.bubble.user{background:#ddecff;align-self:flex-end}.provider-note{font-size:10px;color:#7f8ea2;margin-top:3px}.quick-prompts{padding:0 16px 12px;display:flex;gap:6px;flex-wrap:wrap}.quick-prompts button{border:1px solid #bdd8f7;background:#eef6ff;color:#245d9f;border-radius:9px;padding:9px 11px;font-size:12px;font-weight:650}.chat-input{display:flex;gap:9px;padding:14px 16px;border-top:1px solid #edf1f6}.chat-input input{flex:1;padding:14px 14px;font-size:14px}.chat-input button{width:44px}
.activity-card{grid-column:1/-1}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;font-size:12px}.data-table th{text-align:left;background:#f4f7fb;color:#5f7089;padding:9px 11px}.data-table td{padding:9px 11px;border-top:1px solid #edf1f5;color:#425673}.type-pill{font-size:10px;border-radius:999px;padding:3px 7px;background:#eef5ff;color:#245f9c}.empty{padding:28px;text-align:center;color:#8290a3}.single-view{display:grid;gap:16px}.view-card{padding:18px}.view-card h3{margin-top:0}.view-header{display:flex;align-items:end;justify-content:space-between;margin-bottom:14px}.view-header p{margin:3px 0 0;color:#718198;font-size:13px}.view-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.product-mini{padding:15px}.product-mini h4{margin:0 0 5px}.product-mini p{font-size:12px;color:#718198;min-height:36px}.product-mini strong{font-size:17px;color:#14315c}.product-mini .btn{width:100%;margin-top:10px}.modal-backdrop{position:fixed;inset:0;background:rgba(14,31,54,.42);display:grid;place-items:center;z-index:100;padding:20px}.modal{width:min(640px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.24);padding:24px;position:relative}.modal-close{position:absolute;right:13px;top:10px;border:0;background:transparent;font-size:26px;color:#66778f}.modal h3{margin-top:0}.modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.modal pre{white-space:pre-wrap;background:#f6f8fb;border:1px solid #e4e9f1;border-radius:10px;padding:12px;font-family:inherit;font-size:12px;line-height:1.5}.success-box{background:#edf9f2;border:1px solid #ccebd8;color:#246840;border-radius:10px;padding:12px;margin:12px 0}.warning-box{background:#fff8e7;border:1px solid #f3dfaa;color:#7a5a12;border-radius:10px;padding:12px;font-size:12px}
@media(max-width:1150px){.summary-row{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.activity-card{grid-column:1}.source-badge{display:none}.topbar-right .country,.topbar-right .bell{display:none}}
@media(max-width:760px){.app-shell{display:block}.sidebar{position:static;width:auto;height:auto;flex-direction:row;overflow:auto}.brand-wrap,.sidebar-bottom{display:none}nav{flex-direction:row}.nav-item{width:auto;white-space:nowrap}.main{padding:0 12px 24px}.topbar{height:auto;padding:14px 0}.user-meta{display:none}.summary-row{grid-template-columns:1fr 1fr}.price-strip{grid-template-columns:1fr 1fr}.price-cell{border-bottom:1px solid #e2e8f0}.order-grid,.view-grid{grid-template-columns:1fr}.product-overview{grid-template-columns:90px 1fr}.product-cover{height:110px}.modal-grid{grid-template-columns:1fr}}


.btn:disabled{opacity:.45;cursor:not-allowed}
.admin-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.45fr);gap:16px}
.admin-summary{grid-column:1/-1;grid-template-columns:repeat(4,1fr)}
.admin-wide{grid-column:1}
.admin-insight{grid-column:2}
.insight-copy{padding:22px;font-size:14px;line-height:1.55;color:#52657e}
.insight-copy strong{display:block;color:#18345f;font-size:16px;margin-bottom:8px}
.admin-insight .panel-head{background:linear-gradient(135deg,#f8fbff,#eef5ff)}
@media(max-width:1150px){.admin-grid{grid-template-columns:1fr}.admin-wide,.admin-insight{grid-column:1}.admin-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.admin-summary{grid-template-columns:1fr}}

.role-badge{display:inline-block;margin-top:5px;padding:3px 7px;border-radius:999px;background:#fff1df;color:#a64b00;border:1px solid #ffd0a3;font-size:9px;font-weight:800;letter-spacing:.06em;width:max-content}
body.admin-mode .sidebar{border-right-color:#cbdcf1;box-shadow:4px 0 16px rgba(16,39,74,.04)}
body.admin-mode .nav-item.active{background:#e8f1ff;color:#084fae}
body.admin-mode .topbar h2{color:#0c3874}
.pipeline-hero{display:grid;grid-template-columns:1fr 260px;gap:20px;padding:24px;align-items:center;background:linear-gradient(135deg,#fff,#f4f8ff)}
.pipeline-copy h3{margin:5px 0 8px;font-size:22px}.pipeline-copy p{color:#667991;line-height:1.55;max-width:760px}.pipeline-link{display:inline-block;text-decoration:none;margin-top:10px}
.pipeline-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pipeline-metrics div{padding:16px;border:1px solid #dfe7f1;border-radius:12px;background:#fff}.pipeline-metrics small{display:block;color:#718198;font-size:11px}.pipeline-metrics strong{display:block;margin-top:6px;font-size:17px;color:#173a68}
@media(max-width:760px){.pipeline-hero{grid-template-columns:1fr}.pipeline-metrics{grid-template-columns:1fr 1fr}}

/* V4.4 pilot UI */
.main{min-height:100vh;display:flex;flex-direction:column}#content{flex:1}
.product-cover{background:#fff;border:1px solid #e3eaf4;padding:8px;overflow:hidden;box-shadow:none;justify-content:space-between;color:var(--ink)}
.product-cover img{width:100%;height:82px;object-fit:contain;display:block;background:#fff;border-radius:7px}
.product-cover-meta{display:flex;flex-direction:column;gap:2px;padding:3px 3px 0}.product-cover-meta strong{font-size:12px;color:#284e7f}.product-cover-meta small{font-size:10px;color:#75869d;opacity:1}
.category-link{margin-top:12px;font-size:14px;line-height:1.45;color:#435d7f}.category-link>div{font-weight:600}.category-link a{font-size:14px;font-weight:800;color:#0d5fcf;text-decoration:underline;text-underline-offset:2px}.category-link small{display:block;margin-top:3px;font-size:12px;line-height:1.45;color:#6f8096}
.order-terms{margin-top:10px;font-size:11px;line-height:1.45;color:#7b899a;text-align:center}.order-terms a{color:#586f8b;text-decoration:underline}.modal-terms{margin-top:9px}
.product-mini-brand{height:78px;margin:-3px 0 10px;border:1px solid #edf1f6;border-radius:9px;background:#fff;display:grid;place-items:center;padding:8px}.product-mini-brand img{max-width:100%;max-height:60px;object-fit:contain}
.ecosystem-hero{padding:30px;display:grid;grid-template-columns:1fr 150px;gap:24px;align-items:center;background:linear-gradient(135deg,#fff,#f4f8ff)}.ecosystem-hero h3{font-size:26px;margin:5px 0 10px;color:#15345e}.ecosystem-hero p,.ecosystem-copy,.action-card p{color:#61748d;line-height:1.6;max-width:760px}.ecosystem-mark{width:130px;height:130px;border-radius:26px;background:linear-gradient(145deg,#eef5ff,#1268e8);color:#fff;display:grid;place-items:center;font-size:21px;font-weight:850;justify-self:end}.ai-systems-hero .ecosystem-mark{background:linear-gradient(145deg,#edf8f4,#0b7453)}.action-card{padding:24px}.action-card h3{margin:0 0 6px}.external-action{display:inline-block;margin-top:8px;text-decoration:none}.app-footer{padding:26px 4px 6px;text-align:center;font-size:12px}.app-footer a{color:#718198;text-decoration:none}.app-footer a:hover{text-decoration:underline;color:#315a88}
@media(max-width:760px){.ecosystem-hero{grid-template-columns:1fr;padding:20px}.ecosystem-mark{justify-self:start;width:100px;height:100px}.product-cover img{height:66px}}

/* V4.4 quote profile */
.profile-card{padding:22px}.profile-status{font-size:12px;font-weight:800;padding:7px 10px;border-radius:999px}.profile-status.complete{background:#edf9f2;color:#246840}.profile-status.incomplete{background:#fff8e7;color:#7a5a12}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}.profile-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#425673;font-size:12px}.profile-grid label small{font-weight:500;color:#7a899d}.profile-grid input,.profile-grid textarea{width:100%;box-sizing:border-box}.profile-wide{grid-column:1/-1}.logo-upload-row{display:flex;align-items:center;gap:12px}.profile-logo-preview{width:150px;height:64px;border:1px solid #dde5ef;border-radius:10px;background:#fff;display:grid;place-items:center;overflow:hidden;color:#8b99aa;font-weight:600}.profile-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}.profile-actions{display:flex;align-items:center;gap:12px;margin-top:18px}.success-inline{color:#246840;font-weight:750}.quote-actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}.quote-actions a{text-decoration:none}
@media(max-width:760px){.profile-grid{grid-template-columns:1fr}.profile-wide{grid-column:auto}.price-strip{grid-template-columns:1fr 1fr}}
