:root{--ink:#242424;--muted:#747474;--line:#e7e7e7;--paper:#f7f7f7;--white:#fff;--brand:#e02927;--deep:#941b1b;--accent:#fde9e9;--danger:#b91c1c;--amber:#a16207;--shadow:0 10px 30px #00000010;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:var(--brand);text-decoration:none}a:hover{text-decoration:underline}button:disabled{cursor:not-allowed;opacity:.45}button svg{flex-shrink:0}h1,h2,h3,p{margin-top:0}h1{font-size:30px;letter-spacing:-1px;line-height:1.2;margin-bottom:10px;font-weight:650}h2{font-size:19px;letter-spacing:-.4px;margin-bottom:6px}h3{font-size:15px;margin-bottom:7px}p{margin-bottom:12px}small{font-size:12px;color:var(--muted)}.boot{padding:20vh 10vw;color:var(--brand)}.app-shell{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:var(--deep);color:#d5e3dc;padding:29px 18px 20px;display:flex;flex-direction:column;z-index:25}.brand{display:flex;align-items:center;gap:12px;padding:0 11px 28px;color:#fff}.brand-logo{width:34px;height:35px;display:grid;align-content:center;gap:4px}.brand-logo i{display:block;height:5px;background:var(--accent);border-radius:1px}.brand-logo i:nth-child(2){width:24px}.brand-name{font-size:31px;line-height:1;font-weight:400;letter-spacing:-1.5px}.brand small{display:block;margin-top:7px;font-size:9px;letter-spacing:2px;color:#a7c1b9}.workspace{display:flex;align-items:center;gap:10px;border:1px solid #ffffff20;border-radius:10px;padding:12px;margin-bottom:24px}.workspace-icon{height:31px;width:31px;display:grid;place-items:center;background:#ffffff13;color:#d7e9c7;border-radius:8px;flex-shrink:0}.workspace strong{display:block;font-size:11px;font-weight:600;max-width:146px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace small{font-size:10px;color:#91b0a6}.nav-caption{font-size:9px;font-weight:700;letter-spacing:1.8px;color:#7eaa9c;margin:8px 13px 9px}.nav-items{display:flex;flex-direction:column;gap:3px}.nav-item{display:flex;align-items:center;gap:12px;border-radius:8px;color:#b4cbc3;font-size:12px;padding:10px 13px;min-height:40px}.nav-item:hover{background:#ffffff0a;text-decoration:none;color:white}.nav-item.active{background:var(--accent);color:var(--deep);font-weight:650}.nav-item.active svg{stroke-width:2}.sidebar-bottom{margin-top:auto;padding-top:22px}.sidebar-note{border-top:1px solid #ffffff14;padding:19px 11px 3px;font-size:11px;color:#8fb4a5}.sidebar-note strong{display:block;color:#c7dfd1;font-weight:500;font-size:12px}.main-shell{min-width:0}.topbar{height:79px;border-bottom:1px solid var(--line);background:#fcfdfb;display:flex;align-items:center;justify-content:space-between;padding:0 38px;gap:15px}.crumb{color:var(--muted);font-size:12px;display:flex;align-items:center;gap:10px}.crumb strong{font-weight:500;color:#3f5550}.topbar-right{display:flex;align-items:center;gap:16px}.live-pill{display:flex;gap:7px;align-items:center;font-size:10px;color:#75857c}.live-dot{width:6px;height:6px;border-radius:50%;background:#6f9d6e}.user-chip{display:flex;gap:10px;align-items:center;border-left:1px solid var(--line);padding-left:18px}.avatar{height:34px;width:34px;border-radius:50%;background:#e4eadd;display:grid;place-items:center;color:#54654b;font-size:11px;font-weight:700}.user-chip strong{display:block;font-size:11px}.user-chip small{font-size:10px}.content{padding:32px 38px 45px;max-width:1900px;margin:auto}.page-heading{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:27px}.eyebrow{font-size:9px;letter-spacing:2px;color:var(--brand);font-weight:700;margin-bottom:11px}.subtitle{font-size:12px;color:var(--muted);margin:0;max-width:780px}.heading-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn{border:1px solid #dfe5df;color:#40564e;background:#fff;border-radius:8px;padding:9px 13px;display:inline-flex;gap:8px;align-items:center;justify-content:center;white-space:nowrap;font-size:12px;min-height:36px;transition:background .15s,box-shadow .15s}.btn:hover:not(:disabled){background:#eef3ed}.btn.primary{background:var(--brand);border-color:var(--brand);color:white}.btn.primary:hover:not(:disabled){background:#154e45}.btn.danger{background:#b9443d;border-color:#b9443d;color:white}.btn.ghost{background:transparent;border-color:transparent;min-height:32px;padding:7px}.btn.ghost:hover:not(:disabled){background:#e7ede6}.btn.small{padding:5px 9px;font-size:11px;min-height:29px}.actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.card{background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 2px 6px #14352d03;overflow:hidden}.card-head{display:flex;align-items:center;justify-content:space-between;padding:21px 24px;border-bottom:1px solid #eff1ec;gap:12px}.card-head h2{font-size:15px;margin:0}.card-head p{font-size:11px;color:var(--muted);margin:4px 0 0}.card-body{padding:22px 24px}.dashboard-intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.dashboard-intro h1{font-size:31px}.date-chip{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px 13px;font-size:11px;color:#6b7b70}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:23px}.stat-card{padding:21px 21px 18px;background:white;border:1px solid var(--line);border-radius:11px;position:relative;min-height:125px}.stat-card.featured{background:var(--deep);color:white;border-color:var(--deep)}.stat-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.stat-label{font-size:11px;color:#718077}.stat-card.featured .stat-label{color:#bdd3c9}.stat-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;background:#f1f4ed;color:#6b806b}.featured .stat-icon{background:#ffffff12;color:#c5e3ba}.stat-value{font-size:34px;font-weight:650;letter-spacing:-1px;line-height:1.3}.stat-foot{margin-top:4px;font-size:10px;color:#8a978d}.featured .stat-foot{color:#a8c3b5}.stat-card.alert .stat-value{color:#bb5141}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr);gap:22px}.dashboard-stack{display:grid;gap:22px;align-content:start}.pipeline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:24px}.stage-block{padding:14px 12px;background:#f6f8f4;border-radius:9px;border-top:3px solid #bdd5b1}.stage-block strong{font-size:23px;display:block;margin:4px 0 5px;font-weight:600}.stage-block span{font-size:10px;color:#71816f}.stage-block .stage-name{color:#4e6556;font-size:11px;font-weight:600}.stage-track{height:4px;border-radius:10px;background:#e2e9de;margin-top:12px;overflow:hidden}.stage-track i{height:100%;display:block;background:#749d75}.low-item,.issue-item{padding:14px 22px;border-bottom:1px solid #eff1ec;display:flex;align-items:center;justify-content:space-between;gap:14px}.low-item:last-child,.issue-item:last-child{border:0}.low-item strong,.issue-item strong{font-size:11px;display:block}.low-item small,.issue-item small{font-size:10px}.low-amount{font-size:20px;line-height:1.1;color:var(--amber);font-weight:600;white-space:nowrap}.low-amount small{font-size:9px;font-weight:400;display:block;color:#9aa494;text-align:right;margin-top:4px}.status-line{display:flex;justify-content:space-between;padding:13px 24px;background:#f9fbf7;border-top:1px solid #eaf0e5;font-size:10px;color:#86927e}.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{font-weight:500;color:#859085;background:#fafbf8;padding:11px 19px;font-size:10px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:14px 19px;border-bottom:1px solid #eef1eb;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fcfdf9}td strong{font-size:12px;display:block;font-weight:600}td small{font-size:10px;display:block;margin-top:3px}.nowrap{white-space:nowrap}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px}.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:6px;background:#eef1ed;color:#748274;font-size:10px;white-space:nowrap;line-height:1.3}.badge i{height:4px;width:4px;background:currentColor;border-radius:50%}.badge.available,.badge.completed{background:#ecf3e6;color:#6c8855}.badge.in_production,.badge.in_progress{background:#e5f1ee;color:#367e71}.badge.reserved,.badge.assigned{background:#f7efde;color:#a38346}.badge.remnant{background:#edeafa;color:#8270a8}.badge.defective,.badge.issue,.badge.cancelled{background:#f8e9e5;color:#b86755}.badge.consumed{background:#edf0ee;color:#8c9893}.toolbar{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--line)}.toolbar-left{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.search-box{position:relative;display:flex;align-items:center;min-width:240px}.search-box svg{position:absolute;left:11px;color:#99a59a}.search-box input{padding:9px 12px 9px 36px;background:#fff;border:1px solid #e2e7e0;border-radius:7px;width:100%;font-size:11px}.toolbar select{padding:9px 12px;border:1px solid var(--line);border-radius:7px;background:#fff;font-size:11px;color:#56664f;max-width:210px}.pagination{padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.pagination>div{display:flex;gap:7px}.pagination .btn{min-height:29px;padding:5px 9px;font-size:10px}.empty{text-align:center;padding:49px 22px;color:#8a968a}.empty svg{margin-bottom:14px;stroke:#b4c2af}.empty h3{font-size:14px;color:#5b6d57}.empty p{font-size:12px;max-width:450px;margin:0 auto}.loading{display:flex;align-items:center;justify-content:center;padding:70px;gap:12px;color:var(--muted);font-size:12px}.spinner{width:17px;height:17px;border:2px solid #dbe4d5;border-top-color:var(--brand);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.notice{display:flex;gap:10px;padding:13px 16px;border:1px solid #d9e6d8;border-radius:8px;background:#f1f6ee;color:#647c5a;font-size:12px;margin-bottom:18px}.notice svg{flex-shrink:0;margin-top:1px}.notice.warning{background:#fcf5e8;border-color:#edddbd;color:#997c43}.notice p:last-child{margin:0}.modal{padding:0;border:1px solid var(--line);border-radius:14px;width:min(570px,calc(100vw - 28px));max-height:91vh;box-shadow:0 30px 120px #0a2d3550;color:var(--ink);overflow:auto}.modal.large{width:min(1000px,calc(100vw - 28px))}.modal::backdrop{background:#0a272562;backdrop-filter:blur(3px)}.modal-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:23px 25px 17px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:5}.modal-header h2{font-size:19px;margin:0}.modal-header p{font-size:11px;color:var(--muted);margin:5px 0 0}.modal-body{padding:23px 25px}.modal-footer{display:flex;justify-content:flex-end;gap:8px;padding:15px 25px;background:#fafbf8;border-top:1px solid var(--line);position:sticky;bottom:0;z-index:4}.modal-footer:empty{display:none}.form-body .modal-footer{margin:20px -25px -23px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 18px}.form-grid .wide{grid-column:1/-1}.field{display:flex;flex-direction:column;gap:6px;position:relative;min-width:0}.field>span{font-size:11px;font-weight:550;color:#607059}.field input,.field select,.field textarea{width:100%;border:1px solid #dce3d8;border-radius:7px;padding:10px 11px;min-height:39px;outline:none;color:#2e473a;background:#fff;font-size:12px}.field textarea{resize:vertical}.field input:focus,.field select:focus,.field textarea:focus,.search-box input:focus{outline:2px solid #c8dfbe;outline-offset:1px;border-color:#7c9e72}.field input:disabled,.field input[readonly]{background:#f1f4ed;color:#83917b}.field small{font-size:10px;color:#8a9783}.required{color:#b37e5a}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:23px}.picker-wrap{position:relative}.picker-list{position:absolute;top:calc(100% + 4px);left:0;right:0;background:white;border:1px solid var(--line);border-radius:7px;box-shadow:0 10px 24px #103b3524;max-height:220px;overflow:auto;z-index:30}.picker-list button{display:block;width:100%;border:0;text-align:left;background:white;font-size:12px;padding:10px 12px;color:#3b5946;white-space:normal;line-height:1.4}.picker-list button:hover,.picker-list button.selected{background:#eaf3e4}.picker-empty{padding:13px;color:#8a9683;font-size:12px}.check-label{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#607058;cursor:pointer}.check-label input{accent-color:var(--brand);margin-top:3px;width:15px;height:15px}.dialog-description{color:#697a60;font-size:13px}.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:25px}.detail-item small{display:block;font-size:10px;margin-bottom:4px}.detail-item strong{font-size:13px;font-weight:550}.detail-title{display:flex;justify-content:space-between;align-items:center;margin:20px 0 12px}.detail-title h3{font-size:14px;margin:0}.order-lines{margin-top:22px;border-top:1px solid var(--line);padding-top:18px}.line-editor{display:grid;grid-template-columns:minmax(180px,2.5fr) 1fr 1fr 1fr auto;align-items:start;gap:10px;margin:12px 0}.line-editor>.btn{margin-top:23px}.line-title{font-size:13px;font-weight:600;margin:23px 0 10px}.timeline{display:flex;gap:10px;margin:15px 0 3px;flex-wrap:wrap}.timeline-step{border:1px solid var(--line);border-radius:8px;padding:12px;min-width:130px;flex:1;background:#fafcf8}.timeline-step.active{border-color:#a5c49a;background:#f2f7ec}.timeline-step h4{margin:0 0 8px;font-size:11px;font-weight:600}.timeline-step small{display:block;margin-top:7px;font-size:10px}.timeline-step .btn{margin-top:9px}.kanban{display:grid;grid-auto-columns:235px;grid-auto-flow:column;gap:15px;overflow-x:auto;padding:1px 1px 20px;align-items:start}.kanban-column{background:#eaefe7;border-radius:10px;min-height:350px;padding:13px}.kanban-column-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:600;padding:5px 4px 13px}.count-pill{font-size:10px;background:#dce6d6;border-radius:5px;min-width:23px;text-align:center;padding:2px 5px;color:#758b65}.job-card{background:#fff;border:1px solid #dfe7d9;border-radius:9px;padding:16px 14px;margin-bottom:11px;box-shadow:0 2px 5px #22351804}.job-card .order-code{font-size:10px;color:#71856a;font-weight:650;letter-spacing:.3px}.job-card h3{font-size:12px;font-weight:600;margin:10px 0 4px}.job-card>p{font-size:10px;color:#94a08b;margin:0 0 12px}.job-meta{display:flex;gap:6px;justify-content:space-between;align-items:center;padding:11px 0;border-top:1px solid #edf2e8;font-size:10px;color:#7d9170}.job-card .btn{width:100%;font-size:10px;min-height:29px;padding:6px 9px}.job-card.issue{border-left:3px solid #c98268}.tabs{display:flex;gap:6px;flex-wrap:wrap}.tab{padding:8px 13px;border-radius:7px;background:transparent;border:0;font-size:11px;color:#7b8c72}.tab.active{background:#e5eedb;color:#566f46;font-weight:600}.two-column{display:grid;grid-template-columns:1fr 1fr;gap:22px}.settings-stack{display:grid;gap:20px}.permissions{font-size:11px}.permissions th,.permissions td{text-align:center;padding:10px 9px}.permissions th:first-child,.permissions td:first-child{text-align:left}.permissions input{accent-color:var(--brand)}.workflow-row{display:grid;grid-template-columns:34px 1fr 1.4fr auto;gap:10px;margin-bottom:11px;align-items:end}.workflow-num{background:#eaf0e2;border-radius:6px;color:#77905f;width:28px;height:31px;display:grid;place-items:center;font-size:11px}.audit-json{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;background:#f2f5ee;padding:16px;border-radius:8px;max-height:400px;overflow:auto}.muted{color:var(--muted)}.text-right{text-align:right}.spaced{margin-top:20px}.no-margin{margin:0}.stock-preview{background:#f4f6f1;border:1px solid var(--line);border-radius:10px;padding:16px;height:185px;display:flex;align-items:center;justify-content:center;margin-bottom:20px}.stock-preview svg{width:100%;height:100%}.label-print{border:1px solid #ccc;border-radius:6px;padding:16px;background:white;color:#111;display:grid;grid-template-columns:130px 1fr;align-items:center;gap:18px}.label-print svg{width:130px;height:130px}.label-print h3{font-size:20px;letter-spacing:.6px}.label-print p{margin:4px 0;font-size:12px}.label-url{font-size:10px;overflow-wrap:anywhere;display:block;margin-top:12px;color:#6e7c66}.mobile-menu{display:none}.login-shell{display:grid;grid-template-columns:1.05fr 1fr;min-height:100vh;background:#fcfdf9}.login-visual{background:var(--deep);padding:49px 9%;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;color:#fff}.login-visual .brand{padding:0}.login-copy{z-index:1;max-width:430px;padding:75px 0}.login-copy .eyebrow{color:#a1c591;letter-spacing:2.5px;font-size:10px}.login-copy h1{font-size:47px;line-height:1.18;letter-spacing:-1.9px;font-weight:450;margin:23px 0}.login-copy h1 em{font-style:normal;color:var(--accent)}.login-copy>p{font-size:14px;color:#9ebeae;line-height:1.8;max-width:355px}.login-tags{display:flex;gap:9px;flex-wrap:wrap;margin-top:35px}.login-tags span{border:1px solid #5b8a765c;padding:7px 10px;border-radius:6px;font-size:10px;color:#bad0bf}.login-footer{display:flex;gap:8px;color:#87ae98;font-size:10px;z-index:1}.roll-art{position:absolute;right:-175px;bottom:90px;width:530px;height:530px;border:1px solid #badb9730;border-radius:50%;box-shadow:0 0 0 32px #143f37,0 0 0 33px #a6c78924,0 0 0 68px #143f37,0 0 0 69px #a6c78918,0 0 0 110px #143f37,0 0 0 111px #a6c78911;opacity:.7;pointer-events:none}.login-panel{display:flex;align-items:center;justify-content:center;padding:60px 45px}.login-form{width:100%;max-width:335px}.login-form h2{font-size:29px;font-weight:600;letter-spacing:-1px}.login-form .subtitle{font-size:12px;margin-bottom:32px}.login-form .field{margin-bottom:19px}.login-form .field input{background:#fff;padding:12px}.login-form .btn.primary{width:100%;margin-top:9px;padding:12px}.login-help{font-size:10px;color:#95a18b;line-height:1.8;margin-top:23px;border-top:1px solid #e6eadf;padding-top:18px}.login-error{padding:10px 13px;border-radius:7px;font-size:11px;background:#f9ece4;color:#b06745;margin-bottom:18px}.login-error:empty{display:none}#toasts{position:fixed;right:24px;bottom:24px;z-index:1000;display:flex;flex-direction:column;gap:9px;pointer-events:none;max-width:min(470px,calc(100vw - 35px))}.toast{display:flex;align-items:center;gap:10px;background:#153b30;color:#e9f1df;border-radius:9px;padding:13px 17px;box-shadow:0 10px 40px #14362933;font-size:12px}.toast svg{flex-shrink:0}.toast.error{background:#9e4940;color:#fff}.cut-layout{display:grid;grid-template-columns:245px minmax(0,1fr);gap:17px;align-items:start}.cut-palette{display:grid;gap:14px}.cut-palette .card-body{padding:16px}.cut-palette .card-head{padding:14px 16px}.cut-palette .card-head h2{font-size:12px}.cut-palette .field{margin-bottom:12px}.cut-palette .btn{width:100%}.cut-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cut-piece-pool{max-height:285px;overflow:auto;padding:2px}.pool-piece{touch-action:none;user-select:none;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:11px 12px;background:#edf3e5;border:1px solid #c5d6b6;border-radius:7px;margin-bottom:8px;cursor:grab;text-align:left;width:100%;color:#496442;font-size:11px}.pool-piece:hover{background:#e2edd7}.pool-piece:active{cursor:grabbing}.pool-piece.defect{background:#f8ede7;border-color:#e7c9b6;color:#a47455}.pool-piece.remnant{background:#f1edf8;border-color:#d8c9e6;color:#867198}.pool-piece strong{display:block;font-size:11px}.pool-piece small{display:block;font-size:9px;color:inherit;margin-top:3px}.pool-dragging{opacity:.4}.cut-main{min-width:0;display:grid;gap:15px}.cut-tools{padding:12px 15px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.cut-tools .btn{min-height:30px;padding:5px 8px;font-size:10px}.cut-tools .btn.active{background:#e4eedb;border-color:#b1c89c}.cut-tools strong{font-size:11px}.cut-tools small{font-size:9px;display:block}.canvas-wrap{height:480px;position:relative;overflow:hidden;background:#f5f7f1;touch-action:none;border-radius:0 0 10px 10px}.cut-canvas{display:block;width:100%;height:100%;user-select:none}.cut-canvas.panning{cursor:grab}.cut-canvas .placed-piece{cursor:grab}.cut-canvas .placed-piece:active{cursor:grabbing}.canvas-empty{height:420px;display:flex;align-items:center;justify-content:center;text-align:center;color:#93a584;font-size:12px;background:repeating-linear-gradient(0deg,#f7f9f3,#f7f9f3 23px,#edf2e7 24px)}.canvas-empty svg{display:block;margin:0 auto 18px;color:#c0d0b2}.canvas-caption{font-size:10px;color:#889780;margin:8px 0 0}.geometry-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.geometry-stat{padding:16px 17px;background:white;border:1px solid var(--line);border-radius:9px}.geometry-stat span{display:block;font-size:10px;color:#8d9b83;margin-bottom:7px}.geometry-stat strong{font-size:18px;font-weight:600;letter-spacing:-.4px}.geometry-stat small{font-size:10px;font-weight:400}.canvas-hint{font-size:10px;color:#8b9d7b;margin:7px 0}.cut-selected{padding:16px 18px}.cut-selected .detail-grid{grid-template-columns:repeat(4,1fr);gap:13px;margin:14px 0}.cut-selected .detail-item strong{font-size:11px}.cut-selected .detail-item small{font-size:9px}.cut-footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.draft-status{font-size:10px;color:#9b8a5d;display:flex;align-items:center;gap:5px}.cut-step-one{display:grid;grid-template-columns:1fr 1fr;gap:18px}.plan-card{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 20px;border-bottom:1px solid var(--line)}.plan-card strong{font-size:12px}.plan-card small{display:block;font-size:10px;margin-top:4px}.permission-hint{padding:15px;font-size:11px;color:#88947c}.mobile-backdrop{display:none}.summary-numbers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.summary-numbers>div{background:#f4f7ef;border-radius:8px;padding:13px}.summary-numbers small{display:block;font-size:10px;margin-bottom:5px}.summary-numbers strong{font-size:17px;font-weight:600}.inline-divider{width:1px;height:24px;background:var(--line);margin:0 4px}.warning-text{font-size:11px;color:#a2784b}.success-text{font-size:11px;color:#4a805c}
@media(min-width:1600px){.stats-grid{gap:19px}.content{padding:39px 45px}.canvas-wrap{height:560px}}
@media(max-width:1200px){.app-shell{grid-template-columns:208px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.content{padding:27px 25px}.topbar{padding:0 25px}.dashboard-grid{grid-template-columns:1fr}.dashboard-stack.side{grid-template-columns:1fr 1fr}.stats-grid{gap:11px}.stat-card{padding:17px}.cut-layout{grid-template-columns:225px minmax(0,1fr)}.cut-selected .detail-grid{grid-template-columns:repeat(2,1fr)}.geometry-stat strong{font-size:16px}.two-column{grid-template-columns:1fr}.login-copy h1{font-size:39px}}
@media(max-width:900px){.app-shell{grid-template-columns:180px minmax(0,1fr)}.sidebar{padding:26px 10px 14px}.workspace{display:none}.nav-item{font-size:11px;gap:9px;padding:9px 11px}.brand{padding:0 11px 30px}.brand-name{font-size:28px}.brand small{font-size:8px}.brand-logo{width:26px}.nav-caption{font-size:8px}.content{padding:24px 19px}.topbar{height:70px;padding:0 19px}.topbar .live-pill{display:none}.stats-grid{grid-template-columns:repeat(2,1fr)}.pipeline{padding:17px;gap:7px}.stage-block{padding:12px 8px}.page-heading{align-items:flex-start}.page-heading h1{font-size:25px}.heading-actions{justify-content:flex-end}.cut-layout{grid-template-columns:1fr}.cut-palette{grid-template-columns:1fr 1fr}.cut-piece-pool{max-height:190px}.canvas-wrap{height:440px}.canvas-empty{height:310px}.cut-step-one{grid-template-columns:1fr}.date-chip{display:none}.line-editor{grid-template-columns:minmax(120px,2fr) 1fr 1fr 1fr auto;gap:7px}.line-editor .field input{padding:9px 7px}.login-shell{grid-template-columns:.85fr 1fr}.login-visual{padding:40px 11%}.login-copy h1{font-size:31px}.login-copy>p{font-size:12px}.login-panel{padding:40px 30px}}
@media(max-width:680px){.app-shell{display:block}.sidebar{position:fixed;left:0;top:0;width:230px;transform:translateX(-100%);transition:transform .2s;height:100dvh;z-index:70;padding:30px 17px}.sidebar.open{transform:translateX(0)}.mobile-backdrop.open{display:block;position:fixed;inset:0;background:#142c2650;z-index:60}.mobile-menu{display:inline-flex}.topbar{height:66px;padding:0 17px}.topbar-right{gap:4px}.user-chip{padding-left:9px;gap:8px}.user-chip>div:last-child{display:none}.crumb{font-size:11px}.content{padding:23px 15px 30px}.page-heading{gap:14px;flex-wrap:wrap;margin-bottom:20px}.page-heading h1{font-size:25px}.heading-actions{justify-content:flex-start}.subtitle{font-size:11px}.eyebrow{font-size:8px}.dashboard-intro h1{font-size:27px}.stat-card{padding:16px}.stat-label{font-size:10px}.stat-value{font-size:29px}.stat-foot{font-size:9px}.stats-grid{gap:10px;margin-bottom:17px}.dashboard-stack.side{grid-template-columns:1fr}.dashboard-grid{gap:17px}.dashboard-stack{gap:17px}.pipeline{display:flex;overflow-x:auto}.stage-block{min-width:100px;flex:1}.card-head{padding:17px 18px}.card-body{padding:18px}.toolbar{padding:13px 14px;gap:10px}.toolbar-left{width:100%}.search-box{min-width:140px;flex:1}.toolbar select{max-width:150px}.table-wrap td{padding:13px 15px}.table-wrap th{padding:10px 15px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.modal-header{padding:19px 19px 14px}.modal-body{padding:19px}.modal-footer{padding:14px 19px}.modal-header h2{font-size:17px}.detail-grid{grid-template-columns:1fr 1fr;gap:16px}.line-editor{grid-template-columns:1fr 1fr 1fr auto;border-bottom:1px solid var(--line);padding-bottom:15px}.line-editor>.picker{grid-column:1/-1}.line-editor>.btn{margin-top:21px}.cut-palette{grid-template-columns:1fr}.cut-palette .card:first-child .card-body{padding-bottom:7px}.geometry-stats{gap:7px}.geometry-stat{padding:13px 10px}.geometry-stat strong{font-size:13px}.geometry-stat span{font-size:9px}.geometry-stat small{font-size:8px}.cut-tools{padding:11px;gap:8px}.cut-selected .detail-grid{grid-template-columns:repeat(2,1fr)}.cut-footer{justify-content:stretch}.cut-footer .btn{flex:1}.canvas-wrap{height:360px}.cut-step-one{grid-template-columns:1fr}.two-column{gap:17px}.workflow-row{grid-template-columns:26px .8fr 1.3fr auto;gap:5px}.workflow-row .field input{padding:8px 6px}.workflow-row .btn{padding:5px}.label-print{grid-template-columns:100px 1fr;padding:10px;gap:12px}.label-print svg{width:100px;height:100px}.label-print h3{font-size:17px}.label-print p{font-size:11px}.login-shell{display:flex;flex-direction:column}.login-visual{padding:30px;min-height:170px}.login-visual .brand{padding:0}.login-copy{padding:25px 0 0;max-width:none}.login-copy h1{font-size:25px;margin:0}.login-copy .eyebrow,.login-copy>p,.login-tags,.login-footer{display:none}.login-panel{padding:38px 27px 45px}.login-form{max-width:390px}.login-form h2{font-size:25px}.roll-art{bottom:-140px;right:-280px}.kanban{grid-auto-columns:230px}.permissions td,.permissions th{padding:9px 7px;font-size:10px}.summary-numbers{grid-template-columns:1fr 1fr}}
@media print{body>*{display:none!important}body>.print-dialog{display:block!important;position:static;max-width:none;max-height:none;width:100%;border:0;box-shadow:none;padding:0;overflow:visible}body>.print-dialog .modal-header,body>.print-dialog .modal-footer,body>.print-dialog .label-url,body>.print-dialog .notice{display:none!important}body>.print-dialog .modal-body{padding:0}body>.print-dialog .label-print{border:0;width:150mm;height:100mm;padding:0;grid-template-columns:70mm 80mm;gap:0}body>.print-dialog .label-print svg{width:70mm;height:70mm}body>.print-dialog .label-print h3{font-size:18pt}body>.print-dialog .label-print p{font-size:11pt}@page{size:150mm 100mm;margin:0}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

[hidden]{display:none!important}.nav-area{overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#436c5e transparent}.user-chip.btn{border:0;border-left:1px solid var(--line);border-radius:0;padding:0 0 0 18px;background:transparent}.user-chip.btn:hover{background:transparent}.profile-form .field{margin-bottom:15px}

/* EGELF brand refresh */
.sidebar{background:#941b1b;color:#fff5f5}.brand{flex-direction:column;align-items:flex-start;gap:8px}.brand-wordmark{display:block;width:128px;height:auto;max-width:100%}.brand small{margin:0;color:#ffd7d7;letter-spacing:1.8px}.workspace{border-color:#ffffff26}.workspace-icon{background:#ffffff18;color:#fff}.workspace small,.nav-caption{color:#f3bcbc}.nav-item{color:#f9dada}.nav-item:hover{background:#ffffff12;color:#fff}.nav-item.active{background:#fff;color:#b51f22}.sidebar-note{border-top-color:#ffffff1f;color:#f4c5c5}.sidebar-note strong{color:#fff}.topbar{background:#fff}.crumb strong{color:#3a3a3a}.avatar{background:#fde9e9;color:#b51f22}.btn.primary{background:#e02927;border-color:#e02927}.btn.primary:hover:not(:disabled){background:#b51f22}.btn.danger{background:#b91c1c;border-color:#b91c1c}.stat-card.featured{background:#b51f22;border-color:#b51f22}.featured .stat-icon{color:#fff;background:#ffffff18}.stage-block{border-top-color:#ef9a9a;background:#fff7f7}.stage-block .stage-name{color:#8d2424}.stage-track{background:#f6d4d4}.stage-track i{background:#e02927}.eyebrow{color:#e02927}.login-visual{background:linear-gradient(145deg,#8f1719 0%,#b51f22 55%,#e02927 100%)}.login-visual .brand-wordmark{filter:brightness(0) invert(1)}.login-tags span{border-color:#ffffff32;background:#ffffff0d}.roll-art{border-color:#ffffff12}.cut-tools .btn.active{background:#fde9e9;border-color:#f3b4b4}.pool-piece{background:#fff3f3;border-color:#f0caca;color:#8f2a2a}.pool-piece:hover{background:#fde9e9}.canvas-wrap{background:#fafafa}.canvas-empty{color:#8c8c8c;background:repeating-linear-gradient(0deg,#fafafa,#fafafa 23px,#f0f0f0 24px)}.summary-numbers>div{background:#fff5f5}@media(max-width:900px){.brand-wordmark{width:112px}}

/* Müşteri dağılım haritası */
.customer-map-card{margin-bottom:20px;overflow:hidden}
.customer-map-card .card-head{align-items:flex-start}
.customer-map-card .map-summary{margin:6px 0 0}
.map-body{padding:0!important}
.customer-map{height:430px;width:100%;background:#eef1ed;border-top:1px solid var(--border,#e5e7eb)}
.map-message{min-height:220px;display:flex;align-items:center;justify-content:center;padding:24px;color:var(--muted,#667085);text-align:center}
.map-popup strong{display:block;margin-bottom:4px}
.customer-map .leaflet-control-attribution{font-size:10px}
.action-tip{display:inline-flex}
.action-tip .btn[disabled]{cursor:not-allowed;opacity:.42}
@media (max-width:760px){.customer-map{height:340px}}

/* 2026-09 customer/map and passive record updates */
.table-wrap tbody tr.inactive-row>td{background:#fff1f1;color:#7f2d2d}
.table-wrap tbody tr.inactive-row:hover>td{background:#ffe7e7}
.table-wrap tbody tr.inactive-row .muted,.table-wrap tbody tr.inactive-row small{color:#a95f5f}
.customer-map .maplibregl-ctrl-attrib{font-size:10px}
.customer-map .maplibregl-canvas{outline:none}
.customer-map-marker{border:2px solid #b5161b;border-radius:999px;background:rgba(227,30,36,.56);color:#7f1014;display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 2px 8px #7f10143b;cursor:pointer;font:700 9px/1 system-ui,sans-serif}
.customer-map-marker:hover,.customer-map-marker:focus-visible{background:rgba(227,30,36,.75);outline:2px solid #fff;outline-offset:1px}
.maplibregl-popup-content{border-radius:8px;padding:10px 12px;font:12px/1.4 system-ui,sans-serif}
.stock-location-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(120px,.5fr) auto;gap:10px;align-items:end;margin-bottom:10px}
.production-date-filters{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
.production-date-filters .field{min-width:135px}
.production-date-filters .field>span{font-size:9px}
@media(max-width:680px){.stock-location-row{grid-template-columns:1fr 1fr auto}.production-date-filters{width:100%}.production-date-filters .field{flex:1;min-width:125px}}

/* 2026-09-17 production filters and modal picker fixes */
.picker-up .picker-list{top:auto;bottom:calc(100% + 4px)}
.production-toolbar{justify-content:flex-start}
.production-toolbar .toolbar-left{width:100%;gap:10px;align-items:center}
.production-toolbar .tabs{flex-wrap:nowrap}
.production-toolbar .tabs .btn{min-height:39px}
.production-toolbar .production-date-filters[hidden]{display:none!important}
.production-toolbar .production-date-filters{align-items:flex-end;flex-wrap:nowrap}
.production-toolbar .production-date-filters .field{min-width:145px}
.production-toolbar .btn[aria-label="Filtreleri temizle"]{width:39px;height:39px;padding:0}
@media(max-width:900px){.production-toolbar .toolbar-left{align-items:flex-end}.production-toolbar .tabs{width:auto}}

/* 2026-09-17 production custom date labels */
.production-date-filters .field{margin-bottom:0}
.production-date-filters .field>input{order:1}
.production-date-filters .field>span{order:2;margin-top:2px}


/* 2026-09-17 production date range visual alignment */
.production-toolbar .production-date-filters{
  display:flex;align-items:flex-start;gap:7px;padding:5px 8px 4px;border:1px solid var(--line);border-radius:9px;background:#fafbf8;
}
.production-toolbar .production-date-filters .field{
  display:flex;flex-direction:column;gap:3px;min-width:154px;margin:0;
}
.production-toolbar .production-date-filters .field>input{
  order:1;height:39px;width:100%;margin:0;border-radius:7px;background:#fff;
}
.production-toolbar .production-date-filters .field>span{
  order:2;margin:0;padding-left:2px;font-size:9px;line-height:14px;color:var(--muted);
}
.production-toolbar .date-range-separator{
  align-self:flex-start;height:39px;display:grid;place-items:center;color:#8a978d;font-size:14px;padding:0 1px;
}
@media(max-width:900px){
  .production-toolbar .production-date-filters{width:auto;max-width:100%;}
  .production-toolbar .production-date-filters .field{min-width:138px;}
}
@media(max-width:680px){
  .production-toolbar .production-date-filters{width:100%;}
  .production-toolbar .production-date-filters .field{min-width:0;flex:1;}
}


/* 2026-09-17 simplified production worker view */
.worker-production{max-width:960px;margin:0 auto;display:grid;gap:20px}
.worker-block,.worker-completed{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:var(--shadow)}
.worker-block-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.worker-block-title h2{margin:2px 0 0;font-size:20px}
.worker-block-title .eyebrow{margin:0}
.worker-active-list,.worker-waiting-list{display:grid;gap:12px}
.worker-active-card{border:2px solid #e8b4b4;border-radius:12px;padding:18px;background:#fffafa}
.worker-job-summary{display:grid;grid-template-columns:150px minmax(0,1fr);gap:18px;align-items:center}
.worker-job-ref{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;border-right:1px solid var(--line);min-height:82px}
.worker-job-ref small{font-size:10px;letter-spacing:1.4px;color:var(--muted);font-weight:700}
.worker-job-ref strong{font-size:29px;line-height:1.1;letter-spacing:.4px;color:#8f1e20}
.worker-job-main{display:flex;flex-direction:column;gap:4px;min-width:0}
.worker-step-name{font-size:20px;color:var(--text)}
.worker-action{width:100%;min-height:56px;margin-top:16px;font-size:16px;font-weight:800;letter-spacing:.4px}
.worker-waiting-card{width:100%;border:1px solid var(--line);border-radius:12px;background:#fff;padding:16px;text-align:left;color:inherit;font:inherit;display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:16px;align-items:center;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.worker-waiting-card:hover{border-color:#e1a4a4;box-shadow:0 7px 22px #7e191912;transform:translateY(-1px)}
.worker-waiting-card:focus-visible{outline:3px solid #e8b4b4;outline-offset:2px}
.worker-waiting-card .worker-job-summary{grid-template-columns:135px minmax(0,1fr)}
.worker-start-hint{display:flex;align-items:center;justify-content:center;min-height:46px;border-radius:9px;background:#fde9e9;color:#a21f21;font-weight:800;font-size:13px}
.worker-empty{border:1px dashed var(--line);border-radius:10px;padding:18px;color:var(--muted);background:#fafafa;font-size:13px}
.worker-empty.compact{margin-top:12px;padding:13px}
.worker-completed{padding:0;overflow:hidden}
.worker-completed>summary{cursor:pointer;list-style:none;padding:17px 20px;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:space-between}
.worker-completed>summary::-webkit-details-marker{display:none}
.worker-completed>summary:after{content:'›';font-size:22px;transform:rotate(90deg);transition:transform .15s}
.worker-completed[open]>summary:after{transform:rotate(-90deg)}
.worker-completed-list{display:grid;gap:8px;padding:0 20px 18px}
.worker-completed-card{display:grid;grid-template-columns:130px 160px minmax(0,1fr);gap:12px;align-items:center;padding:12px 13px;border-radius:9px;background:#f7f7f7;font-size:12px}
.worker-completed-card.issue{background:#fff4e8;border:1px solid #f0d1ab}
.worker-cut-note{margin-top:16px;border-radius:10px;padding:14px 15px;background:#f6f6f6;display:flex;flex-direction:column;gap:3px;font-size:12px}
.worker-cut-note strong{font-size:13px}
@media(max-width:680px){
  .worker-production{gap:14px}
  .worker-block{padding:15px;border-radius:10px}
  .worker-block-title{margin-bottom:11px}
  .worker-block-title h2{font-size:18px}
  .worker-job-summary,.worker-waiting-card .worker-job-summary{grid-template-columns:1fr;gap:10px}
  .worker-job-ref{border-right:0;border-bottom:1px solid var(--line);min-height:0;padding-bottom:10px}
  .worker-job-ref strong{font-size:31px}
  .worker-step-name{font-size:18px}
  .worker-active-card{padding:15px}
  .worker-action{min-height:58px;font-size:17px}
  .worker-waiting-card{grid-template-columns:1fr;padding:15px;gap:12px}
  .worker-start-hint{min-height:50px;font-size:14px}
  .worker-completed>summary{padding:16px}
  .worker-completed-list{padding:0 15px 15px}
  .worker-completed-card{grid-template-columns:1fr;gap:3px}
}


/* 2026-09-18 toast foreground and stock definition filters */
.modal-toasts{position:fixed;right:24px;bottom:24px;z-index:2147483647;display:flex;flex-direction:column;gap:9px;pointer-events:none;max-width:min(470px,calc(100vw - 35px))}
.product-column-filters{display:grid;grid-template-columns:minmax(180px,1.25fr) minmax(180px,1.15fr) minmax(105px,.65fr) minmax(160px,1fr) minmax(230px,1.35fr) minmax(120px,.7fr) minmax(105px,.65fr);gap:10px;padding:12px 20px;background:#fafbf8;border-bottom:1px solid var(--line);align-items:end}
.product-filter{display:flex;flex-direction:column;gap:5px;min-width:0}
.product-filter>span{font-size:9px;color:#7d887d;font-weight:600;white-space:nowrap}
.product-filter input,.product-filter select{width:100%;height:34px;padding:6px 9px;border:1px solid #e0e5df;border-radius:7px;background:#fff;color:#4c5a50;font-size:10px;min-width:0}
.dimension-filter>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.dimension-filter .product-filter>span{font-size:8px}
.dimension-filter .product-filter{gap:3px}
@media(max-width:1100px){.product-column-filters{grid-template-columns:repeat(4,minmax(140px,1fr))}}
@media(max-width:680px){.modal-toasts{right:12px;bottom:12px;max-width:calc(100vw - 24px)}.product-column-filters{grid-template-columns:1fr 1fr;padding:12px 14px;gap:9px}.dimension-filter{grid-column:1/-1}}


/* UNIFIED TABLE FILTER CONTROLS */
.table-filter-row th{
  padding:10px 12px 16px !important;
  background:#fafbf8;
  vertical-align:middle;
}

.table-filter-row input,
.table-filter-row select{
  display:block;
  width:100% !important;
  min-width:0 !important;
  height:42px !important;
  margin:0 !important;
  padding:9px 12px !important;
  border:1px solid #dfe5dc !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#53604f !important;
  font-family:inherit !important;
  font-size:13px !important;
  font-weight:400 !important;
  line-height:1.4 !important;
  outline:none !important;
  box-shadow:none !important;
  box-sizing:border-box !important;
}

.table-filter-row input::placeholder{
  color:#8b9588 !important;
  opacity:1 !important;
}

.table-filter-row input:focus,
.table-filter-row select:focus{
  border-color:#aebca9 !important;
  box-shadow:0 0 0 2px #edf2e9 !important;
}

.table-filter-row select{
  cursor:pointer;
}

.qr-scanner-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:20px;align-items:start}
.qr-scanner-card,.qr-manual-card{min-width:0}
.qr-camera-frame{position:relative;display:grid;place-items:center;min-height:360px;background:#171717;border-radius:12px;overflow:hidden}
.qr-camera-video{display:block;width:100%;height:min(62vh,560px);min-height:300px;object-fit:cover;background:#111}
.qr-camera-corners{position:absolute;width:190px;height:190px;border:3px solid #fff;border-radius:18px;box-shadow:0 0 0 9999px #0003;pointer-events:none}
.qr-scanner-status{margin:0;padding:13px 16px;color:var(--muted);font-size:12px}
.qr-scanner-result{margin-top:14px;font-size:12px;color:var(--success,#4a805c)}
.qr-scanner-result.error{color:#a33b3b}
@media(max-width:900px){.qr-scanner-layout{grid-template-columns:1fr}.qr-camera-frame{min-height:300px}.qr-camera-video{height:55vh;min-height:260px}.qr-camera-corners{width:160px;height:160px}}

@media(max-width:680px){
  .table-filter-row input,
  .table-filter-row select{
    height:40px !important;
    font-size:12px !important;
  }
}


/* ORDERS SORTABLE HEADERS */
.table-sort-button{
  appearance:none;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:inherit;
  cursor:pointer;
  text-align:left;
  white-space:nowrap;
}

.table-sort-button:hover{
  text-decoration:underline;
}


/* Cutting order-item picker overlay */
.cut-step-one,
.cut-step-one .card,
.cut-step-one .card-body {
  overflow: visible !important;
}

.cut-step-one .picker,
.cut-step-one .field,
.cut-step-one .autocomplete {
  position: relative;
  z-index: 20;
}

.cut-step-one .picker-menu,
.cut-step-one .picker-results,
.cut-step-one .autocomplete-menu,
.cut-step-one .autocomplete-results,
.cut-step-one [role="listbox"] {
  position: absolute !important;
  z-index: 9999 !important;
  max-height: 360px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .cut-step-one .picker-menu,
  .cut-step-one .picker-results,
  .cut-step-one .autocomplete-menu,
  .cut-step-one .autocomplete-results,
  .cut-step-one [role="listbox"] {
    max-height: 55vh !important;
  }
}


/* CUTTING MOBILE CANVAS FIRST V2 */
@media (max-width:900px){
  .cut-layout{
    display:flex !important;
    flex-direction:column !important;
    gap:16px !important;
  }

  .cut-main{
    order:1 !important;
    width:100% !important;
    min-width:0 !important;
  }

  .cut-palette{
    order:2 !important;
    width:100% !important;
    min-width:0 !important;
  }

  .canvas-wrap{
    width:100% !important;
    min-height:360px !important;
    overflow:hidden !important;
  }

  .cut-canvas{
    width:100% !important;
    min-height:360px !important;
    touch-action:none !important;
  }
}

@media (max-width:520px){
  .canvas-wrap,
  .cut-canvas{
    min-height:310px !important;
  }
}

/* Kesim ekranı göster/gizle alanları */
.cut-collapsible {
  margin-top: 10px;
}

.cut-collapsible-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
}

.cut-collapsible-head strong {
  font-size: 13px;
}

.cut-collapsible-body[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .cut-collapsible {
    margin-top: 4px;
  }

  .cut-collapsible-head {
    min-height: 38px;
    padding: 4px 2px;
  }

  .cut-collapsible-head .btn {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .canvas-hint {
    margin-bottom: 4px !important;
  }
}


/* ==========================================================
   Cutting / picker katman düzeltmesi
   Arama sonuçları Boy / En alanlarının arkasında kalmasın.
   ========================================================== */

.form-grid > .picker{
  position:relative;
  z-index:20;
}

.form-grid > .picker:focus-within{
  z-index:200;
}

.picker-wrap{
  position:relative;
  z-index:1;
}

.picker-wrap:focus-within{
  z-index:300;
}

.picker-list{
  z-index:1000 !important;
  isolation:isolate;
}

.cut-step-one .card,
.cut-step-one .card-body{
  overflow:visible;
}

.cut-step-one{
  position:relative;
}

.cut-step-one > .card:first-child{
  position:relative;
  z-index:5;
}

.cut-step-one > .card:last-child{
  position:relative;
  z-index:1;
}


/* ==========================================================
   GLOBAL PICKER PORTAL
   Tüm aramalı açılır listeler her ekranın üzerinde görünür.
   ========================================================== */

.picker-floating{
  position:fixed !important;
  z-index:2147483000 !important;

  margin:0 !important;

  background:#fff;
  border:1px solid var(--line);
  border-radius:7px;

  box-shadow:
    0 14px 34px rgba(16,59,53,.20),
    0 3px 10px rgba(0,0,0,.08);

  overflow-y:auto !important;
  overflow-x:hidden !important;

  overscroll-behavior:contain;
}

.picker-floating[hidden]{
  display:none !important;
}

.picker-floating button{
  position:relative;
  z-index:1;
}



/* Picker popover: dialog dahil bütün arayüzün üzerinde */
.picker-floating:popover-open{
  position:fixed !important;
  inset:auto !important;
  margin:0 !important;
  z-index:2147483000 !important;
}



/* Popover konumunu tamamen uygulama belirler */
.picker-floating,
.picker-floating:popover-open{
  position:fixed !important;
  margin:0 !important;
  transform:none !important;
  translate:none !important;
}



/* ==========================================================
   PICKER POSITION FIX v2
   Dialog / modal / normal sayfa fark etmeksizin picker,
   bağlı olduğu input'un hemen altında veya üstünde açılır.
   ========================================================== */

.picker-floating,
.picker-floating:popover-open{
  position:fixed !important;

  left:var(--picker-left,8px) !important;
  right:auto !important;

  top:var(--picker-top,auto) !important;
  bottom:var(--picker-bottom,auto) !important;

  width:var(--picker-width,240px) !important;
  min-width:var(--picker-min-width,180px) !important;
  max-width:calc(100vw - 16px) !important;

  max-height:var(--picker-max-height,220px) !important;

  margin:0 !important;
  inset-block:auto !important;
  inset-inline:auto !important;

  transform:none !important;
  translate:none !important;

  overflow-x:hidden !important;
  overflow-y:auto !important;

  z-index:2147483647 !important;
}

/*
 * "inset" shorthand kullanmıyoruz.
 * Çünkü inset:auto !important left/top değerlerini de sıfırlıyordu.
 */


/* ==========================================================
   FINAL PICKER POSITION OVERRIDE
   Önce tüm inset değerlerini sıfırla, SONRA hesaplanan
   left/top/bottom değerlerini uygula.
   ========================================================== */

.picker-floating,
.picker-floating:popover-open{
  position:fixed !important;

  inset:auto !important;

  left:var(--picker-left,8px) !important;
  right:auto !important;

  top:var(--picker-top,auto) !important;
  bottom:var(--picker-bottom,auto) !important;

  width:var(--picker-width,240px) !important;
  min-width:var(--picker-min-width,180px) !important;
  max-width:calc(100vw - 16px) !important;
  max-height:var(--picker-max-height,220px) !important;

  margin:0 !important;
  transform:none !important;
  translate:none !important;

  overflow-x:hidden !important;
  overflow-y:auto !important;

  z-index:2147483647 !important;
}



/* ==========================================================
   STOCK GENEALOGY / TRACEABILITY
   ========================================================== */

.stock-origin-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fafbf8;
}

.stock-genealogy-branch{
  display:block;
}

.stock-genealogy-node{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 10px;
  margin-bottom:5px;
  border-radius:7px;
}

.stock-genealogy-node:hover{
  background:#f7f8f4;
}

.stock-genealogy-node.current{
  background:#fff3f3;
  border:1px solid #f0cccc;
}

.stock-tree-line{
  width:18px;
  flex:0 0 18px;
  text-align:center;
  color:#9aa598;
}

.stock-current-label{
  margin-left:auto;
  font-size:10px;
  color:#b51f22;
}

@media(max-width:680px){
  .stock-origin-grid{
    grid-template-columns:1fr;
  }

  .stock-genealogy-node{
    flex-wrap:wrap;
  }
}



/* ==========================================================
   ÜRETİM · TESLİMAT TİPİ
   ========================================================== */

.production-step-main-fields{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.delivery-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  border:1px solid transparent;
  white-space:nowrap;
}

.delivery-cargo{
  background:#e7f0ff;
  color:#214f8f;
  border-color:#bad0ee;
}

.delivery-salesperson{
  background:#fff1d9;
  color:#855715;
  border-color:#ebca91;
}

.delivery-customer{
  background:#e6f5e9;
  color:#27643a;
  border-color:#b8ddc1;
}

.delivery-card-row{
  margin:8px 0 10px;
}

.delivery-legend{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  padding:10px 14px;
  margin-bottom:16px;
}

.delivery-legend>strong{
  font-size:13px;
}

.delivery-legend-items{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

@media (max-width:900px){
  .production-step-main-fields{
    grid-template-columns:1fr;
  }
}



/* ==========================================================
   ÜRETİM · TESLİMAT RENGİ — LISTE + KANBAN
   ========================================================== */

.production-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.production-toolbar .toolbar-left{
  flex:1 1 auto;
  min-width:0;
}

.production-toolbar-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex:0 0 auto;
}

.production-toolbar-right .tabs{
  flex:0 0 auto;
}

.delivery-inline-legend{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}

/*
 * Liste / Kanban sekmeleri ile benzer yazı büyüklüğü ve ağırlık.
 * Arka plan renkleri teslimat tipini gösterir.
 */
.delivery-legend-key{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:6px 11px;
  border-radius:8px;
  border:1px solid transparent;
  font:inherit;
  font-size:13px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}

/* KARGOLANACAK — mavi */
.delivery-cargo{
  background:#e9f2ff;
  border-color:#bfd5f2;
  color:#214f8f;
}

/* PLASİYER — turuncu */
.delivery-salesperson{
  background:#fff2dc;
  border-color:#ebca91;
  color:#80520f;
}

/* MÜŞTERİ — yeşil */
.delivery-customer{
  background:#e8f6eb;
  border-color:#b8ddc1;
  color:#28633a;
}


/* ==========================================================
   LISTE SATIRLARI
   ========================================================== */

table tbody tr.production-delivery-row.delivery-cargo > td{
  background:#eef5ff;
}

table tbody tr.production-delivery-row.delivery-salesperson > td{
  background:#fff6e7;
}

table tbody tr.production-delivery-row.delivery-customer > td{
  background:#eef8f0;
}

/* Satırın solunda daha belirgin tip işareti */
table tbody tr.production-delivery-row.delivery-cargo > td:first-child{
  box-shadow:inset 4px 0 0 #5c91cf;
}

table tbody tr.production-delivery-row.delivery-salesperson > td:first-child{
  box-shadow:inset 4px 0 0 #d39a3f;
}

table tbody tr.production-delivery-row.delivery-customer > td:first-child{
  box-shadow:inset 4px 0 0 #64a878;
}


/* ==========================================================
   KANBAN KARTLARI
   ========================================================== */

.job-card.production-delivery-card.delivery-cargo{
  background:#eef5ff;
  border-color:#9ebfe5;
  box-shadow:inset 4px 0 0 #5c91cf;
}

.job-card.production-delivery-card.delivery-salesperson{
  background:#fff6e7;
  border-color:#dfba7b;
  box-shadow:inset 4px 0 0 #d39a3f;
}

.job-card.production-delivery-card.delivery-customer{
  background:#eef8f0;
  border-color:#9dccaa;
  box-shadow:inset 4px 0 0 #64a878;
}


/* Artık kart içinde ayrıca teslimat badge gösterilmiyor */
.delivery-card-row{
  display:none !important;
}

/* Önceki ayrı legend kartı artık kullanılmıyor */
.delivery-legend{
  display:none !important;
}


@media (max-width:1200px){
  .production-toolbar{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .production-toolbar-right{
    width:100%;
    justify-content:flex-end;
  }
}

@media (max-width:700px){
  .production-toolbar-right{
    align-items:flex-end;
    flex-direction:column;
  }

  .delivery-inline-legend{
    justify-content:flex-end;
  }
}


/* ==========================================================
   ÜRETİM TOOLBAR — TEK SATIR + EŞİT BOYUT
   ========================================================== */

.production-toolbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
  gap:12px !important;
}

.production-toolbar .toolbar-left{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:12px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}

.production-toolbar-right{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  flex-wrap:nowrap !important;
  gap:8px !important;
  margin-left:auto !important;
  width:auto !important;
  flex:0 0 auto !important;
}

.production-toolbar-right .tabs{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:4px !important;
  margin:0 !important;
}

.delivery-inline-legend{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  flex-wrap:nowrap !important;
  gap:8px !important;
  margin:0 !important;
}

/* Liste / Kanban ve teslimat legend'ları aynı tipografi */
.production-toolbar-right .tab,
.delivery-legend-key{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-height:40px !important;
  height:40px !important;

  padding:0 14px !important;

  font-family:inherit !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:1 !important;

  white-space:nowrap !important;
  border-radius:9px !important;
  box-sizing:border-box !important;
}

/* Dar ekranda da mümkün olduğu kadar tek satır */
@media (max-width:1400px){
  .production-toolbar{
    overflow-x:auto !important;
    overflow-y:hidden !important;
  }

  .production-toolbar .toolbar-left,
  .production-toolbar-right{
    flex-shrink:0 !important;
  }
}

/* Önceki responsive kuralların alta düşürmesini engelle */
@media (max-width:1200px){
  .production-toolbar{
    align-items:center !important;
    flex-wrap:nowrap !important;
  }

  .production-toolbar-right{
    width:auto !important;
    justify-content:flex-end !important;
  }
}

@media (max-width:700px){
  .production-toolbar-right{
    flex-direction:row !important;
    align-items:center !important;
  }

  .delivery-inline-legend{
    justify-content:flex-end !important;
  }
}


/* ==========================================================
   ÜRETİM TOOLBAR — KOMPAKT SEKME + LEGEND
   ========================================================== */

/* Sol filtre grubu ile sağ görünüm/legend grubu arasına boşluk */
.production-toolbar-right{
  margin-left:18px !important;
  gap:6px !important;
}

/* Liste / Kanban eski kompakt boyutuna dönsün */
.production-toolbar-right .tab{
  min-height:32px !important;
  height:32px !important;
  padding:0 10px !important;

  font-size:13px !important;
  font-weight:500 !important;
  line-height:1 !important;

  border-radius:8px !important;
}

/* Teslimat legend'ları Liste/Kanban ile aynı boy */
.delivery-legend-key{
  min-height:32px !important;
  height:32px !important;
  padding:0 10px !important;

  font-size:13px !important;
  font-weight:500 !important;
  line-height:1 !important;

  border-radius:8px !important;
}

/* Liste/Kanban ile legend arasında hafif ayrım */
.delivery-inline-legend{
  margin-left:6px !important;
  gap:6px !important;
}

/* Filtre alanı ile sağ blok arasında nefes */
.production-toolbar .toolbar-left{
  margin-right:14px !important;
}



/* ==========================================================
   QR STOK ETİKETİ · 150 × 100 mm YATAY
   ========================================================== */

.label-print{
  box-sizing:border-box;
  width:100%;
  display:grid;
  grid-template-columns:minmax(150px,42%) minmax(0,58%);
  align-items:center;
  gap:22px;
  padding:20px 24px;
  background:#fff;
  color:#0b0f14;
}

.label-qr-block{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.label-qr-block svg{
  display:block;
  width:min(100%,270px);
  height:auto;
  aspect-ratio:1/1;
}

.label-print-date{
  margin-top:8px;
  text-align:center;
  font-size:14px;
  font-weight:600;
  line-height:1.15;
  white-space:nowrap;
}

.label-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:7px;
}

.label-info h3,
.label-info p{
  margin:0;
}

.label-stock-code{
  font-size:34px !important;
  line-height:1.05;
  font-weight:800;
  letter-spacing:.4px;
  white-space:nowrap;
}

.label-product-code{
  font-size:22px;
  line-height:1.15;
  font-weight:650;
}

.label-product-name{
  font-size:21px;
  line-height:1.15;
  font-weight:600;
  overflow-wrap:anywhere;
}

.label-outer-size{
  font-size:22px;
  line-height:1.15;
  font-weight:700;
}

.label-piece-sizes{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:2px;
}

.label-piece-sizes p{
  font-size:19px;
  line-height:1.15;
  font-weight:650;
  white-space:nowrap;
}

.label-location{
  font-size:21px;
  line-height:1.15;
  font-weight:650;
}

@media print{

  @page{
    size:150mm 100mm;
    margin:0;
  }

  html,
  body{
    width:150mm !important;
    height:100mm !important;
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  body *{
    visibility:hidden !important;
  }

  .print-dialog .label-print,
  .print-dialog .label-print *{
    visibility:visible !important;
  }

  .print-dialog .label-print{
    position:fixed !important;
    inset:0 !important;

    width:150mm !important;
    height:100mm !important;

    margin:0 !important;
    padding:7mm 7mm !important;

    display:grid !important;
    grid-template-columns:48mm minmax(0,1fr) !important;
    gap:7mm !important;

    align-items:center !important;

    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;

    overflow:hidden !important;
    background:#fff !important;
  }

  .print-dialog .label-qr-block{
    width:48mm !important;
    max-width:48mm !important;
  }

  .print-dialog .label-qr-block svg{
    width:46mm !important;
    height:46mm !important;
    max-width:none !important;
  }

  .print-dialog .label-print-date{
    margin-top:2mm !important;
    font-size:3.4mm !important;
    line-height:1.05 !important;
    font-weight:650 !important;
  }

  .print-dialog .label-info{
    gap:2.2mm !important;
  }

  .print-dialog .label-stock-code{
    font-size:7mm !important;
    line-height:1 !important;
    font-weight:800 !important;
  }

  .print-dialog .label-product-code{
    font-size:4.8mm !important;
    line-height:1.05 !important;
    font-weight:650 !important;
  }

  .print-dialog .label-product-name{
    font-size:4.5mm !important;
    line-height:1.08 !important;
    font-weight:600 !important;
  }

  .print-dialog .label-outer-size{
    font-size:4.8mm !important;
    line-height:1.05 !important;
    font-weight:700 !important;
  }

  .print-dialog .label-piece-sizes{
    gap:1mm !important;
    margin-top:0 !important;
  }

  .print-dialog .label-piece-sizes p{
    font-size:4.1mm !important;
    line-height:1.05 !important;
    font-weight:650 !important;
  }

  .print-dialog .label-location{
    font-size:4.5mm !important;
    line-height:1.05 !important;
    font-weight:650 !important;
  }

  .print-dialog .label-url,
  .print-dialog .notice,
  .print-dialog .modal-header,
  .print-dialog .modal-footer,
  .print-dialog .modal-close{
    display:none !important;
  }
}


/* ==========================================================
   QR ETİKETİ · ÖNİZLEME KOMPAKT / BASKI ALANI DAHA DOLU
   ========================================================== */

/* ----------------------------------------------------------
   EKRAN ÖNİZLEMESİ
   Önizlemedeki metinleri eski, daha kompakt ölçülere döndür.
   ---------------------------------------------------------- */

@media screen {

  .label-print{
    grid-template-columns:minmax(150px,42%) minmax(0,58%);
    gap:20px;
    padding:18px 22px;
  }

  .label-qr-block svg{
    width:min(100%,220px);
  }

  .label-print-date{
    margin-top:8px;
    font-size:13px;
    font-weight:500;
  }

  .label-info{
    gap:6px;
  }

  .label-stock-code{
    font-size:28px !important;
    line-height:1.05 !important;
    font-weight:800 !important;
  }

  .label-product-code{
    font-size:15px !important;
    line-height:1.15 !important;
    font-weight:600 !important;
  }

  .label-product-name{
    font-size:15px !important;
    line-height:1.15 !important;
    font-weight:500 !important;
  }

  .label-outer-size{
    font-size:16px !important;
    line-height:1.15 !important;
    font-weight:600 !important;
  }

  .label-piece-sizes{
    gap:3px !important;
  }

  .label-piece-sizes p{
    font-size:15px !important;
    line-height:1.15 !important;
    font-weight:600 !important;
  }

  .label-location{
    font-size:15px !important;
    line-height:1.15 !important;
    font-weight:500 !important;
  }
}


/* ----------------------------------------------------------
   150 × 100 mm BASKI
   Kenar boşluklarını azalt, QR ve metni büyüt.
   ---------------------------------------------------------- */

@media print {

  @page{
    size:150mm 100mm;
    margin:0 !important;
  }

  html,
  body{
    width:150mm !important;
    height:100mm !important;
    margin:0 !important;
    padding:0 !important;
  }

  .print-dialog .label-print{
    position:fixed !important;
    inset:0 !important;

    width:150mm !important;
    height:100mm !important;

    /* Önceki 7 mm yerine daha az boşluk */
    padding:3.5mm 4mm !important;

    /*
     * QR tarafına daha fazla alan veriyoruz.
     * Toplam kullanılabilir genişliği daha iyi doldurur.
     */
    grid-template-columns:55mm minmax(0,1fr) !important;
    column-gap:5mm !important;

    align-items:center !important;

    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    overflow:hidden !important;
  }

  .print-dialog .label-qr-block{
    width:55mm !important;
    max-width:55mm !important;
    align-self:center !important;
  }

  .print-dialog .label-qr-block svg{
    width:53mm !important;
    height:53mm !important;
    max-width:none !important;
  }

  .print-dialog .label-print-date{
    margin-top:2.2mm !important;
    font-size:3.8mm !important;
    line-height:1 !important;
    font-weight:650 !important;
  }

  .print-dialog .label-info{
    gap:2.5mm !important;
    justify-content:center !important;
  }

  .print-dialog .label-stock-code{
    font-size:8.2mm !important;
    line-height:.98 !important;
    font-weight:800 !important;
    letter-spacing:.15mm !important;
  }

  .print-dialog .label-product-code{
    font-size:5.3mm !important;
    line-height:1.05 !important;
    font-weight:700 !important;
  }

  .print-dialog .label-product-name{
    font-size:5.0mm !important;
    line-height:1.07 !important;
    font-weight:600 !important;
  }

  .print-dialog .label-outer-size{
    font-size:5.5mm !important;
    line-height:1.04 !important;
    font-weight:700 !important;
  }

  .print-dialog .label-piece-sizes{
    gap:1.2mm !important;
    margin:0 !important;
  }

  .print-dialog .label-piece-sizes p{
    font-size:4.6mm !important;
    line-height:1.04 !important;
    font-weight:700 !important;
  }

  .print-dialog .label-location{
    font-size:5.0mm !important;
    line-height:1.05 !important;
    font-weight:650 !important;
  }
}



/* ==========================================================
   SİPARİŞ · MÜŞTERİ / PLASİYER / AÇIKLAMA
   ========================================================== */

.order-header-fields{
  margin-bottom:14px;
}

.order-customer-sales-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
  align-items:stretch;
}

.order-party-stack{
  display:grid;
  grid-template-rows:1fr 1fr;
  gap:12px;
  min-width:0;
}

.order-description-wrap{
  min-width:0;
  display:flex;
}

.order-description-wrap > *{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
}

.order-description-wrap textarea{
  flex:1 1 auto;
  width:100%;
  min-height:0;
  height:100%;
  box-sizing:border-box;
  resize:vertical;
}

@media(max-width:800px){
  .order-customer-sales-grid{
    grid-template-columns:1fr;
  }

  .order-description-wrap textarea{
    min-height:120px;
  }
}


/* ==========================================================
   SİPARİŞ KALEMİ · GARANTİLİ
   ========================================================== */

.order-guaranteed-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:90px;
}

.order-guaranteed-field > span:first-child{
  font-size:13px;
  font-weight:500;
}

.order-guaranteed-control{
  height:46px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 8px;
  box-sizing:border-box;
  border:none;
  background:transparent;
}

.order-guaranteed-control input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
  cursor:pointer;
}

.order-guaranteed-control input[type="checkbox"]:disabled{
  cursor:default;
}

/*
 * Ürün | Boy | En | Adet | Garantili | Sil
 */
.line-editor{
  grid-template-columns:
    minmax(240px,2fr)
    minmax(110px,1fr)
    minmax(110px,1fr)
    minmax(90px,.75fr)
    90px
    auto !important;
}

@media(max-width:900px){
  .line-editor{
    grid-template-columns:1fr 1fr !important;
  }
}
/*
 * Ürün | Boy | En | Adet | Garantili | Sil
 * Mevcut satır taşmasını engeller.
 */
.line-editor{
  grid-template-columns:
    minmax(240px,2fr)
    minmax(110px,1fr)
    minmax(110px,1fr)
    minmax(90px,.75fr)
    90px
    auto !important;
}

@media(max-width:900px){
  .line-editor{
    grid-template-columns:1fr 1fr !important;
  }
}



/* ==========================================================
   SİPARİŞ KALEMLERİ · TEK BAŞLIK SATIRI
   ========================================================== */

/* Başlık ve veri satırı aynı kolon düzenini kullanır */
.order-line-header,
.line-editor{
  display:grid !important;
  grid-template-columns:
    minmax(240px,2fr)
    minmax(110px,1fr)
    minmax(110px,1fr)
    minmax(90px,.75fr)
    90px
    auto !important;
  column-gap:12px !important;
}

/* Başlık satırı */
.order-line-header{
  align-items:end !important;
  margin-bottom:7px !important;
  padding:0 !important;
}

.order-line-header > span{
  font-size:13px;
  font-weight:500;
  line-height:1.2;
}

.order-line-header-center{
  text-align:center !important;
}

/*
 * Her kalemin kendi field başlığını gizle.
 * Artık başlıklar yalnızca yukarıdaki header satırında görünür.
 */
.line-editor > .field > span:first-child,
.line-editor > .order-guaranteed-field > span:first-child{
  display:none !important;
}

/* Veri satırları aynı yükseklikte ve ortalı */
.line-editor{
  align-items:center !important;
  row-gap:0 !important;
  margin-bottom:10px !important;
}

/* Normal alanların label wrapper'ı gereksiz boşluk bırakmasın */
.line-editor > .field{
  margin:0 !important;
  gap:0 !important;
}

/* Garantili hücresi yalnız checkbox'tan oluşsun */
.line-editor > .order-guaranteed-field{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:90px !important;
  height:46px !important;
  margin:0 !important;
  padding:0 !important;
  gap:0 !important;
}

/* Checkbox, yanındaki input kutusunun dikey merkezine gelsin */
.line-editor .order-guaranteed-control{
  width:100% !important;
  height:46px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

.line-editor .order-guaranteed-control input[type="checkbox"]{
  width:19px !important;
  height:19px !important;
  margin:0 !important;
}

/* Çöp kutusu da input satırının ortasında */
.line-editor > button,
.line-editor > .btn{
  align-self:center !important;
}

@media(max-width:900px){
  .order-line-header{
    display:none !important;
  }

  .line-editor{
    grid-template-columns:1fr 1fr !important;
  }

  /*
   * Mobilde ortak header gizlendiği için
   * alan başlıklarını tekrar göster.
   */
  .line-editor > .field > span:first-child,
  .line-editor > .order-guaranteed-field > span:first-child{
    display:flex !important;
  }
}


/* ==========================================================
   SİPARİŞ KALEMLERİ · HİZALAMA DÜZELTMESİ
   ========================================================== */

/* Başlık ve veri satırı aynı kolon geometrisini kullansın */
.order-line-header,
.line-editor{
  grid-template-columns:
    minmax(240px,2fr)
    minmax(110px,1fr)
    minmax(110px,1fr)
    minmax(90px,.75fr)
    90px
    42px !important;

  column-gap:12px !important;
}

/* Garantili başlığı kendi kolonunun tam ortasında */
.order-line-header > :nth-child(5){
  display:flex !important;
  align-items:flex-end !important;
  justify-content:center !important;
  text-align:center !important;
}

/* Son sütun (çöp) başlıksız, aynı genişlikte */
.order-line-header > :nth-child(6){
  width:42px !important;
}

/* Checkbox hücresi */
.line-editor > .order-guaranteed-field{
  width:90px !important;
  min-width:90px !important;
  max-width:90px !important;

  height:46px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  margin:0 !important;
  padding:0 !important;
}

/* Checkbox gerçek merkezi */
.line-editor .order-guaranteed-control{
  width:90px !important;
  height:46px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  background:transparent !important;
}

/* Çöp kutusu checkbox ile aynı yükseklikte ve eksende */
.line-editor > button:last-child,
.line-editor > .btn:last-child{
  width:42px !important;
  min-width:42px !important;
  height:46px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  align-self:center !important;

  margin:0 !important;
  padding:0 !important;
}

/* Satırın tamamı input yüksekliğine göre hizalansın */
.line-editor{
  align-items:center !important;
  min-height:46px !important;
}

/* Header ile ilk satırın kolon başlangıçları birebir aynı */
.order-line-header{
  align-items:end !important;
  min-height:22px !important;
  padding:0 !important;
  margin-bottom:7px !important;
}

/* ==========================================================
   FIRMA LOGOSU
   ========================================================== */

.company-logo-settings{
  border-top:1px solid var(--border,#dfe5dc);
  padding-top:18px;
}

.company-logo-preview{
  min-height:80px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:12px 0;
}

.company-logo-preview img{
  max-width:240px;
  max-height:90px;
  object-fit:contain;
}

.company-logo-settings input[type="file"]{
  display:none;
}


/* ==========================================================
   ÜRETİM ETİKETİ
   ========================================================== */

.production-card-print{
  background:#fff;
  color:#111;
  border:1px solid #d8d8d8;
  border-radius:8px;
  padding:24px;
}

.production-card-logo-wrap{
  height:100px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:22px;
}

.production-card-logo{
  max-width:320px;
  max-height:95px;
  object-fit:contain;
}

.production-card-company{
  font-size:30px;
}

.production-card-fields{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.production-card-fields > div{
  display:grid;
  grid-template-columns:230px 1fr;
  gap:16px;
  align-items:baseline;
  font-size:22px;
}

.production-card-fields strong{
  font-weight:700;
}

.production-card-fields span{
  font-weight:500;
}


@media print{

  @page{
    size:150mm 100mm;
    margin:0;
  }

  .production-card-dialog .production-card-print,
  .production-card-dialog .production-card-print *{
    visibility:visible !important;
  }

  .production-card-dialog .production-card-print{
    position:fixed !important;
    inset:0 !important;

    width:150mm !important;
    height:100mm !important;

    box-sizing:border-box !important;

    margin:0 !important;
    padding:6mm 8mm !important;

    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;

    background:#fff !important;
    color:#000 !important;
  }

  .production-card-dialog .production-card-logo-wrap{
    height:24mm !important;
    margin:0 0 5mm 0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }

  .production-card-dialog .production-card-logo{
    max-width:70mm !important;
    max-height:23mm !important;
    object-fit:contain !important;
  }

  .production-card-dialog .production-card-company{
    font-size:7mm !important;
    line-height:1 !important;
  }

  .production-card-dialog .production-card-fields{
    gap:3.5mm !important;
  }

  .production-card-dialog .production-card-fields > div{
    display:grid !important;
    grid-template-columns:50mm 1fr !important;
    gap:4mm !important;

    font-size:5.2mm !important;
    line-height:1.08 !important;
  }

  .production-card-dialog .production-card-fields strong{
    font-weight:700 !important;
  }

  .production-card-dialog .modal-header,
  .production-card-dialog .modal-footer,
  .production-card-dialog .modal-close{
    display:none !important;
  }
}


/* ==========================================================
   ÜRETİM ETİKETİ · ÇOKLU BASKI
   ========================================================== */

/* Normal ekranda yalnızca ana önizleme görünür */
.production-card-batch{
  display:none;
}

.production-card-count{
  margin:12px 0 0;
  text-align:center;
  font-weight:600;
  color:var(--muted,#6f776b);
}

@media print{

  /*
   * Ekrandaki tek önizlemeyi baskıda gizle.
   * Baskıda yalnız quantity kadar oluşturulan kopyalar kullanılır.
   */
  .production-card-preview > .production-card-print,
  .production-card-count{
    display:none !important;
  }

  .production-card-batch{
    display:block !important;
    position:static !important;
  }

  .production-card-batch .production-card-print{
    position:relative !important;
    inset:auto !important;

    width:150mm !important;
    height:100mm !important;

    margin:0 !important;
    padding:6mm 8mm !important;

    box-sizing:border-box !important;

    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;

    background:#fff !important;
    color:#000 !important;

    page-break-after:always !important;
    break-after:page !important;
  }

  .production-card-batch .production-card-print:last-child{
    page-break-after:auto !important;
    break-after:auto !important;
  }

  .production-card-batch .production-card-logo-wrap{
    height:24mm !important;
    margin:0 0 5mm 0 !important;
  }

  .production-card-batch .production-card-logo{
    max-width:70mm !important;
    max-height:23mm !important;
  }

  .production-card-batch .production-card-fields{
    gap:3.5mm !important;
  }

  .production-card-batch .production-card-fields > div{
    grid-template-columns:50mm 1fr !important;
    gap:4mm !important;
    font-size:5.2mm !important;
    line-height:1.08 !important;
  }
}

/* ==========================================================
   HATA MESAJLARI · METİN SEÇİLEBİLİR / KOPYALANABİLİR
   ========================================================== */

.toast,
.toast *,
.toast.error,
.toast.error *{
  -webkit-user-select:text !important;
  user-select:text !important;
}

.toast{
  cursor:text !important;
}

.toast.error{
  cursor:text !important;
}

/* Metni seçerken tarayıcı seçim rengini gösterebilsin */
.toast::selection,
.toast *::selection{
  background:rgba(255,255,255,.35);
}

/* ==========================================================
   TOAST / HATA MESAJI · FAREYLE SEÇİM VE KOPYALAMA
   ========================================================== */

/* Toast taşıyıcısı ekrandaki diğer alanları engellemesin */
.toast-container,
.toasts,
#toast-container{
  pointer-events:none !important;
}

/* Fakat gerçek mesaj kutusu fare olaylarını alabilsin */
.toast,
.toast.error,
.toast.warning,
.toast.success{
  pointer-events:auto !important;
  cursor:text !important;

  -webkit-user-select:text !important;
  -moz-user-select:text !important;
  -ms-user-select:text !important;
  user-select:text !important;

  -webkit-touch-callout:default !important;
}

/* İçindeki ikon/metin dahil tamamı seçilebilir */
.toast *,
.toast.error *,
.toast.warning *,
.toast.success *{
  pointer-events:auto !important;

  -webkit-user-select:text !important;
  -moz-user-select:text !important;
  -ms-user-select:text !important;
  user-select:text !important;
}

/* Metin seçildiğinde belirginleşsin */
.toast ::selection,
.toast::selection{
  background:rgba(255,255,255,.40) !important;
  color:inherit !important;
}

/* ==========================================================
   ORDERS · ÜRETİM KALEM ORANI
   ========================================================== */

.order-status-cell{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
}

.order-status-cell small{
  white-space:nowrap;
}

/* ==========================================================
   STOK DETAY · STOK YERİ SEÇİMİ
   ========================================================== */

.stock-detail-location-select{
  width:100%;
  max-width:280px;
  min-height:38px;

  padding:7px 34px 7px 10px;

  border:1px solid var(--border,#dfe5dc);
  border-radius:8px;

  background:#fff;
  font:inherit;
  font-weight:600;
}

.stock-detail-location-select:disabled{
  background:transparent;
  border-color:transparent;
  padding-left:0;
  opacity:1;
  color:inherit;
}

/* STOK DETAY · STOK YERİ */
.stock-detail-location-select{
  width:100%;
  max-width:280px;
  min-height:38px;
  padding:7px 34px 7px 10px;
  border:1px solid var(--border,#dfe5dc);
  border-radius:8px;
  background:#fff;
  color:inherit;
  font:inherit;
  font-weight:600;
}

.stock-detail-location-select:disabled{
  background:transparent;
  border-color:transparent;
  padding-left:0;
  opacity:1;
  color:inherit;
}

/* ==========================================================
   SİPARİŞ DETAY · KALEM BAZLI ETİKET
   ========================================================== */

.order-item-production-status{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.order-item-production-status .btn{
  white-space:nowrap;
}

/* Sipariş detay · kalem bazlı etiket */
.order-item-production-status{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.order-item-production-status .btn{
  white-space:nowrap;
}

/* Sipariş detay · kalem bazlı etiket */
.order-item-production-status{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.order-item-production-status .btn{
  white-space:nowrap;
}

.order-item-production-status{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.order-item-production-status .btn{
  white-space:nowrap;
}

/* ==========================================================
   STOK FİZİKSEL TÜRÜ
   ========================================================== */

.stock-detail-type-select{
  width:100%;
  max-width:220px;
  min-height:38px;
  padding:7px 34px 7px 10px;
  border:1px solid var(--border,#dfe5dc);
  border-radius:8px;
  background:#fff;
  color:inherit;
  font:inherit;
  font-weight:600;
}

.stock-detail-type-select:disabled{
  background:transparent;
  border-color:transparent;
  padding-left:0;
  opacity:1;
  color:inherit;
}

/* ==========================================================
   STOK DETAY · ÖLÇEKLENDİRİLEBİLİR GÖRÜNÜM
   ========================================================== */

.stock-visual-container{
  width:100%;
}

.stock-scale-panel{
  width:100%;
}

.stock-scale-panel[hidden]{
  display:none !important;
}

.stock-scale-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin:0 0 10px 0;
}

.stock-scale-toolbar .btn{
  min-height:38px;
  white-space:nowrap;
}

.stock-scale-toolbar .btn:first-child,
.stock-scale-toolbar .btn:nth-child(2){
  min-width:42px;
  padding-left:10px;
  padding-right:10px;
  font-size:19px;
  line-height:1;
}

.stock-scale-toolbar .btn.active,
.card-head .btn.active[aria-pressed="true"]{
  background:var(--soft,#eef3ea);
  border-color:var(--border,#d8e0d4);
}

.stock-scale-canvas{
  width:100%;
  min-height:480px;
}

.stock-scale-canvas .cut-canvas{
  width:100%;
  min-height:480px;
  display:block;
  border-radius:10px;
}

@media (max-width:900px){
  .stock-scale-toolbar{
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .stock-scale-canvas,
  .stock-scale-canvas .cut-canvas{
    min-height:360px;
  }
}

/* Stok detay başlık aksiyonları */
.card-head > .stock-scale-toggle{
  margin-left:auto !important;
  flex:0 0 auto;
}

.card-head > .stock-scale-toggle + .btn{
  margin-left:0 !important;
}

/* Ölçeklendir aktifken de Kesim planla ile aynı ana buton görünümü korunsun */
.card-head .stock-scale-toggle.active[aria-pressed="true"]{
  background:var(--primary, #e52629) !important;
  color:#fff !important;
  border-color:var(--primary, #e52629) !important;
}

/* Stok detay: sağ üst aksiyon grubu */
.stock-detail-right-actions{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

.stock-detail-right-actions .btn,
.stock-detail-right-actions button{
  margin:0 !important;
  white-space:nowrap !important;
}

/* Stok detay: sağ üst aksiyon grubu */
.stock-detail-right-actions{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

.stock-detail-right-actions .btn,
.stock-detail-right-actions button{
  margin:0 !important;
  white-space:nowrap !important;
}

/* ==========================================================
   STOK DETAY · SAĞ ÜST BUTONLAR
   ========================================================== */

.card-head .stock-detail-right-actions{
  margin-left:auto !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

.card-head .stock-detail-right-actions > button{
  margin:0 !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
}

/* Eski deneysel konumlandırmayı ez */
.card-head > .stock-scale-toggle{
  margin-left:0 !important;
}

/* Ölçeklendir aktifken de primary görünümünü bozma */
.stock-detail-right-actions .stock-scale-toggle.active,
.stock-detail-right-actions .stock-scale-toggle[aria-pressed="true"]{
  color:#fff !important;
}


/* Yeni stok formu: sabit başlık, maliyet alanı ve geometri aralığı */
.stock-editor-modal .modal-header{
  position:sticky !important;
  top:0 !important;
  z-index:100 !important;
  background:#fff !important;
  isolation:isolate;
  box-shadow:0 1px 0 var(--line);
}
.stock-editor-modal .modal-body{
  position:relative;
  z-index:1;
}
.stock-editor-modal .picker-list{z-index:60;}
.stock-editor-modal .stock-cost-currency{
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px;
  gap:12px;
  align-items:end;
  min-width:0;
}
.stock-editor-modal .stock-geometry-selector{
  margin-top:22px !important;
}
@media(max-width:680px){
  .stock-editor-modal .stock-cost-currency{
    grid-template-columns:minmax(0,1fr) 105px;
  }
}

/* ==========================================================
   RAPORLAMA · KANONİK ARAYÜZ
   Bu blok raporlama sayfalarını genel .card/.actions değişikliklerinden izole eder.
   ========================================================== */
.report-menu-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:18px !important;
  align-items:stretch !important;
  width:100% !important;
}

.report-menu-card{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:16px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:150px !important;
  padding:22px !important;
  margin:0 !important;
  text-align:left !important;
  white-space:normal !important;
  font:inherit !important;
  color:var(--ink) !important;
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:12px !important;
  box-shadow:var(--shadow) !important;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease !important;
}

.report-menu-card:hover{
  transform:translateY(-2px) !important;
  border-color:#efb6b6 !important;
  box-shadow:0 14px 32px #00000014 !important;
}

.report-menu-card > div{
  display:block !important;
  flex:1 1 auto !important;
  min-width:0 !important;
}

.report-menu-card h2{
  display:block !important;
  margin:1px 0 8px !important;
  padding:0 !important;
  font-size:17px !important;
  line-height:1.3 !important;
  font-weight:700 !important;
  color:var(--ink) !important;
}

.report-menu-card p{
  display:block !important;
  margin:0 0 15px !important;
  padding:0 !important;
  font-size:12px !important;
  line-height:1.6 !important;
  color:var(--muted) !important;
}

.report-menu-icon{
  width:42px !important;
  height:42px !important;
  flex:0 0 42px !important;
  display:grid !important;
  place-items:center !important;
  margin:0 !important;
  border-radius:11px !important;
  background:#fff1f1 !important;
  color:var(--brand) !important;
}

.report-menu-icon svg{
  width:21px !important;
  height:21px !important;
}

.report-open-link{
  display:inline-block !important;
  margin:0 !important;
  padding:0 !important;
  font-size:11px !important;
  font-weight:650 !important;
  color:var(--brand) !important;
}

.report-stats{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  margin:0 0 18px !important;
}

.report-stat{
  min-width:0 !important;
  padding:18px 20px !important;
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:11px !important;
  box-shadow:0 2px 6px #14352d03 !important;
}

.report-stat small,
.report-stat span{
  display:block !important;
  color:var(--muted) !important;
  font-size:10px !important;
}

.report-stat strong{
  display:block !important;
  margin-top:6px !important;
  font-size:22px !important;
  line-height:1.15 !important;
  font-weight:650 !important;
  color:var(--ink) !important;
}

.report-period-picker,
.report-advanced-filter{
  display:flex !important;
  align-items:flex-end !important;
  gap:12px !important;
  flex-wrap:wrap !important;
  margin:0 0 18px !important;
  padding:15px 16px !important;
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:11px !important;
}

.report-period-picker label,
.report-advanced-filter label{
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  min-width:180px !important;
}

.report-period-picker label > span,
.report-advanced-filter label > span{
  font-size:10px !important;
  font-weight:600 !important;
  color:#607059 !important;
}

.report-period-picker select,
.report-period-picker input,
.report-advanced-filter input,
.report-advanced-filter select,
.report-pagination select{
  min-height:36px !important;
  border:1px solid #dce3d8 !important;
  border-radius:7px !important;
  background:#fff !important;
  color:#2e473a !important;
  padding:8px 10px !important;
  outline:none !important;
}

.report-custom-dates,
.report-inline-inputs{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
}

.report-custom-dates[hidden]{
  display:none !important;
}

.report-advanced-filter > small{
  align-self:center !important;
  max-width:420px !important;
  line-height:1.5 !important;
}

.report-chart-card{
  margin-bottom:18px !important;
}

.report-bars{
  display:grid !important;
  gap:12px !important;
}

.report-bar-row{
  display:grid !important;
  grid-template-columns:minmax(130px,220px) minmax(140px,1fr) auto !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}

.report-bar-label{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:11px !important;
  color:#59685d !important;
}

.report-bar-track{
  position:relative !important;
  height:9px !important;
  overflow:hidden !important;
  border-radius:999px !important;
  background:#f0f2ed !important;
}

.report-bar-track > i{
  display:block !important;
  height:100% !important;
  border-radius:inherit !important;
  background:var(--brand) !important;
}

.report-bar-row > strong{
  white-space:nowrap !important;
  font-size:11px !important;
}

.report-data-card{
  margin-top:18px !important;
  overflow:hidden !important;
}

.report-data-card > .card-head{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:18px !important;
  min-height:78px !important;
}

.report-data-card > .card-head > div:first-child{
  min-width:0 !important;
}

.report-pagination{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:9px !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  margin-left:auto !important;
}

.report-pagination > span{
  font-size:10px !important;
  color:var(--muted) !important;
  white-space:nowrap !important;
}

.report-pagination select{
  width:auto !important;
  min-width:68px !important;
  padding-right:28px !important;
}

.report-pagination .btn{
  flex:0 0 auto !important;
  margin:0 !important;
}

.report-table-wrap{
  width:100% !important;
  min-width:0 !important;
}

.report-table-wrap > .report-table-meta{
  display:flex !important;
  justify-content:flex-end !important;
  padding:10px 18px !important;
  border-bottom:1px solid var(--line) !important;
}

.report-row-count{
  font-size:10px !important;
  color:var(--muted) !important;
  white-space:nowrap !important;
}

.report-table{
  min-width:760px !important;
}

.report-filter-row th{
  padding:8px 10px !important;
  background:#fff !important;
}

.report-filter-row input{
  width:100% !important;
  min-width:90px !important;
  min-height:32px !important;
  padding:6px 8px !important;
  border:1px solid #dce3d8 !important;
  border-radius:6px !important;
  outline:none !important;
  background:#fff !important;
  color:#2e473a !important;
  font-size:10px !important;
}

.report-filter-row input:focus{
  outline:2px solid #f4c4c4 !important;
  outline-offset:1px !important;
  border-color:#df8d8c !important;
}

.report-empty-cell{
  padding:24px !important;
  text-align:center !important;
  color:var(--muted) !important;
}

@media(max-width:1000px){
  .report-menu-grid{
    grid-template-columns:1fr !important;
  }

  .report-stats{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .report-data-card > .card-head{
    align-items:flex-start !important;
    flex-direction:column !important;
  }

  .report-pagination{
    width:100% !important;
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
    margin-left:0 !important;
  }
}

@media(max-width:680px){
  .report-menu-card{
    min-height:130px !important;
    padding:17px !important;
  }

  .report-stats{
    grid-template-columns:1fr !important;
  }

  .report-period-picker,
  .report-advanced-filter{
    align-items:stretch !important;
    flex-direction:column !important;
  }

  .report-period-picker label,
  .report-advanced-filter label{
    min-width:0 !important;
    width:100% !important;
  }

  .report-bar-row{
    grid-template-columns:1fr !important;
    gap:6px !important;
  }

  .report-bar-label{
    white-space:normal !important;
  }
}

/* PAYMENT_TERM_DAYS */
.order-header-fields{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media(max-width:900px){
  .order-header-fields{
    grid-template-columns:1fr;
  }
}


/* REPORTING_GROUPED_UI_20261008 */
.report-search-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  margin-bottom:18px;
  background:var(--surface,#fff);
  border:1px solid var(--line,#e5e7eb);
  border-radius:14px;
}
.report-search-box{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1 1 520px;
  max-width:720px;
  padding:0 12px;
  border:1px solid var(--line,#e5e7eb);
  border-radius:11px;
  background:#fff;
}
.report-search-box input{
  width:100%;
  height:44px;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
.report-search-count{font-size:12px;color:var(--muted,#6b7280);white-space:nowrap;}
.report-groups{display:grid;gap:16px;}
.report-group{
  overflow:hidden;
  background:var(--surface,#fff);
  border:1px solid var(--line,#e5e7eb);
  border-radius:16px;
  box-shadow:0 7px 22px rgba(15,23,42,.045);
}
.report-group-toggle{
  width:100%;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto 34px;
  gap:14px;
  align-items:center;
  padding:18px 20px;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.report-group-toggle:hover{background:rgba(239,35,35,.025);}
.report-group-icon{
  width:42px;height:42px;display:grid;place-items:center;border-radius:12px;
  background:#fff1f1;color:var(--brand,#e52525);
}
.report-group-copy{display:grid;gap:4px;min-width:0;}
.report-group-copy strong{font-size:17px;}
.report-group-copy small{color:var(--muted,#6b7280);line-height:1.4;}
.report-group-count{font-size:12px;color:var(--muted,#6b7280);background:#f7f8f6;padding:6px 9px;border-radius:999px;}
.report-group-arrow{font-size:22px;line-height:1;text-align:center;color:var(--muted,#6b7280);}
.report-group-content{padding:0 18px 18px;}
.report-list-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.report-list-card{
  min-height:104px;
  display:grid;
  grid-template-columns:34px 42px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:15px;
  border:1px solid var(--line,#e5e7eb);
  border-radius:13px;
  background:#fff;
  color:inherit;
  text-align:left;
}
button.report-list-card{cursor:pointer;}
button.report-list-card:hover{border-color:#efb8b8;box-shadow:0 10px 24px rgba(15,23,42,.06);transform:translateY(-1px);}
.report-list-number{font-weight:800;font-size:12px;color:var(--brand,#e52525);text-align:center;}
.report-list-copy{display:grid;gap:5px;min-width:0;}
.report-list-copy strong{font-size:14px;line-height:1.25;}
.report-list-copy small{font-size:12px;line-height:1.45;color:var(--muted,#6b7280);}
.report-planned-card{opacity:.76;background:#fafafa;cursor:default;}
.report-planned-badge{font-size:11px;font-weight:700;color:#766000;background:#fff7cc;padding:6px 8px;border-radius:999px;white-space:nowrap;}
.report-group-planned{border-style:dashed;}
.report-phase-toggle .report-group-icon{background:#fff8dc;color:#8b6d00;}
.report-selector-row{
  display:flex;flex-wrap:wrap;gap:14px;align-items:end;
  margin-bottom:16px;padding:14px 16px;background:#fff;border:1px solid var(--line,#e5e7eb);border-radius:14px;
}
.report-selector-row label{display:grid;gap:6px;min-width:220px;}
.report-selector-row label>span{font-size:12px;color:var(--muted,#6b7280);}
.report-selector-row select{height:44px;}
@media(max-width:900px){
  .report-list-grid{grid-template-columns:1fr;}
  .report-search-card{align-items:stretch;flex-direction:column;}
  .report-search-box{max-width:none;flex-basis:auto;}
}
@media(max-width:620px){
  .report-group-toggle{grid-template-columns:42px minmax(0,1fr) 28px;padding:14px;}
  .report-group-count{display:none;}
  .report-list-card{grid-template-columns:28px 38px minmax(0,1fr);}
  .report-list-card .report-open-link,.report-planned-badge{grid-column:3;justify-self:start;}
}

