:root {
  --orange: #e2762b;
  --orange-hover: #cf6720;
  --orange-soft: #fdebdc;
  --orange-line: #f3c9a6;
  --brown: #4e3424;
  --brown-mid: #7a5a45;
  --brown-soft: #a88d7a;
  --cream: #fffaf5;
  --white: #ffffff;
  --line: #eadfd5;
  --line-soft: #f4ede6;
  --row-alt: #fffcf9;
  --rownum-bg: #faf5f0;
  --head-bg: #4e3424;
  --on-dark: #ffffff;
  --overlay: rgba(78, 52, 36, .25);
  --shadow: rgba(78, 52, 36, .15);
  --green: #3f7d4e; --green-bg: #e6f2e8;
  --red: #b0412e; --red-bg: #f8e3df;
  --yellow: #8a6a12; --yellow-bg: #fbf1d3;
  --gray: #6d655f; --gray-bg: #efebe7;
  --blue: #3a6386; --blue-bg: #e2ecf4;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --orange: #ef8a43; --orange-hover: #f59c5c; --orange-soft: #3a2618; --orange-line: #6b4127;
    --brown: #f1e4d8; --brown-mid: #c9ae98; --brown-soft: #937a68;
    --cream: #1d1510; --white: #271c15; --line: #3d2e24; --line-soft: #33261d; --row-alt: #2b1f17; --rownum-bg: #241a13;
    --head-bg: #3a2a1f; --overlay: rgba(0, 0, 0, .5); --shadow: rgba(0, 0, 0, .4);
    --green: #8fd19e; --green-bg: #1f3324; --red: #f0a090; --red-bg: #3d1f1a; --yellow: #e6c35c; --yellow-bg: #3a3016;
    --gray: #b5aaa1; --gray-bg: #322a25; --blue: #8fb8dc; --blue-bg: #1c2a38;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --orange: #ef8a43; --orange-hover: #f59c5c; --orange-soft: #3a2618; --orange-line: #6b4127;
  --brown: #f1e4d8; --brown-mid: #c9ae98; --brown-soft: #937a68;
  --cream: #1d1510; --white: #271c15; --line: #3d2e24; --line-soft: #33261d; --row-alt: #2b1f17; --rownum-bg: #241a13;
  --head-bg: #3a2a1f; --overlay: rgba(0, 0, 0, .5); --shadow: rgba(0, 0, 0, .4);
  --green: #8fd19e; --green-bg: #1f3324; --red: #f0a090; --red-bg: #3d1f1a; --yellow: #e6c35c; --yellow-bg: #3a3016;
  --gray: #b5aaa1; --gray-bg: #322a25; --blue: #8fb8dc; --blue-bg: #1c2a38;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--brown); font: 13px/1.4 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--orange); }

/* Üst bar */
.topbar { display: flex; align-items: center; gap: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); height: 48px; background: var(--white); border-bottom: 2px solid var(--orange); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--white); }
.logo { font-weight: 700; font-size: 16px; color: var(--brown); letter-spacing: .3px; }
.logo span { color: var(--orange); }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.tab { border: 0; background: none; padding: 14px 12px; cursor: pointer; color: var(--brown-mid); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--brown); }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }
.who { display: flex; align-items: center; gap: 8px; color: var(--brown-mid); white-space: nowrap; }
.role { background: var(--orange-soft); color: var(--orange); border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 600; }

main { padding-block: 14px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h2 { font-size: 15px; margin: 0 0 10px; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--brown-mid); text-transform: uppercase; letter-spacing: .4px; }
.muted { color: var(--brown-soft); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Butonlar ve girişler */
.btn { border: 1px solid var(--line); background: var(--white); padding: 5px 11px; border-radius: var(--radius); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--orange-line); background: var(--orange-soft); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--on-dark); font-weight: 600; }
.btn.primary:hover { background: var(--orange-hover); }
.btn.small { padding: 2px 8px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 5px 8px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange-line); border-color: var(--orange); }
label { display: block; font-size: 11px; color: var(--brown-mid); margin-bottom: 3px; font-weight: 600; }
.field { margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }

/* Öneri çipleri (kargo ücreti vb.) */
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chip { border: 1px dashed var(--orange-line); background: var(--white); color: var(--orange); border-radius: 12px; padding: 1px 9px; font-size: 12px; cursor: pointer; }
.chip:hover, .chip.on { background: var(--orange); color: var(--on-dark); border-style: solid; }

