/* R8: refinamentos das telas revisadas, sem alterar paleta nem comportamento dos módulos. */
.delivery-driver-access{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 14px;align-items:center;padding:16px}
.delivery-driver-access>.section-title{display:contents}
.delivery-driver-access>.section-title>.delivery-title{grid-column:1/4;grid-row:1;min-width:0}
.delivery-driver-access>.section-title>.btn{grid-column:4;grid-row:1/3;justify-self:end;align-self:center;white-space:nowrap}
.delivery-driver-access>.kpi-strip{display:contents}
.delivery-driver-access>.kpi-strip>.kpi-mini{grid-row:2;min-height:90px;padding:12px}
.delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(1){grid-column:1}
.delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(2){grid-column:2}
.delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(3){grid-column:3}
.delivery-driver-access .delivery-title .delivery-main-icon{width:42px;height:42px}
#custTable .table-wrap{border-radius:14px}
#custTable .table td:last-child .actions-row{flex-wrap:wrap;gap:6px}
#custTable .table td:last-child .btn{white-space:nowrap}

#prodGrid.product-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,232px),1fr));align-items:stretch;gap:14px}
#prodGrid .product-card{display:flex;flex-direction:column;min-width:0;min-height:100%;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
#prodGrid .product-card:hover{transform:translateY(-3px);border-color:#d7c666;box-shadow:0 12px 24px rgba(15,23,42,.09)}
#prodGrid .product-card .product-img img{transition:transform .28s ease}
#prodGrid .product-card:hover .product-img img{transform:scale(1.045)}
#prodGrid .product-card .price{margin-top:auto;padding-top:8px}
#prodGrid .product-actions{flex-wrap:wrap}
#prodGrid .product-price-review{align-self:flex-start;margin-top:5px}
.product-price-notice{border:1px solid #f0d98c;line-height:1.5}
.product-price-notice b{display:block;margin-bottom:2px}
.product-fiscal-fields{margin-top:16px;border:1px solid #e5ebf0;border-radius:14px;padding:12px 14px;background:#fbfcfd}
.product-fiscal-fields>summary,.automation-more-alerts>summary{cursor:pointer;font-weight:850;list-style:none;display:flex;align-items:center;gap:9px;min-height:34px}
.product-fiscal-fields>summary::-webkit-details-marker,.automation-more-alerts>summary::-webkit-details-marker{display:none}
.product-fiscal-fields>summary::after,.automation-more-alerts>summary::after{content:'+';margin-left:auto;color:#64748b;font-size:1.2rem;line-height:1}
.product-fiscal-fields[open]>summary::after,.automation-more-alerts[open]>summary::after{content:'−'}
.product-fiscal-fields[open]>summary{margin-bottom:10px}
#automationDashboardPanel{border-left:3px solid #f6c600}
.automation-more-alerts{margin-top:8px;border-top:1px solid #eef2f5;padding-top:8px}
.automation-more-alerts[open] .automation-alert-list{margin-top:6px;max-height:380px;overflow:auto;padding-right:6px}
#sidebar .nav button[data-page="whatsapp"] .wa-mark{color:#25d366;filter:drop-shadow(0 1px 2px #0005)}
#sidebar .nav button[data-page="whatsapp"] .wa-bubble{fill:currentColor;stroke:none}
#sidebar .nav button[data-page="whatsapp"] .wa-phone{fill:none;stroke:#fff;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
#sidebar .nav button[data-page="whatsapp"].active .wa-mark{color:#128c4b;filter:none}
#sidebar .nav button[data-page="whatsapp"]:hover:not(.active) .wa-mark{color:#49e17c}
#sidebar .nav button[data-page="whatsapp"]:focus-visible .wa-mark{filter:drop-shadow(0 0 4px #25d366)}
@media(max-width:1100px){.delivery-driver-access{grid-template-columns:repeat(3,minmax(0,1fr))}.delivery-driver-access>.section-title>.delivery-title{grid-column:1/3}.delivery-driver-access>.section-title>.btn{grid-column:3;grid-row:1/2;white-space:normal}.delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(1){grid-column:1}.delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(2){grid-column:2}.delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(3){grid-column:3}#prodGrid.product-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr))}}
@media(max-width:650px){.delivery-driver-access{display:block}.delivery-driver-access>.section-title{display:flex;align-items:flex-start;flex-wrap:wrap}.delivery-driver-access>.section-title>.delivery-title{flex:1 1 100%}.delivery-driver-access>.section-title>.btn{margin:4px 0 10px;width:100%}.delivery-driver-access>.kpi-strip{display:grid;grid-template-columns:1fr;gap:8px}.delivery-driver-access>.kpi-strip>.kpi-mini{grid-column:1!important;grid-row:auto;min-height:72px}#prodGrid.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#prodGrid .product-card{padding:9px}#prodGrid .product-actions .btn{flex:1 1 calc(50% - 6px);min-width:0}#prodGrid .product-actions .danger{flex-basis:100%}.product-fiscal-fields{padding:10px}}
@media(prefers-reduced-motion:reduce){#prodGrid .product-card,#prodGrid .product-card:hover,#prodGrid .product-card .product-img img{transition:none!important;transform:none!important}}

/* R9: hierarquia, densidade e estados compartilhados entre Relatórios e Configurações. */
#content .page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:2px 1px 7px}
#content .page-head>div{min-width:0}
#content .page-head h1{letter-spacing:-.025em}
#content .head-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
#content .card,#content .dark-panel{border:1px solid rgba(16,20,21,.08);box-shadow:0 2px 10px rgba(16,20,21,.045)}
#content .grid{align-items:stretch}
#content .premium-metrics .metric-rich{height:100%;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
#content .premium-settings .card,#content .settings-grid>.card{min-width:0;overflow-wrap:anywhere}
#content .table-wrap{overflow:auto;border:1px solid #e5e7eb;border-radius:14px;background:#fff}
#content .table-wrap table{border-collapse:separate;border-spacing:0;min-width:720px}
#content .table-wrap thead th{position:sticky;top:0;z-index:2;background:#fff8d8;box-shadow:0 1px 0 #e6d57d}
#content .table-wrap tbody tr:nth-child(even){background:#fffdf6}
#content .table-wrap tbody tr:hover{background:#fff8d9}
#content .table-wrap td,#content .table-wrap th{vertical-align:middle}
#content .empty{border:1px dashed #d7c56d;border-radius:13px;background:#fffdf3;padding:16px;color:#505254;line-height:1.5}
#content .section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
#content .filters{align-items:center;gap:9px}
#content input:focus-visible,#content select:focus-visible,#content textarea:focus-visible,#content button:focus-visible{outline:3px solid #8b6700;outline-offset:2px}
#sidebar .nav button.active,#sidebar .nav-link.active{position:relative;box-shadow:inset 0 0 0 1px #fff4}
#sidebar .nav button.active::before,#sidebar .nav-link.active::before{content:'';position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:0 4px 4px 0;background:#f6c600}
.product-danger-menu{position:relative;grid-column:2;align-self:stretch;min-width:0}
.product-danger-menu>summary{display:grid;place-items:center;min-height:38px;border:1px solid #d9dee3;border-radius:10px;background:#fff;color:#3f4650;font-size:1.3rem;font-weight:900;line-height:1;cursor:pointer;list-style:none}
.product-danger-menu>summary::-webkit-details-marker{display:none}
.product-danger-menu[open]>summary{border-color:#b91c1c;background:#fff7f7;color:#991b1b}
.product-danger-menu>button{position:absolute;right:0;top:calc(100% + 5px);z-index:25;width:max-content;min-width:190px;box-shadow:0 10px 24px #10141524;border:1px solid #fecaca;background:#fff}
.product-actions .product-danger-menu>.btn{flex:auto;min-height:42px}
@media(hover:hover) and (pointer:fine){#content .premium-metrics .metric-rich:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(16,20,21,.09);border-color:#e1ca5f}}
@media(max-width:900px){#content .page-head{flex-wrap:wrap}#content .head-actions{justify-content:flex-start}}
@media(max-width:650px){#content .table-wrap table{min-width:640px}#content .card,#content .dark-panel{border-radius:14px}.product-danger-menu>button{right:0;min-width:170px}.product-danger-menu>summary{min-height:44px}}
@media(prefers-reduced-motion:reduce){#content .premium-metrics .metric-rich{transition:none!important;transform:none!important}}


/* R9.5: traços com cor semântica sobre os fundos amarelos existentes. */
#content .metric-icon[data-icon="sales"]{color:#166534}
#content .metric-icon[data-icon="calendar"]{color:#1e40af}
#content .metric-icon[data-icon="trend"]{color:#0f766e}
#content .metric-icon[data-icon="box"]{color:#6b21a8}
#content .metric-icon[data-icon="warning"]{color:#b91c1c}
#content .metric-icon[data-icon="cart"]{color:#9a3412}
#content .metric-icon[data-icon="receipt"]{color:#1d4ed8}
#content .metric-icon[data-icon="truck"]{color:#3730a3}
#content .metric-icon[data-icon="check"]{color:#15803d}
#content .metric-icon[data-icon="users"]{color:#0f766e}
#content .metric-icon[data-icon="money"]{color:#166534}
#content .delivery-main-icon[data-icon="truck"]{color:#3730a3}
#content .kpi-icon[data-icon="receipt"]{color:#93c5fd}
#content .kpi-icon[data-icon="box"]{color:#d8b4fe}
#content .kpi-icon[data-icon="check"]{color:#86efac}
#content .kpi-icon[data-icon="truck"]{color:#a5b4fc}
#content .kpi-icon[data-icon="users"]{color:#5eead4}

/* R9.5: mais respiro e leitura rápida no resumo das entregas. */
#content .delivery-process.premium-delivery{padding:20px 22px}
#content .delivery-process.premium-delivery>.section-title{align-items:center;gap:18px;margin-bottom:16px}
#content .delivery-process .delivery-title{gap:15px;min-width:0}
#content .delivery-process .delivery-title>div{min-width:0}
#content .delivery-process .delivery-title h2{margin:0 0 4px;line-height:1.2}
#content .delivery-process .delivery-title>div>div{line-height:1.5;max-width:72ch}
#content .delivery-process.premium-delivery .kpi-strip{gap:12px}
#content .delivery-process.premium-delivery .kpi-mini{min-height:108px;padding:16px 14px 15px;border-radius:14px;line-height:1.4}
#content .delivery-process.premium-delivery .kpi-mini b{margin-bottom:3px}
#content .delivery-driver-access{gap:14px 16px;padding:20px 22px}
#content .delivery-driver-access>.kpi-strip>.kpi-mini{min-height:100px;padding:14px}
#content .delivery-driver-access .delivery-title .delivery-main-icon{flex:0 0 46px;width:46px;height:46px}
@media(max-width:850px){#content .delivery-process.premium-delivery{padding:17px}#content .delivery-process.premium-delivery>.section-title{align-items:flex-start;flex-wrap:wrap}#content .delivery-process.premium-delivery>.section-title>.actions-row{width:100%}}
@media(max-width:650px){#content .delivery-process.premium-delivery{padding:14px}#content .delivery-process.premium-delivery>.section-title{gap:12px;margin-bottom:12px}#content .delivery-process .delivery-title{gap:11px}#content .delivery-process .delivery-title .delivery-main-icon{flex:0 0 42px;width:42px;height:42px;border-radius:12px}#content .delivery-driver-access>.kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#content .delivery-driver-access>.kpi-strip>.kpi-mini{grid-column:auto!important;grid-row:auto;min-height:88px;padding:12px 8px}#content .delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(3){grid-column:1/-1!important}}


/* R9.7: área do entregador compacta, clara e alinhada. */
#content .delivery-driver-access{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:16px 18px;background:linear-gradient(120deg,#fffdf3,#fff);color:#17202a;border:1px solid #eadb94;border-left:4px solid #f6c600;border-radius:17px;box-shadow:0 5px 16px rgba(15,23,42,.06)}
#content .delivery-driver-access>.section-title{display:flex!important;width:100%;align-items:center;justify-content:space-between;gap:16px;margin:0}
#content .delivery-driver-access>.section-title>.delivery-title{display:flex;flex:1 1 auto;align-items:center;gap:12px;min-width:0}
#content .delivery-driver-access .delivery-title .delivery-main-icon{flex:0 0 42px;width:42px;height:42px;border-radius:12px}
#content .delivery-driver-access .delivery-title h2{margin:0 0 3px;color:#111827;font-size:1.08rem;line-height:1.2}
#content .delivery-driver-access .delivery-title>div>div{max-width:none;color:#64748b!important;font-size:.85rem;line-height:1.4}
#content .delivery-driver-access>.section-title>.btn{grid-column:auto;grid-row:auto;justify-self:auto;align-self:center;flex:0 0 auto;white-space:nowrap}
#content .delivery-driver-access>.kpi-strip{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%}
#content .delivery-driver-access>.kpi-strip>.kpi-mini{display:flex;grid-column:auto;grid-row:auto;align-items:center;justify-content:flex-start;gap:10px;min-width:0;min-height:70px;padding:10px 12px;border:1px solid #e5e9ed;border-radius:13px;background:#fff;color:#334155;text-align:left;line-height:1.25}
#content .delivery-driver-access .kpi-icon{flex:0 0 36px;width:36px;height:36px;margin:0;border-radius:11px;background:#fff4c2;color:#166534}
#content .delivery-driver-access .kpi-icon svg{width:19px;height:19px}
#content .delivery-driver-access .delivery-kpi-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
#content .delivery-driver-access .delivery-kpi-copy>b{font-size:1.2rem;line-height:1.1;color:#111827}
#content .delivery-driver-access .delivery-kpi-copy>small{font-size:.76rem;font-weight:700;color:#64748b;line-height:1.3}
@media(max-width:650px){#content .delivery-driver-access{gap:10px;padding:13px}#content .delivery-driver-access>.section-title{align-items:stretch;flex-direction:column;gap:10px}#content .delivery-driver-access>.section-title>.delivery-title{flex:1 1 auto}#content .delivery-driver-access>.section-title>.btn{width:100%;margin:0;white-space:normal}#content .delivery-driver-access>.kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#content .delivery-driver-access>.kpi-strip>.kpi-mini{min-height:66px;padding:9px 8px;gap:8px}#content .delivery-driver-access>.kpi-strip>.kpi-mini:nth-child(3){grid-column:1/-1}}

#content .delivery-driver-access .kpi-icon[data-icon="users"]{color:#0f766e}
#content .delivery-driver-access .kpi-icon[data-icon="truck"]{color:#3730a3}
#content .delivery-driver-access .kpi-icon[data-icon="check"]{color:#15803d}
