:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f7f2f2;background:#100d0f;font-size:16px;--bg:#100d0f;--surface:#1c171a;--surface2:#271e22;--line:#47343b;--text:#f7f2f2;--muted:#b5a4aa;--red:#e5243b;--red-dark:#9b1427;--green:#6ed69a;--amber:#ffd184}*{box-sizing:border-box}html,body{margin:0;min-width:320px}body{min-height:100vh}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}h1,h2,h3,p{margin:0}h1{font-size:clamp(1.5rem,4vw,2rem);line-height:1.15}h2{font-size:1.25rem}h3{font-size:1rem}.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{font-size:.72rem;letter-spacing:.11em;text-transform:uppercase;font-weight:800;color:#ff8d9d}.btn,button.small,.icon-btn{min-height:44px;border:0;border-radius:12px;padding:10px 16px;background:var(--red);color:white;font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:7px;line-height:1.2}.btn:hover,button.small:hover,.icon-btn:hover{filter:brightness(1.12)}.btn.secondary,button.secondary{background:#372a30;color:#fff}.btn.text{background:transparent;color:var(--muted)}.btn.danger{background:#76202c}.btn.full{width:100%}.icon-btn{width:44px;padding:0;background:#302329;font-size:1.35rem}.small{font-size:.85rem}.brand{display:flex;align-items:center;gap:10px}.brand strong{display:block}.brand small{display:block;color:var(--muted);font-size:.74rem}.brand-mark{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#f32b46,#7a0f20);color:white;font-weight:900;letter-spacing:-.08em}.login-screen{min-height:100dvh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at top left,#681122 0%,#170e12 48%,#100d0f 100%)}.login-card{width:min(100%,390px);padding:26px;border:1px solid #72404a;border-radius:22px;background:#1b1519;box-shadow:0 25px 80px #0006}.login-card .brand-mark{width:54px;height:54px;margin-bottom:25px}.login-card h1{margin:10px 0}.login-card .muted{margin-bottom:24px}.app-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100dvh}.sidebar{background:#170f13;border-right:1px solid var(--line);padding:22px;display:flex;flex-direction:column;gap:24px}.sidebar nav{display:grid;gap:7px}.sidebar nav button{width:100%;min-height:48px;border:0;border-radius:12px;padding:9px 12px;text-align:left;background:transparent;color:#dacdd0;font-weight:700;font-size:.96rem}.sidebar nav button.active{background:#9b172a;color:white}.sidebar .logout{margin-top:auto;justify-content:flex-start}.main-area{min-width:0}.topbar{display:none}.content{width:min(100%,1180px);margin:auto;padding:30px 30px 65px}.page-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.page-header p{margin-bottom:5px}.page-header .btn{flex:none}.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:20px}.field{min-width:0;margin-bottom:15px}.field label{display:block;font-size:.84rem;font-weight:700;color:#e8dcdf;margin-bottom:6px}.field input,.field select,.field textarea,input,select,textarea{display:block;width:100%;min-width:0;min-height:46px;border:1px solid #66535b;border-radius:11px;background:#130f12;color:var(--text);padding:10px 12px;font-size:16px}.field textarea,textarea{min-height:84px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus,input:focus,select:focus,textarea:focus{outline:2px solid #ff6073;outline-offset:1px}.field input::placeholder,.field textarea::placeholder{color:#8e7f85}.row{display:flex;gap:12px;align-items:end}.row>*{flex:1}.row .btn{flex:none}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.form-grid>.wide{grid-column:1/-1}.form-section{padding:17px 0 2px;border-top:1px solid var(--line)}.form-section:first-of-type{padding-top:0;border-top:0}.section-title{display:flex;align-items:center;gap:7px;margin:0 0 14px}.section-title h2{font-size:1.02rem}.section-title .muted{font-size:.78rem}.readout{display:flex;align-items:center;min-height:46px;color:#f3e6e9;font-weight:700}.total-box{padding:13px 15px;border:1px solid #9d3849;background:#3a171e;border-radius:12px;display:flex;justify-content:space-between;gap:10px;align-items:center;margin:3px 0 16px}.total-box strong{font-size:1.18rem}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}.help-btn{width:25px;height:25px;min-height:25px;padding:0;border:1px solid #75515a;border-radius:50%;background:#302127;color:#ffd7dd;font-size:.76rem;font-weight:800}.help-wrap{position:relative;display:inline-flex}.help-tip{display:none;position:absolute;z-index:20;left:0;top:30px;width:min(260px,75vw);padding:10px 12px;border:1px solid #95515f;border-radius:10px;background:#301d23;color:white;font-size:.77rem;line-height:1.35;box-shadow:0 8px 25px #0008}.help-wrap:hover .help-tip,.help-wrap:focus-within .help-tip,.help-wrap.open .help-tip{display:block}.calc-inline{padding:13px;border:1px dashed #895761;border-radius:12px;background:#25191e;margin:0 0 13px}.calc-inline summary{cursor:pointer;min-height:32px;display:flex;align-items:center;gap:7px;color:#ffd6dc;font-weight:800;list-style:none}.calc-inline summary::-webkit-details-marker{display:none}.calc-body{padding-top:13px}.calc-body p{font-size:.81rem;color:var(--muted);margin-bottom:10px}.calc-part{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 0;border-bottom:1px solid var(--line)}.calc-part button{min-height:40px}.calc-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.search-box{display:flex;gap:8px;margin-bottom:14px}.search-box input{flex:1}.search-box button{flex:none}.order-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.order-card{border:1px solid var(--line);background:var(--surface);border-radius:15px;padding:14px;min-width:0}.order-card.selected{border-color:#f24860;box-shadow:0 0 0 1px #f24860}.order-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:7px}.order-card h3{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-card .order-id{color:#f797a3;font-weight:800;font-size:.83rem}.card-items{color:var(--muted);font-size:.82rem;line-height:1.35;white-space:pre-line;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:9px 0}.card-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:8px 0}.card-value{font-weight:800}.card-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px}.card-footer .btn{min-width:94px}.select-check{width:22px;height:22px;accent-color:var(--red)}.pay-badge,.status-badge{display:inline-flex;align-items:center;border-radius:100px;padding:5px 9px;font-size:.72rem;font-weight:800;line-height:1.2}.pay-badge.unpaid{background:#5b2831;color:#ffd8df}.pay-badge.partial{background:#664b20;color:#ffe5a5}.pay-badge.paid{background:#1d4e35;color:#baf2cc}.status-badge{background:#382d33;color:#f3d6dd}.due-chip{font-size:.73rem;color:#ffc2cc}.missing{color:#ffc289;font-size:.75rem}.empty-state{text-align:center;border:1px dashed #65464e;border-radius:16px;padding:28px 18px;color:var(--muted)}.bulkbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}.bulkbar select{width:auto;flex:1;max-width:260px}.bulkbar .btn{min-height:44px}.stage-tabs{display:none}.stage-count{color:#f4b2bd;font-size:.75rem}.kanban{display:grid;grid-template-columns:repeat(7,minmax(235px,1fr));gap:10px;overflow-x:auto;padding-bottom:14px}.kanban-column{min-height:200px;border:1px solid var(--line);border-radius:14px;padding:9px;background:#181216}.kanban-column h3{padding:5px 4px 12px;font-size:.9rem}.kanban-column .order-card{margin-bottom:9px}.kanban-column.drop-target{outline:2px solid #f04b62}.order-card.dragging{opacity:.4}#drag-ghost{position:fixed;z-index:1000;pointer-events:none;padding:9px 12px;border-radius:10px;background:var(--red);color:white;box-shadow:0 8px 24px #0008;font-size:.83rem}.select-mode .order-card{cursor:pointer}.select-hint{color:var(--muted);font-size:.8rem;margin:0 0 14px}.sheet,.feedback-modal{border:1px solid #7d4854;background:var(--surface);color:var(--text);border-radius:20px;box-shadow:0 20px 60px #000b}.sheet{width:min(680px,calc(100vw - 24px));max-height:min(90dvh,900px);padding:0;overflow:auto}.sheet::backdrop,.feedback-modal::backdrop{background:#050305cc}.sheet-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:9px;padding:14px 18px;background:#21171b;border-bottom:1px solid var(--line)}.sheet-header h2{flex:1;font-size:1.05rem}.sheet-body{padding:17px 18px 24px}.sheet-actions{position:sticky;bottom:0;z-index:2;background:#21171b;border-top:1px solid var(--line);padding:10px 18px;display:flex;gap:8px}.sheet-actions>*{flex:1}.detail-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.summary-tile{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}.summary-tile span{display:block;color:var(--muted);font-size:.76rem}.summary-tile strong{display:block;font-size:1.02rem;margin-top:5px}.detail-section{border-top:1px solid var(--line);padding:18px 0 4px}.detail-section h3{margin-bottom:12px}.detail-text{white-space:pre-wrap;line-height:1.4;color:#ebdfe2}.history-row{font-size:.82rem;padding:8px 0;border-bottom:1px solid var(--line)}.feedback-modal{width:min(400px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:20px;overflow:auto}.feedback-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#5e2630;color:#fff;font-size:1.2rem;margin-bottom:14px}.feedback-modal h2{margin-bottom:9px}.feedback-modal p{line-height:1.45;color:#d8c7cc;font-size:.9rem;white-space:pre-line}.feedback-actions{display:flex;gap:9px;margin-top:21px}.feedback-actions>*{flex:1}.toast{position:fixed;left:50%;bottom:25px;z-index:50;transform:translate(-50%,30px);max-width:min(450px,calc(100vw - 30px));padding:12px 17px;border:1px solid #57966d;border-radius:12px;background:#20432e;color:#e6ffed;opacity:0;pointer-events:none;transition:.2s}.toast.visible{opacity:1;transform:translate(-50%,0)}.toast.info{border-color:#92606a;background:#3c232a;color:#fff}.busy{position:fixed;inset:0;z-index:80;display:grid;place-content:center;gap:12px;text-align:center;background:#090607b8}.spinner{width:30px;height:30px;margin:auto;border:3px solid #80545d;border-top-color:#ff4157;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.mobile-nav{display:none}.rule{border:0;border-top:1px solid var(--line);margin:18px 0}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.inline-actions .btn{flex:1}.top-spacer{margin-top:10px}
@media(max-width:800px){.app-shell{display:block}.sidebar{display:none}.topbar{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 15px;background:#1a1115;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}.mobile-brand .brand-mark{width:33px;height:33px;border-radius:10px;font-size:.72rem}.mobile-brand strong{font-size:.94rem}.topbar-title{font-size:.73rem;color:var(--muted)}.content{padding:18px 15px calc(90px + env(safe-area-inset-bottom))}.mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:15;display:grid;grid-template-columns:repeat(3,1fr);height:calc(64px + env(safe-area-inset-bottom));padding:4px 9px env(safe-area-inset-bottom);background:#1d1418;border-top:1px solid #6a3943;box-shadow:0 -10px 30px #0006}.mobile-nav button{border:0;border-radius:10px;background:transparent;color:#bfaeb3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:52px;font-weight:700;font-size:.72rem}.mobile-nav button.active{color:white;background:#8e1728}.nav-icon{font-size:1.3rem;line-height:1.1}.page-header{margin-bottom:15px}.page-header h1{font-size:1.45rem}.panel{padding:17px;border-radius:15px}.form-grid{grid-template-columns:1fr}.order-list{grid-template-columns:1fr}.sheet{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-height:calc(100dvh - 10px);border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom)}.sheet-header{padding:12px 15px}.sheet-body{padding:14px 15px calc(16px + env(safe-area-inset-bottom))}.sheet-actions{padding:10px 15px calc(10px + env(safe-area-inset-bottom))}.feedback-modal{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:none;border-radius:20px 20px 0 0;padding:20px 17px calc(20px + env(safe-area-inset-bottom))}.feedback-actions{flex-direction:column-reverse}.toast{bottom:calc(74px + env(safe-area-inset-bottom))}.stage-tabs{display:flex;gap:6px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -15px 14px;padding:0 15px 7px;scrollbar-width:none}.stage-tabs::-webkit-scrollbar{display:none}.stage-tabs button{flex:none;min-height:44px;padding:7px 12px;border:1px solid #5a3943;border-radius:10px;background:#24191e;color:#ddc7ce;scroll-snap-align:start;font-weight:750;font-size:.8rem}.stage-tabs button.active{background:#a51b2f;color:white;border-color:#d52942}.kanban{display:block;overflow:visible;padding:0}.kanban-column{display:none;min-height:0;border:0;background:none;padding:0}.kanban-column.active{display:block}.kanban-column h3{display:none}.kanban-column .order-card{margin-bottom:10px}.kanban .order-card{touch-action:pan-y}.select-hint{display:none}.bulkbar{margin-bottom:12px}.bulkbar .btn{flex:1}.bulkbar select{max-width:none;width:100%;flex-basis:100%}.search-box{margin-bottom:12px}.search-box button{width:48px;padding:0;font-size:1.1rem}.detail-summary{gap:7px}.summary-tile{padding:10px}.summary-tile strong{font-size:.94rem}}
@media(max-width:370px){.content{padding-left:12px;padding-right:12px}.topbar{padding:0 12px}.topbar-title{display:none}.page-header h1{font-size:1.35rem}.detail-summary{grid-template-columns:1fr 1fr}}
.choice-list{display:grid;gap:7px;max-height:min(50dvh,390px);overflow-y:auto;margin-top:16px}.choice-list .btn{justify-content:flex-start;text-align:left}.stage-tabs button.drop-target{outline:2px solid #ff6c80;background:#9b2639}.drag-handle{background:#35262d;font-size:1.15rem;touch-action:none;cursor:grab}.drag-handle:active{cursor:grabbing}.detail-section summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.detail-section summary strong{font-size:1rem}.sheet .field input,.sheet .field select,.sheet .field textarea{font-size:16px}#feedback-modal[open],#modal[open]{z-index:30}#feedback-modal[open]{z-index:40}
@media(max-width:800px){.sheet,.feedback-modal{width:100vw;min-width:100vw;max-width:100vw}}
@media(max-width:800px){.content:has(#create-form){padding-bottom:calc(160px + env(safe-area-inset-bottom))}.content:has(#create-form) .form-actions{position:fixed;bottom:calc(64px + env(safe-area-inset-bottom));left:0;right:0;z-index:14;margin:0;padding:8px 15px;background:#211519;border-top:1px solid #693a45}.content:has(#create-form) .form-actions .btn{min-height:48px}.typing .mobile-nav,.typing .content:has(#create-form) .form-actions{display:none}}
.help-btn{width:44px;height:44px;min-height:44px;border:0;background:transparent;position:relative;z-index:0}.help-btn::before{content:"";position:absolute;inset:10px;border:1px solid #75515a;border-radius:50%;background:#302127;z-index:-1}.select-touch{display:grid;place-items:center;width:44px;height:44px;flex:none}.select-touch .select-check{width:22px;height:22px;min-height:22px}
@media(max-width:800px){.typing .mobile-nav{display:none}.typing .content:has(#create-form) .form-actions{display:flex;bottom:0}}
@media(max-width:370px){.stage-tabs{margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px}}
@media(max-width:800px){.help-tip{display:none!important}}
@media(min-width:801px){.help-tip{left:auto;right:0}}
.sheet.is-loading .sheet-header::after{content:"Aguarde...";font-size:.72rem;color:#ffd1d8;white-space:nowrap}
@media(max-width:800px){.feedback-actions{flex-direction:column}}
