/* QFish – "Okyanus" tasarım katmanı (app.css'in üstünde, yalnızca ekran).
   Sade yüzeyler, tek vurgu rengi (okyanus mavisi), ince çerçeveler, açık / koyu mod.
   Masaüstünde (≥1024 px) solda etiketli, gruplu yan menü; tablette üstte çubuk; telefonda alt menü. */
@media screen {

body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:14.5px;letter-spacing:-.003em}
h1,h2,h3,.card-title{font-family:var(--display);letter-spacing:-.015em}
h1{font-size:26px;font-weight:700}
h2{font-size:18px;font-weight:650}
h3{font-size:15.5px;font-weight:650}
::selection{background:var(--brand-100)}
.muted{color:var(--muted)}
a:focus-visible,button:focus-visible,.btn:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* ---------- yüzeyler ---------- */
.card,.kpi,.ship-card,.empty-state,.havuz-card,.stok-card,.dtable-wrap{border-radius:var(--radius)}
.card,.kpi,.ship-card,.havuz-card,.stok-card{background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.card{padding:18px}
.card-title{font-size:15px;font-weight:650;color:var(--text);margin-bottom:12px}
.card-title svg.i{color:var(--muted);width:17px;height:17px}
.empty-state{background:var(--surface);border:1px dashed var(--line-strong)}
.empty-state svg.i{color:var(--muted)}

/* ---------- özet kutuları ---------- */
.kpis{gap:12px}
.kpi{padding:14px 16px}
.kpi small{font-size:12.5px;font-weight:550;color:var(--muted);letter-spacing:0}
.kpi b{font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--text);margin-top:4px}
.kpi.live b{color:var(--brand)}
.kpi.done b{color:var(--ok)}
.kpi.warn b{color:var(--warn)}
.kpi .cur-note,.kpi small+small{font-weight:500}

/* ---------- düğmeler ---------- */
.btn{border-radius:9px;font-weight:600;font-size:14px;padding:9px 14px;border:1px solid transparent;transition:background .12s,border-color .12s,color .12s}
.btn.lg{padding:10px 16px;font-size:14px}
.btn.sm{padding:6px 10px;font-size:13px;border-radius:8px}
.btn.primary{background:var(--brand-fill);color:var(--on-fill);box-shadow:0 1px 2px rgba(15,23,42,.12)}
.btn.primary:hover{background:var(--brand-fill-hover)}
.btn.ghost{background:var(--surface);border-color:var(--line-strong);color:var(--text)}
.btn.ghost:hover{background:var(--surface-2);border-color:var(--line-strong)}
.btn.ghost svg.i{color:var(--muted)}
.btn.ok{background:var(--ok-fill);color:var(--on-fill)}
.btn.danger{background:var(--danger-fill);color:var(--on-fill)}
.btn.danger-ghost{background:var(--surface);border-color:var(--danger-line);color:var(--danger)}
.icon-act{border-radius:8px}

/* ---------- alanlar ---------- */
input,select,textarea{border-radius:9px;border-color:var(--line-strong);background:var(--surface);color:var(--text);padding:10px 12px;font-size:15px}
input:hover,select:hover,textarea:hover{border-color:var(--muted)}
input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--focus);outline:none}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.75}
input:disabled,select:disabled{background:var(--surface-2)}
.field label,.target-field{font-size:12.5px;font-weight:600;color:var(--muted);letter-spacing:0}

/* ---------- sekme / seçici ---------- */
.seg{background:var(--surface-3);border:0;border-radius:10px;padding:3px}
.seg button{border-radius:8px;font-weight:600;color:var(--muted);padding:7px 12px}
.seg button:hover{color:var(--text)}
.seg button.active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(15,23,42,.1),0 0 0 1px var(--line)}

/* ---------- rozetler, ilerleme ---------- */
.badge{border-radius:6px;font-weight:600;font-size:12px;padding:3px 8px}
.badge.danger{background:var(--danger-50);color:var(--danger)}
.progress{background:var(--track);border-radius:99px}
.progress div{background:var(--brand);border-radius:99px}
.progress.full div{background:var(--ok)}
.notice{border-radius:10px}
.notice.warn{color:var(--warn)}

/* ---------- tablolar ---------- */
.dtable-wrap{background:var(--surface);border:1px solid var(--line)}
.dtable th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:12.5px;letter-spacing:0;text-transform:none;border-bottom:1px solid var(--line)}
.dtable td{border-color:var(--line)}
.dtable tbody tr:hover td{background:var(--surface-2)}

