/* Pedidos / OS: módulo adicional à identidade visual existente. */
.order-main {width:100%;}
.orders-page {flex:1;display:flex;flex-direction:column;padding:24px 0 0;min-width:0;}
.orders-page > footer {margin-top:auto;padding-top:36px;}
.orders-hero {display:flex;align-items:center;justify-content:space-between;min-height:152px;padding:26px 30px;margin-bottom:18px;background:linear-gradient(115deg,#1f0d13,#101319 75%);color:#f7f7f9;border:1px solid #3e1822;border-radius:12px;overflow:hidden;}
.orders-hero h2{font-size:25px;margin:0 0 9px;line-height:1.2;}
.orders-hero p:not(.eyebrow){color:#aab1bd;margin:0;font-size:12px;line-height:1.6;}
.orders-hero-mark{font-size:78px;line-height:1;font-weight:900;letter-spacing:-9px;font-style:italic;color:rgba(242,11,37,.2);padding-right:14px;white-space:nowrap;}
.order-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:20px;}
.order-kpi{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:18px;display:flex;flex-direction:column;gap:7px;}
.order-kpi span,.order-kpi small{font-size:11px;color:var(--muted);}
.order-kpi strong{font-size:29px;line-height:1.2;letter-spacing:-1px;color:var(--text);}
.order-kpi.urgent strong{color:#f05362;}
.orders-panel{margin:0 0 22px;}
.orders-panel-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px;}
.orders-panel-head h2{margin:0 0 6px;font-size:19px;}
.orders-panel-head p{margin:0;color:var(--muted);font-size:12px;line-height:1.5;}
.orders-filters{display:grid;grid-template-columns:minmax(230px,1.8fr) minmax(165px,1fr) minmax(155px,1fr);gap:13px;align-items:end;}
.orders-filters label{margin-bottom:0;font-size:11px;color:var(--muted);font-weight:700;}
.orders-filters input,.orders-filters select{font-size:12px;min-height:43px;}
.orders-result-count{font-size:11px;color:var(--muted);margin:18px 0 10px;}
.orders-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:14px;}
.order-card{background:var(--panel2);border:1px solid var(--line);border-radius:11px;padding:17px;display:flex;flex-direction:column;gap:13px;min-width:0;transition:border-color .15s,transform .15s;}
.order-card:hover{border-color:var(--red);transform:translateY(-1px);}
.order-card-header{display:flex;align-items:start;justify-content:space-between;gap:12px;}
.order-id{font-size:12px;font-weight:900;color:var(--text);letter-spacing:.3px;}
.order-date{font-size:10px;color:var(--muted);margin-top:5px;}
.order-status{display:inline-flex;max-width:180px;align-items:center;padding:6px 9px;border-radius:999px;background:#384052;color:#dae1f4;font-size:10px;line-height:1.3;font-weight:800;text-align:center;}
.order-status[data-status="planejamento"],.order-status[data-status="aprovacao_arte"]{background:#3e2b15;color:#ffcf87;}
.order-status[data-status="materiais"],.order-status[data-status="producao"]{background:#183d61;color:#a1d5ff;}
.order-status[data-status="acabamento"],.order-status[data-status="instalacao"]{background:#29365e;color:#bccfff;}
.order-status[data-status="concluido"]{background:#173a2d;color:#8ae4b1;}
.order-status[data-status="pausado"],.order-status[data-status="cancelado"]{background:#4a202b;color:#ffb4be;}
.order-client{font-size:17px;font-weight:850;color:var(--text);line-height:1.3;overflow-wrap:anywhere;}
.order-service{font-size:11px;color:var(--muted);line-height:1.5;min-height:30px;}
.order-card-meta{display:flex;flex-wrap:wrap;gap:7px 12px;font-size:11px;color:var(--muted);}
.order-card-meta strong{color:var(--text);font-weight:750;}
.order-due-late{color:#f06b77!important;}
.order-priority{font-weight:800;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.4px;}
.order-priority[data-priority="alta"]{color:#ffcb87;}
.order-priority[data-priority="urgente"]{color:#fa7182;}
.order-progress-track{height:5px;border-radius:999px;background:var(--line);overflow:hidden;}
.order-progress-track span{height:100%;display:block;background:var(--red);border-radius:inherit;transition:width .2s;}
.order-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;}
.order-card-footer .btn{white-space:nowrap;}
.order-progress-percent{font-size:10px;color:var(--muted);}
.order-empty{grid-column:1/-1;text-align:center;background:var(--panel2);border:1px dashed var(--line);border-radius:12px;padding:46px 18px;}
.order-empty h3{font-size:17px;margin:0 0 10px;}
.order-empty p{font-size:12px;color:var(--muted);margin:0 auto 16px;max-width:420px;line-height:1.65;}
.order-modal-backdrop{position:fixed;inset:0;z-index:115;background:rgba(0,0,0,.74);display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto;}
.order-modal-backdrop.hidden{display:none!important;}
.order-modal{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:13px;width:min(100%,760px);max-height:min(92vh,1000px);overflow-y:auto;box-shadow:0 22px 70px #0009;}
.order-modal-wide{width:min(100%,1100px);}
.order-modal-head{display:flex;align-items:start;justify-content:space-between;gap:14px;padding:22px 25px 18px;border-bottom:1px solid var(--line);}
.order-modal-head h2{font-size:21px;margin:0 0 7px;}
.order-modal-head p:not(.eyebrow){font-size:11px;color:var(--muted);margin:0;line-height:1.55;}
.order-icon-button{width:34px;height:34px;border:1px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--text);font-size:15px;flex:0 0 auto;}
.order-modal-body{padding:22px 25px 25px;}
.order-modal-body label,.order-detail-form label{font-size:11px;font-weight:700;}
.order-modal-body input,.order-modal-body select,.order-modal-body textarea,.order-detail-form input,.order-detail-form select,.order-detail-form textarea{font-size:12px;}
.order-form-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.selected-quote-info{border:1px solid var(--line);background:var(--panel2);border-radius:9px;padding:12px;margin:-3px 0 17px;font-size:11px;line-height:1.7;color:var(--muted);}
.selected-quote-info strong{color:var(--text);}
.order-required{color:var(--red);}
.orders-info-tip,.order-help{font-size:11px;line-height:1.6;color:var(--muted);background:var(--panel2);border-radius:8px;padding:11px 12px;margin:3px 0 15px;}
.order-form-error{font-size:12px;font-weight:750;color:#fc8490;margin:5px 0;min-height:0;}
.order-form-error:empty{display:none;}
.order-modal-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;align-items:center;margin-top:16px;}
.order-modal-actions a.btn{text-decoration:none;}
.order-detail-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(250px,.7fr);min-height:350px;}
.order-detail-main{padding:22px 25px 25px;min-width:0;}
.order-detail-summary{background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:15px;margin-bottom:20px;}
.order-detail-summary h3{font-size:18px;margin:0 0 8px;}
.order-detail-meta{display:flex;gap:8px 18px;flex-wrap:wrap;font-size:11px;color:var(--muted);}
.order-detail-meta strong{color:var(--text);}
.order-detail-summary p{font-size:11px;color:var(--muted);margin:8px 0 0;}
.order-step-section h3,.order-history-panel h3{font-size:14px;margin:0 0 16px;}
.order-progress-steps{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-bottom:25px;}
.order-step{display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;min-width:0;}
.order-step .dot{height:9px;width:100%;border-radius:5px;background:var(--line);}
.order-step.done .dot{background:#30ad76;}
.order-step.current .dot{background:var(--red);}
.order-step span{font-size:9px;line-height:1.35;color:var(--muted);overflow-wrap:anywhere;}
.order-step.current span{color:var(--text);font-weight:900;}
.order-detail-form{min-width:0;}
.order-history-panel{padding:22px 22px;border-left:1px solid var(--line);background:var(--panel2);}
.order-timeline{display:flex;flex-direction:column;gap:0;}
.order-event{padding:0 0 21px 22px;border-left:2px solid var(--line);position:relative;}
.order-event::before{content:'';position:absolute;top:2px;left:-6px;width:10px;height:10px;background:var(--red);border:2px solid var(--panel2);border-radius:50%;}
.order-event:last-child{border-left-color:transparent;}
.order-event time{display:block;font-size:10px;color:var(--muted);margin-bottom:6px;}
.order-event b{display:block;color:var(--text);font-size:11px;margin-bottom:4px;}
.order-event p{margin:0;color:var(--muted);font-size:11px;line-height:1.55;overflow-wrap:anywhere;}
body.order-modal-open{overflow:hidden;}
/* Botões de pedidos também no histórico de orçamentos. */
.order-table-btn{padding:6px 8px;border-radius:6px;text-decoration:none;white-space:nowrap;font-size:10px;font-weight:800;color:var(--text);background:var(--panel2);border:1px solid var(--line);}
.order-table-approve{background:var(--soft);color:var(--red);}
.table-actions{flex-wrap:wrap;}
.orders-dashboard-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:-2px 0 20px;}
.orders-dashboard-card{display:flex;gap:13px;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px 18px;text-decoration:none;color:var(--text);}
.orders-dashboard-card>span{width:35px;height:35px;flex:0 0 auto;display:grid;place-items:center;background:var(--soft);border-radius:8px;color:var(--red);font-weight:900;font-size:18px;}
.orders-dashboard-card div{display:flex;align-items:baseline;gap:9px;min-width:0;flex:1;}
.orders-dashboard-card strong{font-size:22px;}
.orders-dashboard-card small{color:var(--muted);font-size:10px;}
.orders-dashboard-card b{color:var(--red);font-size:10px;white-space:nowrap;}
@media(max-width:950px){.order-kpis{grid-template-columns:repeat(2,1fr)}.order-detail-grid{grid-template-columns:1fr}.order-history-panel{border-left:0;border-top:1px solid var(--line)}}
@media(max-width:680px){.orders-hero{padding:23px 19px}.orders-hero h2{font-size:20px}.orders-hero-mark{display:none}.orders-panel-head{flex-direction:column;align-items:stretch}.orders-filters{grid-template-columns:1fr}.order-form-two{grid-template-columns:1fr;gap:0}.orders-dashboard-strip{grid-template-columns:1fr}.orders-dashboard-card div{flex-direction:column;gap:2px}.order-modal-backdrop{padding:8px}.order-modal{max-height:97dvh}.order-modal-head,.order-modal-body,.order-detail-main,.order-history-panel{padding:18px 16px}.order-progress-steps{grid-template-columns:repeat(4,1fr);row-gap:12px}.order-modal-actions{justify-content:stretch}.order-modal-actions .btn{flex:1}.order-kpis{gap:8px}.order-kpi{padding:13px}.order-kpi strong{font-size:25px}}

.client-order-link{padding:6px 8px;border-radius:5px;text-decoration:none;white-space:nowrap;font-size:10px;font-weight:800;color:var(--red);background:var(--soft);border:1px solid var(--line);}
