:root{--green:#078b31;--green2:#eaf7ee;--dark:#0f172a;--text:#182033;--muted:#7b8798;--line:#e8edf2;--bg:#f5f7f9;--card:#fff;--red:#dc2626;--blue:#00B4F1}*{box-sizing:border-box}html,body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:15px}a{text-decoration:none;color:inherit}.sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:#fff;border-right:1px solid var(--line);padding:24px 18px;display:flex;flex-direction:column;gap:28px;z-index:50}.brand{display:grid;grid-template-columns:42px 1fr;gap:0 10px;align-items:center}.logo{grid-row:1/3;font-size:28px;color:var(--green)}.brand b{font-size:28px;letter-spacing:-1px}.brand small{color:var(--muted);font-size:12px}.sidebar nav{display:flex;flex-direction:column;gap:10px}.sidebar nav a{padding:14px 18px;border-radius:12px;font-weight:800}.sidebar nav a.on{background:var(--blue);color:white;box-shadow:0 16px 30px rgba(7,139,49,.22)}.status{margin-top:auto;border:1px solid #cfead8;background:#f5fff7;border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:10px}.status strong{color:var(--green)}.status small{color:var(--muted)}.main{margin-left:250px;min-height:100vh}.topbar{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;padding:0 34px;position:sticky;top:0;z-index:30}.topbar form{flex:1}.topbar input{width:100%;max-width:520px;border:1px solid var(--line);border-radius:12px;padding:14px 18px}.datepill{background:#fff;border:1px solid var(--line);padding:12px 18px;border-radius:12px}.user{display:grid;grid-template-columns:34px 1fr;gap:0 10px;align-items:center}.user span{grid-row:1/3;width:34px;height:34px;border-radius:50%;background:var(--green2);color:var(--green);display:grid;place-items:center;font-weight:900}.user small{color:var(--muted)}.content{padding:26px 34px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:22px 0}.page-head h1{font-size:32px;margin:0;letter-spacing:-.8px}.page-head p{margin:8px 0 0;color:var(--muted)}.green{color:var(--blue)}.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:0 14px 34px rgba(15,23,42,.04)}.card h2{margin:0 0 16px;font-size:21px}.card h3{margin:16px 0 10px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px 18px;font-weight:900;cursor:pointer;display:inline-flex;gap:8px;align-items:center;justify-content:center}.btn.primary{background:var(--blue);border-color:var(--blue);color:white;box-shadow:0 16px 28px rgba(7,139,49,.2)}.btn.blue{background:var(--blue);border-color:var(--blue);color:#fff}.btn.danger{background:var(--red);border-color:var(--red);color:white}.btn.full{width:100%}.actions{display:flex;gap:10px;flex-wrap:wrap}.badge{display:inline-block;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:900}.badge.ok{background:#dff4df;color:#0a7b2a}.badge.fail{background:#ffe4e4;color:#ba1a1a}.badge.warn{background:#fff1c9;color:#8a5a00}.badge.muted{background:#eef2f7;color:#64748b}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.step{background:#fff;border:1px solid var(--line);border-radius:18px;padding:24px 34px;display:grid;grid-template-columns:48px 1fr;gap:0 18px;align-items:center}.step span{grid-row:1/3;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#f1f5f9;font-weight:900}.step.active{background:#f5fff7;border-color:#a8dfb7}.step.active span{background:#00B4F1;color:white}.step small{color:var(--muted);margin-top:8px}.label-grid{display:grid;grid-template-columns:1.05fr 1.35fr .85fr;gap:18px}.product-grid{display:grid;grid-template-columns:290px minmax(420px,1fr) 300px;gap:18px}.product-grid .fields{grid-column:1/3}.product-grid .json{grid-column:3}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.form-grid.three{grid-template-columns:repeat(3,1fr)}label{font-weight:800;color:#334155;display:flex;flex-direction:column;gap:8px}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:13px 14px;background:white;font:inherit}textarea{min-height:110px;resize:vertical}.dropzone{border:2px dashed #dbe4ed;background:#fbfdff;border-radius:18px;min-height:235px;display:grid;place-items:center;text-align:center;padding:22px;color:#1f2937}.dropzone span{font-size:42px}.dropzone input{display:none}.preview-img{max-width:100%;border-radius:14px;margin-top:12px}.score-ring{--score:0;width:145px;height:145px;border-radius:50%;margin:18px auto;display:grid;place-items:center;background:conic-gradient(var(--green) calc(var(--score)*1%),#eef2f5 0);position:relative}.score-ring:after{content:"";position:absolute;inset:12px;background:#fff;border-radius:50%}.score-ring b,.score-ring span{z-index:1}.score-ring b{font-size:35px;color:var(--green)}.score-ring span{font-size:12px;color:var(--muted);margin-top:48px;position:absolute}.checklist p,.kv{display:grid;grid-template-columns:1fr auto;gap:12px;border-bottom:1px solid var(--line);padding:11px 0;margin:0}.checklist span{color:var(--green)}.kv{grid-template-columns:1fr 1fr}.kv span{color:#718096}.kv b{font-weight:900}.canvas-wrap{background:#0b1222;border-radius:14px;min-height:420px;display:grid;place-items:center;overflow:auto;padding:16px}.canvas-wrap canvas{max-width:100%;height:auto;background:#111827}.counter-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.counter-grid div{border:1px solid var(--line);border-radius:14px;padding:16px}.counter-grid span{display:block;color:#64748b;font-size:13px}.counter-grid b{font-size:28px}.json pre,pre{background:#0b1222;color:#dbeafe;border-radius:12px;padding:18px;max-height:300px;overflow:auto;font-size:13px}.deliveries-head{display:grid;grid-template-columns:170px 1fr 120px 140px 170px;gap:8px;align-items:end;margin:10px 0 16px}.delivery-list{display:flex;flex-direction:column;gap:10px}.delivery-row{background:#fff;border:1px solid #dde5ee;border-radius:6px;padding:18px;display:grid;grid-template-columns:1fr 54px 54px 54px 54px 54px;align-items:center;gap:8px}.delivery-row b{display:block;margin-bottom:6px}.delivery-row small{color:#5f6b7a}.iconbtn{width:38px;height:38px;border:0;background:#fff;color:#475569;font-size:22px;display:grid;place-items:center;border-radius:10px}.tabs{display:flex;gap:22px;align-items:center;margin:6px 0 30px;border-bottom:1px solid var(--line);padding-bottom:8px}.tabs a{padding:10px 0;border-bottom:2px solid transparent;font-weight:800;color:#344054}.tabs a.active{border-color:#111827;color:#111827}.qc-layout{max-width:980px}.soft-section{background:#f8fafc;border:1px solid #eef2f7;padding:22px;margin:16px 0}.table{width:100%;border-collapse:collapse;background:#fff}.table th,.table td{border:1px solid #dce3ea;padding:10px;text-align:left}.table th{background:#f8fafc}.requirements .row{display:grid;grid-template-columns:1fr 150px 130px;align-items:center;background:#f2f4f6;padding:11px 14px}.requirements .row:nth-child(even){background:#e9edf1}.segmented{display:flex;margin:20px 0}.segmented button{border:1px solid #94a3b8;background:white;padding:14px 28px;min-width:130px}.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}.gallery figure{margin:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}.gallery img{width:100%;height:160px;object-fit:cover}.gallery figcaption{padding:10px;display:flex;gap:8px}.success{background:#edfff1;border:1px solid #b7e6c0;color:#08762a;padding:16px 20px;border-radius:14px;font-weight:800}.report-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.report-summary div{border-right:1px solid var(--line);padding-right:18px}.report-summary small{display:block;color:#64748b}.report-summary b{font-size:22px}.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.login-box{width:min(480px,100%)}@media(max-width:1100px){.sidebar{position:static;width:auto}.main{margin-left:0}.topbar{position:static}.steps,.label-grid,.product-grid,.report-grid,.report-summary{grid-template-columns:1fr}.product-grid .fields,.product-grid .json{grid-column:auto}.deliveries-head{grid-template-columns:1fr 1fr}.delivery-row{grid-template-columns:1fr repeat(3,42px)}}@media print{.sidebar,.topbar,.steps,.tabs,.btn,.actions{display:none!important}.main{margin:0}.content{padding:0}.card{box-shadow:none;break-inside:avoid}.gallery img{height:120px}}
.mini-alert{font-size:12px;line-height:1.35;padding:10px 12px;border:1px solid #dbeafe;background:#eff6ff;border-radius:12px;color:#1e3a8a;margin:8px 0 12px}.norm-box{margin-top:14px;padding:14px;border:1px solid #dcfce7;background:#f0fdf4;border-radius:16px;color:#14532d}.norm-box ul{margin:8px 0 0 18px;padding:0}.norm-box li{margin:4px 0}.canvas-wrap canvas{max-width:100%;height:auto;display:block;margin:auto}.result textarea{min-height:116px}.counter-grid div:first-child{border-color:#8b5cf6;background:#f5f3ff}.counter-grid div:first-child b{color:#6d28d9}
/* v12 detaylı yönetim ekranları */
.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:16px;margin:18px 0}.kpi{background:#fff;border:1px solid #e6edf0;border-radius:22px;padding:18px;box-shadow:0 20px 45px rgba(15,23,42,.05)}.kpi small{color:#64748b;font-weight:800}.kpi b{display:block;font-size:32px;margin:8px 0;color:#0f172a}.kpi span{color:#64748b;font-size:12px}.kpi.danger b{color:#dc2626}.kpi.warn b{color:#b45309}.two-col{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(520px,1.35fr);gap:18px;margin:18px 0}.wide{min-width:0}.stack-list{display:grid;gap:10px}.mini-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #edf2f7;border-radius:16px;padding:12px;text-decoration:none;color:#0f172a;background:#fbfdff}.mini-row:hover{border-color:#16a34a;background:#f0fdf4}.mini-row small{display:block;color:#64748b;margin-top:3px}.flow-line{display:flex;gap:10px;flex-wrap:wrap}.flow-line span{background:#f0fdf4;color:#087f2e;border:1px solid #bbf7d0;border-radius:999px;padding:10px 14px;font-weight:800}.form-grid .span2{grid-column:1/-1}.btn.danger,.danger{border-color:#fecaca;color:#b91c1c;background:#fff5f5}.decision-box{background:#f8fafc;border-radius:18px;padding:18px;border:1px solid #e2e8f0}.route-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.route-grid>div{border:1px solid #e2e8f0;border-radius:14px;padding:10px;background:#f8fafc}.logbox{background:#0f172a;color:#d1fae5;border-radius:16px;padding:14px;white-space:pre-wrap;max-height:360px;overflow:auto}.main .content{padding-bottom:80px}@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.route-grid{grid-template-columns:1fr}}@media(max-width:740px){.kpi-grid{grid-template-columns:1fr}.flow-line span{width:100%}.sidebar nav a{font-size:13px}}

/* v13 advanced full detay modülleri */
.module-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:16px}.module-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:0 18px 42px rgba(15,23,42,.05)}.module-card b{display:block;font-size:20px;margin:8px 0}.module-card small{color:#64748b}.timeline{position:relative;padding-left:28px}.timeline:before{content:"";position:absolute;left:8px;top:0;bottom:0;width:2px;background:#dbeafe}.tl{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px;margin:12px 0}.tl:before{content:"";position:absolute;left:-25px;top:18px;width:14px;height:14px;border-radius:50%;background:#16a34a;border:3px solid #dcfce7}.matrix{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.matrix div{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:14px}.matrix b{font-size:22px}.heat{height:10px;border-radius:999px;background:linear-gradient(90deg,#22c55e,#fde047,#ef4444);margin-top:8px}.wizard-split{display:grid;grid-template-columns:280px 1fr;gap:18px}.sticky-panel{position:sticky;top:86px;align-self:start}.quality-pill{display:inline-flex;gap:7px;align-items:center;border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:999px;padding:8px 12px;font-weight:900}.risk-high{color:#dc2626}.risk-medium{color:#b45309}.risk-low{color:#15803d}.print-a4{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:28px;max-width:980px}.signature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:28px}.signature-grid div{border-top:1px solid #94a3b8;padding-top:10px;color:#64748b}.photo-wall{columns:4 220px;column-gap:14px}.photo-wall figure{break-inside:avoid;margin:0 0 14px;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.photo-wall img{width:100%;display:block}.photo-wall figcaption{padding:10px;font-size:12px}.scorebar{height:12px;background:#e2e8f0;border-radius:999px;overflow:hidden}.scorebar i{display:block;height:100%;background:#16a34a}.scorebar.danger i{background:#ef4444}.scorebar.warn i{background:#f59e0b}.lang-tabs{display:flex;gap:8px}.lang-tabs span{padding:8px 12px;border-radius:999px;background:#f1f5f9;font-weight:800}.lang-tabs span.on{background:#0f172a;color:white}.page-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.notice{border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:16px;padding:14px 16px;margin:14px 0}.warning{border:1px solid #fde68a;background:#fffbeb;color:#92400e;border-radius:16px;padding:14px 16px;margin:14px 0}.reject{border:1px solid #fecaca;background:#fef2f2;color:#991b1b;border-radius:16px;padding:14px 16px;margin:14px 0}@media(max-width:1200px){.module-grid,.matrix{grid-template-columns:repeat(2,1fr)}.wizard-split{grid-template-columns:1fr}}@media(max-width:720px){.module-grid,.matrix,.signature-grid{grid-template-columns:1fr}.print-a4{padding:16px}}
/* v14 ultra modules */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#1f2937}.form-grid input,.form-grid select,.form-grid textarea{border:1px solid #e5e7eb;border-radius:12px;padding:12px;background:#fff}.form-grid textarea{min-height:105px}.span2{grid-column:1/-1}.codebox{background:#071122;color:#e5f6ff;padding:18px;border-radius:14px;overflow:auto}.risk{display:inline-flex;padding:7px 11px;border-radius:999px;font-weight:800}.risk-high{background:#fee2e2;color:#991b1b}.risk-medium{background:#fef3c7;color:#92400e}.risk-low{background:#dcfce7;color:#166534}.qr-layout{display:grid;grid-template-columns:1fr 320px;gap:24px;align-items:center}.qrbox{min-height:280px;border:1px dashed #cbd5e1;border-radius:18px;display:flex;align-items:center;justify-content:center;background:#f8fafc}.qrbox canvas{max-width:100%}.table code,.card code{background:#f1f5f9;padding:4px 7px;border-radius:7px}.print-only{display:none}@media(max-width:900px){.form-grid,.qr-layout{grid-template-columns:1fr}.sidebar nav{max-height:62vh;overflow:auto}}@media print{.sidebar,.topbar,.actions,.btn{display:none!important}.main{margin:0}.content{padding:0}.card{box-shadow:none;border:1px solid #ddd}.print-only{display:block}}
/* v15 save-flow + AgriQC design polish */
.hint-box{border:1px solid #c7f0d2;background:linear-gradient(135deg,#00B4F1,#00B4F1);color:#00B4F1;border-radius:16px;padding:12px 14px;margin:8px 0 14px;font-size:13px;line-height:1.45}.agri-modal{position:fixed;inset:0;background:rgba(15,23,42,.52);z-index:9999;display:none;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(4px)}.agri-modal.show{display:flex}.agri-modal-card{width:min(480px,100%);background:#fff;border-radius:28px;padding:28px;box-shadow:0 35px 90px rgba(15,23,42,.28);text-align:center;border:1px solid #e2e8f0;animation:agriPop .18s ease-out}.agri-modal-icon{width:74px;height:74px;border-radius:24px;display:grid;place-items:center;margin:0 auto 16px;background:#dcfce7;color:#15803d;font-size:42px;font-weight:900}.agri-modal-icon.warn{background:#fef3c7;color:#b45309}.agri-modal-icon.error{background:#fee2e2;color:#b91c1c}.agri-modal-card h3{font-size:24px;margin:0 0 8px}.agri-modal-card p{color:#64748b;margin:0 0 14px}.agri-modal-details{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;text-align:left;padding:14px;margin:12px 0;color:#334155;line-height:1.65}.agri-modal-actions{display:flex;justify-content:center;margin-top:16px}.agri-toast{position:fixed;right:22px;bottom:22px;z-index:9998;background:#0f172a;color:white;padding:14px 18px;border-radius:16px;box-shadow:0 22px 55px rgba(15,23,42,.28);transform:translateY(20px);opacity:0;pointer-events:none;transition:.22s}.agri-toast.show{opacity:1;transform:translateY(0)}.agri-toast.success{background:#166534}.agri-toast.error{background:#991b1b}.is-busy{opacity:.72;cursor:wait}.is-busy:after{content:' ';display:inline-block;width:12px;height:12px;margin-left:8px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}.checklist p.ok span{background:#dcfce7;color:#166534}.checklist p.bad span{background:#fee2e2;color:#991b1b}.page-head{background:linear-gradient(135deg,#ffffff 0%,#f7fff9 100%);border:1px solid #e3f6e8;border-radius:24px;padding:18px 20px;margin-bottom:18px;box-shadow:0 18px 42px rgba(15,23,42,.04)}.card{border-radius:22px}.;box-shadow:0 16px 34px rgba(22,163,74,.2)}@keyframes agriPop{from{transform:scale(.96);opacity:.4}to{transform:scale(1);opacity:1}}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:700px){.agri-modal-card{border-radius:22px;padding:22px}.agri-toast{left:16px;right:16px;bottom:16px}.page-head{display:block}.page-head .btn{width:100%;margin-top:12px}}
/* v19 unified German QC + AgriQC simplified structure */
.hint-box{border:1px solid #dbeafe;background:#f8fbff;color:#334155;border-radius:14px;padding:12px 14px;margin-bottom:14px;line-height:1.45}.integrated-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:18px;margin-top:18px}.wide-card{grid-column:1/-1}.requirements.label-req{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:10px 0 18px}.requirements .row.head{background:#fff;font-weight:900}.requirements .row label{display:grid;place-items:center}.requirements input[type=checkbox]{width:18px;height:18px}.spec-note{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:14px;margin-top:12px}.detail-tests{display:grid;gap:10px}.test-line{display:grid;grid-template-columns:1fr 130px 170px;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}.defect-table{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.muted{color:#718096}.delivery-row>a:first-child{display:block}.delivery-row a.iconbtn{background:#fff;border:1px solid transparent}.delivery-row a.iconbtn:hover{border-color:#bbf7d0;background:#f0fdf4;color:var(--green)}.report-summary{margin-bottom:18px}@media(max-width:1100px){.integrated-grid,.defect-table{grid-template-columns:1fr}.test-line{grid-template-columns:1fr}.form-grid.three{grid-template-columns:1fr}.label-grid{grid-template-columns:1fr}.product-grid{grid-template-columns:1fr}.product-grid .fields,.product-grid .json{grid-column:auto}.sidebar nav{max-height:unset}.content{padding:18px}.page-head{align-items:flex-start;flex-direction:column}}


/* NOK Synapse logo integration */
.sidebar{width:290px}
.main{margin-left:290px}
.brand.brand-logo{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.brand.brand-logo img{display:block;width:100%;max-width:230px;height:auto;object-fit:contain}
.brand.brand-logo small{color:var(--muted);font-size:12px;margin-left:2px;letter-spacing:.2px}
.brand.brand-logo-login{align-items:center;text-align:center;margin-bottom:10px}
.brand.brand-logo-login img{max-width:320px;width:100%}
.login-box{width:min(560px,100%)}
@media(max-width:1100px){.main{margin-left:0}.sidebar{width:auto}.brand.brand-logo img{max-width:220px}}


/* v20 tablet + mobile hamburger layout */
.hamburger{display:none;width:44px;height:44px;border:1px solid var(--line);background:#fff;border-radius:13px;align-items:center;justify-content:center;flex-direction:column;gap:5px;cursor:pointer;box-shadow:0 8px 22px rgba(15,23,42,.06);flex:0 0 auto}
.hamburger span{display:block;width:20px;height:2px;background:#0f172a;border-radius:999px;transition:.18s}
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.48);z-index:80;backdrop-filter:blur(3px)}
body.menu-open{overflow:hidden}
body.menu-open .sidebar-backdrop{display:block}
body.menu-open .hamburger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
body.menu-open .hamburger span:nth-child(2){opacity:0}
body.menu-open .hamburger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
@media(max-width:1180px){
  .sidebar{position:fixed!important;inset:0 auto 0 0;width:min(86vw,330px)!important;transform:translateX(-104%);transition:transform .22s ease;z-index:100;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:18px 16px}
  body.menu-open .sidebar{transform:translateX(0)}
  .main{margin-left:0!important}
  .hamburger{display:flex}
  .topbar{height:auto;min-height:64px;padding:10px 14px;gap:10px;position:sticky;top:0}
  .topbar form{flex:1;min-width:0}
  .topbar input{max-width:none;padding:12px 14px}
  .datepill{display:none}
  .user{grid-template-columns:34px auto;min-width:0}
  .user b,.user small{max-width:125px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .content{padding:16px!important}
  .brand.brand-logo img{max-width:230px}
  .sidebar nav{max-height:none!important;overflow:visible!important}
  .status{margin-top:18px}
}
@media(max-width:900px){
  html,body{font-size:14px}
  .steps{grid-template-columns:1fr!important;gap:10px}
  .step{padding:16px 18px;grid-template-columns:42px 1fr}
  .step span{width:42px;height:42px}
  .label-grid,.product-grid,.integrated-grid,.report-grid,.report-summary,.two-col,.kpi-grid,.form-grid,.form-grid.three,.defect-table,.route-grid,.qr-layout,.module-grid,.matrix,.signature-grid{grid-template-columns:1fr!important}
  .product-grid .fields,.product-grid .json,.wide-card,.form-grid .span2,.span2{grid-column:auto!important}
  .page-head{display:block!important;padding:16px;margin:12px 0}
  .page-head h1{font-size:24px}
  .page-head .btn,.page-head .actions{width:100%;margin-top:12px}
  .actions{display:grid;grid-template-columns:1fr;gap:8px}
  .btn{width:100%;padding:12px 14px}
  .card{padding:16px;border-radius:18px}
  .card h2{font-size:18px}
  .canvas-wrap{min-height:280px;padding:10px}
  .counter-grid{grid-template-columns:repeat(2,1fr)!important}
  .delivery-row{grid-template-columns:1fr repeat(4,42px)!important;padding:14px;overflow:hidden}
  .delivery-row b{font-size:14px}
  .delivery-row small{font-size:12px}
  .deliveries-head{grid-template-columns:1fr!important}
  .requirements .row{grid-template-columns:1fr 72px 72px!important;font-size:13px}
  .test-line{grid-template-columns:1fr!important}
  .table{display:block;overflow-x:auto;white-space:nowrap}
  .gallery{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .topbar{align-items:center}
  .topbar form input{font-size:13px}
  .user b,.user small{display:none}
  .user{grid-template-columns:34px}
  .content{padding:12px!important}
  .page-head h1{font-size:22px}
  .hint-box{font-size:12px}
  .dropzone{min-height:180px}
  .score-ring{width:120px;height:120px}
  .score-ring b{font-size:28px}
  .counter-grid{grid-template-columns:1fr!important}
  .report-summary div{border-right:0;border-bottom:1px solid var(--line);padding-bottom:12px}
  .kv{grid-template-columns:1fr!important}
  .kv b{margin-bottom:8px}
  .delivery-row{grid-template-columns:1fr repeat(3,38px)!important;gap:4px}
  .delivery-row .iconbtn{width:36px;height:36px;font-size:18px}
  .brand.brand-logo img{max-width:210px}
  .login-wrap{padding:14px}
  .login-box{border-radius:20px;padding:18px}
  .brand.brand-logo-login img{max-width:260px}
}
@media(hover:none){.btn,.iconbtn,.sidebar nav a{min-height:44px}}


/* v21 ultra mobile/tablet polish */
:root{--touch:48px}
.mobile-bottom-nav{display:none}
.mobile-op-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.mobile-op-card .op-product{border:1px solid var(--line);border-radius:16px;padding:16px;background:#fbfdff;margin:10px 0 16px}
.mobile-op-card .op-product b{display:block;font-size:22px}
.mobile-op-card .op-product small{color:#64748b}
.op-progress{display:grid;gap:10px}
.op-progress a{display:flex;align-items:center;gap:10px;border:1px solid #e2e8f0;border-radius:16px;padding:14px;background:#fff;font-weight:900}
.op-progress a span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f1f5f9}
.op-progress a.done{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.op-progress a.done span{background:#16a34a;color:#fff}
.op-kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.op-kpis div{border:1px solid var(--line);border-radius:16px;padding:14px;background:#fff}
.op-kpis small{display:block;color:#64748b}
.op-kpis b{font-size:20px}
.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.quick-grid a{border:1px solid #dbeafe;background:#f8fbff;border-radius:16px;padding:16px;font-weight:900;color:#0f172a}
.quick-grid a:hover{border-color:#86efac;background:#f0fdf4;color:#166534}
.span2{grid-column:1/-1}
@media(max-width:1180px){
  .mobile-bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:12px;right:12px;bottom:12px;z-index:70;background:rgba(255,255,255,.96);border:1px solid #e2e8f0;border-radius:22px;box-shadow:0 22px 70px rgba(15,23,42,.18);overflow:hidden;backdrop-filter:blur(10px)}
  .mobile-bottom-nav a{display:flex;min-height:58px;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-weight:900;color:#0f172a;font-size:18px}
  .mobile-bottom-nav a span{font-size:11px;color:#64748b}
  .mobile-bottom-nav a:active{background:#f0fdf4;color:#166534}
  .content{padding-bottom:96px!important}
  input,select,textarea,button,.btn{font-size:16px}
  input,select{min-height:var(--touch)}
  textarea{min-height:120px}
  .topbar{box-shadow:0 10px 25px rgba(15,23,42,.05)}
  .sidebar nav a{min-height:var(--touch);display:flex;align-items:center}
  .dropzone{cursor:pointer}
}
@media(min-width:760px) and (max-width:1180px){
  .label-grid{grid-template-columns:1fr 1.25fr!important}
  .label-grid aside{grid-column:1/-1}
  .product-grid{grid-template-columns:280px 1fr!important}
  .product-grid .result{grid-column:1}
  .product-grid .fields,.product-grid .json{grid-column:1/-1!important}
  .integrated-grid{grid-template-columns:1fr 1fr!important}
  .integrated-grid .wide-card{grid-column:1/-1!important}
  .report-grid{grid-template-columns:1fr 1fr!important}
  .report-summary{grid-template-columns:repeat(3,1fr)!important}
  .delivery-row{grid-template-columns:1fr repeat(5,44px)!important}
}
@media(max-width:760px){
  .mobile-op-grid{grid-template-columns:1fr}
  .quick-grid{grid-template-columns:1fr}
  .op-kpis{grid-template-columns:1fr 1fr}
  .span2{grid-column:auto}
  .mobile-bottom-nav{left:8px;right:8px;bottom:8px;border-radius:18px}
  .mobile-bottom-nav a{min-height:54px;font-size:16px}
  .mobile-bottom-nav a span{font-size:10px}
  .topbar input::placeholder{color:transparent}
  .card,.page-head{box-shadow:0 10px 28px rgba(15,23,42,.04)}
  .requirements .row{gap:6px;padding:10px}
  .requirements .row span{font-size:12px}
  .segmented{display:grid;grid-template-columns:1fr}
  .segmented button{width:100%;min-height:44px}
  .canvas-wrap{border-radius:16px;max-height:60vh}
  .json pre,pre{max-height:220px;font-size:12px}
}
@media(max-width:390px){
  .hamburger{width:40px;height:40px}
  .topbar{padding:8px}
  .mobile-bottom-nav a span{display:none}
  .mobile-bottom-nav a{min-height:50px}
  .page-head h1{font-size:20px}
  .card{padding:14px}
}


/* v22 full mobile compatibility for all pages */
*{-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{overflow-x:hidden}
img,video,canvas,svg{max-width:100%;height:auto}
table{max-width:100%}
input,select,textarea,button{max-width:100%}
.card,.page-head,.soft-section,.delivery-row,.kpi,.module-card{min-width:0}
.main,.content{min-width:0}
.actions{align-items:center}
.card > table,.soft-section > table,.report-grid table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-collapse:collapse}
pre,.codebox,.logbox,.json pre{white-space:pre-wrap;word-break:break-word}
.topbar,.topbar form,.topbar input,.user{min-width:0}
@media(max-width:1180px){
  body{padding-bottom:86px}
  .content{padding:14px!important;padding-bottom:105px!important}
  .topbar{z-index:75}
  .hamburger{display:flex!important}
  .sidebar{box-shadow:22px 0 70px rgba(15,23,42,.18)}
  .sidebar .brand{margin-bottom:4px}
  .sidebar nav a{border-radius:14px}
  .mobile-bottom-nav{display:grid!important}
  .page-actions,.actions{display:grid;grid-template-columns:1fr;gap:10px;width:100%}
  .page-head .actions,.page-head .btn{width:100%}
  .btn,.iconbtn,button{touch-action:manipulation}
  .form-grid,.form-grid.three,.label-grid,.product-grid,.integrated-grid,.report-grid,.two-col,.qr-layout,.wizard-split,.module-grid,.matrix,.signature-grid{gap:14px!important}
  .dropzone{min-height:210px}
  .preview-img{width:100%;object-fit:contain}
}
@media(min-width:768px) and (max-width:1180px){
  .content{padding:18px!important;padding-bottom:106px!important}
  .page-head{display:flex!important;align-items:center!important}
  .page-head h1{font-size:28px}
  .kpi-grid{grid-template-columns:repeat(3,1fr)!important}
  .module-grid{grid-template-columns:repeat(2,1fr)!important}
  .label-grid{display:grid!important;grid-template-columns:1fr 1.2fr!important}
  .label-grid > aside{grid-column:1/-1}
  .integrated-grid{grid-template-columns:1fr 1fr!important}
  .integrated-grid .wide-card{grid-column:1/-1!important}
  .product-grid{grid-template-columns:300px 1fr!important}
  .product-grid .result{grid-column:1}
  .product-grid .fields,.product-grid .json{grid-column:1/-1!important}
  .report-grid{grid-template-columns:1fr 1fr!important}
  .report-summary{grid-template-columns:repeat(3,1fr)!important}
  .counter-grid{grid-template-columns:repeat(4,1fr)!important}
  .defect-table{grid-template-columns:repeat(2,1fr)!important}
  .quick-grid{grid-template-columns:repeat(3,1fr)!important}
  .delivery-row{grid-template-columns:1fr repeat(5,44px)!important}
  .deliveries-head{grid-template-columns:1fr 1fr!important}
  .canvas-wrap{min-height:360px}
}
@media(max-width:767px){
  html,body{font-size:14px}
  .topbar{padding:8px 10px!important;gap:8px!important}
  .topbar input{height:42px;padding:10px 12px}
  .hamburger{width:42px!important;height:42px!important;border-radius:12px!important}
  .user span{width:32px!important;height:32px!important}
  .content{padding:10px!important;padding-bottom:102px!important}
  .page-head{padding:14px!important;border-radius:18px!important;margin:10px 0!important}
  .page-head h1{font-size:21px!important;line-height:1.18}
  .page-head p{font-size:13px;line-height:1.35}
  .card{padding:14px!important;border-radius:18px!important}
  .card h2{font-size:18px!important;line-height:1.2}
  .card h3{font-size:15px!important}
  .steps{grid-template-columns:1fr!important;gap:8px!important}
  .step{padding:12px 14px!important;grid-template-columns:38px 1fr!important;border-radius:16px!important}
  .step span{width:38px!important;height:38px!important}
  .step b{font-size:14px}
  .step small{font-size:11px}
  .label-grid,.product-grid,.integrated-grid,.report-grid,.report-summary,.two-col,.kpi-grid,.form-grid,.form-grid.three,.defect-table,.route-grid,.qr-layout,.module-grid,.matrix,.signature-grid,.mobile-op-grid,.quick-grid{grid-template-columns:1fr!important}
  .product-grid .fields,.product-grid .json,.wide-card,.span2{grid-column:auto!important}
  label{font-size:13px}
  input,select,textarea{font-size:16px!important;border-radius:12px!important;padding:12px!important}
  textarea{min-height:96px}
  .btn{min-height:46px;border-radius:12px!important;font-size:14px!important}
  .dropzone{min-height:170px!important;padding:16px!important}
  .dropzone span{font-size:32px!important}
  .score-ring{width:112px!important;height:112px!important;margin:12px auto!important}
  .score-ring b{font-size:26px!important}
  .canvas-wrap{min-height:260px!important;max-height:54vh!important;padding:8px!important}
  .canvas-wrap canvas{max-height:50vh;object-fit:contain}
  .counter-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .counter-grid div{padding:12px!important}
  .counter-grid b{font-size:22px!important}
  .requirements .row{grid-template-columns:1fr 58px 58px!important;padding:9px!important;gap:6px!important}
  .requirements .row span{font-size:12px!important;line-height:1.25}
  .requirements .row.head b{font-size:11px}
  .requirements input[type=checkbox]{width:20px!important;height:20px!important}
  .test-line{grid-template-columns:1fr!important;gap:8px!important;padding:10px!important}
  .test-line select{width:100%}
  .delivery-row{display:grid!important;grid-template-columns:1fr repeat(3,38px)!important;gap:6px!important;padding:12px!important}
  .delivery-row .iconbtn:nth-last-child(n+5){display:none}
  .delivery-row b{font-size:13px}
  .delivery-row small{font-size:11px;line-height:1.25}
  .deliveries-head{grid-template-columns:1fr!important;gap:8px!important}
  .iconbtn{width:38px!important;height:38px!important;font-size:18px!important}
  .kv{grid-template-columns:1fr!important;gap:4px!important}
  .kv span{font-size:12px}
  .kv b{font-size:14px;margin-bottom:7px}
  .report-summary div{border-right:0!important;border-bottom:1px solid var(--line);padding:10px 0!important}
  .report-summary b{font-size:19px!important}
  .gallery{grid-template-columns:1fr!important;gap:10px!important}
  .gallery img{height:auto!important;max-height:260px;object-fit:contain!important;background:#f8fafc}
  .photo-wall{columns:1!important}
  .op-kpis{grid-template-columns:1fr 1fr!important}
  .op-kpis b{font-size:16px!important}
  .op-progress a{padding:12px!important}
  .mobile-bottom-nav{left:6px!important;right:6px!important;bottom:6px!important;border-radius:18px!important}
  .mobile-bottom-nav a{min-height:54px!important;font-size:16px!important}
  .mobile-bottom-nav a span{font-size:10px!important}
  .agri-modal-card{width:calc(100vw - 24px)!important;padding:20px!important;border-radius:20px!important}
  .agri-modal-card h3{font-size:20px!important}
}
@media(max-width:420px){
  .topbar form{max-width:calc(100vw - 92px)}
  .topbar input{font-size:13px!important}
  .topbar input::placeholder{color:transparent}
  .user{display:none!important}
  .page-head h1{font-size:20px!important}
  .counter-grid,.op-kpis{grid-template-columns:1fr!important}
  .mobile-bottom-nav a span{display:none}
  .mobile-bottom-nav a{min-height:50px!important}
  .brand.brand-logo img{max-width:205px!important}
  .login-box{padding:16px!important}
}
@media print{
  body{padding-bottom:0!important}
  .mobile-bottom-nav,.hamburger,.sidebar-backdrop{display:none!important}
  .content{padding:0!important}
}
.mobile-bottom-nav a.active{background:#f0fdf4;color:#166534}.mobile-bottom-nav a.active span{color:#166534;font-weight:900}

/* =========================================================
   v30 ULTRA RESPONSIVE UI FIX
   Amaç: wizard.php ve tüm sistem sayfalarında taşma/kayma olmadan
   masaüstü, tablet ve telefonda kusursuz akış.
   ========================================================= */
:root{
  --page-max: 1760px;
  --radius-xl: 22px;
  --radius-md: 14px;
  --gap: clamp(10px, 1.2vw, 18px);
  --pad: clamp(12px, 1.5vw, 24px);
  --topbar-h: 70px;
}
html{width:100%;max-width:100%;overflow-x:hidden;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{width:100%;max-width:100%;overflow-x:hidden;line-height:1.45;background:#f4f6f8;color:#111827}
*,*::before,*::after{box-sizing:border-box;min-width:0}
img,picture,svg,video,canvas,iframe{max-width:100%;height:auto}
a,button,input,select,textarea{font-family:inherit}
button,.btn,a.step,.sidebar nav a{user-select:none;-webkit-user-select:none}

/* Sayfa iskeleti */
.main{min-width:0;max-width:100vw;overflow-x:clip}
.content{width:100%;max-width:var(--page-max);margin:0 auto;padding:clamp(14px,2vw,34px)!important;min-width:0}
.card,.page-head,.soft-section,.kpi,.delivery-row,.step,.report-summary,.spec-panel,.aldi-reference-card{max-width:100%;min-width:0;overflow:hidden;border-color:#e5eaf1}
.card,.page-head,.soft-section{box-shadow:0 14px 34px rgba(15,23,42,.045)}
.card{padding:var(--pad)!important;border-radius:var(--radius-xl)!important}
.page-head{background:linear-gradient(90deg,#fff 0%,#fff 62%,#f1fff5 100%);border:1px solid #e5eaf1;border-radius:var(--radius-xl);padding:clamp(14px,1.7vw,24px)!important;margin:clamp(12px,1.4vw,22px) 0!important;display:flex;align-items:center;justify-content:space-between;gap:14px;overflow:visible}
.page-head h1{font-size:clamp(22px,2.1vw,34px)!important;line-height:1.12;margin:0;letter-spacing:-.03em;word-break:break-word}
.page-head p{max-width:980px;color:#667085;line-height:1.45;margin:.45rem 0 0!important}
.page-head .btn{flex:0 0 auto;white-space:normal;text-align:center}

/* Üst bar */
.topbar{height:auto;min-height:var(--topbar-h);padding:10px clamp(12px,2vw,34px)!important;gap:12px!important;max-width:100vw;overflow:hidden;background:rgba(255,255,255,.96);backdrop-filter:saturate(140%) blur(8px)}
.topbar form{flex:1 1 auto;min-width:90px;max-width:720px}
.topbar input{max-width:100%!important;width:100%;height:46px;border-radius:14px!important}
.datepill{white-space:nowrap;flex:0 0 auto}
.user{flex:0 0 auto;max-width:220px;overflow:hidden}
.user b,.user small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Menü */
.sidebar{overflow-y:auto;overflow-x:hidden;max-width:100vw}
.sidebar nav a{white-space:normal;line-height:1.25;word-break:break-word}
.brand.brand-logo img{max-width:min(230px,100%)}
.status{word-break:break-word}

/* Genel gridler: taşmayı engelle */
.steps,
.label-grid,
.product-grid,
.integrated-grid,
.report-grid,
.report-summary,
.form-grid,
.form-grid.three,
.two-col,
.kpi-grid,
.module-grid,
.route-grid,
.qr-layout,
.signature-grid,
.mobile-op-grid,
.quick-grid,
.defect-table,
.defect-table-pro,
.spec-page-grid,
.reference-photo-grid,
.reference-status-grid,
.reference-top-row,
.detail-test-list,
.recommendation-buttons{width:100%;max-width:100%;min-width:0;gap:var(--gap)!important}

.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.integrated-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.label-grid{grid-template-columns:minmax(260px,1.05fr) minmax(320px,1.35fr) minmax(240px,.85fr)!important}
.product-grid{grid-template-columns:minmax(245px,290px) minmax(360px,1fr) minmax(260px,300px)!important}
.product-grid .fields{grid-column:1/3}.product-grid .json{grid-column:3}
.report-grid{grid-template-columns:1fr 1fr!important}
.report-summary{grid-template-columns:repeat(5,minmax(0,1fr))!important}

/* Wizard adımları */
.steps{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;margin:0 0 clamp(12px,1.6vw,22px);align-items:stretch}
.steps.wizard-seven-steps{grid-template-columns:repeat(7,minmax(132px,1fr))!important}
.step{padding:clamp(12px,1.45vw,22px)!important;display:grid!important;grid-template-columns:clamp(36px,3vw,48px) minmax(0,1fr)!important;gap:0 12px!important;align-items:center;border-radius:18px!important;background:#fff;min-height:88px}
.step span{width:clamp(36px,3vw,48px)!important;height:clamp(36px,3vw,48px)!important;grid-row:1/3;flex:0 0 auto}
.step b,.step small{min-width:0;overflow:hidden;text-overflow:ellipsis;display:block;line-height:1.25}.step b{font-size:clamp(13px,.95vw,15px)}.step small{font-size:12px}
.step.active{box-shadow:inset 0 0 0 1px #bbf7d0;background:#f5fff7}

/* Form kontrolleri */
label{min-width:0;line-height:1.25;word-break:break-word}
input,select,textarea{max-width:100%!important;min-width:0;border-radius:12px!important;border-color:#dce3ec!important;outline:none;transition:border-color .15s,box-shadow .15s;background:#fff}
input:focus,select:focus,textarea:focus{border-color:#0b8f35!important;box-shadow:0 0 0 4px rgba(7,139,49,.10)}
textarea{max-height:45vh;line-height:1.4}
input[type=file]{padding:10px;background:#fff;white-space:normal;height:auto;line-height:1.3}
input[type=checkbox],input[type=radio]{width:20px!important;height:20px!important;min-width:20px!important;flex:0 0 20px;accent-color:#078b31;padding:0!important}
.btn{min-height:44px;white-space:normal;text-align:center;line-height:1.25;border-radius:12px!important;max-width:100%}
.actions,.page-actions,.spec-next-actions,.detail-next-actions,.defect-next-actions,.quality-next-actions,.reference-bottom-action{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;max-width:100%;min-width:0}
.spec-next-actions .btn,.detail-next-actions .btn,.defect-next-actions .btn,.quality-next-actions .btn{white-space:normal}

/* Tablolar */
.table,.responsive-table,.card>table,.soft-section>table{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
.table table,.responsive-table table,.card>table,.soft-section>table{width:100%;border-collapse:collapse;min-width:620px}
th,td{word-break:break-word;vertical-align:top}
.table th,.table td{padding:10px 12px}

/* Referans ALDI alanları */
.reference-top-row{grid-template-columns:minmax(0,1fr) minmax(180px,260px)!important;align-items:end}
.reference-photo-grid,.reference-status-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.reference-req-table{max-width:100%;overflow:hidden;border-radius:14px!important}
.reference-req-table .row{grid-template-columns:minmax(0,1fr) minmax(84px,130px) minmax(84px,130px)!important;min-height:42px}
.reference-req-table .row span{min-width:0;white-space:normal;word-break:break-word;line-height:1.32}.reference-req-table .row b{white-space:normal;line-height:1.2;padding:6px 4px}
.reference-req-table label{min-height:42px}.aldi-comment{max-width:100%}.aldi-comment textarea{width:100%}
.reference-note{max-width:100%;overflow:hidden}.reference-note label{display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;line-height:1.35}

/* Spec ekranı */
.spec-tabs{display:flex;flex-wrap:wrap;gap:0;max-width:100%;overflow:hidden;border-bottom:1px solid #e5eaf1}
.spec-tabs a{flex:1 1 190px;min-width:0;text-align:center;white-space:normal;line-height:1.25;padding:14px 12px!important}
.spec-page-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr)!important}
.spec-status-buttons,.quality-status-buttons,.detail-status-buttons{max-width:100%;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:hidden;border-radius:14px!important}
.spec-status-buttons label,.quality-status-buttons label,.detail-status-buttons label{min-width:0;white-space:normal;text-align:center;display:flex!important;flex-direction:row!important;align-items:center;justify-content:center;gap:8px;line-height:1.2;padding:12px!important}
.spec-upload-inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;max-width:100%}.spec-upload-inline input{flex:1 1 220px}

/* Detay kalite */
.detail-ref-tabs{display:flex;flex-wrap:wrap;gap:10px;border-bottom:1px solid #e5eaf1;padding-bottom:10px;overflow:hidden}.detail-ref-tabs a{white-space:normal;line-height:1.25}
.detail-test-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important}.detail-test-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;max-width:100%;overflow:hidden}.detail-test-panel{max-width:100%;overflow:hidden}.detail-open-btn{white-space:nowrap}
.detail-status-badge,.badge{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* Mängel ekranı */
.defects-ref-card,.quality-ref-card,.recommendation-ref-card{overflow:hidden;max-width:100%}
.defect-table-pro{display:grid!important;grid-template-columns:1fr!important;gap:10px}.defect-ratio-line,.defect-eval,.defect-inline{max-width:100%;min-width:0;display:flex;flex-wrap:wrap;gap:8px;align-items:center}.defect-calc-input{max-width:110px!important}.defect-block{max-width:100%;overflow:hidden}
.counter-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.counter-grid div{min-width:0;overflow:hidden}.counter-grid span{word-break:break-word}

/* Rapor */
.report-summary{overflow:hidden;border-radius:18px}.report-summary div{min-width:0}.report-summary b{font-size:clamp(18px,1.6vw,26px);word-break:break-word}.report-summary span{word-break:break-word}
.kv{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.kv span,.kv b{min-width:0;word-break:break-word}
.gallery,.photo-wall{max-width:100%;overflow:hidden}.gallery img,.photo-wall img{max-width:100%;object-fit:cover}
pre,.json pre,.logbox,.codebox{max-width:100%;white-space:pre-wrap!important;word-break:break-word!important;overflow:auto;border-radius:14px}

/* Teslimatlar */
.deliveries-head{grid-template-columns:minmax(140px,170px) minmax(180px,1fr) minmax(100px,120px) minmax(120px,140px) minmax(140px,170px)!important;max-width:100%}
.delivery-list{max-width:100%;overflow:hidden}.delivery-row{grid-template-columns:minmax(0,1fr) repeat(5,46px)!important;gap:8px!important;align-items:center}.delivery-row b,.delivery-row small{min-width:0;word-break:break-word}.iconbtn{flex:0 0 auto}

/* Görsel analiz */
.canvas-wrap{max-width:100%;min-height:clamp(270px,32vw,440px);overflow:auto!important}.canvas-wrap canvas{max-width:100%;height:auto!important;object-fit:contain}.dropzone{min-width:0;overflow:hidden}.preview-img{max-width:100%;object-fit:contain}
.score-ring{flex:0 0 auto}.checklist p{grid-template-columns:minmax(0,1fr) auto!important}.checklist p span,.checklist p b{word-break:break-word}

/* Desktop orta ekran */
@media (max-width: 1500px){
  .steps.wizard-seven-steps{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .label-grid{grid-template-columns:1fr 1.25fr!important}.label-grid>aside{grid-column:1/-1}
  .product-grid{grid-template-columns:minmax(240px,300px) minmax(0,1fr)!important}.product-grid .result{grid-column:1}.product-grid .fields,.product-grid .json{grid-column:1/-1!important}
  .report-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

/* Tablet */
@media (max-width: 1180px){
  :root{--topbar-h:62px}
  body{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))!important}
  .main{margin-left:0!important;width:100%!important;max-width:100vw!important}
  .content{padding:16px!important;padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important}
  .topbar{position:sticky;top:0;z-index:75;min-height:62px;overflow:visible!important}.datepill{display:none!important}
  .sidebar{width:min(88vw,340px)!important;transform:translateX(-105%);z-index:100!important;border-right:0;box-shadow:25px 0 80px rgba(15,23,42,.22)}
  body.menu-open .sidebar{transform:translateX(0)}body.menu-open .sidebar-backdrop{display:block!important}
  .hamburger{display:flex!important;flex:0 0 44px!important}.mobile-bottom-nav{display:grid!important;padding-bottom:env(safe-area-inset-bottom,0px)}
  .page-head{display:grid!important;grid-template-columns:1fr;align-items:start}.page-head .btn{width:100%}
  .steps.wizard-seven-steps,.steps{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .label-grid,.product-grid,.integrated-grid,.report-grid,.two-col,.spec-page-grid{grid-template-columns:1fr!important}
  .product-grid .fields,.product-grid .json,.wide-card,.span2,.label-grid>aside{grid-column:auto!important}
  .form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .reference-photo-grid,.reference-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .report-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .counter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .deliveries-head{grid-template-columns:1fr 1fr!important}.delivery-row{grid-template-columns:minmax(0,1fr) repeat(5,42px)!important}
  .actions,.spec-next-actions,.detail-next-actions,.defect-next-actions,.quality-next-actions,.reference-bottom-action{display:grid!important;grid-template-columns:1fr!important}.actions .btn,.spec-next-actions .btn,.detail-next-actions .btn,.defect-next-actions .btn,.quality-next-actions .btn,.reference-bottom-action .btn{width:100%}
}

/* Telefon */
@media (max-width: 767px){
  html,body{font-size:14px!important}
  .content{padding:10px!important;padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))!important}
  .topbar{padding:8px 10px!important;gap:8px!important;min-height:58px}.topbar form{max-width:none}.topbar input{height:42px!important;padding:10px 12px!important;font-size:15px!important}.user b,.user small{display:none!important}.user{max-width:36px;grid-template-columns:32px!important}.user span{width:32px!important;height:32px!important}.hamburger{width:42px!important;height:42px!important;flex-basis:42px!important}
  .page-head{padding:14px!important;margin:10px 0!important;border-radius:18px!important}.page-head h1{font-size:21px!important}.page-head p{font-size:13px!important}
  .card{padding:14px!important;border-radius:18px!important}.card h2{font-size:18px!important}.card h3{font-size:15px!important}
  .steps.wizard-seven-steps,.steps{grid-template-columns:1fr!important;gap:8px!important}.step{min-height:70px!important;padding:12px!important;grid-template-columns:38px minmax(0,1fr)!important}.step span{width:38px!important;height:38px!important}.step small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  .form-grid,.form-grid.three,.reference-top-row,.reference-photo-grid,.reference-status-grid,.report-summary,.counter-grid,.op-kpis,.quick-grid,.mobile-op-grid,.kpi-grid,.module-grid,.route-grid,.signature-grid{grid-template-columns:1fr!important}
  label{font-size:13px!important}input,select,textarea{font-size:16px!important;min-height:44px!important;padding:11px 12px!important}textarea{min-height:96px!important;max-height:42vh}.btn{width:100%;min-height:46px!important;padding:12px!important;font-size:14px!important}.iconbtn{width:40px!important;height:40px!important;font-size:18px!important}
  .spec-tabs{display:grid!important;grid-template-columns:1fr!important}.spec-tabs a{text-align:left!important;border:1px solid #edf1f6;border-bottom:0}.spec-tabs a:last-child{border-bottom:1px solid #edf1f6}.spec-status-buttons,.quality-status-buttons,.detail-status-buttons{grid-template-columns:1fr!important}.spec-status-buttons label,.quality-status-buttons label,.detail-status-buttons label{justify-content:flex-start!important;text-align:left!important;border-bottom:1px solid #e5eaf1!important}
  .reference-req-table{overflow:visible!important}.reference-req-table .row{grid-template-columns:minmax(0,1fr) 58px 58px!important}.reference-req-table .row span{padding:8px!important;font-size:12px!important}.reference-req-table .row b{font-size:10px!important;padding:4px 2px!important}.reference-req-table input[type=checkbox]{width:18px!important;height:18px!important;min-width:18px!important}
  .kv{grid-template-columns:1fr!important}.kv b{margin-bottom:8px}.report-summary div{border-right:0!important;border-bottom:1px solid #e5eaf1!important}.report-summary div:last-child{border-bottom:0!important}
  .delivery-row{grid-template-columns:minmax(0,1fr) repeat(3,38px)!important;padding:12px!important}.delivery-row .iconbtn:nth-of-type(1),.delivery-row .iconbtn:nth-of-type(2){display:none!important}.delivery-row b{font-size:13px}.delivery-row small{font-size:11px}.deliveries-head{grid-template-columns:1fr!important}
  .dropzone{min-height:165px!important;padding:14px!important}.canvas-wrap{min-height:250px!important;max-height:56vh}.canvas-wrap canvas{max-height:52vh}.score-ring{width:112px!important;height:112px!important}.score-ring b{font-size:26px!important}
  .detail-test-item{grid-template-columns:1fr!important}.detail-open-btn{width:100%;white-space:normal}.recommendation-buttons{grid-template-columns:1fr!important}
  .mobile-bottom-nav{left:6px!important;right:6px!important;bottom:6px!important;border-radius:18px!important;overflow:hidden}.mobile-bottom-nav a{min-height:52px!important}.mobile-bottom-nav a span{font-size:10px!important}
  .table table,.responsive-table table,.card>table,.soft-section>table{min-width:560px}
}
@media (max-width: 420px){
  .topbar input::placeholder{color:transparent}.user{display:none!important}.topbar form{max-width:calc(100vw - 62px)}
  .page-head h1{font-size:20px!important}.brand.brand-logo img{max-width:205px!important}.mobile-bottom-nav a span{display:none!important}.mobile-bottom-nav a{min-height:50px!important}
  .reference-req-table .row{grid-template-columns:minmax(0,1fr) 50px 50px!important}.reference-req-table .row b{font-size:9px!important}.reference-req-table .row span{font-size:11px!important}
}
@media (min-width: 1181px){
  .hamburger,.sidebar-backdrop,.mobile-bottom-nav{display:none!important}
  .main{margin-left:250px!important;width:calc(100% - 250px)}
}
@media print{
  body{background:#fff!important;padding-bottom:0!important;overflow:visible!important}.sidebar,.topbar,.mobile-bottom-nav,.sidebar-backdrop,.hamburger,.btn:not(.print-keep){display:none!important}.main{margin:0!important;width:100%!important}.content{max-width:none!important;padding:0!important}.card,.page-head{box-shadow:none!important;break-inside:avoid}.steps{display:none!important}
}

/* Product page width adjustment: wider Analyseeinstellungen panel, slightly smaller image analysis area */
@media (min-width: 1101px){
  .product-grid{
    grid-template-columns:390px minmax(360px,.92fr) 300px !important;
    gap:18px !important;
    align-items:start !important;
  }
  .product-grid .controls{
    padding:24px 28px !important;
  }
  .product-grid .analysis .canvas-wrap{
    min-height:360px !important;
    max-height:560px !important;
  }
  .product-grid .analysis #aiCanvas{
    max-height:520px !important;
    width:auto !important;
  }
  .product-defect-panel{
    padding:16px !important;
  }
  .product-defect-row{
    grid-template-columns:minmax(0,1fr) 124px !important;
    gap:12px !important;
    padding:10px 12px !important;
  }
  .product-defect-row span{
    font-size:14px !important;
    line-height:1.22 !important;
    overflow-wrap:anywhere !important;
  }
  .product-defect-row .mini-counter{
    grid-template-columns:34px 1fr 34px !important;
  }
  .product-defect-row button,
  .product-defect-row input{
    height:34px !important;
    min-height:34px !important;
  }
}
@media (min-width: 1101px) and (max-width: 1450px){
  .product-grid{
    grid-template-columns:360px minmax(340px,1fr) 270px !important;
  }
  .product-grid .controls{
    padding:22px !important;
  }
}

/* v40 Bericht per E-Mail / SMTP Einstellungen */
.settings-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:18px;align-items:start}.settings-form h3{grid-column:1/-1;margin:8px 0 0}.compact-form textarea{min-height:74px}.muted{color:#64748b}.success.fail{background:#fff1f2;border-color:#fecdd3;color:#991b1b}.report-mail-modal{position:fixed;inset:0;z-index:9999;background:rgba(15,23,42,.55);backdrop-filter:blur(8px);display:none;align-items:center;justify-content:center;padding:18px}.report-mail-modal.show{display:flex}.report-mail-card{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border:1px solid #e5eaf1;border-radius:24px;box-shadow:0 28px 80px rgba(15,23,42,.28);padding:24px;position:relative}.report-mail-card h2{margin:0 0 6px;font-size:24px}.report-mail-card p{color:#64748b;margin:0 0 16px}.report-mail-card form{display:grid;gap:12px}.report-mail-close{position:absolute;right:16px;top:14px;width:36px;height:36px;border:0;border-radius:12px;background:#f1f5f9;font-size:24px;line-height:1;cursor:pointer}.mail-recipient-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;min-height:34px}.mail-result{border:1px solid #e5eaf1;background:#f8fafc;border-radius:14px;text-align:left;padding:10px 12px;cursor:pointer}.mail-result:hover{border-color:#18b8e8;background:#eefafe}.mail-result b,.mail-result small{display:block}.mail-result small{color:#64748b;margin-top:2px}.mail-recipient-selected{display:flex;flex-wrap:wrap;gap:8px}.mail-chip{display:grid;grid-template-columns:auto auto 28px;align-items:center;gap:8px;padding:8px 8px 8px 12px;border-radius:999px;background:#ecfeff;border:1px solid #a5f3fc;color:#0f172a}.mail-chip small{color:#0369a1}.mail-chip button{width:24px;height:24px;border:0;border-radius:999px;background:#cffafe;cursor:pointer}.mail-two-cols{display:grid;grid-template-columns:1fr 240px;gap:12px;align-items:end}.mail-check{display:flex!important;align-items:center;gap:8px;border:1px solid #e5eaf1;border-radius:14px;padding:11px 12px;min-height:46px}.mail-check input{width:18px!important;height:18px!important;min-height:18px!important}.report-mail-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:4px}.report-mail-actions .btn{width:auto}.fail{color:#dc2626}
@media (max-width: 900px){.settings-grid{grid-template-columns:1fr}.mail-two-cols{grid-template-columns:1fr}.report-mail-actions .btn{width:100%}.report-mail-card{padding:18px;border-radius:20px}.report-mail-modal{align-items:flex-end;padding:10px}.mail-recipient-results{grid-template-columns:1fr}.mail-chip{grid-template-columns:1fr auto 28px;border-radius:16px;width:100%}}
@media print{.report-mail-modal{display:none!important}}
