*{box-sizing:border-box}html,body{margin:0;padding:0;min-width:1024px;min-height:100%;font-family:"Segoe UI",Tahoma,Arial,sans-serif;background:#f5f7fb;color:#17233c;font-size:13px}body{overflow:auto}.clearfix:after{content:"";display:block;clear:both}.hidden{display:none!important}button,input,select,textarea{font-family:"Segoe UI",Tahoma,Arial,sans-serif;font-size:12px}button{cursor:pointer}#sidebar{position:fixed;left:0;top:0;bottom:0;width:220px;background:#072757;background:linear-gradient(#061f45,#083b79);color:#fff;padding:20px 16px;z-index:20;overflow:auto}.brand{height:60px;margin-bottom:25px;white-space:nowrap}.brand-mark{float:left;width:42px;height:42px;border-radius:10px;background:#1c6ef2;line-height:42px;text-align:center;font-weight:700;font-size:14px;box-shadow:0 5px 16px rgba(0,73,194,.35)}.brand-copy{margin-left:54px;padding-top:1px}.brand-title{font-size:18px;font-weight:700;line-height:22px}.brand-subtitle{color:#b8c8e1;font-size:11px}.nav-item{display:block;text-decoration:none;color:#d6e1f2;margin:4px 0;padding:12px 10px;border-radius:7px;font-weight:600}.nav-item:hover,.nav-item.active{background:#1d69e8;color:#fff;box-shadow:0 4px 12px rgba(0,73,194,.22)}.nav-icon{display:inline-block;width:27px;text-align:center;margin-right:7px;color:#fff;font-weight:700}.sidebar-spacer{height:110px}.side-card{border:1px solid rgba(255,255,255,.12);background:rgba(21,63,119,.64);border-radius:9px;padding:13px;margin-top:14px}.side-card-icon{float:left;width:28px;height:28px;border-radius:50%;line-height:28px;text-align:center;background:#2a5da6;color:#ffd66b;margin-right:8px}.side-card-title{font-weight:700;margin-bottom:4px}.side-card-sub{font-size:10px;color:#c5d3e6;margin-bottom:10px}.green-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#45ce76;margin-right:4px}.side-card button{width:100%;border:1px solid #37649a;background:#123a73;color:#fff;border-radius:5px;padding:7px}.compact-side-card{margin-bottom:15px}#main{margin-left:220px;min-height:100vh}#topbar{height:70px;background:#fff;border-bottom:1px solid #e2e7ef;padding:14px 24px;white-space:nowrap}.hamburger{float:left;font-size:22px;line-height:38px;width:35px;color:#132033}.search-wrap{position:relative;float:left;width:47%;max-width:580px;margin-left:6px}.search-wrap input{width:100%;height:39px;border:1px solid #dce3ee;border-radius:7px;background:#fbfcfe;padding:0 70px 0 36px;color:#33425e}.search-symbol{position:absolute;left:13px;top:9px;color:#627694;font-size:18px}.search-key{position:absolute;right:8px;top:8px;border:1px solid #dde4ee;border-radius:5px;color:#7d8da8;padding:3px 6px;font-size:10px;background:#fff}.top-user{float:right;height:42px;display:block}.bell{position:relative;float:left;width:38px;line-height:40px;color:#152038;font-size:11px}.bell span{position:absolute;top:0;right:7px;background:#e84d45;color:#fff;border-radius:9px;min-width:17px;height:17px;line-height:17px;text-align:center;font-size:9px}.avatar{float:left;width:36px;height:36px;line-height:36px;text-align:center;border-radius:50%;background:#e9eef5;color:#203656;font-weight:700;margin:2px 9px 0 0}.top-user-copy{float:left;padding-top:4px;min-width:100px}.top-user-copy b,.top-user-copy small{display:block}.top-user-copy small{color:#8090aa;margin-top:2px;font-size:10px}#content{padding:18px 22px 28px}.kpis{margin:0 -7px 17px}.kpi{float:left;width:25%;padding:0 7px}.kpi:before{content:""}.kpi{min-height:108px}.kpi>.kpi-icon,.kpi>.kpi-copy{position:relative}.kpi{background-clip:content-box}.kpi-icon{float:left;width:58px;height:58px;line-height:58px;text-align:center;border-radius:14px;margin:20px 0 0 20px;font-size:17px;font-weight:700}.kpi-copy{margin:18px 16px 0 91px}.kpi-copy span{display:block;color:#687793;font-weight:600;font-size:12px;margin-bottom:4px}.kpi-copy b{display:block;font-size:20px;line-height:25px;color:#17233c}.kpi-copy small{display:block;color:#8f9bb0;font-size:10px;margin-top:5px}.kpi-blue{background:#edf4ff;color:#246fea}.kpi-green{background:#ebf8ef;color:#24954c}.kpi-purple{background:#f4edff;color:#7358e6}.kpi-yellow{background:#fff5e2;color:#d99a15}.kpi{border:1px solid #e4e9f1;background-color:#fff;border-radius:10px;box-shadow:0 2px 6px rgba(22,42,71,.05)}.money-kpi{font-size:18px!important}.main-panels{margin:0 -6px 16px}.panel{background:#fff;border:1px solid #e2e7ef;border-radius:9px;box-shadow:0 2px 7px rgba(26,48,78,.05)}.main-panels>.panel{float:left;margin:0 6px;min-height:408px}.client-panel{width:31%}.product-panel{width:24%}.order-panel{width:41%}.panel-title{height:45px;border-bottom:1px solid #e5e9f0;line-height:45px;padding:0 14px;font-size:13px;font-weight:700;position:relative}.panel-minus{float:right;color:#495874;font-weight:400}.title-icon{display:inline-block;width:25px;height:25px;line-height:25px;text-align:center;margin-right:7px;border-radius:6px;font-size:10px}.blue-outline{color:#1b69ee}.gray-outline{color:#5c687c}.panel-body{padding:14px}.form-row{margin-bottom:10px}.form-row label{display:block;font-size:10px;font-weight:700;color:#394964;margin-bottom:5px}.form-row input,.form-row select,.form-row textarea,.list-toolbar input,.company-form input{width:100%;border:1px solid #dce3ee;background:#fff;border-radius:5px;height:33px;padding:0 9px;color:#263752}.form-row textarea{height:58px;padding-top:8px;resize:vertical}.form-row.two>div{float:left;width:49%}.form-row.two>div+div{margin-left:2%}.form-row.three>div{float:left;margin-right:2%}.form-row.three>.wide{width:39%}.form-row.three>.small{width:22%}.form-row.three>.mid{width:35%;margin-right:0}.btn{border:0;border-radius:5px;padding:9px 14px;font-weight:600;font-size:11px;white-space:nowrap}.btn-blue{background:#1769e8;color:#fff}.btn-green{background:#269a46;color:#fff}.btn-red{background:#d94b48;color:#fff}.btn-light{background:#f2f5f9;color:#33455f;border:1px solid #dce3ec}.btn-outline{background:#fff;color:#1769e8;border:1px solid #bcd1f7}.order-client>div{float:left;width:73%}.order-client>.btn{float:right;margin-top:18px;padding:8px 10px}.order-table-head{height:30px;line-height:30px;background:#f6f8fb;border:1px solid #e2e7ef;border-radius:5px 5px 0 0;margin-top:4px;font-weight:700;color:#40506a;font-size:9px;padding:0 6px}.order-table-head span,.order-item span{float:left;display:block}.h-prod{width:42%}.h-qtd{width:18%}.h-price{width:16%}.h-sub{width:18%}.h-act{width:6%}.order-item{border:1px solid #e2e7ef;border-top:0;padding:6px;background:#fff;min-height:42px}.order-item:after{content:"";display:block;clear:both}.order-item .oi-prod{width:42%;padding-right:5px}.order-item .oi-qtd{width:18%;padding-right:5px}.order-item .oi-price{width:16%;padding-top:8px;font-size:10px}.order-item .oi-sub{width:18%;padding-top:8px;font-size:10px}.order-item .oi-act{width:6%;padding-top:5px;text-align:center}.order-item select,.order-item input{width:100%;height:28px;border:1px solid #dae2ec;border-radius:4px;font-size:10px}.order-item input{text-align:center}.remove-item{border:0;background:transparent;color:#a84b4b;font-size:14px;padding:2px}.add-product{margin-top:8px;padding:7px 10px}.totals-box{margin:8px 0 0 40%;font-size:10px}.total-line{height:26px;line-height:26px;border-bottom:1px solid #edf0f4}.total-line span{float:left;font-weight:600}.total-line b{float:right}.total-line.editable input{float:left;margin-left:10px;width:55px;height:22px;border:1px solid #dce3ec;border-radius:4px;text-align:right}.total-final{background:#f0fbf2;border:1px solid #d9eee0;margin-top:4px;padding:0 7px;height:31px;line-height:31px}.total-final b{color:#168338;font-size:14px}.order-actions{text-align:right;margin-top:8px}.recent-panel{margin-top:4px}.see-all{float:right;text-decoration:none;color:#1769e8;font-size:10px;font-weight:600}.table-wrap{overflow-x:auto;padding:0 11px 10px}table{border-collapse:collapse;width:100%;font-size:10px}th{background:#f7f9fc;text-align:left;color:#40506a;padding:8px;border-bottom:1px solid #dfe5ed}td{padding:8px;border-bottom:1px solid #e8edf3;color:#45546b}tr:hover td{background:#fbfcfe}.tag{display:inline-block;border-radius:12px;padding:3px 7px;font-size:9px}.tag-green{background:#e9f7ed;color:#258144}.tag-blue{background:#eaf3ff;color:#1769e8}.tag-orange{background:#fff3dc;color:#c17b0b}.tag-red{background:#ffebea;color:#c94741}.action-btn{border:0;background:transparent;color:#1769e8;font-size:10px;padding:3px 5px;text-decoration:underline}.action-btn.delete{color:#c44949}.action-btn.pdf{color:#17843c}.page-header{margin-bottom:15px}.page-header>div{float:left}.page-header>button{float:right;margin-top:9px}.page-header h1{margin:0;font-size:23px}.page-header p{margin:5px 0 0;color:#7d8ba1}.list-panel{padding-top:10px}.list-toolbar{padding:0 12px 10px}.list-toolbar input{width:280px}.report-kpis{margin-bottom:18px}.reports{margin:0 -7px}.report-panel{float:left;width:48.5%;margin:0 .75%}.report-line{padding:9px 0;border-bottom:1px solid #edf0f4}.report-line b{float:right}.settings-panel{margin-bottom:14px}.settings-row{padding:15px;border-bottom:1px solid #e7ecf2;min-height:68px}.settings-row:last-child{border-bottom:0}.settings-row>div{float:left;width:70%}.settings-row>button{float:right}.settings-row b{font-size:13px}.settings-row p{margin:5px 0 0;color:#7c8aa0;font-size:11px}.settings-row:after{content:"";display:block;clear:both}.settings-row.danger{background:#fffafa}.company-form{max-width:720px}.modal-overlay{position:fixed;z-index:100;left:0;right:0;top:0;bottom:0;background:rgba(11,23,43,.55)}.modal-card{width:720px;max-height:82%;overflow:auto;margin:55px auto;background:#fff;border-radius:9px;box-shadow:0 15px 40px rgba(0,0,0,.25)}.modal-head{height:50px;line-height:50px;padding:0 17px;border-bottom:1px solid #e5e9ef;font-size:15px}.modal-head button{float:right;border:0;background:transparent;font-size:24px;color:#61708a}.modal-body{padding:18px}.modal-actions{padding:12px 18px;border-top:1px solid #e5e9ef;text-align:right}.order-detail-head{margin-bottom:15px}.order-detail-head h2{margin:0 0 4px}.order-detail-head p{margin:2px 0;color:#64738c}.detail-total{font-size:17px;color:#168338;font-weight:700;text-align:right;padding:13px 0}.empty-state{text-align:center;color:#8996aa;padding:24px}#toast{display:none;position:fixed;right:22px;bottom:22px;background:#14294a;color:#fff;padding:12px 16px;border-radius:7px;z-index:150;box-shadow:0 5px 20px rgba(0,0,0,.22);font-size:11px}@media(max-width:1200px){.client-panel{width:30%}.product-panel{width:27%}.order-panel{width:39%}.kpi-copy{margin-left:80px}.kpi-icon{width:48px;height:48px;line-height:48px;margin-left:16px}.kpi-copy b{font-size:17px}}@media print{#sidebar,#topbar,.page-header button,.btn,.action-btn{display:none!important}#main{margin-left:0}#content{padding:0}.panel{box-shadow:none}}


/* ===== V2 - legibilidade, ações, busca de produtos e modo escuro ===== */
html,body{font-size:15px}
button,input,select,textarea{font-size:14px}
.brand-title{font-size:20px}.brand-subtitle{font-size:12px}.nav-item{font-size:14px;padding:13px 10px}
.side-card-title{font-size:14px}.side-card-sub{font-size:12px;line-height:17px}.side-card button{font-size:13px;padding:9px}
.search-wrap input{font-size:14px}.top-user-copy b{font-size:14px}.top-user-copy small{font-size:11px}
.kpi-copy span{font-size:13px}.kpi-copy b{font-size:23px}.kpi-copy small{font-size:11px}.money-kpi{font-size:20px!important}
.panel-title{font-size:15px;height:49px;line-height:49px}.form-row label,.order-product-search label{font-size:12px;color:#2d3d58;margin-bottom:6px}
.form-row input,.form-row select,.form-row textarea,.list-toolbar input,.company-form input,.order-product-search input,.theme-select{height:39px;font-size:14px;border-radius:7px}
.btn{font-size:13px;padding:10px 15px;border-radius:6px;box-shadow:0 1px 2px rgba(20,36,58,.09)}
.btn:hover{filter:brightness(.97)}
table{font-size:13px}th{font-size:12px;padding:11px 9px}td{font-size:13px;padding:10px 9px}
.tag{font-size:11px;padding:4px 8px}.see-all{font-size:12px}.empty-state{font-size:13px}
.page-header h1{font-size:27px}.page-header p{font-size:14px}.settings-row b{font-size:15px}.settings-row p{font-size:13px;line-height:19px}
.product-form-tip{background:#f5f8fc;border:1px solid #e1e8f1;border-radius:7px;color:#667793;font-size:12px;line-height:18px;padding:10px;margin:3px 0 14px}
.product-panel .panel-body{padding-bottom:24px}
.order-product-search{margin:1px 0 12px;background:#f7f9fc;border:1px solid #e2e7ef;border-radius:7px;padding:9px}
.order-product-search>div{float:left;width:72%}.order-product-search>button{float:right;margin-top:19px}
.order-table-head{font-size:11px;height:34px;line-height:34px}.order-item{min-height:48px;padding:7px}.order-item select,.order-item input{height:33px;font-size:12px}.order-item .oi-price,.order-item .oi-sub{padding-top:9px;font-size:12px;font-weight:600}.remove-item{width:27px;height:27px;border-radius:5px;background:#fff0f0;color:#c73f3f;font-size:18px;font-weight:700}.remove-item:hover{background:#ffdede}
.totals-box{font-size:12px}.total-line{height:30px;line-height:30px}.total-line.editable input{height:25px;font-size:12px}.total-final{height:36px;line-height:36px}.total-final b{font-size:17px}
.action-btn{display:inline-block;border:1px solid #cbd7e6;background:#f5f8fc;color:#24486f;font-size:12px;font-weight:700;padding:6px 9px;margin:2px 3px 2px 0;text-decoration:none;border-radius:5px;white-space:nowrap}
.action-btn.view,.action-btn.edit{background:#eaf3ff;border-color:#b8d2f7;color:#125fca}.action-btn.history{background:#f0ecff;border-color:#d4c9ff;color:#6246c6}.action-btn.pdf{background:#eaf8ef;border-color:#bfe5ca;color:#16743a}.action-btn.delete{background:#fff0f0;border-color:#f0c3c3;color:#b63535}.action-btn:hover{filter:brightness(.97)}
.order-count{display:inline-block;min-width:27px;text-align:center;background:#edf3fb;color:#31577e;border-radius:12px;padding:4px 7px;font-weight:700}
.client-history-summary{margin:0 -6px 16px;overflow:hidden}.client-history-summary>div{float:left;width:31.8%;margin:0 .75%;background:#f7f9fc;border:1px solid #e1e7ef;border-radius:8px;padding:13px}.client-history-summary span{display:block;font-size:11px;color:#73839a;margin-bottom:5px}.client-history-summary b{font-size:17px;color:#1c2c43}.client-history-summary:after{content:"";display:block;clear:both}
.order-summary-lines{margin-left:auto;width:300px;margin-top:12px}.order-summary-lines div{padding:6px 0;border-bottom:1px solid #e8edf3}.order-summary-lines b{float:right}.detail-total{font-size:20px}
.theme-select{float:right;width:190px;border:1px solid #d4dce7;background:#fff;color:#263752;padding:0 8px;margin-top:0}
.appearance-panel .settings-row{min-height:82px}

/* Tema escuro salvo no dados.json */
body.dark-mode{background:#111827;color:#e5edf8}
body.dark-mode #main,body.dark-mode #content{background:#111827}
body.dark-mode #topbar,body.dark-mode .panel,body.dark-mode .kpi,body.dark-mode .modal-card{background:#182235;border-color:#2a3950;color:#e7eef8}
body.dark-mode #topbar{border-bottom-color:#2a3950}
body.dark-mode .search-wrap input,body.dark-mode .form-row input,body.dark-mode .form-row select,body.dark-mode .form-row textarea,body.dark-mode .list-toolbar input,body.dark-mode .company-form input,body.dark-mode .order-product-search input,body.dark-mode .theme-select,body.dark-mode .order-item select,body.dark-mode .order-item input,body.dark-mode .total-line.editable input{background:#111b2b;border-color:#34445d;color:#edf4ff}
body.dark-mode .search-key{background:#111b2b;border-color:#34445d;color:#aebbd0}
body.dark-mode .hamburger,body.dark-mode .top-user-copy b,body.dark-mode .panel-title,body.dark-mode .page-header h1,body.dark-mode td,body.dark-mode .kpi-copy b,body.dark-mode .client-history-summary b{color:#edf4ff}
body.dark-mode .top-user-copy small,body.dark-mode .page-header p,body.dark-mode .kpi-copy span,body.dark-mode .kpi-copy small,body.dark-mode .settings-row p,body.dark-mode .form-row label,body.dark-mode .order-product-search label{color:#aebbd0}
body.dark-mode .panel-title,body.dark-mode th,body.dark-mode td,body.dark-mode .settings-row,body.dark-mode .modal-head,body.dark-mode .modal-actions,body.dark-mode .total-line{border-color:#2e3d54}
body.dark-mode th,body.dark-mode .order-table-head,body.dark-mode .order-product-search,body.dark-mode .product-form-tip,body.dark-mode .client-history-summary>div{background:#202c40;border-color:#33435a;color:#cbd7e8}
body.dark-mode .order-item{background:#182235;border-color:#2e3d54}
body.dark-mode tr:hover td{background:#202c40}
body.dark-mode .total-final{background:#173124;border-color:#28543a}
body.dark-mode .btn-light{background:#26344a;color:#edf4ff;border-color:#3d4d64}
body.dark-mode .btn-outline{background:#182235;color:#7eb0ff;border-color:#44699c}
body.dark-mode .action-btn.view,body.dark-mode .action-btn.edit{background:#19365c;border-color:#2c5b94;color:#9dc5ff}
body.dark-mode .action-btn.history{background:#302855;border-color:#554687;color:#c7b9ff}
body.dark-mode .action-btn.pdf{background:#173c2a;border-color:#286542;color:#90ddb0}
body.dark-mode .action-btn.delete,body.dark-mode .remove-item{background:#482426;border-color:#733639;color:#ffaaaa}
body.dark-mode .empty-state{color:#90a0b7}
body.dark-mode .order-count{background:#273952;color:#b7d5f7}
body.dark-mode .settings-row.danger{background:#2b1d21}
body.dark-mode #toast{background:#e5edf8;color:#152033}


/* ===== V3 - dashboard reorganizado e buscas corrigidas ===== */
#topbar{position:relative;z-index:60;height:76px;padding-top:17px}
.search-wrap{width:52%;max-width:680px}
.search-wrap input{height:42px;font-size:15px;padding-left:40px}
.search-symbol{top:10px;font-size:20px}
.search-key{top:9px;font-size:11px}
.global-search-results{position:absolute;left:0;right:0;top:47px;background:#fff;border:1px solid #d9e2ee;border-radius:9px;box-shadow:0 12px 30px rgba(18,39,70,.18);max-height:370px;overflow:auto;z-index:100}
.global-search-results a{display:block;position:relative;padding:11px 14px 11px 86px;border-bottom:1px solid #edf1f5;text-decoration:none;color:#1d2c43;min-height:58px}
.global-search-results a:last-child{border-bottom:0}
.global-search-results a:hover{background:#f4f8ff}
.global-search-results b,.global-search-results small{display:block}
.global-search-results b{font-size:14px;margin-bottom:3px}
.global-search-results small{font-size:12px;color:#738198}
.gs-type{position:absolute;left:13px;top:18px;display:inline-block;width:61px;text-align:center;padding:4px 3px;border-radius:10px;background:#eaf3ff;color:#1769e8;font-size:9px;font-weight:800;letter-spacing:.3px}
.global-search-empty{padding:18px;color:#7d8ba1;font-size:13px;text-align:center}

#content{padding:24px 28px 34px}
.dashboard-heading{margin-bottom:16px}
.dashboard-heading>div:first-child{float:left}
.dashboard-heading-actions{float:right;padding-top:17px}
.dashboard-heading h1{font-size:29px;line-height:34px;margin:2px 0 4px;color:#14223a}
.dashboard-heading p{font-size:14px;color:#75849b;margin:0}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.2px;color:#1769e8;margin-bottom:2px}
.btn-large{padding:12px 20px;font-size:14px}

.quick-actions{margin:0 -6px 17px}
.quick-action{position:relative;float:left;width:32.33%;margin:0 .5%;height:78px;border:1px solid #e1e7ef;border-radius:10px;background:#fff;text-align:left;padding:12px 42px 12px 13px;box-shadow:0 2px 7px rgba(26,48,78,.05);color:#1c2d46}
.quick-action:hover{border-color:#bfd3f1;background:#fbfdff}
.quick-icon{float:left;width:48px;height:48px;line-height:48px;border-radius:10px;text-align:center;font-weight:800;font-size:15px;margin-right:12px}
.quick-client .quick-icon{background:#eaf3ff;color:#1769e8}
.quick-product .quick-icon{background:#eaf8ef;color:#168143}
.quick-order .quick-icon{background:#f1ecff;color:#6548cb}
.quick-copy{display:block;padding-top:4px}
.quick-copy b,.quick-copy small{display:block}
.quick-copy b{font-size:15px;margin-bottom:5px}
.quick-copy small{font-size:12px;color:#7c899e}
.quick-arrow{position:absolute;right:15px;top:24px;font-size:27px;color:#9aabc1}

.kpis{margin-bottom:20px}
.kpi{min-height:116px}
.kpi-icon{margin-top:26px}
.kpi-copy{margin-top:22px}
.kpi-copy b{font-size:25px}

.order-panel-featured{width:auto!important;float:none!important;margin:0 0 18px!important;min-height:0!important;border-color:#d8e3f1;box-shadow:0 4px 14px rgba(24,53,91,.07)}
.featured-title{height:54px;line-height:54px;font-size:16px}
.panel-hint{font-size:12px;font-weight:400;color:#8390a4;margin-left:8px}
.order-panel-featured .panel-body{padding:18px}
.order-panel-featured .order-client>div{width:82%}
.order-panel-featured .order-client>.btn{margin-top:21px}
.order-panel-featured .order-product-search{position:relative;margin:8px 0 14px;padding:12px;background:#f6f9fd;border-color:#dfe7f1}
.order-panel-featured .order-product-search>div{width:82%;position:relative}
.order-panel-featured .order-product-search>button{margin-top:23px}
.product-search-input-wrap{position:relative}
.product-search-input-wrap>span{position:absolute;left:12px;top:8px;font-size:18px;color:#6f8199;z-index:2}
.product-search-input-wrap input{padding-left:37px!important}
.product-search-results{position:absolute;left:0;right:0;top:66px;background:#fff;border:1px solid #d5dfec;border-radius:8px;box-shadow:0 10px 26px rgba(20,41,72,.17);z-index:55;max-height:310px;overflow:auto}
.product-search-result{padding:10px 10px 10px 12px;border-bottom:1px solid #edf1f5;min-height:57px}
.product-search-result:last-child{border-bottom:0}
.product-search-result:hover{background:#f6f9fd}
.product-search-result>div{float:left;width:75%;padding-top:2px}
.product-search-result b,.product-search-result small{display:block}
.product-search-result b{font-size:14px;color:#20314b;margin-bottom:4px}
.product-search-result small{font-size:12px;color:#178143;font-weight:700}
.product-search-result button{float:right;margin-top:3px;border:1px solid #b9d1f5;background:#eaf3ff;color:#1769e8;border-radius:6px;padding:8px 12px;font-weight:700;font-size:12px}
.product-search-result button:hover{background:#dceaff}
.product-search-empty{padding:16px;text-align:center;color:#7b899d;font-size:13px}
.order-panel-featured .order-table-head{margin-top:2px}
.order-panel-featured .h-prod,.order-panel-featured .order-item .oi-prod{width:50%}
.order-panel-featured .h-qtd,.order-panel-featured .order-item .oi-qtd{width:13%}
.order-panel-featured .h-price,.order-panel-featured .order-item .oi-price{width:14%}
.order-panel-featured .h-sub,.order-panel-featured .order-item .oi-sub{width:18%}
.order-panel-featured .h-act,.order-panel-featured .order-item .oi-act{width:5%}
.order-panel-featured .order-item select,.order-panel-featured .order-item input{height:38px;font-size:13px}
.order-panel-featured .order-item .oi-price,.order-panel-featured .order-item .oi-sub{padding-top:11px}
.order-bottom{margin-top:12px}
.order-help{float:left;width:48%;background:#f7f9fc;border:1px solid #e1e7ef;border-radius:8px;padding:12px 14px;color:#667892;font-size:12px;line-height:18px}
.order-help b{display:block;color:#30445f;font-size:13px;margin-bottom:2px}
.order-help span{display:block}
.order-panel-featured .totals-box{float:right;width:43%;margin:0;font-size:13px}
.order-panel-featured .total-line{height:35px;line-height:35px}
.order-panel-featured .total-line.editable input{height:28px;margin-top:3px;font-size:13px}
.order-panel-featured .total-final{height:44px;line-height:44px;margin-top:6px}
.order-panel-featured .total-final b{font-size:20px}
.order-panel-featured .order-actions{margin-top:14px}

.secondary-forms{margin:0 -6px 18px}
.secondary-forms>.panel{float:left;margin:0 6px;min-height:325px}
.secondary-forms .client-panel{width:64%}
.secondary-forms .product-panel{width:33%}
.secondary-forms .panel-title{font-size:15px;height:50px;line-height:50px}
.secondary-forms .panel-body{padding:16px}
.secondary-forms .product-form-tip{margin-top:8px}
.recent-panel{margin-top:0}

@media(max-width:1180px){
  .quick-action{height:74px}
  .quick-icon{width:42px;height:42px;line-height:42px}
  .quick-copy b{font-size:14px}
  .order-panel-featured .order-client>div,.order-panel-featured .order-product-search>div{width:78%}
  .secondary-forms .client-panel{width:62%}
  .secondary-forms .product-panel{width:35%}
}

body.dark-mode .dashboard-heading h1,body.dark-mode .quick-action,body.dark-mode .quick-copy b{color:#edf4ff}
body.dark-mode .dashboard-heading p,body.dark-mode .quick-copy small,body.dark-mode .panel-hint{color:#9fadc1}
body.dark-mode .quick-action,body.dark-mode .global-search-results,body.dark-mode .product-search-results{background:#182235;border-color:#304057}
body.dark-mode .quick-action:hover,body.dark-mode .global-search-results a:hover,body.dark-mode .product-search-result:hover{background:#202c40}
body.dark-mode .global-search-results a,body.dark-mode .product-search-result{border-color:#2e3d54;color:#e9f1fb}
body.dark-mode .global-search-results b,body.dark-mode .product-search-result b{color:#edf4ff}
body.dark-mode .global-search-results small,body.dark-mode .global-search-empty,body.dark-mode .product-search-empty{color:#a8b6ca}
body.dark-mode .gs-type{background:#19365c;color:#9dc5ff}
body.dark-mode .order-panel-featured .order-product-search,body.dark-mode .order-help{background:#202c40;border-color:#33435a}
body.dark-mode .order-help{color:#b5c2d4}
body.dark-mode .order-help b{color:#edf4ff}
body.dark-mode .product-search-result button{background:#19365c;border-color:#2c5b94;color:#9dc5ff}
body.dark-mode .product-search-result small{color:#90ddb0}

/* ===== V4 - pesquisa por linha, prévia em PDF e edição de pedidos ===== */
#pedidoItens{position:relative;z-index:10}
.order-main-fields .order-client-field,.order-main-fields .order-status-field{float:left}
.order-main-fields .order-client-field{width:72%}
.order-main-fields .order-status-field{width:26%;margin-left:2%}
.order-main-fields label{display:block;font-size:12px;font-weight:700;color:#2d3d58;margin-bottom:6px}
.order-main-fields select{width:100%;height:39px;border:1px solid #dce3ee;background:#fff;border-radius:7px;padding:0 9px;color:#263752;font-size:14px}
.order-panel-featured .order-item{position:relative;overflow:visible;z-index:1}
.order-panel-featured .order-item .oi-prod{position:relative;overflow:visible;padding-right:8px}
.order-panel-featured .order-item .oi-price{padding-top:0!important;padding-right:7px}
.order-item input.row-product-price{width:100%;height:38px;text-align:right;padding:0 8px;background:#fff;color:#1769e8;border-color:#b8d2f7;font-weight:700}
.order-item input.row-product-price:disabled{background:#f2f5f8;border-color:#dfe5ec;color:transparent;cursor:not-allowed}
.row-product-picker{position:relative;width:100%}
.order-item input.row-product-search{width:100%;height:38px;text-align:left;padding:0 34px 0 11px;background:#fff;color:#263752}
.row-product-picker:after{content:"⌕";position:absolute;right:11px;top:7px;color:#6f8199;font-size:18px;pointer-events:none}
.row-product-results{position:absolute;left:0;right:0;top:41px;z-index:120;background:#fff;border:1px solid #d5dfec;border-radius:8px;box-shadow:0 10px 26px rgba(20,41,72,.2);max-height:286px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.row-product-result{display:block;width:100%;min-height:52px;border:0;border-bottom:1px solid #edf1f5;background:#fff;text-align:left;padding:9px 12px;color:#20314b}
.row-product-result:last-child{border-bottom:0}
.row-product-result:hover,.row-product-result:focus{background:#f0f6ff;outline:0}
.row-product-result b,.row-product-result small{display:block}
.row-product-result b{font-size:13px;margin-bottom:3px}
.row-product-result small{font-size:12px;color:#178143;font-weight:700}
.row-product-empty{padding:14px;text-align:center;color:#7b899d;font-size:12px;background:#fff}
.order-actions .btn{margin-left:7px}
.order-actions .btn:first-child{margin-left:0}

body.dark-mode .order-item input.row-product-search{background:#111b2b;border-color:#34445d;color:#edf4ff}
body.dark-mode .order-item input.row-product-price{background:#111b2b;border-color:#44699c;color:#9dc5ff}
body.dark-mode .order-item input.row-product-price:disabled{background:#202b3d;border-color:#334159;color:transparent}
body.dark-mode .order-main-fields label{color:#aebbd0}
body.dark-mode .order-main-fields select{background:#111b2b;border-color:#34445d;color:#edf4ff}
body.dark-mode .row-product-results{background:#182235;border-color:#304057}
body.dark-mode .row-product-result{background:#182235;border-color:#2e3d54;color:#edf4ff}
body.dark-mode .row-product-result:hover,body.dark-mode .row-product-result:focus{background:#202c40}
body.dark-mode .row-product-result small{color:#90ddb0}
body.dark-mode .row-product-empty{background:#182235;color:#a8b6ca}

/* ===== V5 - preço negociado, produção e relatórios por período ===== */
.production-toolbar{margin-bottom:16px;padding:12px 14px;background:#fff;border:1px solid #e2e7ef;border-radius:9px;box-shadow:0 2px 7px rgba(26,48,78,.05)}
.production-toolbar input{float:left;width:420px;height:39px;border:1px solid #dce3ee;border-radius:7px;padding:0 11px;color:#263752;font-size:14px}
.production-toolbar span{float:right;color:#73839a;font-size:12px;line-height:39px}
.production-toolbar:after{content:"";display:block;clear:both}
.production-board{margin:0 -7px}
.production-column{float:left;width:32.33%;margin:0 .5%;background:#f7f9fc;border:1px solid #dfe6ef;border-radius:10px;min-height:510px;overflow:hidden}
.production-column-head{height:67px;padding:12px 14px;background:#fff;border-bottom:1px solid #e2e7ef}
.production-column-head>div{float:left}
.production-column-head strong{float:right;font-size:13px;line-height:35px;color:#31435e}
.production-column-head b{font-size:15px;line-height:20px}
.production-column-head em{display:inline-block;margin-left:7px;min-width:24px;padding:3px 7px;border-radius:12px;background:#eef2f7;color:#52627a;font-size:11px;font-style:normal;text-align:center}
.production-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:7px}
.column-open .production-dot{background:#e7a51b}.column-production .production-dot{background:#1769e8}.column-done .production-dot{background:#269a46}
.production-card-list{padding:11px;min-height:440px}
.production-card{margin-bottom:10px;padding:12px;background:#fff;border:1px solid #dde5ef;border-radius:8px;box-shadow:0 2px 6px rgba(25,49,79,.05)}
.production-card-head{height:22px;color:#7a899d;font-size:11px}
.production-card-head b{float:left;color:#1769e8;font-size:12px}.production-card-head span{float:right}
.production-card h3{margin:5px 0 7px;font-size:14px;color:#1f3049}
.production-items{height:34px;overflow:hidden;margin:0 0 9px;color:#6c7b91;font-size:11px;line-height:17px}
.production-card-total{padding:8px 0;border-top:1px solid #edf1f5;border-bottom:1px solid #edf1f5;font-size:11px;color:#78869a}
.production-card-total span{float:left}.production-card-total b{float:right;color:#1d2f48;font-size:13px}.production-card-total:after{content:"";display:block;clear:both}
.production-card-actions{padding-top:8px}
.production-card-actions button,.production-move{border:1px solid #c8d6e8;background:#f5f8fc;color:#315273;border-radius:5px;padding:6px 9px;margin-right:5px;font-size:11px;font-weight:700}
.production-card-move{margin-top:8px}
.production-card-move .production-move{margin-bottom:4px}
.production-card-move .move-next{background:#eaf3ff;border-color:#b8d2f7;color:#125fca}
.production-card-move .move-done{background:#eaf8ef;border-color:#bfe5ca;color:#16743a}
.production-card-move .move-back{background:#fff6e6;border-color:#ead5aa;color:#9a6710}
.production-empty{text-align:center;color:#8795a9;font-size:12px;padding:35px 10px}

.report-toolbar{margin-bottom:16px;padding:12px 15px}
.report-toolbar>div{float:left;width:260px}
.report-toolbar label{display:block;margin-bottom:5px;color:#394964;font-size:11px;font-weight:700}
.report-toolbar select{width:100%;height:38px;border:1px solid #dce3ee;border-radius:7px;background:#fff;color:#263752;padding:0 9px;font-size:13px}
.report-toolbar p{float:left;margin:22px 0 0 18px;color:#6f7e93;font-size:12px}
.status-report-panel{margin-bottom:16px}
.report-status-grid{margin:0 -6px}
.report-status-card{float:left;width:31.83%;min-height:76px;margin:0 .75%;padding:14px;border:1px solid #e0e6ee;border-radius:8px;background:#f8fafc}
.report-status-card>div{float:left}.report-status-card>b{float:right;font-size:16px;line-height:34px}
.report-status-card span,.report-status-card small{display:block}.report-status-card span{font-size:14px;font-weight:700;margin-bottom:4px}.report-status-card small{font-size:11px;color:#7d8ba0}
.status-open{border-left:4px solid #e7a51b}.status-production{border-left:4px solid #1769e8}.status-done{border-left:4px solid #269a46}

body.dark-mode .production-toolbar,body.dark-mode .production-column-head,body.dark-mode .production-card{background:#182235;border-color:#2e3d54}
body.dark-mode .production-column{background:#111b2b;border-color:#304057}
body.dark-mode .production-toolbar input,body.dark-mode .report-toolbar select{background:#111b2b;border-color:#34445d;color:#edf4ff}
body.dark-mode .production-toolbar span,body.dark-mode .production-items,body.dark-mode .production-card-head,body.dark-mode .production-card-total,body.dark-mode .report-toolbar p{color:#a8b6ca}
body.dark-mode .production-card h3,body.dark-mode .production-card-total b,body.dark-mode .production-column-head strong{color:#edf4ff}
body.dark-mode .production-card-actions button{background:#26344a;border-color:#3d4d64;color:#edf4ff}
body.dark-mode .report-toolbar label{color:#aebbd0}
body.dark-mode .report-status-card{background:#202c40;border-color:#33435a}
body.dark-mode .report-status-card small{color:#a8b6ca}

@media(max-width:1180px){
  .production-toolbar input{width:360px}
  .production-toolbar span{display:none}
  .production-card-actions button,.production-move{padding:6px 7px}
}

/* ===== V6 - experiência responsiva para celular e tablet ===== */
button.hamburger{border:0;background:transparent;padding:0;text-align:left}
.mobile-nav-overlay{display:none}

@media(max-width:900px){
  html,body{min-width:0;width:100%;overflow-x:hidden;font-size:14px}
  body.mobile-nav-open{overflow:hidden}

  #sidebar{width:min(82vw,300px);padding:18px 15px;transform:translateX(-105%);transition:transform .22s ease;box-shadow:8px 0 30px rgba(4,22,49,.28);z-index:220}
  body.mobile-nav-open #sidebar{transform:translateX(0)}
  .mobile-nav-overlay{position:fixed;inset:0;background:rgba(4,18,38,.52);z-index:210}
  body.mobile-nav-open .mobile-nav-overlay{display:block}
  .sidebar-spacer{height:24px}
  .nav-item{font-size:15px;padding:13px 11px;margin:3px 0}
  .side-card{margin-top:10px}

  #main{margin-left:0;width:100%;min-height:100vh}
  #topbar{position:sticky;top:0;display:flex;align-items:center;gap:8px;width:100%;height:64px;padding:10px 11px;white-space:normal;z-index:180}
  button.hamburger{float:none;flex:0 0 40px;width:40px;height:42px;line-height:42px;text-align:center;border:1px solid #dbe3ed;border-radius:8px;background:#f7f9fc;color:#17233c;font-size:24px}
  .search-wrap{float:none;flex:1;width:auto;max-width:none;margin:0;min-width:0}
  .search-wrap input{height:42px;font-size:14px;padding:0 34px 0 36px}
  .search-symbol{top:9px}
  .search-key{display:none}
  .global-search-results{position:fixed;left:10px;right:10px;top:59px;max-height:58vh}
  .top-user{float:none;flex:0 0 38px;width:38px;height:42px}
  .bell,.top-user-copy{display:none}
  .avatar{float:none;width:38px;height:38px;line-height:38px;margin:2px 0 0}

  #content{padding:14px 10px 30px}
  .dashboard-heading{margin-bottom:12px}
  .dashboard-heading>div:first-child,.dashboard-heading-actions{float:none}
  .dashboard-heading-actions{padding-top:11px}
  .dashboard-heading-actions .btn{width:100%}
  .dashboard-heading h1,.page-header h1{font-size:23px;line-height:28px}
  .dashboard-heading p,.page-header p{font-size:13px;line-height:19px}
  .panel-hint{display:block;margin:2px 0 0;line-height:17px}
  .featured-title{height:auto;min-height:54px;line-height:22px;padding-top:9px;padding-bottom:9px}

  .quick-actions{margin:0 0 13px}
  .quick-action{float:none;width:100%;height:70px;margin:0 0 8px;padding-top:10px;padding-bottom:10px}
  .quick-icon{width:48px;height:48px;line-height:48px}

  .kpis{display:flex;flex-wrap:wrap;margin:0 -4px 12px}
  .kpi{float:none;width:50%;min-height:112px;margin:0 0 8px;padding:0 4px}
  .kpi-icon{width:40px;height:40px;line-height:40px;margin:20px 0 0 12px;border-radius:10px}
  .kpi-copy{margin:17px 9px 0 61px}
  .kpi-copy span{font-size:11px;line-height:15px}
  .kpi-copy b{font-size:20px;line-height:24px}
  .money-kpi{font-size:16px!important}

  .panel,.main-panels>.panel,.secondary-forms>.panel,.report-panel{float:none!important;width:100%!important;min-height:0!important;margin:0 0 12px!important}
  .panel-body,.order-panel-featured .panel-body,.secondary-forms .panel-body{padding:13px}
  .panel-title{padding-left:12px;padding-right:12px}

  .order-client>div,.order-panel-featured .order-client>div{float:none;width:100%}
  .order-client>.btn,.order-panel-featured .order-client>.btn{float:none;width:100%;margin:4px 0 2px}
  .order-main-fields .order-client-field,.order-main-fields .order-status-field{float:none;width:100%;margin:0 0 10px}
  .order-panel-featured .order-table-head{display:none}
  .order-panel-featured .order-item{position:relative;min-height:146px;margin:0 0 10px;padding:12px;border:1px solid #dfe6ef;border-radius:9px;box-shadow:0 2px 5px rgba(25,49,79,.04)}
  .order-panel-featured .order-item span{display:block}
  .order-panel-featured .order-item .oi-prod{float:none;width:100%;padding:0 38px 0 0;margin-bottom:10px}
  .order-panel-featured .order-item .oi-qtd{float:left;width:27%;padding:0 7px 0 0}
  .order-panel-featured .order-item .oi-price{float:left;width:39%;padding:0 7px 0 0!important}
  .order-panel-featured .order-item .oi-sub{float:left;width:34%;padding:0!important;font-size:13px;line-height:38px;text-align:right}
  .order-panel-featured .order-item .oi-act{position:absolute;right:10px;top:12px;width:auto;padding:0}
  .order-panel-featured .order-item .oi-qtd:before,.order-panel-featured .order-item .oi-price:before,.order-panel-featured .order-item .oi-sub:before{display:block;height:18px;line-height:15px;color:#6d7c92;font-size:10px;font-weight:700;text-align:left}
  .order-panel-featured .order-item .oi-qtd:before{content:"Quantidade"}
  .order-panel-featured .order-item .oi-price:before{content:"Preço"}
  .order-panel-featured .order-item .oi-sub:before{content:"Subtotal";text-align:right}
  .order-panel-featured .order-item .oi-sub{line-height:38px}
  .order-panel-featured .order-item .oi-sub:before{line-height:15px}
  .row-product-results{right:-38px;max-height:250px}
  .add-product{width:100%;margin-top:0}
  .order-bottom{margin-top:10px}
  .order-help,.order-panel-featured .totals-box{float:none;width:100%;margin:0}
  .order-help{margin-bottom:10px}
  .order-panel-featured .total-line.editable input{width:64px}
  .order-actions{text-align:stretch}
  .order-actions .btn{display:block;width:100%;margin:8px 0 0}

  .form-row.two>div,.form-row.three>div,.form-row.three>.wide,.form-row.three>.small,.form-row.three>.mid{float:none;width:100%;margin:0 0 10px}
  .secondary-forms{margin:0}
  .secondary-forms .btn{width:100%;margin-top:4px}
  .product-form-tip{margin-bottom:10px}

  .page-header>div,.page-header>button{float:none}
  .page-header>button{width:100%;margin:11px 0 0}
  .list-toolbar{padding:0 10px 10px}
  .list-toolbar input{width:100%}
  .table-wrap{width:100%;overflow-x:auto;padding:0 8px 10px;-webkit-overflow-scrolling:touch}
  .table-wrap table{min-width:720px}
  .recent-panel .table-wrap table{min-width:780px}
  th,td{white-space:nowrap}

  .production-toolbar{padding:10px;margin-bottom:12px}
  .production-toolbar input{float:none;width:100%}
  .production-toolbar span{display:none}
  .production-board{margin:0}
  .production-column{float:none;width:100%;min-height:0;margin:0 0 13px}
  .production-card-list{min-height:0;padding:9px}
  .production-card-actions button,.production-move{min-height:36px;margin-bottom:5px}

  .report-toolbar>div,.report-toolbar p{float:none;width:100%;margin:0}
  .report-toolbar p{padding-top:9px}
  .report-status-grid{margin:0}
  .report-status-card{float:none;width:100%;min-height:72px;margin:0 0 8px}
  .reports{margin:0}

  .settings-row{padding:13px}
  .settings-row>div,.settings-row>button{float:none;width:100%}
  .settings-row>button{margin-top:11px}
  .theme-select{float:none;width:100%;margin-top:11px}

  .modal-card{width:calc(100% - 20px);max-height:calc(100vh - 20px);margin:10px auto;border-radius:8px}
  .modal-head{height:48px;line-height:48px;padding:0 13px}
  .modal-body{padding:13px}
  .modal-actions{padding:10px}
  .modal-actions .btn{display:block;width:100%;margin:7px 0 0}
  .client-history-summary>div{float:none;width:100%;margin:0 0 8px}
  .order-summary-lines{width:100%}

  #toast{left:10px;right:10px;bottom:10px;width:auto;text-align:center;font-size:12px}

  body.dark-mode button.hamburger{background:#202c40;border-color:#34445d;color:#edf4ff}
  body.dark-mode .order-panel-featured .order-item .oi-qtd:before,body.dark-mode .order-panel-featured .order-item .oi-price:before,body.dark-mode .order-panel-featured .order-item .oi-sub:before{color:#aebbd0}
}

@media(max-width:420px){
  .kpi-icon{display:none}
  .kpi-copy{margin:17px 10px}
  .kpi{min-height:104px}
  .quick-copy small{font-size:11px}
  .order-panel-featured .order-item .oi-qtd{width:25%}
  .order-panel-featured .order-item .oi-price{width:43%}
  .order-panel-featured .order-item .oi-sub{width:32%;font-size:12px}
}
