/* Distribuidora Pro: shared visual language for the administration and role apps.
   Loaded last; preserves business components, role permissions and offline storage. */
:root {
  --dp-bg:#f3f5f8;--dp-surface:#fff;--dp-surface-soft:#f8fafc;
  --dp-text:#172b45;--dp-muted:#617187;--dp-line:#e1e7ef;
  --dp-primary:#225dd9;--dp-primary-strong:#184aaf;--dp-primary-soft:#edf3ff;
  --dp-brand:#225dd9;--dp-brand-deep:#184aaf;--dp-action:#225dd9;
  --dp-radius-sm:8px;--dp-radius-md:12px;--dp-radius-lg:16px;
  --dp-shadow:0 2px 8px rgba(23,43,69,.035);
  --stgr-ink:#172b45;--stgr-muted:#617187;--stgr-bg:#f3f5f8;
  --stgr-card:#fff;--stgr-line:#e1e7ef;--stgr-primary:#225dd9;
  --stgr-primary-2:#184aaf;--stgr-radius:12px;
  --stgr-shadow:0 2px 8px rgba(23,43,69,.035);
  color-scheme:light;
}
html,body{background:#f3f5f8;color:#172b45}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
button,input,select,textarea{font:inherit}
:is(button,a,input,select,textarea):focus-visible{outline:3px solid #87a9f5;outline-offset:3px}
.app.dp-app-shell{grid-template-columns:224px minmax(0,1fr)}
.dp-sidebar{background:#fff;color:var(--dp-text);border-right:1px solid var(--dp-line);padding:22px 12px;overflow-y:auto}
.dp-brand{gap:10px;padding:0 8px 20px;border-color:var(--dp-line)}
.dp-brand .logo{width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:#225dd9;color:#fff;font-size:23px;font-weight:750;letter-spacing:-2px;box-shadow:none}
.dp-brand-copy b{font-size:14px;color:var(--dp-text);letter-spacing:-.3px}
.dp-brand-copy small{color:var(--dp-muted);font-size:10px}
.dp-nav{gap:20px}.dp-nav-group{gap:3px}
.dp-nav-label{padding:0 10px 6px;color:#748298;font-size:9px;letter-spacing:.12em}
.dp-nav button{gap:10px;padding:9px 10px;min-height:40px;border-radius:8px;font-size:12px;font-weight:550;color:#53637a;background:transparent;box-shadow:none}
.dp-nav button:hover{color:#225dd9;background:#f5f8fd}
.dp-nav button.active{color:#225dd9;background:#edf3ff;box-shadow:none;font-weight:700}
.dp-nav .dp-icon{width:18px;height:18px}
.dp-sidebar-footer{border-color:var(--dp-line);color:var(--dp-muted);padding:16px 10px}
.dp-sidebar-footer b{color:var(--dp-text)}
.main.dp-main{padding:22px 28px 40px}
.top.dp-topbar{margin:-22px -28px 26px;padding:14px 28px;min-height:74px;background:#fff;border-color:var(--dp-line);backdrop-filter:none}
.dp-top-copy h1{font-size:20px;line-height:1.2;letter-spacing:-.5px}
.dp-top-copy small{font-size:11px}
.dp-top-left,.dp-top-actions{gap:10px}
.dp-icon-button,.dp-search-button{border-radius:8px;box-shadow:none;min-height:40px}
.dp-search-button{font-size:11px;min-width:180px}.dp-icon-button{width:40px}
.dp-avatar{border-radius:50%;background:#edf3ff;width:34px;height:34px;font-size:12px}
.dp-profile-copy b{font-size:12px}.dp-profile-copy small{font-size:10px}
.dp-welcome{background:transparent;border:0;box-shadow:none;padding:0;margin-bottom:22px;border-radius:0}
.dp-welcome:after{display:none}.dp-welcome h2{font-size:27px;letter-spacing:-.8px;margin:5px 0 7px}
.dp-welcome p{font-size:13px;line-height:1.5;color:var(--dp-muted)}
.dp-welcome .eyebrow{color:var(--dp-muted);font-size:10px;letter-spacing:.12em}
.dp-live-pill{background:#fff;border:1px solid var(--dp-line);font-size:11px;font-weight:600}
.dp-quick-actions{gap:10px;margin-bottom:20px}
.dp-quick-action{min-height:66px;border-radius:10px;box-shadow:none;grid-template-columns:32px minmax(0,1fr);gap:9px;padding:12px}
.dp-quick-action>.dp-icon{width:32px;height:32px;padding:7px;border-radius:8px}
.dp-quick-action b{font-size:12px}.dp-quick-action small{font-size:10px}.dp-action-arrow{display:none}
.dp-quick-action:hover{transform:none;box-shadow:0 2px 8px #172b4508}
.dp-app-shell .card{border:1px solid var(--dp-line);border-radius:12px;box-shadow:var(--dp-shadow);padding:20px;background:#fff}
.dp-app-shell .kpi:before{display:none}.dp-app-shell .kpi{padding:20px;border-radius:12px}
.dp-app-shell .kpi b{letter-spacing:-.7px}.dp-app-shell .grid{gap:14px}
.dp-app-shell .section-head h2{font-size:15px;letter-spacing:-.25px}
.dp-app-shell .section-head small{font-size:11px;color:var(--dp-muted)}
.dp-app-shell .btn{border-radius:8px;box-shadow:none;font-weight:650;font-size:12px;min-height:40px}
.dp-app-shell .btn-primary{background:#225dd9;color:#fff}
.dp-app-shell .btn-primary:hover{background:#184aaf}
.dp-app-shell input,.dp-app-shell select,.dp-app-shell textarea{border-radius:8px;border-color:var(--dp-line)}
.dp-app-shell th{background:#f8fafc;color:#617187;font-size:11px;letter-spacing:.025em}
.dp-app-shell td{font-size:12px}.dp-app-shell td,.dp-app-shell th{padding:13px 12px;border-color:var(--dp-line)}
.dp-home-layout{grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr);gap:18px}
.dp-focus-item{min-height:66px;border-radius:8px;box-shadow:none;padding:12px}
.dp-focus-item b{font-size:12px}.dp-focus-item small{font-size:11px}.dp-focus-mark{width:4px;height:32px}
.dp-focus-clear{font-size:12px;border-radius:8px}
.dp-app-shell .dp-ai-card{background:#f8faff;border-color:#cdddfb}
.dp-ai-card .section-head h2{color:#225dd9}.dp-ai-card #aiSummary{font-size:13px;line-height:1.65;max-height:340px;overflow-y:auto;padding-right:5px}
.dp-app-shell .modal,.dp-command-palette{border-radius:14px}
.dp-app-shell .release-grid{gap:16px}
.dp-app-shell .release-card{border-radius:12px;box-shadow:none;border-color:var(--dp-line)}
/* Standalone operational workspaces retain their existing grids and controls. */
body:not(:has(.dp-app-shell)):not(:has(.stgr-login)) :is(.card,.panel){border-color:#e1e7ef;border-radius:12px;box-shadow:0 2px 8px #172b4508}
body:not(:has(.dp-app-shell)) :is(.primary,.btn-primary){background:#225dd9;color:#fff;border-radius:8px;box-shadow:none}
/* All five APKs render these same role-specific web screens. */
html[data-stgr-app]{--stgr-primary:#225dd9;--stgr-primary-2:#184aaf;--stgr-accent:#11845b}
[data-stgr-app] .preventa-hero{background:#fff;color:#172b45;border:1px solid #e1e7ef;border-radius:12px;box-shadow:none}
[data-stgr-app] .preventa-hero:after{display:none}
[data-stgr-app] .preventa-hero :is(.eyebrow,p){color:#617187}
[data-stgr-app] .metric-grid div{background:#f8fafc;border-color:#e1e7ef;border-radius:8px}
[data-stgr-app] .metric-grid span{color:#617187}
[data-stgr-app] .mobile-appbar{background:#fff;border-color:#e1e7ef;box-shadow:none}
[data-stgr-app] .mobile-brand{background:#225dd9;border-radius:10px;box-shadow:none}
[data-stgr-app] .mobile-bottom-nav{background:#fff;border-color:#e1e7ef}
[data-stgr-app] .mobile-bottom-nav button{border-radius:8px}
[data-stgr-app] .mobile-bottom-nav button[aria-current="page"]{background:#edf3ff;color:#225dd9}
[data-stgr-app] body{background:#f3f5f8;color:#172b45}
[data-stgr-app] .stgr-appbar{background:#fff;border-color:#e1e7ef;backdrop-filter:none;min-height:68px}
[data-stgr-app] .stgr-mark{background:#225dd9;border-radius:10px;box-shadow:none;flex-basis:40px;height:40px}
[data-stgr-app] .stgr-mark:after{display:none}
[data-stgr-app] .stgr-app-title strong{font-size:.92rem}
[data-stgr-app] .stgr-app-title small{font-size:.6rem;letter-spacing:.09em}
[data-stgr-app] .hero{border:1px solid #e1e7ef!important;border-radius:12px!important;background:#fff!important;color:#172b45!important;box-shadow:none!important;padding:22px!important}
[data-stgr-app] .hero:after{display:none}
[data-stgr-app] .hero h1{font-size:1.75rem!important;line-height:1.12!important}
[data-stgr-app] .hero :is(small,p,span){color:#617187!important}
[data-stgr-app] .hero :is(button,a){position:relative;z-index:1}
[data-stgr-app] :is(.section,.warehouse-order,.picking-card,.route-card,.cartbar){border-radius:12px!important;box-shadow:0 2px 8px #172b4508!important}
[data-stgr-app] :is(.btn,button.primary,.primary){border-radius:8px!important;box-shadow:none!important;min-height:46px}
[data-stgr-app] :is(.btn-primary,button.primary,.primary){background:#225dd9!important}
[data-stgr-app] .btn-success{background:#11845b!important}
[data-stgr-app] .btn-soft{background:#edf3ff!important;color:#225dd9!important;border-color:#d8e4fc!important}
[data-stgr-app] :is(input,select,textarea){border-radius:8px!important;border-color:#d5dee9!important}
[data-stgr-app] .quick button{border-radius:10px!important;box-shadow:none!important}
[data-stgr-app] .stgr-sync{font-weight:600;border-radius:8px}
[data-stgr-app] stgr-bottom-nav{background:#fff;border-color:#e1e7ef;backdrop-filter:none}
[data-stgr-app] .stgr-nav a{border-radius:8px;font-weight:650;min-height:52px}
[data-stgr-app] .stgr-nav a[aria-current="page"]{color:#225dd9;background:#edf3ff;box-shadow:none}
[data-stgr-app] .stgr-shell-version{background:#f3f5f8;padding:2px 5px;border-radius:4px}
.dp-chat-tools{display:flex;gap:8px;padding:8px 14px;border-top:1px solid #e1e7ef;background:#fff}
.dp-chat-tools button{border:1px solid #e1e7ef;border-radius:8px;background:#f8fafc;color:#225dd9;padding:8px 10px;font-size:11px;cursor:pointer}
.dp-chat-tools button[hidden]{display:none}
.sales-ai-floating-panel{border:1px solid #d5e1f7;border-radius:14px;box-shadow:0 12px 45px #172b4522}
.sales-ai-floating-header{background:#225dd9;color:#fff}
.sales-ai-floating-toggle{background:#225dd9;box-shadow:0 6px 20px #225dd92b}
.sales-ai-message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
.sales-ai-message{border-radius:12px}.sales-ai-message.user{background:#edf3ff}
.sales-ai-floating-chat{min-height:100px}
.stgr-login{background:#f3f5f8}
.stgr-login-brand{background:#172b45}.stgr-login-brand:after{border-radius:24px;transform:rotate(-12deg);opacity:.5}
.stgr-login-brand .stgr-mark{background:#225dd9;border-radius:14px;box-shadow:none}
.stgr-login-brand h1{font-size:clamp(2.2rem,4.5vw,4rem);line-height:1.08}
.stgr-login-side{background:#f3f5f8}.stgr-login-box{border-radius:16px;box-shadow:0 8px 30px #172b4508}
.stgr-login-box input{width:100%;border-radius:8px!important}.stgr-login-box .btn-primary{background:#225dd9!important;border-radius:8px!important;box-shadow:none}
@media(min-width:1001px) and (max-width:1250px){.dp-search-button{min-width:40px;width:40px;padding:0;justify-content:center}.dp-search-button span,.dp-search-button kbd{display:none}.dp-profile-copy{display:none}}
@media(max-width:1000px) and (min-width:721px){.app.dp-app-shell{grid-template-columns:76px minmax(0,1fr)}.dp-sidebar{padding-inline:10px}.main.dp-main{padding-inline:22px}.top.dp-topbar{margin-inline:-22px;padding-inline:22px}.dp-home-layout{grid-template-columns:1fr}}
@media(max-width:720px){
 .app.dp-app-shell{display:block}.dp-sidebar{width:min(290px,86vw)}
 .dp-sidebar.open .dp-brand{justify-content:flex-start}.dp-nav button{min-height:44px}
 .main.dp-main{padding:16px 14px 30px}.top.dp-topbar{margin:-16px -14px 22px;padding:12px 14px;gap:8px}
 .dp-top-copy h1{font-size:17px}.dp-top-left{min-width:0;gap:8px}.dp-top-copy{min-width:0}
 .dp-top-actions{gap:6px}.dp-top-actions .dp-search-button{display:none}
 .dp-welcome h2{font-size:24px}.dp-welcome p{font-size:12px}
 .dp-home-layout{grid-template-columns:minmax(0,1fr)}
 .dp-app-shell .card{padding:16px}.dp-app-shell .grid{gap:10px}.dp-app-shell .kpi{padding:15px}
 .dp-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;padding:0;gap:8px}
 .dp-quick-action{min-height:68px;padding:10px;grid-template-columns:26px minmax(0,1fr);gap:7px}
 .dp-quick-action>.dp-icon{width:26px;height:26px;padding:5px}.dp-quick-action small{display:none}
 .dp-app-shell .section-head{flex-wrap:wrap;gap:10px}.dp-app-shell .section-head>div{max-width:100%}
 .dp-app-shell .toolbar{flex-wrap:wrap}.dp-app-shell .toolbar :is(input,select){min-width:0;max-width:100%}
 .dp-app-shell :is(.row,.form-grid)>*{min-width:0}
 .dp-app-shell .table-wrap{max-width:100%;overflow-x:auto}
 .stgr-login-brand{min-height:250px}.stgr-login-brand h1{font-size:2.1rem}
}
@media(max-width:360px){.dp-top-copy h1{font-size:15px}.dp-top-actions{gap:4px}.dp-icon-button{width:36px}.dp-app-shell .grid{grid-template-columns:1fr}}
@media print{.dp-sidebar,.dp-topbar,stgr-app-mark,stgr-bottom-nav,.stgr-shell-version{display:none!important}.app.dp-app-shell{display:block}.main.dp-main{padding:0}.dp-app-shell .card{box-shadow:none}}