/* Filtre barı */
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { width: 220px; }
.filters select { max-width: 150px; }

/* Excel benzeri tablo */
.sheet-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 200px); }
table.sheet { border-collapse: collapse; width: 100%; white-space: nowrap; }
.sheet th { position: sticky; top: 0; background: var(--head-bg); color: var(--on-dark); font-weight: 600; text-align: left; padding: 6px 8px; font-size: 12px; z-index: 2; }
.sheet td { padding: 4px 8px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft); vertical-align: middle; }
.sheet tbody tr:nth-child(even) td { background: var(--row-alt); }
.sheet tbody tr:hover td { background: var(--orange-soft); }
.sheet tbody tr { cursor: pointer; }
.sheet td.num, .sheet th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet td.code { font-weight: 600; color: var(--orange); }
.sheet td.wrap { white-space: normal; min-width: 180px; max-width: 260px; }
.sheet tfoot td { position: sticky; bottom: 0; background: var(--orange-soft); font-weight: 700; border-top: 2px solid var(--orange); }
.sheet .rownum { color: var(--brown-soft); font-size: 11px; text-align: right; width: 1%; background: var(--rownum-bg) !important; }

/* Durum etiketleri */
.pill { display: inline-block; border-radius: 10px; padding: 1px 8px; font-size: 12px; border: 0; background: var(--gray-bg); color: var(--gray); }
select.pill { padding: 1px 4px; cursor: pointer; appearance: auto; }
.s-green { background: var(--green-bg); color: var(--green); }
.s-red { background: var(--red-bg); color: var(--red); }
.s-yellow { background: var(--yellow-bg); color: var(--yellow); }
.s-blue { background: var(--blue-bg); color: var(--blue); }
.s-gray { background: var(--gray-bg); color: var(--gray); }
.s-orange { background: var(--orange-soft); color: var(--orange); }

/* Kartlar / KPI */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.card .k { font-size: 11px; color: var(--brown-mid); text-transform: uppercase; letter-spacing: .3px; }
.card .v { font-size: 20px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.card .v.good { color: var(--green); }
.card .v.bad { color: var(--red); }
.card .v.accent { color: var(--orange); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.total-line { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); font-weight: 600; }
.total-line.big { font-size: 16px; color: var(--orange); border-top: 2px solid var(--orange); }

/* Çekmece (sipariş formu) */
.drawer-bg { position: fixed; inset: 0; background: var(--overlay); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--white); z-index: 41; display: flex; flex-direction: column; box-shadow: -6px 0 24px var(--shadow); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer header { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.drawer header h2 { margin: 0; flex: 1; }
.drawer .body { padding: 14px 16px; overflow: auto; flex: 1; }
.drawer footer { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.section-title { font-size: 11px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--orange-soft); }
.item-row { display: grid; grid-template-columns: 1fr 70px 90px 28px; gap: 6px; margin-bottom: 6px; align-items: center; }
.stub { border: 1px dashed var(--orange-line); background: var(--cream); border-radius: var(--radius); padding: 10px; }

/* Giriş */
.login { max-width: 320px; margin: 12vh auto; width: calc(100% - 32px); background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 24px; }
.login .logo { font-size: 22px; margin-bottom: 4px; }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 6px; padding: 8px; }
.demo { margin-top: 14px; font-size: 12px; color: var(--brown-soft); }
.demo code { background: var(--orange-soft); color: var(--brown); padding: 0 4px; border-radius: 3px; cursor: pointer; }

.toast { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--head-bg); color: var(--on-dark); padding: 8px 14px; border-radius: var(--radius); z-index: 60; }
.toast.err { background: var(--red); }
.perm-list label { display: flex; gap: 6px; align-items: center; font-weight: 400; font-size: 13px; color: var(--brown); margin: 4px 0; }
.empty { padding: 30px; text-align: center; color: var(--brown-soft); }

@media (max-width: 760px) {
  .cols, .grid2, .grid3 { grid-template-columns: 1fr; }
  .who .name { display: none; }
  .filters input[type=search] { width: 100%; }
}
@media print {
  .topbar, .filters, .no-print { display: none !important; }
  body { background: var(--white); }
  .panel { border: 0; }
}