/* ---------- pencereler, bildirimler ---------- */
.modal,dialog.sheet::backdrop,dialog::backdrop{background:rgba(2,12,20,.42)}
.modal-box,dialog.sheet{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-lg)}
.toast{background:var(--toast);color:#fff;border-radius:10px;font-weight:550}
.toast.ok{background:var(--ok-fill)}
.toast.err{background:var(--danger-fill)}

/* ---------- sevkiyat kartları ---------- */
.ship-card{transition:border-color .12s,box-shadow .12s}
.ship-card:hover{transform:none;border-color:var(--brand-line);box-shadow:0 6px 18px -10px rgba(15,23,42,.25)}
.stat-main b,.result b{color:var(--ok-600)}
.bucket-no{background:var(--surface-3);color:var(--muted);border-radius:8px}
.bucket:hover{background:var(--surface-2)}
.tank-tabs button{border-radius:10px;background:var(--surface);border-color:var(--line)}
.tank-tabs button.active{border-color:var(--brand);box-shadow:0 0 0 3px var(--focus)}
.truck-sum{background:var(--surface-2);border-color:var(--line);border-radius:10px}
.pool-chips button{border-radius:8px;background:var(--surface);border-color:var(--line-strong);color:var(--text)}
.totals .share-line{background:var(--ok-50)}
.sample-calc{border-color:var(--brand-line);background:var(--brand-50)}

/* ---------- grafikler ---------- */
.ch-bar,.ch-hbar{background:var(--chart-1)}
.chart-card .ch-sub{color:var(--muted)}

/* =================== üst çubuk (telefon, tablet) =================== */
.appbar{background:var(--surface);color:var(--text);border-bottom:1px solid var(--line);box-shadow:none}
.appbar-title small{color:var(--muted);opacity:1}
.brand img{border:0;border-radius:10px;box-shadow:0 0 0 1px var(--line)}
.appnav a{color:var(--muted);opacity:1;border-radius:8px;font-weight:600}
.appnav a:hover{background:var(--surface-2);color:var(--text)}
.appnav a.active{background:var(--brand-50);color:var(--brand-600)}
.appnav a.active svg.i{color:var(--brand)}
.nav-group{display:none}
.side-firm{display:none}
.icon-btn.on-brand{background:transparent;border:1px solid var(--line);color:var(--muted);border-radius:9px;width:36px;height:36px}
.icon-btn.on-brand:hover{background:var(--surface-2);color:var(--text)}
.icon-btn.on-brand svg.i{width:18px;height:18px}
.sync{background:var(--surface-2);color:var(--muted);border:1px solid var(--line);font-weight:600}
.sync.ok{background:var(--ok-50);color:var(--ok-600);border-color:var(--ok-line)}
.sync.ok::before{background:var(--ok)}
.sync.error{background:var(--danger-fill);color:#fff;border-color:transparent}

/* =================== masaüstü: etiketli yan menü =================== */
@media (min-width:1024px){
  body{padding-left:var(--side-w)}
  .appbar{position:fixed;left:0;top:0;bottom:0;width:var(--side-w);z-index:40;padding:0;border-bottom:0;border-right:1px solid var(--line)}
  .appbar-inner{flex-direction:column;align-items:stretch;height:100%;max-width:none!important;min-height:0;padding:14px 12px;gap:4px}
  .brand{order:-1;display:flex;align-items:center;gap:10px}
  .brand img{width:36px;height:36px}
  #backBtn{display:none!important}
  .appbar-title{display:none}
  .side-firm{display:flex;flex-direction:column;min-width:0}
  .side-firm b{font-size:14.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .side-firm small{font-size:12px;color:var(--muted)}
  .appnav{flex-direction:column;align-items:stretch;gap:1px;width:100%;margin-top:14px;flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:thin}
  .appnav a{flex-direction:row;gap:10px;padding:8px 10px;font-size:14px;font-weight:550;text-align:left;flex:none}
  .appnav a svg.i{width:18px;height:18px;color:var(--muted)}
  .appnav a.active{font-weight:650}
  .nav-group{display:block;font-size:11.5px;font-weight:600;color:var(--muted);padding:14px 10px 4px;letter-spacing:.02em}
  .nav-group.hidden{display:none}
  .side-foot{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-top:10px;border-top:1px solid var(--line)}
  .sync{flex:0 0 100%;margin:0 0 2px;font-size:11.5px;padding:5px 9px;width:max-content;max-width:100%}
  .side-foot .sync{flex:0 0 auto;margin-right:100%}
  .wrap{max-width:1280px;padding:28px 32px 48px}
  .offline{margin-left:auto;margin-right:auto}
  body.ship-mode .wrap{height:100dvh;max-width:1600px;padding-top:16px}
}
@media (min-width:761px) and (max-width:1023px){
  .side-foot{display:contents}
}

/* =================== telefon =================== */
@media (max-width:760px){
  .appbar{border-bottom:1px solid var(--line)}
  .side-foot{display:contents}
  .tabbar{background:var(--surface);border-top:1px solid var(--line);box-shadow:none}
  .tabbar a.active,.tabbar button.active{color:var(--brand)}
  .tabbar .tab-new{background:var(--brand-fill);color:var(--on-fill);border-radius:14px;box-shadow:none}
  .fab{background:var(--brand-fill);color:var(--on-fill);border-radius:16px;box-shadow:0 10px 24px -10px rgba(2,32,44,.6)}
  h1{font-size:22px}
  .kpi b{font-size:20px}
  .card{padding:15px}
}

/* =================== giriş / kilit ekranı =================== */
dialog.lock-screen{background:var(--bg);color:var(--text)}
dialog.lock-screen::backdrop{background:var(--bg)}
.lock-box{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-lg)}
.lock-brand{color:var(--text)}
.lock-logo{border-radius:16px;box-shadow:0 0 0 1px var(--line)}

/* =================== genel bakış paneli =================== */
.pn-head{align-items:flex-end;flex-wrap:wrap}
.pn-head h1{white-space:nowrap}
.pn-head h1{font-size:26px}
.pn-quick{gap:8px}
.pn-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.pn-kpi{display:flex;flex-direction:column;gap:6px;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow);transition:border-color .12s,box-shadow .12s}
.pn-kpi:hover{border-color:var(--brand-line);box-shadow:0 6px 18px -12px rgba(15,23,42,.3)}
.pn-kpi-top{display:flex;align-items:center;gap:8px;color:var(--muted)}
.pn-kpi-top svg.i{width:16px;height:16px;padding:6px;box-sizing:content-box;border-radius:8px;background:var(--brand-50);color:var(--brand)}
.pn-kpi-top small{font-size:13px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pn-kpi b{font-size:26px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1.15}
.pn-kpi-sub{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pn-kpi-sub .up{color:var(--ok);font-weight:650}.pn-kpi-sub .down{color:var(--danger);font-weight:650}
.pn-kpi.warn .pn-kpi-top svg.i{background:var(--warn-50);color:var(--warn)}.pn-kpi.warn b{color:var(--warn)}
.pn-kpi.danger .pn-kpi-top svg.i{background:var(--danger-50);color:var(--danger)}.pn-kpi.danger b{color:var(--danger)}
.pn-wait{font-size:15px;font-weight:500;color:var(--muted)}
.pn-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:16px;margin-bottom:16px}
.pn-card{margin:0}
.pn-card .card-title{margin-bottom:10px}
.pn-alerts{display:flex;flex-direction:column}
.pn-alert{display:flex;align-items:center;gap:10px;padding:10px 6px;border-bottom:1px solid var(--line);border-radius:6px}
.pn-alert:last-child{border-bottom:0}
.pn-alert:hover{background:var(--surface-2)}
.pn-alert svg.i{width:15px;height:15px;color:var(--muted);flex:none}
.pn-alert-text{flex:1;min-width:0;font-size:14px}
.pn-tag{flex:none;min-width:64px;text-align:center;font-size:11.5px;font-weight:650;border-radius:6px;padding:3px 7px;background:var(--brand-50);color:var(--brand-600)}
.pn-tag.warn{background:var(--warn-50);color:var(--warn)}
.pn-tag.danger{background:var(--danger-50);color:var(--danger)}
.pn-calm{display:flex;gap:12px;align-items:center;padding:18px 6px;color:var(--muted)}
.pn-calm svg.i{width:20px;height:20px;padding:8px;box-sizing:content-box;border-radius:50%;background:var(--ok-50);color:var(--ok)}
.pn-calm b{display:block;color:var(--text)}.pn-calm small{font-size:13px}
.pn-recent{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:24px}
.pn-row{display:flex;align-items:center;gap:12px;padding:9px 6px;border-bottom:1px solid var(--line);border-radius:6px;min-width:0}
.pn-row:hover{background:var(--surface-2)}
.pn-row-ic svg.i{width:16px;height:16px;padding:7px;box-sizing:content-box;border-radius:8px;background:var(--surface-3);color:var(--muted)}
.pn-row-main{flex:1;min-width:0}
.pn-row-main b{display:block;font-size:13.5px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pn-row-main small{font-size:12px;color:var(--muted)}
.pn-row-val{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.pn-empty{color:var(--muted);margin:6px}
@media (max-width:1100px){.pn-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.pn-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
  .pn-head .head-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .pn-quick .btn{justify-content:flex-start;padding:9px 10px;font-size:13px}
  .pn-quick .btn span{display:inline!important}
  .pn-kpis{gap:8px;margin-bottom:12px}
  .pn-kpi{padding:12px;gap:4px}
  .pn-kpi-top small{font-size:12px}
  .pn-kpi-top svg.i{width:14px;height:14px;padding:5px}
  .pn-kpi b{font-size:20px}
  .pn-kpi-sub{font-size:11.5px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .pn-grid{gap:12px;margin-bottom:12px}
  .pn-recent{grid-template-columns:minmax(0,1fr)}
}

/* =================== giriş / kayıt ekranı =================== */
dialog.lock-screen{padding:0;place-items:stretch;overflow:auto}
.auth-wrap{min-height:100dvh;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;padding:24px 16px}
.auth-side{display:none}
.lock-box{width:min(400px,100%);padding:30px 28px 24px;gap:12px}
.lock-logo{width:56px;height:56px;border-radius:14px}
.lock-brand{font-size:17px;font-weight:700;color:var(--text);letter-spacing:-.01em}
.lock-brand small{font-size:12.5px;font-weight:500;color:var(--muted);margin-top:2px}
.lock-box h2{font-size:21px;font-weight:700;margin-top:8px}
.lock-box .btn.lg{padding:12px 16px;font-size:15px;margin-top:4px}
.lock-error:empty{min-height:0}
@media (min-width:960px){
  .auth-wrap{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);padding:0;place-items:stretch}
  .auth-side{display:flex;flex-direction:column;justify-content:space-between;padding:44px 52px;color:#e6f6fa;
    background:radial-gradient(90% 70% at 0% 0%,#13859f 0%,transparent 60%),linear-gradient(160deg,#0b5c72 0%,#083f50 100%)}
  .auth-mark{display:flex;align-items:center;gap:12px}
  .auth-mark img{width:40px;height:40px;border-radius:10px;box-shadow:0 0 0 1px rgba(255,255,255,.25)}
  .auth-mark b{font-size:20px;font-weight:700;letter-spacing:-.01em;color:#fff}
  .auth-pitch{max-width:470px}
  .auth-pitch h2{font-size:36px;line-height:1.12;font-weight:700;letter-spacing:-.025em;color:#fff;margin-bottom:14px}
  .auth-pitch p{font-size:16px;line-height:1.55;color:#c4e7ef;margin-bottom:30px}
  .auth-feats{list-style:none;margin:0;padding:0;display:grid;gap:16px}
  .auth-feats li{display:flex;gap:14px;align-items:center}
  .auth-feats svg.i{width:20px;height:20px;padding:10px;box-sizing:content-box;border-radius:12px;background:rgba(255,255,255,.1);color:#a5e3f0;flex:none}
  .auth-feats b{display:block;color:#fff;font-size:15px;font-weight:600}
  .auth-feats small{color:#9fd0dc;font-size:13.5px}
  .auth-foot{color:#8cc3d0;font-size:13px}
  .auth-wrap>.lock-box{align-self:center;justify-self:center;border:0;box-shadow:none;background:transparent;padding:32px 28px}
  .auth-wrap>.lock-box .lock-logo,.auth-wrap>.lock-box .lock-brand{display:none}
  .auth-wrap>.lock-box h2{text-align:left;font-size:28px;margin-top:0}
  .auth-wrap>.lock-box .lock-sub{text-align:left;margin:-2px 0 10px}
  body.locked-relock .auth-wrap>.lock-box .lock-logo,body.locked-relock .auth-wrap>.lock-box .lock-brand{display:block}
}

/* dil seçici */
.lang-btn{font-size:12px;font-weight:700;letter-spacing:.02em}
.auth-lang{align-self:flex-end;margin:-10px -6px 4px 0;padding:2px}
.auth-lang button{padding:5px 10px;font-size:12.5px}
@media (min-width:960px){.auth-wrap>.lock-box .auth-lang{margin:0 0 8px}}

/* yükleme rehberi ve bandı */
.guide-head{display:flex;gap:14px;align-items:flex-start;margin-bottom:6px}
.guide-head img{width:48px;height:48px;border-radius:12px;flex:none;box-shadow:0 0 0 1px var(--line)}
.guide-head h3{margin:2px 0 4px}.guide-head .hint{margin:0}
.guide-steps{list-style:none;counter-reset:gs;padding:0;margin:16px 0;display:flex;flex-direction:column;gap:12px}
.guide-steps li{counter-increment:gs;display:flex;align-items:center;gap:12px;font-size:14.5px;line-height:1.4}
.guide-steps li::before{content:counter(gs);flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:700;background:var(--brand-50);color:var(--brand-600)}
.guide-steps .guide-ico{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--surface-3)}
.guide-steps .guide-ico svg.i{width:17px;height:17px;color:var(--brand);vertical-align:0}
.install-banner img{border-radius:10px}
.install-banner .icon-act svg.i{width:16px;height:16px}
#installBtn svg.i{width:17px;height:17px}

/* =================== telefon / dokunmatik: veri girişinde kayma olmasın =================== */
/* iOS, 16 px'ten küçük alana dokununca sayfayı yakınlaştırır ve yana kaydırır: alanlar en az 16 px. */
@media (max-width:760px),(pointer:coarse){
  :where(input:not([type=checkbox]):not([type=radio]):not([type=range])),select,textarea{font-size:16px!important}
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{touch-action:manipulation}
}
@media (max-width:760px){
  .wrap{overflow-x:clip}
  dialog.sheet{overflow-x:hidden}
  /* sevkiyat kova girişi: havuzlar tek bakışta (yana kaydırmadan), alanlar aynı hizada */
  #screen-ship .pool-chips,#screen-ship .pool-field .pool-chips,#screen-ship .entry .pool-chips{flex-wrap:wrap;overflow:visible;margin-right:0;padding-right:0}
  #screen-ship .pool-chips button{min-width:44px;min-height:36px}
  #screen-ship .entry-grid{align-items:end}
  #screen-ship .entry-grid .field>label{min-height:0}
  /* stok grupları sığmazsa alt satıra */
  .stok-groups{flex-wrap:wrap}
  .stok-groups button{flex:1 1 auto}
  /* fatura satırları: 16 px alanlarla satır tablosu kendi içinde kayar, sayfa kaymaz */
  .inv-lines{max-width:100%}
  /* sevkiyat ekranında bildirim, alttaki yapışkan "Kova ekle" çubuğunu örtmesin */
  body.ship-mode .toast-wrap{bottom:calc(96px + env(safe-area-inset-bottom))}
}

/* =================== cari: firma listesi ve ekstre =================== */
.back-link{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:4px}
.back-link:hover{color:var(--brand)}.back-link svg.i{width:15px;height:15px}
.cari-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.cari-bar .cari-merge{display:flex;align-items:center;gap:10px;font-size:13.5px}
.cari-list-bar{margin-bottom:12px;flex-wrap:wrap}
.cari-list-table{min-width:0;width:100%}
.cari-row{cursor:pointer}
.cari-row:hover td{background:var(--brand-50)!important}
.cari-row:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.bal-recv{color:var(--ok)}.bal-pay{color:var(--warn)}
.cari-list-table td,.cari-list-table th{white-space:nowrap}.cari-list-table td:first-child{white-space:normal;min-width:220px}
dialog.cari-entry-sheet{width:min(860px,calc(100% - 28px))}
.cari-entry .card-title-row{margin-bottom:10px}
.cari-entry .card-title-row .icon-act{margin-left:auto;order:3}
@media (max-width:760px){
  .cari-bar{gap:8px}.cari-bar .seg{width:100%}
  .cari-list-table td:first-child{min-width:0}
  .cari-detail-head h1{display:block!important;font-size:20px}
  .cari-detail-head .back-link{display:none}
}

/* =================== listeler yukarıda: ince özet şeridi, grafikler listenin altında =================== */
.screen:not(#screen-panel) .kpis{gap:10px;margin-bottom:12px}
.screen:not(#screen-panel) .kpi{padding:10px 14px}
.screen:not(#screen-panel) .kpi b{font-size:20px;margin-top:1px;line-height:1.2}
.screen:not(#screen-panel) .kpi small{font-size:12px}
.screen:not(#screen-panel) .kpi .cur-note,.screen:not(#screen-panel) .kpi .kpi-sub{font-size:11.5px;margin-top:2px}
.screen:not(#screen-panel) .page-head{margin-bottom:12px}
.chart-row.chart-below{margin-top:16px;margin-bottom:0}
@media (max-width:760px){
  .screen:not(#screen-panel) .kpis{gap:6px;margin-bottom:10px}
  .screen:not(#screen-panel) .kpi{padding:8px 10px}
  .screen:not(#screen-panel) .kpi b{font-size:16.5px}
  .screen:not(#screen-panel) .kpi .cur-note,.screen:not(#screen-panel) .kpi .kpi-sub{display:none}
  .chart-row.chart-below{margin-top:12px}
}

/* yumurta: yaklaşan gelişler tek satır, tıklayınca açılır */
details.y-arrivals{padding:10px 14px;margin-bottom:12px}
details.y-arrivals>summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:14px}
details.y-arrivals>summary::-webkit-details-marker{display:none}
details.y-arrivals>summary svg.i{width:17px;height:17px;color:var(--brand)}
details.y-arrivals>summary b::after{content:"";display:inline-block;width:6px;height:6px;margin-left:8px;vertical-align:2px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}
details.y-arrivals[open]>summary b::after{transform:rotate(-135deg);vertical-align:-1px}
details.y-arrivals[open]>summary{margin-bottom:10px}
details.y-arrivals.has-late>summary b{color:var(--danger)}
details.y-arrivals .y-remind select{padding:5px 8px;font-size:13px}

/* telefonda sayfa başı: yardımcı düğmeler (Excel, PDF, rapor) yalnız simge, tek satır; ad ekran okuyucuda kalır */
@media (max-width:760px){
  .screen .page-head .head-actions{flex-wrap:wrap;gap:6px}
  .screen .page-head .head-actions .btn.ghost:not(.lg){width:42px;height:40px;padding:0;justify-content:center}
  .screen .page-head .head-actions .btn.ghost:not(.lg) span{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;display:inline!important}
  .screen .page-head .head-actions .btn.ghost:not(.lg) svg.i{width:19px;height:19px}
  .screen:not(#screen-panel) .page-head .head-actions{flex-wrap:nowrap}
  .screen:not(#screen-panel) .page-head .head-actions .btn.lg,.screen:not(#screen-panel) .page-head .head-actions .btn.primary{flex:1 1 0;min-width:0;padding:9px 8px;font-size:13.5px;height:40px}
  .screen:not(#screen-panel) .page-head .head-actions .btn.lg span,.screen:not(#screen-panel) .page-head .head-actions .btn.primary span{display:inline!important;overflow:hidden;text-overflow:ellipsis}
  .inv-bar .field>label,.inv-bar .y-cust>span{display:none}
  #screen-panel .pn-quick .btn.ghost{width:auto;height:auto;padding:9px 10px;justify-content:flex-start}
  #screen-panel .pn-quick .btn.ghost span{position:static!important;width:auto;height:auto;clip:auto}
}

/* cari firma listesi telefonda: iki satırlık kompakt satır (ad solda, bakiye ve yön sağda) */
@media (max-width:760px){
  .dtable.stack.cari-list-table tbody{gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
  .dtable.stack.cari-list-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name bal" "name st";gap:3px 12px;align-items:center;
    border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;padding:11px 12px}
  .dtable.stack.cari-list-table tr:last-child{border-bottom:0}
  .dtable.stack.cari-list-table td{padding:0;border:0;margin:0}
  .dtable.stack.cari-list-table td::before{display:none}
  .dtable.stack.cari-list-table td:nth-child(1){grid-area:name;border:0;padding:0;margin:0}
  .dtable.stack.cari-list-table td:nth-child(2){grid-area:bal;text-align:right}
  .dtable.stack.cari-list-table td:nth-child(3){grid-area:st;text-align:right}
  .dtable.stack.cari-list-table td:nth-child(n+4){display:none}
  .dtable.stack.cari-list-table td.empty{grid-column:1/-1;text-align:center;padding:14px 0}
  .cari-list-bar .seg button{padding:7px 6px;font-size:12.5px}
}

/* =================== telefonda kompakt liste satırları ===================
   Uzun kart yerine iki üç satır: solda ana bilgi, sağda tutar / durum, sağ altta işlem simgeleri.
   Gizlenen ayrıntılar düzenleme penceresinde ve masaüstünde görünür. */
@media (max-width:760px){
  .dtable.stack.compact tbody{gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
  .dtable.stack.compact tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;align-items:center;
    border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;padding:10px 12px;background:var(--surface)}
  .dtable.stack.compact tr:last-child{border-bottom:0}
  .dtable.stack.compact tr.editing{background:var(--warn-50)}
  .dtable.stack.compact tr.excluded{opacity:.6}
  .dtable.stack.compact td{padding:0!important;border:0!important;margin:0!important;text-align:left;min-width:0;font-size:13px;line-height:1.35}
  .dtable.stack.compact td::before{display:none!important}
  .dtable.stack.compact td.empty{grid-column:1/-1;text-align:center!important;padding:14px 0!important;display:block!important}
  .dtable.stack.compact td small{font-size:11.5px}
  .dtable.stack.compact td .act-row{flex-wrap:nowrap;gap:2px}
  .dtable.stack.compact td .btn.sm{padding:5px 8px;font-size:12.5px}
  .dtable.stack.compact td .icon-act{width:32px;height:32px}

  .dtable.stack.compact.c-inv tr{grid-template-areas:"t a" "s b" "x x"}
  .dtable.stack.compact.c-inv td:nth-child(1){grid-area:s;color:var(--muted)}
  .dtable.stack.compact.c-inv td:nth-child(2){grid-area:t;font-weight:600;font-size:14px;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtable.stack.compact.c-inv td:nth-child(3):not(.empty){display:none!important}
  .dtable.stack.compact.c-inv td:nth-child(4):not(.empty){display:none!important}
  .dtable.stack.compact.c-inv td:nth-child(5):not(.empty){display:none!important}
  .dtable.stack.compact.c-inv td:nth-child(6){grid-area:a;text-align:right;justify-self:end;font-weight:700;font-size:14px}
  .dtable.stack.compact.c-inv td:nth-child(7):not(.empty){display:none!important}
  .dtable.stack.compact.c-inv td:nth-child(8){grid-area:b;text-align:right;justify-self:end}
  .dtable.stack.compact.c-inv td:nth-child(9){grid-area:x;display:flex!important;justify-content:flex-end;align-items:center;justify-self:end}
  .dtable.stack.compact.c-smove tr{grid-template-areas:"t a" "s b" "n x"}
  .dtable.stack.compact.c-smove td:nth-child(1){grid-area:s;color:var(--muted)}
  .dtable.stack.compact.c-smove td:nth-child(2){grid-area:t;font-weight:600;font-size:14px;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtable.stack.compact.c-smove td:nth-child(3){grid-area:b;text-align:right;justify-self:end}
  .dtable.stack.compact.c-smove td:nth-child(4){grid-area:a;text-align:right;justify-self:end;font-weight:700;font-size:14px}
  .dtable.stack.compact.c-smove td:nth-child(5){grid-area:n;color:var(--muted)}
  .dtable.stack.compact.c-smove td:nth-child(6){grid-area:x;display:flex!important;justify-content:flex-end;align-items:center;justify-self:end}
  .dtable.stack.compact.c-ck tr{grid-template-areas:"t a" "s b" "n x"}
  .dtable.stack.compact.c-ck td:nth-child(1){grid-area:s;color:var(--muted)}
  .dtable.stack.compact.c-ck td:nth-child(2){grid-area:t;font-weight:600;font-size:14px;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtable.stack.compact.c-ck td:nth-child(3){grid-area:n;color:var(--muted)}
  .dtable.stack.compact.c-ck td:nth-child(4):not(.empty){display:none!important}
  .dtable.stack.compact.c-ck td:nth-child(5){grid-area:a;text-align:right;justify-self:end;font-weight:700;font-size:14px}
  .dtable.stack.compact.c-ck td:nth-child(6){grid-area:b;text-align:right;justify-self:end}
  .dtable.stack.compact.c-ck td:nth-child(7):not(.empty){display:none!important}
  .dtable.stack.compact.c-ck td:nth-child(8):not(.empty){display:none!important}
  .dtable.stack.compact.c-ck td:nth-child(9){grid-area:x;display:flex!important;justify-content:flex-end;align-items:center;justify-self:end}
  .dtable.stack.compact.c-cck tr{grid-template-areas:"t a" "s b" "n x"}
  .dtable.stack.compact.c-cck td:nth-child(1){grid-area:s;color:var(--muted)}
  .dtable.stack.compact.c-cck td:nth-child(2){grid-area:n;color:var(--muted)}
  .dtable.stack.compact.c-cck td:nth-child(3){grid-area:t;font-weight:600;font-size:14px;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtable.stack.compact.c-cck td:nth-child(4){grid-area:a;text-align:right;justify-self:end;font-weight:700;font-size:14px}
  .dtable.stack.compact.c-cck td:nth-child(5){grid-area:b;text-align:right;justify-self:end}
  .dtable.stack.compact.c-cck td:nth-child(6):not(.empty){display:none!important}
  .dtable.stack.compact.c-cck td:nth-child(7):not(.empty){display:none!important}
  .dtable.stack.compact.c-cck td:nth-child(8){grid-area:x;display:flex!important;justify-content:flex-end;align-items:center;justify-self:end}
  .dtable.stack.compact.c-yship tr{grid-template-areas:"t a" "s b" "n x"}
  .dtable.stack.compact.c-yship td:nth-child(1){grid-area:t;font-weight:600;font-size:14px;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtable.stack.compact.c-yship td:nth-child(2){grid-area:s;color:var(--muted)}
  .dtable.stack.compact.c-yship td:nth-child(3){grid-area:n;color:var(--muted)}
  .dtable.stack.compact.c-yship td:nth-child(4):not(.empty){display:none!important}
  .dtable.stack.compact.c-yship td:nth-child(5){grid-area:a;text-align:right;justify-self:end;font-weight:700;font-size:14px}
  .dtable.stack.compact.c-yship td:nth-child(6){grid-area:b;text-align:right;justify-self:end}
  .dtable.stack.compact.c-yship td:nth-child(7):not(.empty){display:none!important}
  .dtable.stack.compact.c-yship td:nth-child(8){grid-area:x;display:flex!important;justify-content:flex-end;align-items:center;justify-self:end}
  .dtable.stack.compact.c-ledger tr{grid-template-areas:"t a" "s b" "n x"}
  .dtable.stack.compact.c-ledger td:nth-child(1):not(.empty){display:none!important}
  .dtable.stack.compact.c-ledger td:nth-child(2){grid-area:s;color:var(--muted)}
  .dtable.stack.compact.c-ledger td:nth-child(3):not(.empty){display:none!important}
  .dtable.stack.compact.c-ledger td:nth-child(4){grid-area:n;color:var(--muted)}
  .dtable.stack.compact.c-ledger td:nth-child(5){grid-area:t;font-weight:600;font-size:14px;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtable.stack.compact.c-ledger td:nth-child(6){grid-area:a;text-align:right;justify-self:end;font-weight:700;font-size:14px}
  .dtable.stack.compact.c-ledger td:nth-child(7):not(.empty){display:none!important}
  .dtable.stack.compact.c-ledger td:nth-child(8):not(.empty){display:none!important}
  .dtable.stack.compact.c-ledger td:nth-child(9){grid-area:b;text-align:right;justify-self:end}
  .dtable.stack.compact.c-ledger td:nth-child(10){grid-area:x;display:flex!important;justify-content:flex-end;align-items:center;justify-self:end}
}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
}

/* ---------------- sayfalama (paginate) ---------------- */
.paged{scroll-margin-top:84px}
.pager{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:12px 2px 4px}
.pager[hidden]{display:none}
.pg-info{color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.pg-btns{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.pg{min-width:36px;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);
  font:inherit;font-size:14px;font-variant-numeric:tabular-nums;cursor:pointer;touch-action:manipulation}
.pg:hover:not(:disabled):not(.on){background:var(--surface-2);border-color:var(--line-strong)}
.pg:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.pg.on{background:var(--brand-fill);border-color:var(--brand-fill);color:var(--on-fill);font-weight:600;cursor:default}
.pg:disabled{opacity:.4;cursor:default}
.pg-gap{color:var(--muted);padding:0 2px}
.ship-list+.pager,.stok-list+.pager,.havuz-list+.pager{margin-top:16px}
@media (max-width:640px){
  .pager{justify-content:center}
  .pg-info{width:100%;text-align:center}
  .pg{min-width:44px;height:44px}
}

/* ---------------- kova girişi: yazınca havuz önerisi, giriş altında tank özeti ---------------- */
#screen-ship .entry .pool-field{display:block}
#screen-ship .pool-field .pool-row{max-width:none}
#screen-ship .pool-field .pool-chips{flex-wrap:wrap;overflow:visible;margin:6px 0 0;padding:0;gap:6px}
#screen-ship .pool-field .pool-chips.hidden{display:none}
#screen-ship .pool-field .pool-chips button{min-width:48px;min-height:40px;font-size:14px}
.entry-sum:empty{display:none}
.entry-sum{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.es-last{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.es-last b{color:var(--text);font-size:15px;font-variant-numeric:tabular-nums}
.es-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.es-grid>div{display:flex;flex-direction:column;gap:1px;min-width:0}
.es-grid small{color:var(--muted);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.es-grid b{font-size:17px;font-variant-numeric:tabular-nums}
.es-grid span{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.es-grid .es-net b{color:var(--ok-600)}
.col-buckets .finalize-card{margin-top:0}
@media (min-width:1024px) and (min-height:600px){
  #screen-ship .col-buckets{display:flex;flex-direction:column;gap:12px}
  #screen-ship .bucket-card{height:auto;flex:1}
  #screen-ship .col-buckets .finalize-card{flex:none;flex-direction:column;align-items:stretch;gap:10px}
}

/* Yumurta: hafta ve sıra numarası ("48. hafta · 19. sevkiyat") */
.y-weekseq .lbl{font-size:12.5px;font-weight:600;color:var(--muted)}
.y-ws{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.y-weekseq .y-ws label{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--text);letter-spacing:0}
.y-ws input{text-align:right;font-variant-numeric:tabular-nums}
.y-ws span{white-space:nowrap}
.y-weekseq .hint{font-size:12px;color:var(--muted)}
.y-ws-tag{display:inline-block;margin-top:2px;font-size:12px;font-weight:600;color:var(--brand-600);white-space:nowrap}

/* Panel: en büyük cari bakiyeler (alacağımız / borcumuz, ilk 5) */
.pn-cari-card{margin-bottom:16px}
.pn-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.pn-more{font-size:13px;font-weight:600;color:var(--brand-600);white-space:nowrap}
.pn-cari{display:grid;grid-template-columns:1fr 1fr;gap:8px 24px}
.pn-cari-col h4{margin:0 0 4px;font-size:12px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.pn-cari .pn-row:last-child{border-bottom:0}
.pn-row-val.pos{color:var(--ok-600)}
.pn-row-val.neg{color:var(--danger)}
@media (max-width:720px){.pn-cari{grid-template-columns:1fr}}

/* Mobil: "+" düğmesi ve uygulama yükleme şeridi açıkken listenin son satırı (rozet, sil düğmesi) altlarında kalmasın.
   Şerit açıkken düğme 98px yukarı çıkar (app.css), alt boşluk da o kadar artar. Sayfalama düğmeleri de kaydırılınca
   düğmenin üstüne çıkabilsin diye listeler arasında boşluk korunur. */
@media (max-width:760px){
  body.has-fab.install-open .wrap{padding-bottom:calc(var(--tabbar-h) + 190px + env(safe-area-inset-bottom))}
  body.install-open:not(.has-fab) .wrap{padding-bottom:calc(var(--tabbar-h) + 100px + env(safe-area-inset-bottom))}
}

/* =================== tablet / dar masaüstü (761–1023px) ===================
   Üst menü tek satıra sığmayınca yana kayıyordu (Stok, Fatura, Cari, Çekler görünmüyordu): ikinci satıra sarılır.
   Fatura tablosu kartı taşırıyordu: ayrıntı sütunları (adet, kur, KDV, TL karşılığı) gizlenir; faturayı açınca görünür. */
@media (min-width:761px) and (max-width:1023px){
  .appbar-inner{flex-wrap:wrap;row-gap:6px}
  .appnav{order:10;flex:1 1 100%;flex-wrap:wrap;overflow:visible;gap:2px 0;margin:0 -6px}
  .appnav a{padding:6px 7px;gap:5px;font-size:13px}
  .appnav a svg.i{width:16px;height:16px}
  .c-inv th:nth-child(3),.c-inv th:nth-child(4),.c-inv th:nth-child(5),.c-inv th:nth-child(7),
  .c-inv td:nth-child(3):not(.empty),.c-inv td:nth-child(4):not(.empty),.c-inv td:nth-child(5):not(.empty),.c-inv td:nth-child(7):not(.empty){display:none}
  .c-inv{min-width:0!important}
}
.kpi b .kpi-unit{font-size:13px;font-weight:600;color:var(--muted);letter-spacing:0}

/* Pencere kapat (×) düğmesi: sağ üstte, uzun pencere kaydırılınca da görünür kalır (app.js · addDialogCloseButtons). */
.dlg-close{position:sticky;top:0;float:right;z-index:6;width:36px;height:36px;margin:-10px -10px 4px 10px;padding:0;
  display:grid;place-items:center;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--muted);
  cursor:pointer;box-shadow:0 2px 8px rgba(2,12,20,.12)}
.dlg-close:hover{color:var(--text);border-color:var(--muted)}
.dlg-close:focus-visible{outline:2px solid var(--accent, #0e7490);outline-offset:2px}
.dlg-close svg{width:18px;height:18px}
.modal-box .dlg-close{margin:-8px -8px 4px 10px}
@media print{.dlg-close{display:none!important}}

/* Verim ve ölüm (havuz) */
.pf-charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-top:14px}
.pf-fcr{font-weight:700;padding:2px 7px;border-radius:6px}
.pf-fcr.ok{background:var(--ok-50);color:var(--ok)}
.pf-fcr.warn{background:var(--warn-50);color:var(--warn)}
.pf-fcr.bad{background:var(--danger-50);color:var(--danger)}
.field-inline{display:inline-flex;align-items:center;gap:8px;font-size:14px}
