:root{font-family:Segoe UI,Arial,sans-serif;color:#242428;background:#f5f5f6;font-size:14px;--brand:#d01216;--muted:#63656c;--line:#e4e4e7}*{box-sizing:border-box}body{margin:0;display:flex;min-height:100vh}aside{width:248px;background:#1c1c1c;color:#e4e4e7;position:fixed;inset:0 auto 0 0;padding:30px 18px;display:flex;flex-direction:column}.brand{display:flex;gap:11px;align-items:center;color:white;font-size:22px;font-weight:700;letter-spacing:-.6px;padding:0 4px 34px}.brand small{display:block;font-size:10px;font-weight:400;letter-spacing:.1px;color:#b6b6bd;margin-top:6px}.mark{display:grid;place-items:center;background:#d01216;color:#ffffff;width:36px;height:40px;border-radius:9px;font-size:23px}nav{display:grid;gap:5px}nav button{text-align:left;padding:12px 15px;color:#d4d4da;border:0;background:transparent;font-size:14px;font-weight:500;border-radius:8px;display:flex;gap:13px}nav button:hover{background:#303034}nav button.active{background:#d01216;color:#ffffff}nav .num{opacity:.55;font-size:11px;align-self:center}.aside-bottom{margin-top:auto;padding:30px 10px 0;font-size:11px;line-height:2}.aside-bottom small{display:block;color:#b6b6bd;font-size:11px}.online{display:inline-block;width:6px;height:6px;border-radius:50%;background:#8dd2b2}.ghost{background:transparent;color:#d4d4da;border:1px solid #55555d;margin-top:15px;width:100%;font-size:12px}main{margin-left:248px;width:calc(100% - 248px);padding:38px 42px 20px;max-width:1850px}header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:32px}.eyebrow{font-size:10px;color:var(--muted);letter-spacing:2px;font-weight:700}h1{font-size:29px;letter-spacing:-.8px;font-weight:650;margin:9px 0}header p{color:var(--muted);margin:0;font-size:13px}.header-tools{display:flex;align-items:center;gap:16px;font-size:12px;color:var(--muted)}button{cursor:pointer;background:var(--brand);color:#fff;border:1px solid transparent;border-radius:7px;padding:10px 15px;font:600 12px Segoe UI,Arial,sans-serif;transition:background .15s}button:hover{filter:brightness(.94)}button:disabled{opacity:.45;cursor:default}button.secondary{background:#fff;color:#343843;border-color:#d9d9df}button.danger{background:#fff0ee;color:#a63b2e}button.small{padding:6px 9px;font-size:11px}button.icon{background:none;color:#63656c;font-size:23px;padding:0 5px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:22px}.metric-label{color:var(--muted);font-size:12px}.metric{font-size:31px;line-height:1.5;letter-spacing:-1px;font-weight:600}.metric-note{color:#63656c;font-size:11px}.panel{background:#fff;border:1px solid var(--line);border-radius:11px;overflow:hidden;margin-bottom:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 22px;border-bottom:1px solid var(--line)}h2{font-size:16px;margin:0;font-weight:600}h3{font-size:14px;margin:0 0 12px}.panel-head p,.muted{color:var(--muted);font-size:12px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}.toolbar .actions,.actions{display:flex;gap:8px;flex-wrap:wrap}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}th{text-align:left;font-weight:600;font-size:10px;letter-spacing:.3px;color:#63656c;background:#f8f8f9;padding:13px 18px;border-bottom:1px solid var(--line)}td{padding:14px 18px;border-bottom:1px solid #eaeaec}tr:last-child td{border:0}tr:hover td{background:#fafafa}.code{font-weight:650;color:#a40e11}.badge{display:inline-flex;align-items:center;border-radius:4px;font-size:10px;padding:4px 7px;background:#f0f0f2;color:#46464d}.badge.orange{background:#fff2db;color:#9b6d20}.badge.gray{background:#f0f0f2;color:#63656c}.badge.red{background:#fdeceb;color:#b14c44}.empty{text-align:center;padding:55px 24px;color:#63656c;font-size:13px}.empty strong{display:block;color:#343843;font-size:16px;margin-bottom:8px}.empty button{margin-top:18px}.note{padding:14px 18px;background:#f2f2f4;color:#48484f;border:1px solid #e1e1e6;border-radius:8px;margin-bottom:18px;font-size:12px;line-height:1.65}.note.warning{background:#fff8ea;color:#906b2c;border-color:#f2e4bf}.note.error{background:#fff0ee;color:#a64236;border-color:#f5d4cf}.split{display:grid;grid-template-columns:1.35fr 1fr;gap:22px}.pad{padding:22px}.steps{list-style:none;padding:0;margin:0}.steps li{display:flex;gap:13px;padding:12px 0;border-bottom:1px solid #eaeaec;line-height:1.5}.steps li:last-child{border:0}.steps span{border-radius:50%;background:#fce9ea;color:#a40e11;flex-shrink:0;width:25px;height:25px;display:grid;place-items:center;font-size:11px}.steps p{margin:0;color:#63656c;font-size:12px}.steps strong{display:block;color:#343843;font-size:12px;font-weight:600;margin-bottom:3px}input,select{font:13px Segoe UI,Arial,sans-serif;padding:10px 12px;border:1px solid #d1d1d8;border-radius:6px;background:#fff;color:#343843;min-width:0}input:focus,select:focus{outline:2px solid #d01216;outline-offset:1px}.search{width:280px}dialog{border:0;padding:26px;width:540px;max-width:calc(100% - 30px);border-radius:13px;box-shadow:0 25px 100px #1c1c1c33;color:#343843}dialog::backdrop{background:#16161688}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}#fields{display:grid;grid-template-columns:1fr 1fr;gap:17px}label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#55555e}label.wide{grid-column:1/-1}.help{grid-column:1/-1;font-size:12px;color:#63656c;line-height:1.6;margin:0}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}#form-error{color:#b44636;font-size:12px;line-height:1.6;margin-top:14px}#toast{display:none;position:fixed;right:28px;bottom:28px;background:#242428;color:#fff;padding:15px 24px;border-radius:9px;box-shadow:0 6px 25px #0002;z-index:10;font-size:13px;max-width:460px}#toast.error{background:#a33d31}footer{color:#73737b;font-size:10px;margin-top:30px}.link-actions{display:flex;gap:6px}.settings{max-width:800px}.settings .card{margin-bottom:16px}.settings p{color:#63656c;font-size:12px;line-height:1.8}.report-total{font-size:12px;color:#63656c}details{font-size:12px;line-height:1.8}summary{cursor:pointer;font-weight:600}.stock-low{color:#af6731;font-weight:600}@media(max-width:1100px){main{padding:28px 22px}aside{width:210px}main{margin-left:210px;width:calc(100% - 210px)}.cards{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}.header-tools #today{display:none}}@media(max-width:700px){aside{position:static;width:100%;padding:16px}.brand{padding-bottom:14px}nav{display:flex;overflow:auto}nav button{white-space:nowrap}.aside-bottom{display:none}body{display:block}main{margin:0;width:100%;padding:22px 14px}h1{font-size:24px}.cards{gap:9px}.card{padding:16px}.toolbar{align-items:flex-start;flex-direction:column}.search{width:100%}}

.full-span{grid-column:1/-1}

#login-screen{display:none}body.logged-out{display:block;background:#f3f3f5}body.logged-out>aside,body.logged-out>main{display:none}body.logged-out #login-screen{display:grid;min-height:100vh;place-items:center;padding:24px}.login-card{width:440px;max-width:100%;background:white;padding:38px;border-radius:16px;box-shadow:0 15px 60px #1c1c1c18;border:1px solid #e0e0e5}.login-brand{display:flex;align-items:center;gap:13px}.login-brand h1{font-size:28px}.login-subtitle{color:#63656c;font-size:13px;line-height:1.7;margin-bottom:28px}.login-card form{display:grid;gap:18px}.login-card form[hidden]{display:none}.login-card button{padding:13px;font-size:14px}.login-foot{border-top:1px solid #e4e4e7;padding-top:20px;margin-top:26px;color:#63656c;font-size:11px;line-height:1.7}#login-error{color:#a83e32;font-size:12px;line-height:1.7}#account-name{font-size:11px;color:#55555e}.header-tools{flex-wrap:wrap;justify-content:flex-end;max-width:460px}.brand{font-size:20px;letter-spacing:-.5px}pre{white-space:pre-wrap;max-width:500px;font-size:11px}.aside-bottom{padding-top:15px}#fields input[type=password]{font-family:Segoe UI,Arial,sans-serif}

/* Oturum kontrolü dar ve kısa ekranlarda da erişilebilir. */
aside{overflow-y:auto}header>div{min-width:0}#quit{white-space:nowrap;flex-shrink:0}@media(max-width:700px){header{flex-direction:column;align-items:flex-start}.header-tools{width:100%;max-width:none;justify-content:flex-start;gap:10px}}

/* HoodSafer: ana renk #D01216, antrasit #1C1C1C, beyaz. */
:root{--brand-hover:#ad0f13;--brand-soft:#fce9ea}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px}nav button.active:hover{background:var(--brand-hover)}nav button.active .num{opacity:.85}.login-card{border-top:4px solid var(--brand)}.metric{color:#1c1c1c}.eyebrow{color:#a40e11}::selection{background:var(--brand-soft);color:#761013}

.mark{font-size:17px;flex-shrink:0}body.logged-out #login-screen{grid-template-columns:minmax(0,1fr)}.login-card{min-width:0;justify-self:center}.login-card label{min-width:0}.login-card input{width:100%}#fields{grid-template-columns:repeat(2,minmax(0,1fr))}#fields>label{min-width:0}@media(max-width:420px){.login-card{padding:26px 22px}.login-brand h1{font-size:25px}#fields{grid-template-columns:minmax(0,1fr)}}

/* Çok satırlı satın alma. */
.purchase-order>summary{padding:18px 22px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#fafafa;border-bottom:1px solid var(--line);list-style:none}
.purchase-order>summary::before{content:'+';font-size:20px;color:var(--brand)}.purchase-order[open]>summary::before{content:'−'}
.purchase-number{font-size:15px;color:#a40e11;overflow-wrap:anywhere}.purchase-actions{padding:14px 22px}.purchase-order .panel{margin:0;border:0;border-radius:0}
.purchase-dialog{width:960px}.purchase-editor{min-width:0}.purchase-line{display:grid;grid-template-columns:minmax(150px,1fr) 110px 160px auto;gap:12px;align-items:end;padding:16px 0;border-bottom:1px solid var(--line)}
.purchase-line input,.purchase-line select{width:100%}.purchase-line>label{min-width:0}.purchase-line>button{min-height:37px}.purchase-line-tools{display:flex;gap:16px;align-items:center;margin-top:18px;flex-wrap:wrap}
@media(max-width:700px){.purchase-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.purchase-line>label:first-child{grid-column:1/-1}.purchase-line>button{grid-column:1/-1;justify-self:end}.purchase-order>summary{padding:15px;gap:10px}.purchase-actions{padding:12px 15px}}

/* Satın alma ve teslimat fiyatları. */
.purchase-dialog{width:1100px}.purchase-line{grid-template-columns:minmax(160px,1fr) 85px 120px 95px 150px auto;gap:10px}
.purchase-totals{padding:16px 22px;border-top:1px solid var(--line);background:#fafafa;font-size:12px;line-height:1.8}.purchase-totals span{display:inline-block;min-width:245px;color:#55555e}.purchase-totals strong{white-space:nowrap}.purchase-totals small{color:#906b2c}.purchase-totals p{margin:8px 0 0;color:var(--muted);font-size:11px}
@media(max-width:900px){.purchase-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.purchase-line>label:first-child{grid-column:1/-1}.purchase-line>button{grid-column:1/-1;justify-self:end}.purchase-totals{padding:14px 15px}.purchase-totals span{display:block;min-width:0}}
.purchase-order .link-actions{flex-wrap:wrap;min-width:210px;max-width:260px;row-gap:6px}.purchase-order td,.purchase-order th{padding:12px 10px}

/* Grup başlıkları ve ihtiyaç halinde açılan ürün ağacı. */
.bom-group{margin-bottom:14px}.tree-group-head{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fafafa;justify-content:space-between}.tree-disclosure{background:transparent;color:#25252b;display:flex;align-items:center;gap:10px;text-align:left;min-width:0;white-space:normal;font-size:13px;padding:8px 4px}.tree-group-head>.tree-disclosure{flex:1}.tree-arrow{color:var(--brand);font-size:18px;flex-shrink:0;width:18px}.tree-count{color:var(--muted);font-weight:400;font-size:11px}.bom-tree,.tree-children{list-style:none;margin:0;padding:0}.bom-tree{padding:0 16px}.tree-children{margin-left:18px;padding-left:14px;border-left:2px solid #e4e4e8}.tree-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid #ededf0}.tree-main{min-width:0;flex:1}.tree-label{overflow-wrap:anywhere;line-height:1.6}.tree-meta{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding-left:32px;color:var(--muted);font-size:11px;line-height:1.7;overflow-wrap:anywhere}.tree-leaf{display:flex;align-items:center;gap:10px;padding:8px 4px;font-size:13px}.tree-leaf>span:first-child{width:18px;text-align:center;color:#85858b;flex-shrink:0}.tree-actions{justify-content:flex-end;max-width:280px}.tree-empty{font-size:12px;color:var(--muted);padding:4px 20px 16px;line-height:1.7}.bom-group [hidden]{display:none}
@media(max-width:1000px){.tree-row{align-items:flex-start;flex-direction:column}.tree-actions{padding-left:32px;justify-content:flex-start;max-width:none}}
@media(max-width:700px){.tree-group-head{padding:10px;flex-wrap:wrap}.tree-group-head>.actions{width:100%;padding-left:28px}.bom-tree{padding:0 10px}.tree-children{margin-left:5px;padding-left:7px}.tree-meta,.tree-actions{padding-left:8px}.tree-count{white-space:nowrap}.tree-label{font-size:12px}}

.sale-number{display:inline-block;max-width:300px;white-space:normal;overflow-wrap:anywhere;font-weight:600;color:#a40e11}

.sales-dialog{width:960px}.sales-line{display:grid;grid-template-columns:minmax(150px,1fr) 100px 155px auto;gap:12px;align-items:end;padding:16px 0;border-bottom:1px solid var(--line)}.sales-line input,.sales-line select{width:100%}.sales-line>label{min-width:0}.sales-line>button{min-height:37px}
@media(max-width:700px){.sales-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.sales-line>label:first-child{grid-column:1/-1}.sales-line>button{grid-column:1/-1;justify-self:end}}

.work-actions{flex-wrap:wrap;min-width:220px;max-width:320px}.work-number,.operation-name{display:inline-block;max-width:260px;white-space:normal;overflow-wrap:anywhere}.operation-summary{display:flex;gap:20px;flex-wrap:wrap;font-size:12px;color:var(--muted)}

/* Müşteri siparişi stok eksiği ve yazdırma görünümü. */
.shortage-report{margin-top:32px;padding:22px;background:#fff;border:1px solid var(--line);border-top:3px solid var(--brand);border-radius:11px}.shortage-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:16px}.shortage-head h2{margin-top:8px}.shortage-head p,.shortage-explanation{font-size:12px;line-height:1.7;color:var(--muted)}.shortage-explanation{margin:9px 0}.shortage-order{margin-top:24px}.shortage-order h3{line-height:1.7;overflow-wrap:anywhere}.shortage-order h3 small{font-size:11px;color:var(--muted);font-weight:400;display:block}.shortage-report table td:first-child{white-space:normal;min-width:140px;max-width:270px;overflow-wrap:anywhere}.shortage-report th,.shortage-report td{padding:12px 10px}.shortage-value{color:#a40e11}.shortage-totals{border-top:2px solid var(--line);padding-top:22px;margin-top:28px}.shortage-grand-total{padding:18px;background:#fce9ea;border-radius:8px;line-height:1.8}.shortage-grand-total>strong{font-size:12px}.shortage-grand-total>div{display:flex;gap:20px;flex-wrap:wrap;font-size:21px;font-weight:650}.shortage-grand-total small{font-size:11px;color:var(--muted)}#shortage-print{display:none}
@media(max-width:700px){.shortage-report{padding:14px}.shortage-head{flex-direction:column;align-items:flex-start}.shortage-grand-total>div{font-size:18px}}
@media print{
 @page{size:A4 landscape;margin:12mm}
 body.printing-shortages{display:block!important;background:white!important;color:#000!important}
 body.printing-shortages>*:not(#shortage-print){display:none!important}
 body.printing-shortages #shortage-print{display:block!important;width:100%;font:10pt Arial,sans-serif}
 #shortage-print .shortage-print-title{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #777;padding-bottom:8px;font-size:10pt}
 #shortage-print .shortage-print-title span{font-size:9pt}
 #shortage-print .shortage-report{padding:0;margin-top:14px;border:0;border-radius:0}
 #shortage-print .shortage-head{margin-bottom:6px;display:block}
 #shortage-print .eyebrow{display:none}
 #shortage-print h2{font-size:15pt}#shortage-print h3{font-size:11pt;break-after:avoid}
 #shortage-print .shortage-explanation,#shortage-print .shortage-head p{font-size:9pt;color:#222}
 #shortage-print .table-wrap,#shortage-print .panel{overflow:visible;border-radius:0;margin-bottom:14px}
 #shortage-print table{width:100%;white-space:normal;table-layout:fixed;font-size:9pt}
 #shortage-print th,#shortage-print td{white-space:normal;overflow-wrap:anywhere;padding:7px 6px;max-width:none;min-width:0;border-color:#aaa;color:#000}
 #shortage-print th{font-size:8pt;background:#eee}
 #shortage-print thead{display:table-header-group}#shortage-print tr{break-inside:avoid}
 #shortage-print .shortage-order{margin-top:18px}#shortage-print .shortage-totals{margin-top:20px;padding-top:14px}
 #shortage-print .shortage-grand-total{break-inside:avoid;border:1px solid #777;background:#fff;color:#000;padding:12px}
 #shortage-print .shortage-grand-total>div{font-size:15pt}#shortage-print .shortage-value{color:#000}
}

@media print{
 #shortage-print .shortage-report{margin-top:8px}
 #shortage-print .shortage-head{margin:0 0 6px}
 #shortage-print .shortage-head h2{display:none}
 #shortage-print .shortage-head p,#shortage-print .shortage-explanation{margin:4px 0;font-size:8pt;line-height:1.35}
 #shortage-print .shortage-order{margin-top:10px}
 #shortage-print .shortage-order h3{margin:0 0 5px;line-height:1.25}
 #shortage-print .shortage-order h3 small{font-size:8pt}
 #shortage-print .panel{margin-bottom:8px}
 #shortage-print th,#shortage-print td{padding:4px 5px;line-height:1.2}
 #shortage-print .shortage-summary-block{break-inside:avoid}
 #shortage-print .shortage-totals{padding-top:10px;margin-top:12px}
 #shortage-print .shortage-totals h3{margin-bottom:6px}
 #shortage-print .shortage-grand-total{padding:8px;line-height:1.4}
}

/* Sipariş bazında tam reçete ağacı ve ortak malzeme toplamları. */
.shortage-tree h4{font-size:12px;margin:12px 0 8px;line-height:1.6;overflow-wrap:anywhere}.shortage-tree table{min-width:1000px}.shortage-tree td:first-child{min-width:230px;max-width:360px}.shortage-tree-label{display:flex;align-items:flex-start;gap:7px;line-height:1.4}.shortage-tree-label>div{min-width:0}.shortage-tree-label strong,.shortage-tree-label span,.shortage-tree-label small{display:block;overflow-wrap:anywhere}.shortage-path{font-size:10px;color:var(--muted);margin-bottom:3px}.shortage-tree-label>div>span{font-size:12px}.shortage-node-toggle{padding:2px 6px;background:#fff;color:var(--brand);border:1px solid #ccc;min-width:24px;flex-shrink:0}.shortage-node-marker{color:#999;min-width:16px}.shortage-warning{color:#a40e11;font-weight:600}.zero-demand td{color:#74747c}.detailed-shortages .shortage-head{align-items:flex-start}.detailed-shortages .shortage-head .actions{justify-content:flex-end}.shortage-summary-block{min-width:0}
.tree-indent-0{margin-left:0px}
.tree-indent-1{margin-left:14px}
.tree-indent-2{margin-left:28px}
.tree-indent-3{margin-left:42px}
.tree-indent-4{margin-left:56px}
.tree-indent-5{margin-left:70px}
.tree-indent-6{margin-left:84px}
.tree-indent-7{margin-left:98px}
.tree-indent-8{margin-left:112px}
@media print{
 #shortage-print .shortage-tree h4{font-size:9pt;margin:7px 0 4px;break-after:avoid}
 #shortage-print .shortage-tree table{min-width:0;font-size:8pt}
 #shortage-print .shortage-tree th{font-size:7pt}
 #shortage-print .shortage-tree th:first-child,#shortage-print .shortage-tree td:first-child{width:28%;min-width:0;max-width:none}
 #shortage-print .shortage-tree th:nth-child(2){width:13%}
 #shortage-print .shortage-tree th:nth-child(3){width:6%}
 #shortage-print .shortage-tree th:nth-child(4){width:12%}
 #shortage-print .shortage-tree-label>div>span{font-size:8pt}
 #shortage-print .shortage-path{font-size:7pt}
 #shortage-print .shortage-node-marker{min-width:8px}
 #shortage-print .shortage-tree-label{gap:3px}
 #shortage-print .shortage-incomplete{background:#fff;border:2px solid #000;color:#000}
 #shortage-print .shortage-warning{color:#000;font-weight:bold}
 #shortage-print .shortage-tree .muted{font-size:7pt}
 #shortage-print .tree-indent-0{margin-left:0px}
 #shortage-print .tree-indent-1{margin-left:7px}
 #shortage-print .tree-indent-2{margin-left:14px}
 #shortage-print .tree-indent-3{margin-left:21px}
 #shortage-print .tree-indent-4{margin-left:28px}
 #shortage-print .tree-indent-5{margin-left:35px}
 #shortage-print .tree-indent-6{margin-left:42px}
 #shortage-print .tree-indent-7{margin-left:49px}
 #shortage-print .tree-indent-8{margin-left:56px}
}