/* Filtre ayırıcı */
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* Değişiklik geçmişi (açılır bölüm) */
details.history { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
details.history > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; color: var(--brown); list-style: revert; }
details.history > div { padding: 4px 12px 12px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--orange-line); display: grid; gap: 12px; }
.timeline > li { position: relative; }
.timeline > li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid var(--cream); }
.tl-head { color: var(--brown); }
.tl-changes { margin: 4px 0 0; padding: 0; list-style: none; color: var(--brown-mid); display: grid; gap: 3px; }
.tl-field { display: inline-block; min-width: 120px; color: var(--brown); font-weight: 600; }
.tl-arrow { color: var(--orange); font-weight: 700; padding: 0 2px; }

/* Haftalık fatura: kaydırılabilir çerçeve */
.week-frame { border: 2px solid var(--orange-line); border-radius: var(--radius); background: var(--cream); max-height: calc(100vh - 260px); min-height: 320px; overflow-y: auto; padding: 10px; display: grid; gap: 12px; align-content: start; }
.week { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.week-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--orange-soft); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: -10px; z-index: 3; }
.week-total { font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.week-body { padding: 10px 12px; display: grid; gap: 14px 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.week-block { min-width: 0; }
.week-block h3 { margin: 0; }
.week-block .row { margin-bottom: 6px; }
.seller-block { border-left: 3px solid var(--orange-line); padding-left: 10px; }
.week-sum { display: grid; gap: 2px; align-content: start; }
.week-sum > div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.week-sum > div.big { color: var(--orange); font-size: 15px; border-bottom: 0; border-top: 2px solid var(--orange); }
.week-orders { grid-column: 1 / -1; }
.week-orders > summary { cursor: pointer; color: var(--brown-mid); font-weight: 600; padding: 4px 0; }
.week-orders tr[data-code] { cursor: pointer; }
.warn { background: var(--yellow-bg); color: var(--yellow); padding: 6px 8px; border-radius: var(--radius); font-size: 12px; }
.sheet.compact td, .sheet.compact th { padding: 3px 6px; font-size: 12px; }
.sheet.compact th { position: static; }
.card .muted { font-size: 11px; margin-top: 2px; }

/* Reklam */
.sheet tr.flash td { background: var(--orange-soft) !important; animation: flash 2.4s ease-out; }
@keyframes flash { 0% { background: var(--orange-line); } 100% { background: var(--orange-soft); } }
@media (prefers-reduced-motion: reduce) { .sheet tr.flash td { animation: none; } }
.good-t { color: var(--green); }
.bad-t { color: var(--red); }
code.copy { display: block; background: var(--cream); border: 1px dashed var(--line); padding: 6px 8px; border-radius: var(--radius); user-select: all; word-break: break-all; font-size: 12px; }
.panel .sheet-wrap { max-height: none; }
.pay-row { margin-top: 6px; }

/* Bakiye: hesap kartları */
.acc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin-bottom: 12px; }
.acc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.acc-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--orange-soft); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.acc-body { padding: 10px 12px; display: grid; gap: 10px; }
.acc-info { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.acc-info dt { color: var(--brown-mid); font-size: 12px; }
.acc-info dd { margin: 0; min-width: 0; }
.acc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acc-nums > div { display: grid; gap: 2px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font-variant-numeric: tabular-nums; }
.acc-nums span { font-size: 11px; color: var(--brown-mid); text-transform: uppercase; letter-spacing: .3px; }
.acc-form { display: grid; grid-template-columns: 130px 110px 110px 1fr; gap: 6px; }
.acc-form input[name=description] { grid-column: 1 / 4; }
.acc-form input[name=order_code] { grid-column: 4; }
.acc-form .btn { grid-column: 4; justify-self: end; }
.acc-entries { max-height: 220px; overflow-y: auto; }
@media (max-width: 760px) {
  .acc-form { grid-template-columns: 1fr 1fr; }
  .acc-form input[name=description], .acc-form input[name=order_code], .acc-form .btn { grid-column: 1 / -1; }
}
tr.dirty td { background: var(--orange-soft); }
tr.dirty td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.acc-head code.copy { display: inline-block; margin-top: 4px; padding: 2px 6px; background: var(--white); }
.acc-total { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.acc-total span { font-size: 11px; color: var(--brown-mid); text-transform: uppercase; letter-spacing: .3px; }
.acc-total b { font-size: 18px; color: var(--brown); }
.acc-form.simple { grid-template-columns: 140px 140px 1fr auto; }
.acc-form.simple input[name=description], .acc-form.simple .btn { grid-column: auto; justify-self: stretch; }
.warn-line { background: var(--yellow-bg); color: var(--yellow); padding: 6px 10px; border-radius: var(--radius); }
.pay-box { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin-top: 8px; }
@media (max-width: 760px) {
  .acc-head { flex-wrap: wrap; }
  .acc-form.simple { grid-template-columns: 1fr 1fr; }
  .acc-form.simple input[name=description], .acc-form.simple .btn { grid-column: 1 / -1; }
}
.acc-form input, .acc-form select { min-width: 0; width: 100%; }
#prodBulk.float { position: fixed; right: 24px; bottom: 24px; z-index: 50; box-shadow: 0 4px 14px var(--shadow); padding: 10px 18px; }

/* Veriler ve Bakiye: sade düzen */
.cards.hero { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.cards.hero .card .muted { line-height: 1.35; }
.panel .sheet-wrap { border-color: var(--line-soft); }
.panel > .row h2, .panel > .row h3 { margin: 0; }
.panel > .row { margin-bottom: 8px; }
/* gruplar boşluk bırakmadan sütunlara yerleşir */
.metric-grid { columns: 4 280px; column-gap: 12px; margin-bottom: 12px; }
.metric-grid .metric { break-inside: avoid; margin-bottom: 12px; display: inline-block; width: 100%; }
.metric { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.metric h3 { margin: 0 0 6px; font-size: 13px; color: var(--orange); text-transform: uppercase; letter-spacing: .4px; }
.metric dl, .m-list { margin: 0; }
.m-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.m-row:last-child { border-bottom: 0; }
.m-row dt { color: var(--brown-mid); min-width: 0; }
.m-row dt .muted { font-size: 11px; }
.m-row dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; max-width: 100%; overflow-x: auto; }
.seg-btn { background: var(--white); border: 0; border-right: 1px solid var(--line); padding: 7px 14px; cursor: pointer; color: var(--brown); font: inherit; white-space: nowrap; }
.seg-btn:last-child { border-right: 0; }
.seg-btn.on { background: var(--orange); color: var(--on-dark); }
.seg-btn:hover:not(.on) { background: var(--orange-soft); }
.picker { position: relative; }
.picker > summary { list-style: none; cursor: pointer; }
.picker > summary::-webkit-details-marker { display: none; }
.picker-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: min(340px, 90vw); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px var(--shadow); padding: 10px; display: grid; gap: 8px; }
.pick-list { max-height: 300px; overflow-y: auto; display: grid; gap: 2px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 6px 0; }
.pick-list label, .pick-all { display: flex; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 4px; cursor: pointer; font-weight: 400; }
.pick-list label:hover { background: var(--orange-soft); }
.pick-all { font-weight: 600; }
.picked { margin: -4px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad-form { display: grid; gap: 8px; grid-template-columns: minmax(170px, 1.6fr) minmax(220px, 1.8fr) minmax(100px, .9fr) minmax(160px, 1.4fr) minmax(100px, .9fr) auto; align-items: end; }
.ad-form .field { margin: 0; min-width: 0; }
.ad-form input, .ad-form select { width: 100%; min-width: 0; }
@media (max-width: 1000px) { .ad-form { grid-template-columns: 1fr 1fr; } .ad-form .grow { grid-column: 1 / -1; } }
.bal-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.bal-cols .panel { margin-bottom: 12px; }
.big-num { font-size: 18px; font-variant-numeric: tabular-nums; }
.debt { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 6px; display: grid; gap: 6px; }
.debt:first-of-type { border-top: 0; }
.bar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); }
.debt-form { display: grid; gap: 6px; grid-template-columns: 140px 1fr 1fr auto; align-items: center; }
.debt-form.adjust { grid-template-columns: 1fr 1fr auto; }
.debt-form input, .debt-form select { min-width: 0; width: 100%; }
.debt-block { background: var(--cream); border: 1px dashed var(--line); border-radius: var(--radius); padding: 8px 10px; }
.debt-block .debt-form { grid-template-columns: 1fr 1fr auto; margin-top: 6px; }
.bal-table td:first-child { white-space: nowrap; }
@media (max-width: 760px) {
  .debt-form, .debt-form.adjust, .debt-block .debt-form { grid-template-columns: 1fr 1fr; }
  .debt-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .cards.hero { grid-template-columns: 1fr 1fr; } .cards.hero .card .v { font-size: 17px; } }

.cards.hero.ten { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
@media (min-width: 1200px) { .cards.hero.ten { grid-template-columns: repeat(5, 1fr); } }
.seg.small { margin-bottom: 8px; }
.seg.small .seg-btn { padding: 4px 10px; font-size: 13px; }
.range { display: flex; gap: 6px; }
.range input { flex: 1; min-width: 0; }
.acc-entry { display: grid; gap: 8px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.acc-entry-head .seg { margin: 0; }
.acc-entry-row { display: grid; gap: 6px; grid-template-columns: 150px 140px 1fr auto; align-items: center; }
.acc-entry-row > span > input, .acc-entry-row > span > select, .acc-entry-row input { width: 100%; min-width: 0; }
.acc-entry-row > span[hidden] { display: none; }
.match > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.match[open] { display: grid; gap: 6px; }
.match-q { width: 100%; }
.match-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.match-list label { display: grid; grid-template-columns: auto 90px 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-bottom: 1px solid var(--line-soft); font-weight: 400; cursor: pointer; }
.match-list label[hidden] { display: none; }
.match-list label:hover { background: var(--orange-soft); }
.match-list label b { font-variant-numeric: tabular-nums; }
tr.deleted td { text-decoration: line-through; color: var(--brown-soft); }
tr.deleted td .pill, tr.deleted td .btn, tr.deleted td .muted { text-decoration: none; }
.btn.danger { color: var(--red); }
tr.clickable { cursor: pointer; }
@media (max-width: 760px) {
  .acc-entry-row { grid-template-columns: 1fr 1fr; }
  .acc-entry-row input[name=description], .acc-entry-row .btn { grid-column: 1 / -1; }
  .match-list label { grid-template-columns: auto 1fr auto; }
  .match-list label .muted { grid-column: 2 / -1; }
}

/* Tarihli maliyetler */
.cost-from { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--orange-soft); border: 1px solid var(--orange-line); border-radius: var(--radius); padding: 8px 10px; margin: 6px 0 8px; }
.cost-from .chips { margin: 0; }
.cost-cell { white-space: nowrap; }
.cost-meta { font-size: 11px; margin-top: 2px; text-align: right; }
.cost-meta a { color: var(--orange); }
tr.cost-hist > td { background: var(--cream); padding: 10px 12px; }
.cost-box { display: grid; gap: 8px; max-width: 900px; }
.cost-add { display: grid; grid-template-columns: auto 150px 130px 1fr auto; gap: 6px; align-items: center; }
.cost-add input { min-width: 0; width: 100%; }
@media (max-width: 760px) { .cost-add { grid-template-columns: 1fr 1fr; } .cost-add label, .cost-add input[name=note], .cost-add .btn { grid-column: 1 / -1; } }
/* Haftalık fatura: bekleyen komisyon */
.pending-fees { background: var(--white); border: 1px solid var(--orange-line); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.pending-fees summary { cursor: pointer; }
.pending-fees .sheet-wrap { margin-top: 8px; max-height: 260px; }
.fee-list tr[data-code] { cursor: pointer; }
/* Excel güncellemesi özeti */
.sync-note { background: var(--white); border: 1px solid var(--orange-line); border-left: 3px solid var(--orange); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; }
.sync-note summary { cursor: pointer; }
.sync-body { max-height: 280px; overflow-y: auto; margin-top: 6px; }
.sync-body h4 { margin: 8px 0 4px; font-size: 12px; color: var(--brown-mid); text-transform: uppercase; letter-spacing: .3px; }
.sync-body ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }

/* Canlı kurulum: zayıf şifre uyarısı, yedekleme */
.weak-pw { border-radius: 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.panel.backup { margin-top: 12px; display: grid; gap: 8px; }
.panel.backup h2, .panel.backup p { margin: 0; }
.restore-row input[type=file] { max-width: 100%; }
.cargo-bulk { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cargo-bulk input[name=amount] { width: 90px; }
.cargo-in { width: 80px; text-align: right; }
