:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #d4dce7;
  --text: #10213c;
  --muted: #617087;
  --accent: #0b4d8c;
  --accent-bg: #eaf3ff;
  --danger: #a93232;
  --danger-bg: #fff0f0;
  --warn: #b27a00;
  --input-bg: #ffffff;
  --focus: #2770b7;
  --navy: #082e5c;
  --navy-deep: #06264b;
  --gold: #d4a52c;
  --green: #07853f;
  --ui-button-height: 36px;
  --ui-button-padding-x: 0.72rem;
  --ui-button-font-size: 0.82rem;
  --ui-button-radius: 6px;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

/* Cari musteri profili, urun/vade gecmisi ve ekstre */
.cari-kart-heading{display:flex;flex-direction:column;gap:.55rem;margin-bottom:.65rem}
.cari-kart-title-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.65rem 1rem}
.cari-kart-nav{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem}
.cari-kart-nav button{border:1px solid #b9cae0;background:#f5f8fc;color:#153b68;border-radius:6px;padding:.42rem .72rem;font-weight:800;cursor:pointer;font-size:.82rem}
.cari-kart-nav button.active{background:#0b4f91;color:#fff;border-color:#0b4f91}
.cari-kart-nav .btn-ekstre-yazdir,.cari-kart-nav #btn-ekstre-yazdir{min-height:36px}
.cari-search-actions{display:flex;align-items:center;gap:.35rem;min-width:0}
.cari-search-actions button{border:1px solid #b9cae0;background:#f5f8fc;color:#153b68;border-radius:6px;padding:.42rem .62rem;font-weight:800;cursor:pointer;font-size:.78rem;white-space:nowrap}
.cari-search-actions button.active{background:#0b4f91;color:#fff;border-color:#0b4f91}
.cari-native-balance-note{margin:.2rem 0 .65rem}
.cari-kur-cell{min-width:12rem;max-width:24rem;white-space:normal;font-size:.76rem;line-height:1.35}
.cari-islem-yon-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem 1.25rem}
.cari-islem-yon-block{display:flex;flex-direction:column;gap:.45rem;min-width:0}
.cari-islem-yon-title{font-size:.72rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#294b72}
.cari-islem-yon-block .cari-islem-pills{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%}
.cari-islem-yon-block .cari-islem-pills .secici-pill{width:100%}
#cari-giris-kategoriler .secici-pill{background:#07853f;border-color:#07853f;color:#fff}
#cari-giris-kategoriler .secici-pill:hover{background:#056f35;border-color:#056f35}
#cari-cikis-kategoriler .secici-pill{background:#b92f3a;border-color:#b92f3a;color:#fff}
#cari-cikis-kategoriler .secici-pill:hover{background:#9f2630;border-color:#9f2630}
@media (max-width:900px){.cari-islem-yon-grid{grid-template-columns:1fr}}
.cari-tab-hidden{display:none!important}
.cari-card-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin:0 0 .65rem}
.cari-card-tabs button{border:1px solid #b9cae0;background:#f5f8fc;color:#153b68;border-radius:6px;padding:.42rem .72rem;font-weight:800;cursor:pointer}
.cari-card-tabs button.active{background:#0b4f91;color:#fff;border-color:#0b4f91}
.yeni-cari-card{margin:0;padding:1rem 1.15rem}
.yeni-cari-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem .8rem}
.yeni-cari-grid label{display:flex;flex-direction:column;gap:.25rem;color:#38506e;font-size:.78rem;font-weight:750}
.yeni-cari-grid input,.yeni-cari-grid select,.yeni-cari-grid textarea{width:100%;min-width:0;padding:.58rem .62rem;border:1px solid #c7d5e6;border-radius:6px;background:#fff;color:#10243f;font:inherit;font-size:.88rem}
.yeni-cari-grid .span-2{grid-column:span 2}
.yeni-cari-grid .check-label{flex-direction:row;align-items:center;align-self:end;padding-bottom:.65rem}
.yeni-cari-grid .check-label input{width:auto}
.yeni-cari-actions{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.75rem}
.cari-detail-grid{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(16rem,.9fr);gap:.75rem;margin-bottom:.75rem}
.cari-profile-box,.cari-summary-box,.cari-history-grid>.group-box{margin:0;padding:.8rem}
.cari-profile-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem .65rem}
.cari-profile-fields label{display:flex;flex-direction:column;gap:.2rem;color:#38506e;font-size:.76rem;font-weight:700}
.cari-profile-fields input,.cari-profile-fields select,.cari-profile-fields textarea{width:100%;min-width:0;padding:.48rem .55rem;border:1px solid #c7d5e6;border-radius:6px;background:#fff;color:#10243f;font:inherit;font-size:.84rem}
.cari-profile-fields .span-2{grid-column:span 2}
.cari-profile-fields .check-label{flex-direction:row;align-items:center;align-self:end;padding-bottom:.55rem}
.cari-profile-fields .check-label input{width:auto}
.cari-profile-actions{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.55rem}
.cari-card-balance{display:grid;gap:.35rem}
.cari-card-balance>div{display:flex;justify-content:space-between;gap:1rem;padding:.5rem .6rem;border-bottom:1px solid #d8e2ef;background:#f6f9fd}
.cari-mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin-top:.7rem}
.cari-mini-stats span{padding:.55rem .35rem;border:1px solid #d8e2ef;border-radius:6px;text-align:center;color:#526a86;font-size:.72rem}
.cari-mini-stats strong{display:block;color:#082e5c;font-size:1.1rem}
.cari-history-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:.75rem;margin-bottom:.75rem}
.cari-subtable{max-height:12rem;overflow:auto}
.cari-subtable table{font-size:.78rem}
.cari-old-gold{background:#fff8e8}
.vade-status{display:inline-block;padding:.15rem .38rem;border-radius:999px;font-size:.7rem;font-weight:800;background:#e8eef6}
.vade-acik{color:#a34c00;background:#fff0d9}.vade-kismi{color:#805a00;background:#fff8c9}.vade-odendi{color:#08743c;background:#dcf5e7}
.cari-ekstre-title{margin:.65rem 0 .35rem}

@media (max-width:1100px){.cari-detail-grid,.cari-history-grid{grid-template-columns:1fr}.cari-profile-fields,.yeni-cari-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media print{
  #cari-islem-header,#cari-bottom-panel,.cari-detail-grid,.cari-history-grid,.cari-search-group,.cari-kart-nav,.module-header .btn,.foot-meta,#btn-ekstre-yazdir,#msg{display:none!important}
  #cari-ekstre-panel{display:block!important}
  #kart-panel{box-shadow:none;border:0;padding:0}.cari-ekstre-title{margin-top:1rem}
}

* { box-sizing: border-box; }

body {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.4rem; margin: 0 0 0.35rem; font-weight: 650; }
h2 {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  vertical-align: middle;
}

.sub { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.95rem; }

.nav-back { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }

.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.menu a {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 560;
}

.menu a:hover {
  border-color: var(--focus);
  text-decoration: none;
}

.menu .hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.links { margin-top: 2rem; font-size: 0.85rem; color: var(--muted); }
.links ul { line-height: 1.9; padding-left: 1.2rem; }

/* Ana menü — kuyumcu web ANA MENÜ düzeni */
.ana-page {
  max-width: 560px;
}
.ana-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}
.ana-menu-header {
  text-align: center;
  margin-bottom: 0.35rem;
}
.ana-menu-header h1 {
  font-size: 1.45rem;
  margin: 0 0 0.25rem;
  letter-spacing: 0.04em;
}
.ana-menu-header .sub {
  margin: 0;
  font-size: 0.85rem;
}
.module-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.1rem;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.25;
  min-height: 3.25rem;
}
.module-btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.module-btn.pesin { background: #2d6a4f; }
.module-btn.nakit { background: #1b6b6b; }
.module-btn.cari { background: #1d3557; }
.module-btn.personel { background: #4a3f6b; }
.module-btn.stok { background: #6d4c41; }
.module-btn.bilanco { background: #3d405b; }

.hub-choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 1.25rem 0 0;
}
.hub-btn {
  display: block;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 1.02rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}
.hub-btn:hover {
  border-color: var(--focus);
  background: var(--accent-bg);
  color: var(--accent);
  text-decoration: none;
}
.hub-btn .hub-sub {
  display: block;
  margin-top: 0.25rem;
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--muted);
}
.hub-btn:hover .hub-sub { color: inherit; }

/* Peşin ISCINSI seçim penceresi */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal-backdrop.hidden { display: none; }
body.modal-open { overflow: hidden; }
.modal-panel {
  width: min(520px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.modal-head.modal-dragging { cursor: grabbing; }
.modal-head .modal-close,
.modal-head button,
.modal-head a {
  cursor: pointer;
  user-select: auto;
  touch-action: auto;
}
[data-modal-drag] {
  cursor: grab;
  user-select: none;
  touch-action: none;
}
[data-modal-drag].modal-dragging { cursor: grabbing; }
.modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text);
}
.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.modal-close:hover { color: var(--text); border-color: var(--focus); }
.modal-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.pesin-secim-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pesin-grup h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.pesin-grup-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.iscinsi-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 560;
}
.iscinsi-btn:hover {
  border-color: var(--focus);
  text-decoration: none;
  background: var(--accent-bg);
}
.iscinsi-kod {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.iscinsi-ad {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 450;
}

@media (orientation: landscape) and (min-width: 720px) {
  .ana-page { max-width: 720px; }
  .ana-menu { grid-template-columns: 1fr 1fr; }
  .ana-menu-header { grid-column: 1 / -1; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.row:last-child { margin-bottom: 0; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 8rem;
  min-width: 0;
}

.field.narrow { flex: 0 1 6.5rem; }
.field.wide { flex: 1 1 100%; }

label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

input, select, textarea, button {
  font: inherit;
  color: var(--text);
}

input, select, textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--focus);
}

.mode-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.mode-tabs button {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
}

.mode-tabs button.active {
  background: var(--accent-bg);
  border-color: var(--focus);
  color: var(--accent);
}

.btn {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--focus);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-weight: 560;
}

.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.btn-danger {
  background: var(--danger-bg);
  border: 1px solid #6a3a3a;
  color: var(--danger);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.totals strong { color: var(--accent); font-size: 1.15rem; }
.totals .mismatch { color: var(--danger); }
.totals .ok { color: var(--accent); }

.odeme-row {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.odeme-row:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.odeme-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.lookup-status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
  margin-top: 0.35rem;
}

.lookup-status.ok { color: var(--accent); }
.lookup-status.err { color: var(--danger); }

.msg {
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  display: none;
}

.msg.show { display: block; }
.msg.ok { background: var(--accent-bg); color: var(--accent); }
.msg.err { background: var(--danger-bg); color: var(--danger); }

.hidden { display: none !important; }

.actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.foot-meta {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

code {
  background: #222;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: baseline;
}

table.data th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

table.data tr:last-child td { border-bottom: none; }

table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

table.data .muted { color: var(--muted); text-align: center; }

.unit {
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 400;
  margin-left: 0.15rem;
}

/* —— Rapor sayfaları (kuyumcu web stok/bilanço düzeninden) —— */
:root {
  --stok: #4caf50;
  --stok-hover: #45a049;
  --bilanco: #3498db;
  --bilanco-hover: #2980b9;
  --pos: #1e8449;
  --neg: #c0392b;
}

body.report-page {
  max-width: 1100px;
}

.personel-ozet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.personel-ozet-kpi {
  padding: 12px 14px;
  border: 1px solid #d4dce7;
  border-radius: 8px;
  background: #f8fbff;
}
.personel-ozet-kpi span {
  display: block;
  font-size: 0.82rem;
  color: #5a7088;
  margin-bottom: 4px;
}
.personel-ozet-kpi strong {
  font-size: 1.05rem;
  color: #0a3568;
}
.personel-ozet-hint {
  margin: 0 0 8px;
}
.personel-ozet-row:hover {
  background: #eef6ff;
}

.module-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}

.module-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.btn-back {
  background: #3a3a4a;
  color: #ddd;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-back:hover {
  filter: brightness(1.1);
  text-decoration: none;
  color: #fff;
}

.btn-stok {
  background: var(--stok);
  color: #fff;
  border: 1px solid var(--stok-hover);
}

.btn-stok:hover {
  background: var(--stok-hover);
  filter: none;
}

.btn-bilanco {
  background: var(--bilanco);
  color: #fff;
  border: 1px solid var(--bilanco-hover);
}

.btn-bilanco:hover {
  background: var(--bilanco-hover);
  filter: none;
}

.group-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.group-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.5rem;
}

.filter-row:last-child { margin-bottom: 0; }

.filter-row label {
  margin: 0;
  white-space: nowrap;
}

.filter-row select,
.filter-row .filter-input {
  width: auto;
  min-width: 7rem;
  max-width: 14rem;
}

.cari-ara-row {
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem 0.75rem;
}

.cari-ara-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 12rem;
  max-width: none;
}
.filter-row .cari-ara-wrap .filter-input {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.cari-bakiye-box {
  flex: 0 0 auto;
  width: 14.75rem;
  max-width: min(14.75rem, 46vw);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.18rem 0.32rem 0.2rem;
}
.cari-bakiye-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.08rem;
  line-height: 1.15;
}
.cari-bakiye-table-wrap {
  margin: 0;
  overflow-x: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}
table.data.cari-bakiye-table {
  width: 100%;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.1;
}
table.data.cari-bakiye-table th,
table.data.cari-bakiye-table td {
  padding: 0.02rem 0.22rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data.cari-bakiye-table th {
  font-size: 0.58rem;
  padding-top: 0;
  padding-bottom: 0.06rem;
}
table.data.cari-bakiye-table tr:last-child td {
  border-bottom: none;
}

.cari-hareket-bakiye-tip {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(17, 55, 98, 0.14);
  padding: 0.18rem 0.32rem 0.2rem;
  min-width: 11.5rem;
  max-width: min(14.75rem, 92vw);
}
.cari-hareket-bakiye-tip.hidden { display: none; }
.cari-hareket-bakiye-tip-inner .cari-bakiye-title { margin-bottom: 0.12rem; }
table.data tbody tr.cari-hareket-row { cursor: help; }

@media (max-width: 640px) {
  .cari-ara-row {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .cari-bakiye-box {
    width: 100%;
    max-width: none;
  }
}

/* Stok > Ürün Kartları: 13 inç masaüstünde iki dengeli kolon, gereksiz uzun alan yok. */
.urun-kart-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1.45fr) minmax(390px, .8fr);
  gap: 16px;
  height: calc(100vh - 145px);
  min-height: 540px;
}

.urun-list-panel,
.urun-form-panel {
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.urun-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 170px auto;
  gap: 10px;
  margin: 8px 0 12px;
}

.urun-toolbar input,
.urun-toolbar select {
  min-height: 44px;
}

.urun-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.urun-list-wrap tbody tr {
  cursor: pointer;
}

.urun-list-wrap tbody tr:hover,
.urun-list-wrap tbody tr:focus {
  background: #edf6ff;
  outline: none;
}

.urun-rule-note {
  margin: 8px 0 16px;
  padding: 10px 12px;
  border-left: 4px solid #c99b2b;
  border-radius: 6px;
  background: #fff9e8;
  color: #33465d;
  line-height: 1.35;
}

.urun-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.urun-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #183b67;
}

.urun-form-grid label:nth-child(2) {
  grid-column: 1 / -1;
}

.urun-form-grid input:not([type="checkbox"]),
.urun-form-grid select {
  width: 100%;
  min-height: 46px;
}

.urun-form-grid .urun-aktif-label {
  flex-direction: row;
  align-items: center;
  align-self: end;
  min-height: 46px;
}

.urun-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.urun-form-panel .foot-meta {
  margin-top: auto;
}

@media (max-width: 1050px) {
  .urun-kart-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}
.cari-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.15rem);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 16rem;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.cari-suggest-empty {
  padding: 0.5rem 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.cari-suggest-item {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.7rem;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.cari-suggest-item:hover,
.cari-suggest-item.active {
  background: var(--accent-bg);
}
.cari-suggest-kod {
  font-weight: 650;
  font-size: 0.85rem;
}
.cari-suggest-unvan {
  color: var(--muted);
  font-size: 0.8rem;
}

.filter-sep {
  color: var(--border);
  user-select: none;
}

.filter-row--actions {
  margin-top: 0.35rem;
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}

.panel-card {
  margin-bottom: 1rem;
}

.panel-card > .group-title {
  margin-bottom: 0.5rem;
}

table.data .num.pos { color: var(--pos); font-weight: 600; }
table.data .num.neg { color: var(--neg); font-weight: 600; }

table.data tfoot .toplam-row td {
  border-top: 2px solid var(--border);
  background: #1a1a2a;
}

.bilanco-view table.data th:first-child,
.bilanco-view table.data td:first-child {
  min-width: 10rem;
}

.bilanco-view tr.bil-kar td:first-child {
  color: #e0c080;
}

.bilanco-view tr.bil-stok td:first-child {
  color: var(--stok);
}

/* —— Gruplu BORÇ/ALACAK bilanço (MLJEWEL mantığı) —— */
.bilanco-grid td.bil-kalem { padding-left: 1.1rem; }
.bilanco-grid .num.muted-zero { color: var(--muted); }

.bilanco-grid tr.bil-grup td {
  background: #23233a;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  color: #cdd3ff;
  padding-top: 0.6rem;
}

.bilanco-grid tr.bil-grup-toplam td {
  color: var(--muted);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.bilanco-grid tr.bil-grup-toplam td:first-child { font-style: italic; }

.bilanco-grid tr.bil-toplam td {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.bilanco-grid tr.bil-net-row td { color: var(--accent, #ffd479); }

/* ÖZ (özel) satır/grup — gösterilir ama TOPLAM'a dahil değil */
.bilanco-grid tr.bil-ozel td { opacity: 0.62; font-style: italic; }
.bil-ozel-tag { font-size: 0.72rem; color: var(--muted); font-style: normal; }

.bilanco-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.bil-box {
  flex: 1 1 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}
.bil-box-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.bil-box-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.bil-kz {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bil-kz.pos { color: var(--pos); }
.bil-kz.neg { color: var(--neg); }
.bil-net,
.kur-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-variant-numeric: tabular-nums;
  padding: 0.15rem 0;
}
.bil-net span,
.kur-row span { color: var(--muted); }
.bil-net b,
.kur-row b { font-weight: 650; }
.kur-row.muted { color: var(--muted); font-size: 0.82rem; }
.kur-eksik {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: #e0a060;
}
.bilanco-note {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin: 0.5rem 0 1rem;
}

/* Stok özet / detay (kuyumcu web) */
.stok-detail-bar {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.btn-stok-detail {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--focus);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.5rem;
}
.btn-stok-detail:hover {
  filter: brightness(1.1);
}

/* —— AS barkod kartı (MLJEWEL okuyucu barkod kartı düzeni) —— */
/* Giriş kartı — VisBug ölçüleri (sürükleme left/top/transform atıldı) */
.giris-kart {
  width: min(298px, calc(100% - 2rem));
  margin: 8vh auto;
  padding: 32px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 13px;
  box-sizing: border-box;
}
.giris-kart label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}
.giris-kart .ana-brand {
  margin-bottom: 0.4rem;
  color: #10213c;
}
.giris-kart .ana-brand small {
  color: #617087;
}
.giris-kart input,
.giris-kart select {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
}
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }.form-grid label { display:grid; gap:.35rem; font-weight:700; }.form-wide { grid-column:1 / -1; }
.prim-kota-box { margin-top: 1rem; }
.prim-check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.5rem 0;
}
.prim-check-row input { margin: 0; flex-shrink: 0; }
.prim-check-row label {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  font-size: inherit;
  cursor: pointer;
}
.prim-kota-not { margin: .35rem 0 0; font-size: .9rem; }
.prim-aile-list { display: grid; gap: 0.55rem; margin: 0.65rem 0; }
.prim-aile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.prim-aile-row label { display: grid; gap: 0.2rem; font-weight: 700; font-size: 0.82rem; }
.prim-aile-pick select { min-width: 8.5rem; }
#prim-msg { margin: 0.75rem 0 0; }
.prim-islem-pick { display: flex; gap: 0.65rem; align-items: center; min-height: 2.4rem; }
.prim-aile-row .prim-oran-deger { width: 4.5rem; }
.prim-mini-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.prim-mini-check input { margin: 0; }
.ayarlar-menu { width:min(700px,calc(100% - 2rem)); margin:3rem auto; display:grid; gap:1rem; }.ayarlar-menu .module-btn { width:100%; text-align:left; }.kullanici-modal-card { width:min(860px,96vw); max-height:90vh; overflow:auto; background:#f7f9fc; border-radius:12px; box-shadow:0 24px 70px rgba(0,0,0,.32); }.kullanici-modal-body { padding:1.25rem 1.5rem 1.5rem; }.kullanici-modal-body .modal-hint { margin:0 0 1rem; }.settings-tabs { display:flex; gap:.55rem; margin:0 0 1rem; padding:0 0 1rem; border-bottom:1px solid var(--border); }.settings-tab { min-height:2.55rem; padding:.45rem 1rem; border:1px solid #b8c9df; border-radius:7px; background:#fff; color:#164a82; font-weight:800; cursor:pointer; }.settings-tab.active { background:#0d5da5; color:#fff; border-color:#0d5da5; }.settings-section { border-top:1px solid var(--border); margin-top:1.25rem; padding-top:1.1rem; }.settings-tabs + .settings-section { border-top:0; margin-top:0; padding-top:0; }.settings-section h3 { margin:0 0 .45rem; color:#0b3568; }.table-wrap { overflow:auto; margin-top:1rem; background:#fff; border:1px solid var(--border); border-radius:8px; }.table-wrap table { width:100%; border-collapse:collapse; }.table-wrap th,.table-wrap td { padding:.7rem; text-align:left; border-bottom:1px solid var(--border); }.btn-small { padding:.35rem .55rem; font-size:.85rem; }
.barkod-kart {
  margin-top: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.barkod-kart.hidden { display: none; }
.barkod-kart-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.barkod-resim {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.barkod-resim--yok {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--input-bg);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}
.barkod-meta { flex: 1 1 auto; min-width: 0; }
.barkod-kod {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #7fb4ff;
  letter-spacing: 0.02em;
}
.barkod-ayar {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.barkod-aciklama {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}
.barkod-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.barkod-row:last-child { border-bottom: none; }
.barkod-label { color: var(--muted); font-size: 0.85rem; }
.barkod-value { font-weight: 600; text-align: right; }
/* HAS bloğu — mavi vurgu (Gramı / Has / İşçlik / Toplam has maliyet) */
.barkod-row--has {
  background: rgba(60, 120, 220, 0.14);
}
.barkod-row--has .barkod-label,
.barkod-row--has .barkod-value {
  color: #9ec5ff;
}
.barkod-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.barkod-badge--ok { background: var(--accent-bg); color: var(--accent); }
.barkod-badge--out { background: var(--danger-bg); color: var(--danger); }

/* —— Kur giriş ekranı —— */
.kur-form-grid {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 0.5rem 0.75rem;
  align-items: center;
  max-width: 460px;
}
.kur-form-grid .kur-head {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kur-pill {
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}
.kur-pill strong { color: var(--warn); }
.canli-oto {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* —— Stok ekranı sekmeler (MLJEWEL veri tablosu) —— */
.stok-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0 0.75rem;
}
.stok-tab {
  background: var(--input-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px 7px 0 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.stok-tab:hover { filter: brightness(1.2); }
.stok-tab.active {
  background: var(--stok);
  color: #fff;
  border-color: var(--stok-hover);
}
.stok-tab .stok-tab-count { opacity: 0.85; font-weight: 500; }
.tum-stok-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
}
.tum-stok-grid.hidden { display: none; }
.tum-stok-column { display: grid; align-content: start; gap: 0.8rem; min-width: 0; }
.tum-stok-card {
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.tum-stok-card-title {
  padding: 0.45rem 0.65rem;
  color: var(--primary);
  font-weight: 700;
  background: var(--subtle-bg);
}
.tum-stok-card .table-wrap { margin: 0; }
#stok-host > .table-wrap,
#stok-host .data { min-height: 0; height: auto; }
@media (max-width: 900px) { .tum-stok-grid { grid-template-columns: 1fr; } }
/* TOPLAM satırı — sarı arka plan (MLJEWEL) */
table.data tfoot .toplam-row.stok-toplam td {
  background: #4a4020;
  color: #f0dca0;
  border-top: 2px solid var(--warn);
}

/* —— Stok "Detay listesi" —— */
.stok-detay-bar {
  margin-top: 12px;
}
.stok-detay-bar.hidden { display: none; }
.stok-detay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stok-yok-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: pointer;
}
.stok-yok-filter input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}
.stok-filter-box {
  padding: 0.6rem 0.75rem;
}
.stok-filter-row {
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.stok-filter-row select {
  min-width: 5.5rem;
  max-width: 9rem;
  padding-left: 0.45rem;
  padding-right: 1.5rem;
}
.stok-filter-row .btn {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.38rem 0.7rem;
  white-space: nowrap;
}
.stok-filter-row .status {
  flex: 1 1 4rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stok-barkod-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.stok-barkod-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.stok-barkod-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #183b67;
  font-weight: 700;
}
.stok-barkod-fields label.span-2 { grid-column: span 2; }
.stok-barkod-fields input,
.stok-barkod-fields select {
  width: 100%;
  min-height: 2.65rem;
}
.stok-barkod-fields input[readonly] { background: var(--input-bg); color: var(--muted); }
.stok-barkod-summary {
  align-self: start;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
}
.stok-barkod-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.stok-barkod-summary > div:last-child { border-bottom: 0; }
.stok-barkod-summary strong { color: #0a3568; text-align: right; white-space: nowrap; }
.stok-barkod-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
}

/* Atölye seçimi ve o firmanın cari bakiyesi aynı çalışma bandında görünür. */
.firma-kartlari-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: start;
  gap: 1rem;
}
.firma-kartlari-secim { min-width: 0; }
.stok-atolye-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.stok-atolye-actions button { border: 1px solid #b9cae0; background: #f5f8fc; color: #153b68; border-radius: 6px; padding: .42rem .72rem; font-weight: 800; cursor: pointer; }
.stok-atolye-actions button.active { background: #0b4f91; color: #fff; border-color: #0b4f91; }
.stok-odeme-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .75rem; }
.stok-odeme-fields label { display: flex; flex-direction: column; gap: .35rem; color: #183b67; font-weight: 700; }
.firma-kartlari-secim .stok-atolye-islem-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; width: 100%; margin: .75rem 0 0; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.stok-atolye-islem-buttons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin-top: .5rem; }
.stok-atolye-islem-buttons .btn { min-width: 0; padding: .45rem .25rem; font-weight: 700; white-space: nowrap; }
.stok-atolye-giris-buttons .btn { background: #07853f; border-color: #07853f; color: #fff; }
.stok-atolye-giris-buttons .btn:hover { background: #056f35; border-color: #056f35; }
.stok-atolye-cikis-buttons .btn { background: #b92f3a; border-color: #b92f3a; color: #fff; }
.stok-atolye-cikis-buttons .btn:hover { background: #9f2630; border-color: #9f2630; }
.stok-odeme-modal-card { width: min(620px, 96vw); }
.stok-yeni-atolye-modal-card { width: min(900px, 96vw); }
.stok-odeme-modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.stok-odeme-modal-body .stok-odeme-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .firma-kartlari-secim .stok-atolye-islem-box { grid-template-columns: 1fr; } .stok-atolye-islem-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stok-odeme-modal-body .stok-odeme-fields { grid-template-columns: 1fr; } }
.stok-odeme-fields input, .stok-odeme-fields select { width: 100%; min-height: 2.65rem; }
.stok-atolye-bakiye-box {
  width: 100%;
  max-width: none;
  min-height: 15.2rem;
  display: flex;
  flex-direction: column;
}
.stok-atolye-bakiye-box .cari-bakiye-table-wrap {
  flex: 1;
  display: flex;
}
.stok-atolye-bakiye-box .cari-bakiye-table {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.stok-atolye-bakiye-box .cari-bakiye-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.stok-atolye-bakiye-box .cari-bakiye-table tbody {
  flex: 1;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
}
.stok-atolye-bakiye-box .cari-bakiye-table tbody tr {
  display: grid;
  grid-template-columns: 25% 37.5% 37.5%;
}
.stok-atolye-bakiye-box .cari-bakiye-table tbody td {
  display: flex;
  align-items: center;
}
.stok-atolye-bakiye-box .cari-bakiye-table tbody td.num { justify-content: flex-end; }

.stok-tanim-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin: 14px 16px;
}

.stok-tanim-layout .group-box { margin: 0; }
.stok-tanim-form {
  display: grid;
  grid-template-columns: minmax(8rem, 0.7fr) minmax(12rem, 1.4fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.stok-tanim-form label { display: grid; gap: 5px; font-weight: 700; color: #314a6a; }
.stok-tanim-form input,
.stok-tanim-form select { min-height: 42px; }
.stok-tanim-form .stok-tanim-check { display: flex; align-items: center; min-height: 42px; white-space: nowrap; }
.stok-tanim-form .stok-tanim-check input { min-height: auto; width: 18px; height: 18px; }
.stok-tanim-form .btn {
  white-space: nowrap;
  min-width: max-content;
  min-height: 36px;
  padding: 0.42rem 0.78rem;
  font-size: 0.9rem;
}

/* Sol panelde form kolonlarının panel içinde kalması için kompakt tutulur. */
#cins-form .btn {
  width: 7.5rem;
  min-width: 0;
  padding-inline: 0.5rem;
  font-size: 0.82rem;
}

.stok-tanim-layout section:nth-child(2) .stok-tanim-form {
  grid-template-columns: minmax(9rem, 0.8fr) minmax(9rem, 1fr) minmax(11rem, 1.2fr) auto auto;
}
.stok-tanim-table-wrap { max-height: 58vh; overflow: auto; }
.stok-tanim-active { color: #078447; font-weight: 800; }
.stok-tanim-passive { color: #bd342b; font-weight: 800; }
.stok-tanim-row-action { width: 1%; text-align: right; }
.btn-stok-sil {
  border: 1px solid #d98a84;
  border-radius: 6px;
  background: #fff4f3;
  color: #b42318;
  padding: 0.3rem 0.65rem;
  font-weight: 800;
  cursor: pointer;
}
.btn-stok-sil:hover,
.btn-stok-sil:focus-visible { background: #b42318; color: #fff; }

@media (max-width: 1050px) {
  .stok-tanim-layout { grid-template-columns: 1fr; }
  .stok-tanim-layout section:nth-child(2) .stok-tanim-form {
    grid-template-columns: minmax(9rem, 0.8fr) minmax(9rem, 1fr) minmax(11rem, 1.2fr) auto auto;
  }
}

@media (max-width: 720px) {
  .stok-tanim-layout { margin: 10px; }
  .stok-tanim-form { grid-template-columns: 1fr; }
  .stok-tanim-layout section:nth-child(2) .stok-tanim-form { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stok-barkod-layout { grid-template-columns: 1fr; }
  .firma-kartlari-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .stok-barkod-fields, .stok-odeme-fields { grid-template-columns: 1fr; }
  .stok-barkod-fields label.span-2 { grid-column: span 1; }
  .stok-barkod-actions { justify-content: stretch; }
  .stok-barkod-actions .btn { flex: 1 1 auto; }
}
table.data tbody tr.stok-detay-row td {
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92em;
  color: var(--muted, #b8b8c8);
}
table.data tbody tr.stok-yok-row td,
table.data tbody tr.stok-yok-row td.num,
table.data tbody tr.stok-yok-row td.pos,
table.data tbody tr.stok-yok-row td.neg {
  color: #d83b3b;
  background: rgba(216, 59, 59, 0.08);
  font-weight: 650;
}
/* Satılmış (stokta olmayan) kaydın BÜTÜN hücre içeriği kırmızı kalır; iç içe
   sayı/renk sınıfları (pos/neg/has) bu kuralı ezemez. */
table.data tbody tr.stok-yok-row td,
table.data tbody tr.stok-yok-row td.num,
table.data tbody tr.stok-yok-row td.pos,
table.data tbody tr.stok-yok-row td.neg,
table.data tbody tr.stok-yok-row td span,
table.data tbody tr.stok-yok-row td strong,
table.data tbody tr.stok-yok-row td b {
  color: #d83b3b !important;
}
table.data tbody tr.cari-liste-row {
  cursor: pointer;
}
table.data tbody tr.cari-liste-row:hover td {
  background: var(--accent-bg);
}
.cari-bakiye-item { white-space: nowrap; font-weight: 700; }
.cari-bakiye-item b { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-right: .28rem; border-radius: 50%; color: #fff; font-size: .76rem; }
.cari-bakiye-item--alacak { color: #168a4d; }
.cari-bakiye-item--alacak b { background: #168a4d; }
.cari-bakiye-item--borc { color: #c53b3b; }
.cari-bakiye-item--borc b { background: #c53b3b; }

/* —— Onay modalı (SIFIRLA) —— */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.confirm-backdrop.hidden { display: none; }
.confirm-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  max-width: 420px;
  width: calc(100% - 2rem);
  overflow: hidden;
}
.confirm-panel > .modal-head {
  border-radius: 12px 12px 0 0;
}
.confirm-panel > .modal-head h2 {
  color: #fff;
  margin: 3px 0 0;
}
.confirm-panel > .feedback-body,
.confirm-panel-wide > .feedback-body {
  padding: 1.1rem 1.5rem 1.35rem;
}
.confirm-panel > h2 { color: var(--danger); padding: 1.25rem 1.5rem 0; }
.confirm-panel-wide { max-width: 480px; }
.sifirla-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}
.sifirla-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.sifirla-option:hover:not(:disabled) {
  border-color: var(--accent, #4a7cff);
  background: var(--accent-bg, rgba(74, 124, 255, 0.08));
}
.sifirla-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sifirla-option strong {
  font-size: 0.95rem;
  color: var(--text);
}
.sifirla-option span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.sifirla-option-danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.confirm-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.1rem;
}

/* Merkezi kullanıcı bildirimi / onay (toast yerine) */
.feedback-backdrop {
  z-index: 220;
  background: rgba(4, 20, 39, 0.62);
}
.feedback-panel {
  padding: 0;
  overflow: hidden;
}
.feedback-panel .modal-head {
  border-radius: 12px 12px 0 0;
}
.feedback-body {
  padding: 1.1rem 1.5rem 1.35rem;
}
.feedback-modal-head h2 {
  color: #fff;
  margin: 3px 0 0;
  font-size: 1.15rem;
}
.feedback-tone-err .feedback-modal-head { background: #7a1f1f; }
.feedback-tone-warn .feedback-modal-head { background: #7a5a00; }
.feedback-tone-ok .feedback-modal-head { background: #0d5a32; }
.feedback-message {
  margin: 0;
  color: var(--text, #1a2b3c);
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.feedback-actions { margin-top: 1.25rem; }
.feedback-actions .hidden { display: none !important; }

.module-btn.sifirla { background: #6b2b2b; }
.module-btn.kur { background: #2b4d6b; }

/* Ortak bölüm alt menüsü: çalışan işlevler doğrudan açılır, planlananlar kapsamı gösterir. */
.module-submenu {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid #cbd9e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(9, 48, 91, .06);
}
.module-submenu-btn {
  position: relative;
  flex: 1 0 max-content;
  min-height: 42px;
  padding: 9px 28px 9px 13px;
  border: 1px solid #b9cbe0;
  border-radius: 8px;
  background: #f7faff;
  color: #0a3568;
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.module-submenu-btn::after {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-weight: 900;
}
.module-submenu-btn.ready::after { content: "✓"; color: #078447; }
.module-submenu-btn.todo::after { content: "○"; color: #a26f00; }
.module-submenu-btn:hover,
.module-submenu-btn:focus-visible { border-color: #2877bf; background: #eaf4ff; color: #082e5c; }
.module-submenu-btn.todo { border-style: dashed; background: #fffbef; }

.roadmap-modal {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 24, 50, .64);
}
.roadmap-modal.hidden { display: none; }
.roadmap-card {
  position: relative;
  width: min(620px, 100%);
  padding: 0;
  border: 1px solid #c5d6e8;
  border-top: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(0, 20, 45, .3);
  overflow: hidden;
}
.roadmap-modal-head {
  border-radius: 14px 14px 0 0;
}
.roadmap-modal-head h2 { margin: 3px 0 0; color: #fff; }
.roadmap-modal-head .roadmap-kicker,
.roadmap-modal-head small { color: #d8e7fa; font-size: .75rem; font-weight: 850; letter-spacing: .08em; }
.roadmap-body { padding: 18px 28px 28px; }
.roadmap-card h2 { margin: 6px 38px 12px 0; color: #082e5c; }
.roadmap-card p { margin: 0 0 18px; color: #43556b; line-height: 1.55; }
.roadmap-kicker { color: #976900; font-size: .75rem; font-weight: 850; letter-spacing: .08em; }
.roadmap-status { margin-bottom: 20px; padding: 12px 14px; border-radius: 8px; background: #f2f6fb; color: #344b65; }
.roadmap-close { border: 0; background: transparent; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.roadmap-ok { min-width: 120px; }

body.pesin-v2 .module-submenu { margin: 8px 16px 0; }
@media (max-width: 900px) {
  .module-submenu-btn { flex-basis: auto; }
}

/* —— Birleşik peşin: kompakt kategori + alış/satış —— */
.pesin-secici {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.secici-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.secici-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.secici-pill {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}
.secici-pill:hover { border-color: var(--focus); background: var(--accent-bg); }
.secici-pill.active {
  border-color: var(--focus);
  background: var(--accent-bg);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--focus);
}

/* —— Anlık K/Z —— */
.kz-canli {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--input-bg);
}
.kz-canli.hidden { display: none; }
.kz-canli strong { font-size: 1.05rem; }
.kz-canli.kar { border-color: #2f7d4f; background: rgba(47, 125, 79, 0.14); }
.kz-canli.kar strong { color: #7ee0a2; }
.kz-canli.zarar { border-color: #7d2f2f; background: rgba(125, 47, 47, 0.16); }
.kz-canli.zarar strong { color: #ff9e9e; }
.kz-canli.notr strong { color: var(--text); }

/* ——— Peşin İşlem v2: iki aşamalı karma fiş ——— */
.pesin-v2 { width: 100%; max-width: none; margin: 0; padding: 0; min-height: 100vh; background: #f4f7fb; color: #10213c; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.pesin-v2 .hidden { display: none !important; }
.pesin-topbar { height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg,#06264b,#082e5c); color: #fff; box-shadow: 0 2px 8px rgba(5,30,60,.18); }
.pesin-brand { color: #fff; text-decoration: none; font-size: 1.55rem; font-weight: 800; letter-spacing: .02em; display: flex; align-items: center; gap: 12px; }
.brand-gem { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid #d4a52c; color: #efc75e; border-radius: 12px; font-size: 1.8rem; transform: rotate(45deg); }
.brand-gem::first-letter { transform: rotate(-45deg); }
.pesin-step { font-size: 1rem; display: flex; gap: 12px; align-items: center; }
.pesin-step strong { font-size: 1.25rem; }
.pesin-shell { max-width: 1660px; margin: 0 auto; padding: 28px 32px 36px; }
.owner-heading { text-align: center; margin: 4px 0 26px; }
.owner-heading h1 { margin: 0 0 8px; font-size: clamp(1.7rem,3vw,2.25rem); color: #0d2240; }
.owner-heading p { margin: 0; color: #617087; }
.owner-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 20px; }
.owner-card { min-height: 190px; border: 1px solid #ccd4df; border-radius: 12px; background: #fff; padding: 28px 30px; display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto 1fr; gap: 6px 20px; color: #15233b; text-align: left; cursor: pointer; box-shadow: 0 4px 14px rgba(9,42,78,.04); }
.owner-card:hover { border-color: #4d76aa; }
.owner-card.active { border: 2px solid #0b407a; background: #f5f9ff; box-shadow: 0 7px 20px rgba(20,72,127,.1); }
.owner-card strong { display: block; font-size: 1.3rem; color: #0a3568; margin-bottom: 8px; }
.owner-card small { display: block; color: #536176; font-size: .95rem; }
.owner-icon { grid-row: 1 / 3; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: #0b3d76; color: #fff; font-size: 2rem; }
.owner-icon.outline { background: #fff; color: #687384; border: 2px solid #aeb8c6; }
.owner-benefits { color: #20804b; line-height: 1.9; font-size: .9rem; }
.account-picker,.trade-panel,.settlement-card,.summary-card { background: #fff; border: 1px solid #d4dce7; border-radius: 10px; box-shadow: 0 3px 12px rgba(17,45,78,.04); }
.section-title { font-size: 1.08rem; font-weight: 800; color: #0a3568; letter-spacing: .015em; }
.account-picker { overflow: hidden; }
.account-picker > .section-title { padding: 18px 24px 8px; }
.account-search-row { display: flex; gap: 16px; padding: 8px 24px 16px; }
.account-search-row input { flex: 1; }
.pesin-v2 input,.pesin-v2 select { min-height: 42px; border: 1px solid #bfc9d7; border-radius: 6px; background: #fff; color: #17253a; padding: 8px 11px; font: inherit; box-sizing: border-box; }
.pesin-v2 input:focus,.pesin-v2 select:focus { outline: 2px solid rgba(25,96,170,.22); border-color: #2770b7; }
.btn-outline,.btn-primary,.btn-gold,.btn-green,.btn-cikis { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 20px; border-radius: 6px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-outline { border: 1px solid #174d88; background: #fff; color: #123b6d; }
.btn-primary { border: 1px solid #078440; color: #fff; background: linear-gradient(#12a055,#07853f); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold { border: 1px solid #b27a00; color: #6e4700; background: #fffaf0; }
.btn-green { border: 1px solid #15824c; color: #0b6739; background: #f3fff8; }
.btn-cikis { border: 1px solid #8f2a2a; color: #fff; background: linear-gradient(#c44545, var(--danger)); }
.compact { min-height: 36px; padding: 0 13px; font-size: .86rem; }
.account-table-wrap,.trade-table-wrap { overflow: auto; }
.account-table,.trade-table { width: 100%; border-collapse: collapse; }
.account-table th,.account-table td,.trade-table th,.trade-table td { border-top: 1px solid #dce2ea; padding: 11px 14px; text-align: left; }
.account-table th,.trade-table th { color: #536176; font-weight: 650; background: #f8fafc; }
.account-result { cursor: pointer; }
.account-result:hover,.account-result.selected { background: #eaf3ff; }
.account-result.selected td:first-child { color: #0b4d8c; font-weight: 900; }
.empty-cell { text-align: center !important; color: #7b8797; padding: 24px !important; }
.error-text { color: #a33b3b; }
.stage-actions { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin-top: 20px; }
.stage-selected { text-align: right; color: #58657a; }
.account-strip { min-height: 56px; display: grid; grid-template-columns: 1.05fr .45fr 1.15fr minmax(150px,.72fr) .55fr auto; gap: 12px; align-items: center; border: 1px solid #d4dce7; border-radius: 8px; background: #fff; padding: 0 18px; margin-bottom: 14px; }
.strip-icon { color: #0d447e; margin-right: 8px; }
.staff-picker { display: grid; grid-template-columns: auto minmax(100px,1fr); align-items: center; gap: 7px; color: #536176; font-size: .78rem; font-weight: 700; }
.staff-picker select { width: 100%; min-width: 0; }

.owner-inline-switch { display: inline-flex; min-width: 210px; padding: 3px; border: 1px solid #b9cbe0; border-radius: 8px; background: #edf3f9; }
.owner-inline-switch button { flex: 1; min-height: 30px; padding: 4px 9px; border: 0; border-radius: 6px; background: transparent; color: #52667d; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.owner-inline-switch button.active { background: #0b4d8c; color: #fff; box-shadow: 0 2px 6px rgba(8,46,92,.18); }
.inline-account-picker { position: relative; min-width: 0; }
.inline-account-picker input { width: 100%; min-width: 0; }
.inline-account-results { position: absolute; z-index: 180; top: calc(100% + 5px); left: 0; width: min(720px, 58vw); max-height: 280px; overflow: auto; border: 1px solid #b8cbe0; border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(4,31,62,.22); }
.inline-account-results .account-table { width: 100%; }
.inline-account-results td { padding: 8px 10px; white-space: nowrap; }
.inline-new-account { justify-content: center; white-space: nowrap; }
.active-account-inline { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.active-account-inline strong,.active-account-inline small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-account-inline strong { color: #0a3568; font-size: .78rem; }
.active-account-inline small { color: #65758a; font-size: .68rem; }
.inline-date { white-space: nowrap; color: #536176; font-size: .75rem; }
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trade-panel { min-width: 0; overflow: hidden; }
.trade-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #dce2ea; }
.trade-head h2 { margin: 0; color: #0b3568; font-size: 1.08rem; }.trade-head h2 small { display: block; margin-top: 3px; color: #08733d; font-size: .72rem; }.buy-panel .trade-head h2 small { color: #52728f; }
.trade-table-wrap { min-height: 220px; max-height: 310px; }
.trade-table { font-size: .83rem; }
.trade-table td:first-child { min-width: 150px; }
.trade-table td small { display: block; color: #778397; margin-top: 3px; }
.trade-table .line-kz { font-weight: 700; white-space: nowrap; }
.trade-table .line-kz.positive { color: #08733d; }
.trade-table .line-kz.negative { color: #a93232; }
.trade-total { padding: 12px 18px; text-align: right; border-top: 1px solid #dce2ea; font-size: 1rem; }
.sale-panel .trade-total strong { color: #a96f00; }.buy-panel .trade-total strong { color: #08733d; }
.line-remove { border: 0; background: transparent; color: #a93232; cursor: pointer; font-size: 1.2rem; }
.editable-line { cursor: pointer; }
.editable-line:hover td { background: #f2f8ff; }
.net-strip { min-height: 78px; margin: 14px 0; padding: 0 28px; border: 1px solid #d4dce7; border-radius: 9px; background: linear-gradient(90deg,#fff,#f7fbff,#fffaf0); display: grid; grid-template-columns: 1fr auto 1fr auto 1.35fr; gap: 22px; align-items: center; }
.net-strip > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #bac5d2; border-radius: 50%; font-size: 1.3rem; }
.net-strip strong { display: block; font-size: 1.15rem; margin-top: 4px; }
.net-result { border-left: 1px solid #bdc7d4; padding-left: 26px; }.net-profit { border-left: 1px solid #bdc7d4; padding-left: 20px; }.net-profit small { display: block; color: #173b68; font-weight: 800; }.net-profit strong { color: #08733d; }.net-profit strong.negative { color: #a93232; }
.net-result small { font-weight: 800; color: #173b68; }.net-result strong { color: #a16c06; font-size: 1.55rem; }
.settlement-grid { display: grid; grid-template-columns: 2.25fr .95fr; gap: 14px; }
.settlement-card,.summary-card { padding: 16px 18px; }
.payment-content { display: grid; grid-template-columns: minmax(360px,1fr) 310px; gap: 24px; align-items: start; }
.payment-actions { display: grid; gap: 10px; padding: 4px 0 4px 22px; border-left: 1px solid #dce2ea; }
.payment-actions > button { width: 100%; min-height: 44px; }
.payment-row { display: grid; grid-template-columns: 170px minmax(200px, 1.15fr) minmax(160px,1fr) 130px auto; gap: 10px; align-items: center; margin: 10px 0; }
.payment-row .pay-amount { min-width: 11.5rem; width: 100%; font-variant-numeric: tabular-nums; }
.payment-row > :nth-last-child(2):first-child { grid-column: auto; }
.current-direction { border: 1px solid #b7cbe2; background: #f3f8fe; border-radius: 6px; padding: 10px; color: #174777; font-weight: 700; }
.settlement-hint { color: #47705b; margin: 12px 0 0; font-size: .85rem; }
.summary-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #dce2ea; }
.summary-row.emphasized strong { color: #08733d; font-size: 1.25rem; }
.balance-ok,.balance-bad { text-align: center; margin-top: 16px; font-weight: 800; }.balance-ok { color: #0c7b40; }.balance-bad { color: #b23a34; }
.current-preview { margin-top: 16px; padding: 12px; border: 1px solid #b7dbc6; border-radius: 7px; background: #f3fbf6; color: #16673d; text-align: center; }
.save-transaction { min-height: 46px !important; font-size: 1rem; }
.history-page { padding: 18px; background:#fff; border:1px solid #d4dce7; border-radius:10px; }
.history-head { display:flex; justify-content:space-between; gap:20px; align-items:start; }.history-head h1 { margin:0; color:#0b3568; font-size:1.25rem; }.history-head p { color:#66758a; }
.history-filter { display:grid; grid-template-columns:150px 150px minmax(220px,1fr) 150px auto; gap:10px; padding:14px; background:#f3f7fc; border:1px solid #d6e0eb; border-radius:8px; }.history-filter label { display:flex; flex-direction:column; gap:5px; font-size:.76rem; font-weight:800; color:#455c75; }
.history-layout { display:grid; grid-template-columns:minmax(580px,1.5fr) minmax(340px,.85fr); gap:14px; margin-top:14px; }.history-table-wrap,.history-detail { border:1px solid #d6e0eb; border-radius:8px; overflow:auto; }.history-table-wrap tr[data-id] { cursor:pointer; }.history-table-wrap tr[data-id]:hover td { background:#edf6ff; }.history-detail { padding:14px; }.history-detail h2 { margin:0; color:#0b3568; }.history-detail h3 { margin:18px 0 6px; }.history-actions { display:flex; gap:8px; margin-top:16px; }.btn-danger { border:1px solid #a93232; background:#fff0f0; color:#962d2d; border-radius:6px; padding:8px 12px; font-weight:800; cursor:pointer; }
.history-direction { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }.history-direction span { display:flex; flex-direction:column; gap:4px; padding:9px; border-radius:6px; font-weight:800; }.history-direction b { font-size:.72rem; }.history-sale { color:#9a6400; background:#fff8e9; border:1px solid #ebc36d; }.history-buy { color:#08743c; background:#effbf3; border:1px solid #a8d7b8; }
@media (max-width:1050px) { .history-filter,.history-layout { grid-template-columns:1fr; }.history-head { flex-direction:column; } }
@media print { body.pesin-v2.history-list-page > header.pesin-topbar:not(#receipt-modal),body.pesin-v2.history-list-page .history-head,body.pesin-v2.history-list-page .history-filter,body.pesin-v2.history-list-page .history-table-wrap,body.pesin-v2.history-list-page #msg,body.pesin-v2.history-list-page .history-actions { display:none !important; } body.pesin-v2.history-list-page > main.pesin-shell:not(#receipt-modal) { display:block !important; padding:0 !important; } body.pesin-v2.history-list-page .history-page,body.pesin-v2.history-list-page .history-detail { display:block !important; border:0; box-shadow:none; } body.pesin-v2.history-list-page .history-layout { display:block; margin:0; } }
.transaction-footer { display: grid; grid-template-columns: minmax(260px,1fr) auto auto auto; gap: 12px; align-items: center; margin-top: 14px; }
.transaction-footer input { width: 100%; }
.pesin-v2 .msg { display: none; margin-top: 10px; padding: 10px 12px; border-radius: 6px; }
.pesin-v2 .msg.show { display: block; position: fixed; right: 18px; bottom: 14px; z-index: 130; max-width: min(480px, calc(100vw - 24px)); margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.16); }
.pesin-v2 .payment-actions .msg.show { position: static; max-width: none; box-shadow: none; margin-top: 8px; }
.pesin-v2 .msg.err { background: #fff0f0; color: #972e2e; border: 1px solid #e4adad; }
.pesin-v2 .msg.ok { background: #effbf3; color: #116b38; border: 1px solid #a8d7b8; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(4,20,39,.58); }
.line-modal-card { width: min(980px,96vw); max-height: 92vh; overflow: auto; background: #f8fafc; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; background: #082e5c; color: #fff; border-radius: 12px 12px 0 0; }
.line-modal-card .modal-head h2 { margin: 3px 0 0; color: #fff; }.modal-head small { color: #d8e7fa; font-weight: 700; }.modal-close { border: 0; background: transparent; color: #fff; font-size: 2rem; cursor: pointer; }
.category-pills,.entry-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px 0; }
.category-pills button,.entry-tabs button { min-height: 38px; padding: 0 16px; border: 1px solid #b9c6d7; border-radius: 20px; background: #fff; color: #244361; font-weight: 700; cursor: pointer; }
.category-pills button.active,.entry-tabs button.active { border-color: #0b4c8c; background: #e8f2ff; color: #073f78; }
.entry-tabs { padding-top: 10px; }.entry-tabs button { border-radius: 6px; }
.line-modal-card form { padding: 14px 22px 22px; }
.form-block { border: 1px solid #d5dde7; border-radius: 8px; background: #fff; padding: 15px; margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 13px; }
.field-grid label,.field-row label { display: flex; flex-direction: column; gap: 6px; color: #394b61; font-size: .84rem; font-weight: 700; }
.field-source { min-height: 1.1em; color: #62758c; font-size: .72rem; font-weight: 600; line-height: 1.25; }
.field-wide { grid-column: span 2; }.field-row { display: flex; align-items: end; gap: 12px; }.field-grow { flex: 1; }.field-button { margin-bottom: 0; }
.barcode-summary { display: grid; grid-template-columns: 158px minmax(390px,1fr) minmax(250px,.86fr); gap: 18px; align-items: stretch; margin-top: 12px; padding: 18px; border-radius: 9px; background: #eaf5ff; border: 1px solid #b8d9f6; }.barcode-card-main { min-width: 0; }.barcode-card-main h3 { margin: 2px 0 16px; color: #174979; font-size: 1.03rem; }.barcode-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }.barcode-info-item { min-height: 60px; padding: 0 0 10px; border-bottom: 1px solid #c9deef; display: flex; flex-direction: column; justify-content: center; gap: 6px; }.barcode-info-item small { color: #6a839e; font-size: .73rem; font-weight: 800; }.barcode-info-item strong { color: #1c476f; font-size: .88rem; line-height: 1.25; }.barcode-photo,.barcode-photo-placeholder { width:100%; min-height:100%; height:100%; box-sizing:border-box; border-radius:8px; }.barcode-photo { object-fit:cover; border:1px solid #83add0; background:#fff; }.barcode-photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px dashed #83add0; background: linear-gradient(135deg,#dcecfb,#f7fbff); color: #547898; text-align: center; }.barcode-photo-placeholder span { font-size: 2.9rem; line-height: 1; }.barcode-photo-placeholder b { font-size: .83rem; }.barcode-photo-placeholder small { font-size: .72rem; font-weight: 700; }.barcode-cost { display: flex; flex-direction: column; padding: 16px; border-radius: 8px; background: #115697; color: #fff; font-size: .83rem; }.barcode-cost b { margin-bottom: 12px; font-size: .9rem; }.barcode-cost span { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.26); line-height: 1.35; }.barcode-cost span strong { text-align: right; }.barcode-cost .barcode-cost-total { min-height: 58px; font-size: .98rem; font-weight: 900; }.ok-text { color: #078446 !important; font-weight: 800; }
.formula-preview { margin: 10px 0 0; padding: 9px 11px; border: 1px solid #c8d9eb; border-radius: 6px; background: #f2f7fd; color: #174777; font-weight: 700; font-size: .84rem; }
.receipt-modal-card { width: min(760px,96vw); max-height: 94vh; overflow: auto; background: #f6f8fb; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.receipt-paper { margin: 18px; padding: 24px; border: 1px solid #cbd4df; background: #fff; color: #17253a; }
.receipt-heading,.receipt-meta { display: flex; justify-content: space-between; gap: 20px; }
.receipt-heading { padding-bottom: 14px; border-bottom: 2px solid #0b3d76; }
.receipt-heading > div { display: flex; flex-direction: column; gap: 3px; }.receipt-heading > div:last-child { text-align: right; }
.receipt-meta { padding: 12px 0; font-size: .86rem; }
.receipt-paper table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.receipt-paper th,.receipt-paper td { padding: 7px 8px; border-bottom: 1px solid #dce2ea; text-align: left; }
.receipt-paper th:last-child,.receipt-paper td:last-child { text-align: right; }.receipt-paper td small { display: block; color: #66758a; margin-top: 2px; }
.receipt-section td { background: #edf3fa; color: #0a3568; font-weight: 800; }
.receipt-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 20px; margin: 14px 0; padding: 12px; background: #f6f8fb; }
.receipt-totals span { display: flex; justify-content: space-between; }.receipt-totals strong { grid-column: 1 / -1; text-align: right; color: #08733d; font-size: 1.05rem; }
.receipt-note { margin: 14px 0 0; }.receipt-thanks { margin: 18px 0 0; text-align: center; font-weight: 700; color: #0a3568; }
.receipt-actions { padding: 0 18px 18px; }
.receipt-actions .btn-danger { margin-right: auto; min-height: 42px; padding: 0 18px; border: 1px solid #a93232; border-radius: 6px; background: #fff0f0; color: #962d2d; font-weight: 800; cursor: pointer; }
.receipt-cancelled { margin-bottom: 12px; padding: 9px; border: 3px solid #aa3030; color: #aa3030; text-align: center; font-size: 1.35rem; font-weight: 900; letter-spacing: .12em; transform: rotate(-2deg); }

@media print {
  body.pesin-v2 > :not(#receipt-modal) { display: none !important; }
  #receipt-modal { position: static; display: block !important; padding: 0; background: #fff; }
  .receipt-modal-card { width: 100%; max-height: none; overflow: visible; box-shadow: none; background: #fff; }
  .receipt-modal-card > .modal-head,.receipt-actions { display: none !important; }
  .receipt-paper { margin: 0; border: 0; padding: 0; }
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 1050px) { .trade-grid,.owner-cards,.settlement-grid,.payment-content { grid-template-columns: 1fr; }.payment-actions { padding: 14px 0 0; border-left: 0; border-top: 1px solid #dce2ea; }.account-strip { grid-template-columns: 1fr 1fr; padding: 12px; }.field-grid { grid-template-columns: repeat(2,1fr); }.transaction-footer { grid-template-columns: 1fr 1fr; }.transaction-footer input { grid-column: 1 / -1; }.payment-row { grid-template-columns: 1fr 1fr; }.net-strip { grid-template-columns: 1fr auto 1fr; }.net-result { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #bdc7d4; padding: 12px 0; } }
@media (max-width: 650px) { .pesin-topbar { padding: 0 14px; }.pesin-brand { font-size: 1.1rem; }.pesin-shell { padding: 16px 10px 24px; }.owner-cards,.trade-grid { grid-template-columns: 1fr; }.owner-card { grid-template-columns: 54px 1fr; padding: 18px; }.owner-icon { width: 50px; height: 50px; }.account-search-row,.stage-actions { display: flex; flex-direction: column; }.field-grid { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }.payment-row,.account-strip,.transaction-footer { grid-template-columns: 1fr; }.net-strip { padding: 12px; gap: 10px; }.trade-table { min-width: 720px; } }

/* ——— Ortak görsel sistem: Peşin v2 ile renk ve yüzey bütünlüğü ——— */
body:not(.pesin-v2) {
  background:
    radial-gradient(circle at 8% 0%, rgba(31, 101, 170, .08), transparent 28rem),
    var(--bg);
}

body.report-page {
  max-width: 1240px;
  padding-top: 1rem;
}

.module-header {
  min-height: 58px;
  padding: 9px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--navy-deep), var(--navy));
  color: #fff;
  box-shadow: 0 5px 16px rgba(5, 38, 75, .16);
}
.module-title { color: #fff; font-weight: 800; letter-spacing: .035em; }
.btn-back {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(239,199,94,.72);
}
.btn-back:hover { background: rgba(255,255,255,.16); border-color: #efc75e; }

.panel,
.group-box,
.table-wrap,
.hub-btn,
.bil-box,
.confirm-panel,
.barkod-kart {
  box-shadow: 0 3px 12px rgba(17,45,78,.045);
}
.group-box,
.panel,
.hub-btn,
.bil-box { border-radius: 10px; }
.group-title,
.panel h2 { color: #0a3568; font-weight: 800; }

input, select, textarea {
  box-shadow: inset 0 1px 2px rgba(17,45,78,.025);
}
.btn {
  background: #eef5fc;
  color: #123b6d;
  border-color: #8baacb;
}
.btn-stok,
.btn-primary {
  background: linear-gradient(#12a055, #07853f);
  color: #fff;
  border-color: #07803d;
}
.btn-cikis {
  background: linear-gradient(#c44545, var(--danger));
  color: #fff;
  border-color: #8f2a2a;
}
.btn-bilanco {
  background: linear-gradient(#195d9f, #0b467f);
  color: #fff;
  border-color: #0b467f;
}
.btn-ghost { color: #36516f; background: #fff; }

table.data th {
  color: #42566f;
  background: #f3f7fb;
}
table.data td { background: rgba(255,255,255,.86); }
table.data tbody tr:hover td { background: #f4f8fd; }
table.data tfoot .toplam-row td { background: #eef3f8; }
.bilanco-grid tr.bil-grup td { background: #e8f1fb; color: #164c82; }
.bilanco-grid tr.bil-toplam td { color: #10213c; background: #f5f8fc; }
.bilanco-grid tr.bil-net-row td { color: #9a6500; }
code { background: #e8eef5; color: #173b68; }

.hub-choices { max-width: 44rem; }
.hub-btn {
  min-height: 78px;
  padding: 1rem 1.2rem;
  border-left: 5px solid var(--gold);
  background: linear-gradient(90deg,#fff,#f8fbff);
  color: #0a3568;
}
.hub-btn:hover { border-color: var(--gold); background: #eef6ff; color: #0a3568; }

/* Ana menü */
.ana-page {
  max-width: 1080px;
  min-height: 100vh;
  padding: 18px 24px 24px;
}
.ana-hero {
  min-height: 72px;
  margin-bottom: 16px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  background: linear-gradient(90deg,var(--navy-deep),var(--navy));
  color: #fff;
  box-shadow: 0 7px 22px rgba(5,38,75,.18);
}
.ana-brand { display: flex; align-items: center; gap: 14px; font-size: 1.22rem; font-weight: 800; letter-spacing: .035em; }
.ana-brand small { display: block; margin-top: 2px; color: #cbdcf0; font-size: .73rem; font-weight: 500; letter-spacing: .02em; }
.ana-gem { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid #efc75e; border-radius: 12px; color: #efc75e; font-size: 1.8rem; transform: rotate(45deg); }
.ana-env { padding: 5px 10px; border: 1px solid rgba(239,199,94,.65); border-radius: 999px; color: #f5d780; font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.ana-user-actions { display: flex; align-items: center; gap: 8px; }
.ana-logout { padding: 5px 10px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.ana-logout:hover { background: rgba(255,255,255,.12); }
.giris-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
  box-sizing: border-box;
}
.giris-actions > button.btn {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  height: 34px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.1;
  transform: none;
}
.giris-actions .btn-primary {
  border: 1px solid #078440;
  color: #fff;
  background: linear-gradient(#12a055, #07853f);
}
.giris-actions .btn-cikis {
  border: 1px solid #8f2a2a;
  color: #fff;
  background: linear-gradient(#c44545, var(--danger));
}
.ana-menu { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.ana-menu-header { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #d8e0ea; padding: 2px 2px 10px; }
.ana-menu-header h1 { color: #0d2240; font-size: 1.35rem; }
.ana-menu-header .sub { color: #617087; }
.module-btn {
  min-height: 76px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #d1dae6;
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(100deg,#fff,#f7faff) !important;
  color: #0a3568;
  box-shadow: 0 3px 12px rgba(17,45,78,.055);
}
.module-btn:hover { color: #0a3568; border-color: #7fa3c9; border-left-color: var(--gold); filter: none; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(17,55,98,.11); }
.module-btn > span:last-child { flex: 1; }
.module-btn small { display: block; margin-top: 4px; color: #65758a; font-size: .76rem; font-weight: 500; }
.module-icon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #e8f2ff; color: #0b4d8c; font-size: 1.25rem; }
.module-btn.pesin { border-left-color: #d4a52c; }
.module-btn.pesin .module-icon { background: #fff6dc; color: #9b6b00; }
.module-btn.cari,.module-btn.stok { border-left-color: #16844d; }
.module-btn.cari .module-icon,.module-btn.stok .module-icon { background: #eaf8f0; color: #08733d; }
.module-btn.sifirla { border-left-color: #b44a45; }
.module-btn.sifirla .module-icon { background: #fff0f0; color: #a93232; }
.links { margin-top: 12px; text-align: right; }
.links p { display: none; }.links ul { display: inline-flex; gap: 18px; margin: 0; padding: 0; list-style: none; }

/* 13 inç ve üzeri masaüstü: Peşin ekranının tamamı tek viewport */
@media (min-width: 1100px) and (min-height: 650px) {
  body.pesin-v2 { height: 100dvh; min-height: 0; overflow: hidden; }
  .pesin-topbar { height: 54px; padding: 0 20px; }
  .pesin-brand { font-size: 1.2rem; gap: 10px; }
  .brand-gem { width: 34px; height: 34px; border-radius: 9px; font-size: 1.35rem; }
  .pesin-step,.pesin-step strong { font-size: .92rem; }
  .pesin-shell { width: 100%; max-width: 1660px; height: calc(100dvh - 54px); padding: 10px 18px 12px; overflow: hidden; }

  .owner-stage { height: 100%; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 10px; }
  .owner-heading { margin: 0; }
  .owner-heading h1 { margin-bottom: 3px; font-size: clamp(1.35rem,2vw,1.8rem); }
  .owner-heading p { font-size: .84rem; }
  .owner-cards { gap: 12px; margin: 0; }
  .owner-card { min-height: 112px; padding: 14px 18px; grid-template-columns: 54px 1fr; gap: 2px 14px; }
  .owner-icon { width: 48px; height: 48px; font-size: 1.45rem; }
  .owner-card strong { margin-bottom: 3px; font-size: 1.03rem; }
  .owner-card small,.owner-benefits { font-size: .78rem; line-height: 1.55; }
  .account-picker { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr); }
  .account-picker > .section-title { padding: 9px 16px 3px; font-size: .9rem; }
  .account-search-row { padding: 5px 16px 8px; gap: 10px; }
  .pesin-v2 input,.pesin-v2 select,.btn-outline,.btn-primary,.btn-gold,.btn-green,.btn-cikis { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
  .account-table-wrap { min-height: 0; overflow: auto; }
  .account-table th,.account-table td { padding: 7px 11px; font-size: .8rem; }
  .empty-cell { padding: 13px !important; }
  .stage-actions { margin: 0; gap: 12px; }

  .transaction-stage:not(.hidden) { height: 100%; display: grid; grid-template-rows: 42px minmax(160px,1fr) 56px minmax(106px,.62fr) 38px; gap: 8px; }
  .account-strip { min-height: 0; margin: 0; padding: 0 8px; gap: 7px; font-size: .78rem; grid-template-columns: 210px minmax(210px,1fr) auto minmax(130px,.65fr) minmax(175px,.7fr) auto; }
  .staff-picker select { min-height: 30px; }
  .trade-grid { gap: 8px; min-height: 0; }
  .trade-panel { display: grid; grid-template-rows: 42px minmax(0,1fr) 38px; }
  .trade-head { padding: 5px 11px; }
  .trade-head h2 { font-size: .9rem; }
  .trade-table-wrap { min-height: 0; max-height: none; overflow: auto; }
  .trade-table { font-size: .72rem; }
  .trade-table th,.trade-table td { padding: 6px 8px; }
  .trade-table td:first-child { min-width: 115px; }
  .trade-total { padding: 7px 12px; font-size: .86rem; }
  .net-strip { min-height: 0; height: 56px; margin: 0; padding: 0 18px; gap: 12px; font-size: .76rem; grid-template-columns: 1fr auto 1fr auto 1.35fr 1fr; }
  .net-strip > span { width: 28px; height: 28px; font-size: 1rem; }
  .net-strip strong { margin-top: 1px; font-size: .92rem; }
  .net-result { padding-left: 16px; }.net-result strong { font-size: 1.15rem; }.net-profit { padding-left: 12px; }.net-profit strong { font-size: .94rem; }
  .settlement-grid { min-height: 0; gap: 8px; }
  .settlement-card,.summary-card { min-height: 0; padding: 9px 12px; overflow: auto; }
  .section-title { font-size: .84rem; }
  .payment-row { grid-template-columns: 130px minmax(170px,1.15fr) minmax(120px,1fr) 100px auto; gap: 7px; margin: 6px 0; }
  .payment-row .pay-amount { min-width: 10rem; }
  .settlement-hint { margin: 6px 0 0; font-size: .72rem; }
  .summary-row { padding: 5px 0; font-size: .76rem; }
  .summary-row.emphasized strong { font-size: .94rem; }
  .balance-ok,.balance-bad { margin-top: 5px; font-size: .76rem; }
  .current-preview { margin-top: 5px; padding: 5px; font-size: .72rem; }
  .transaction-footer { grid-template-columns: minmax(190px,1fr) auto auto auto; gap: 7px; margin: 0; }
  .transaction-footer input { min-width: 0; }

  .modal-backdrop { padding: 10px; }
  .line-modal-card { width: min(980px,96vw); max-height: calc(100dvh - 20px); overflow: hidden; }
  .line-modal-card .modal-head { padding: 9px 16px; }
  .line-modal-card .modal-head h2 { font-size: 1.05rem; }
  .category-pills,.entry-tabs { padding: 7px 16px 0; gap: 6px; }
  .category-pills button,.entry-tabs button { min-height: 31px; padding: 0 12px; font-size: .76rem; }
  .entry-tabs { padding-top: 6px; }
  .line-modal-card form { padding: 8px 16px 12px; }
  .form-block { padding: 9px; margin-bottom: 7px; }
  .field-grid { gap: 8px; }
  .field-grid label,.field-row label { gap: 3px; font-size: .72rem; }
  /* VisBug: barkodlu ürün bilgileri (peşin satış satırı modalı) */
  .barcode-summary { grid-template-columns: 74px minmax(150px,1fr) minmax(175px,.9fr); margin-top: 7px; padding: 7px; font-size: .75rem; }
  /* Foto: sol sütunu dikey doldur (VisBug sabit 250.6px + translate boşluk bırakıyordu) */
  .barcode-photo,.barcode-photo-placeholder {
    width: 233.687px;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    transform: none;
    object-fit: cover;
    object-position: center;
  }
  .barcode-photo-placeholder { font-size: 1.7rem; }
  .barcode-card-main { position: relative; left: 153px; top: -1px; }
  .barcode-card-main span,.barcode-cost { font-size: .65rem; }
  .barcode-cost { width: 235.36px; transform: translate(144.531px, 0); }
  /* VisBug: satır modalı Vazgeç */
  .line-modal-card #cancel-line {
    height: 35.7578px;
    min-height: 35.7578px;
    position: relative;
    left: 0;
    top: 4px;
    background-color: rgb(251, 50, 50);
    border-color: rgb(40, 85, 134);
    color: rgb(231, 237, 243);
    transform: translate(0, 2.03125px);
  }
}

@media (max-width: 719px) {
  .ana-page { padding: 10px; }
  .ana-hero { min-height: 62px; padding: 0 14px; }
  .ana-brand { font-size: 1rem; }.ana-gem { width: 34px; height: 34px; }
  .ana-menu { grid-template-columns: 1fr; }
  .ana-menu-header { align-items: flex-start; flex-direction: column; }
}

@media (min-width: 651px) {
  .account-search-row {
    display: grid;
    grid-template-columns: minmax(320px, 760px) auto;
    justify-content: space-between;
  }
  .account-search-row input {
    width: 100%;
    min-width: 0;
  }
}

/* ——— Masaüstü ekran yerleşimi: modüller tam genişlik, alanlar ölçülü ——— */
body.report-page,
body.legacy-transaction-page {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 14px 18px 24px;
}

body.report-page .hub-choices {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

body.report-page .hub-btn {
  height: 100%;
  min-height: 96px;
}

/* Cari seçiminde arama ile bakiye özeti aynı önemde ve okunabilir boyutta. */
.cari-ara-row {
  display: grid;
  grid-template-columns: auto minmax(360px, 3fr) minmax(390px, 2fr);
  align-items: center;
  gap: 10px 14px;
}

.cari-ara-wrap {
  width: 100%;
  min-width: 0;
}

.cari-bakiye-box {
  width: 100%;
  max-width: none;
  padding: 7px 10px 8px;
  border-radius: 8px;
  background: #f8fbff;
}

.cari-bakiye-title {
  margin-bottom: 5px;
  font-size: .76rem;
  line-height: 1.25;
  color: #294b72;
  font-weight: 800;
}

table.data.cari-bakiye-table {
  font-size: .84rem;
  line-height: 1.25;
}

table.data.cari-bakiye-table th,
table.data.cari-bakiye-table td {
  padding: 2px 8px;
}

table.data.cari-bakiye-table th {
  font-size: .7rem;
  padding-top: 2px;
  padding-bottom: 4px;
}

.cari-ara-row > .status {
  grid-column: 2 / 3;
}

.cari-search-group #liste-status:empty {
  display: none;
}

/* Seçili cari kartı masaüstünde tek çalışma bandı olarak kullanılır. */
@media (min-width: 981px) {
  .cari-search-group {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .cari-search-group .group-title {
    margin-bottom: 7px;
  }

.cari-search-group .cari-islem-header {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d7e1ec;
}

.cari-search-group .cari-islem-header > .group-title {
  margin-bottom: 8px;
}

  .cari-islem-secici {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, .85fr);
    gap: 18px 28px;
    align-items: start;
  }

  .cari-islem-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 10px;
  }

  .cari-islem-hint {
    margin: 8px 0 0;
  }

  .cari-bottom-panel {
    margin-top: 12px;
    padding: 10px 14px 12px;
    min-height: 0;
  }

  .cari-bottom-panel:not(.hidden) {
    min-height: 140px;
  }
}

@media (min-width: 1180px) {
  .cari-islem-secici {
    grid-template-columns: minmax(410px, 1.2fr) minmax(225px, .8fr);
  }

  .cari-search-group {
    position: relative;
    min-height: 255px;
    padding-bottom: 14px;
  }

  .cari-search-group .cari-islem-header {
    position: absolute;
    left: 16px;
    top: 78px;
    width: calc(100% - 453px);
    margin-top: 0;
    padding-top: 8px;
    border-top: none;
  }

  .cari-search-group .cari-islem-header > .group-title {
    margin-bottom: 6px;
  }

  .cari-search-group .cari-ara-row {
    display: block;
    position: static;
  }

  .cari-search-group .cari-bakiye-box {
    position: absolute;
    top: 8px;
    right: 16px;
    width: 421px;
    min-height: 243px;
    height: 243px;
    padding: 8px 11px 10px;
    display: flex;
    flex-direction: column;
  }

  .cari-search-group .cari-ara-row > label,
  .cari-search-group .cari-ara-wrap {
    position: absolute;
  }

  .cari-search-group .cari-ara-row > label {
    left: 16px;
    top: 29px;
  }

  .cari-search-group .cari-ara-wrap {
    left: 93px;
    top: 19px;
    width: 300px;
  }

  .cari-search-group .cari-search-actions {
    position: absolute;
    left: 405px;
    top: 19px;
    right: 453px;
    flex-wrap: wrap;
  }

  .cari-search-group .cari-bakiye-title {
    margin-bottom: 5px;
  }

  .cari-search-group .cari-bakiye-table thead {
    display: table-header-group;
  }

  .cari-search-group .cari-bakiye-table-wrap {
    flex: 1;
    display: flex;
  }

  .cari-search-group .cari-bakiye-table {
    height: 100%;
  }

  .cari-search-group #liste-status:not(:empty) {
    position: absolute;
    left: 93px;
    top: 96px;
  }

  .cari-search-group .cari-bakiye-table tbody td {
    padding: 3px 8px;
    border-bottom: 1px solid #d7e1ec;
    font-size: .84rem;
    white-space: nowrap;
  }

  .cari-search-group .cari-bakiye-table tbody td:nth-child(2)::before,
  .cari-search-group .cari-bakiye-table tbody td:nth-child(3)::before {
    content: none;
  }
}

/* Kur alanları kompakt kalır; form düğmeleri alan genişliğine yayılmaz. */
.kur-form-grid {
  grid-template-columns: 110px repeat(2, minmax(170px, 220px));
  max-width: 590px;
}

body.report-page .actions-row .btn-primary {
  width: auto;
  min-width: 150px;
  margin-top: 0;
}

/* Eski tek ürün fişleri: yüzey tam sayfa, veri girişleri masaüstünde kısa. */
body.legacy-transaction-page form {
  width: 100%;
  max-width: none;
}

body.legacy-transaction-page .panel {
  width: 100%;
}

body.legacy-transaction-page .field.wide {
  flex: 0 1 42rem;
}

body.legacy-transaction-page .field:not(.wide):not(.narrow) {
  flex: 0 1 20rem;
}

body.legacy-transaction-page .nav-back {
  padding: 8px 12px;
  border: 1px solid #8baacb;
  border-radius: 7px;
  background: #eef5fc;
  font-weight: 700;
}

@media (max-width: 980px) {
  .cari-ara-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
  }
  .cari-bakiye-box,
  .cari-search-actions,
  .cari-ara-row > .status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body.report-page,
  body.legacy-transaction-page {
    padding: 10px;
  }
  body.report-page .hub-choices {
    grid-template-columns: 1fr;
  }
  .cari-ara-row {
    display: flex;
  }
  body.legacy-transaction-page .field.wide,
  body.legacy-transaction-page .field:not(.wide):not(.narrow) {
    flex: 1 1 100%;
  }
}

.cari-islem-header{margin:0;padding:.85rem 0 0}
.cari-islem-secici{display:flex;flex-direction:column;gap:.75rem}
.cari-islem-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.65rem .85rem;margin-top:.65rem}
.cari-islem-hint{margin:.45rem 0 0;font-size:.78rem}
.cari-islem-pills .secici-pill{min-height:36px;padding:.45rem .85rem;font-size:.84rem;font-weight:700;line-height:1.2;display:inline-flex;align-items:center;justify-content:center}
.cari-fis-btn{min-width:9.5rem;min-height:40px;padding:.55rem 1.1rem;font-size:.92rem}
.cari-bottom-panel{margin:0;padding:.75rem 1rem}
.cari-bottom-panel.hidden{display:none!important}
#tbl-draft .draft-sil{min-width:2rem;padding:.2rem .45rem}
@media (min-width:981px){.cari-islem-secici{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(220px,.85fr);gap:18px 28px}}

/* Ortak işlem butonu standardı: yeni butonlar .btn + renk varyantı kullanır. */
.btn,
.cari-kart-nav button,
.cari-search-actions button,
.cari-card-tabs button,
.stok-atolye-actions button,
.secici-pill {
  min-height: var(--ui-button-height);
  padding: 0 var(--ui-button-padding-x);
  border-radius: var(--ui-button-radius);
  font-size: var(--ui-button-font-size);
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.module-submenu-btn {
  min-height: var(--ui-button-height);
  padding: 7px 26px 7px 11px;
  border-radius: var(--ui-button-radius);
  font-size: 0.78rem;
}

.stok-atolye-islem-buttons .btn,
.stok-tanim-form .btn,
.stok-barkod-actions .btn,
.cari-fis-btn {
  min-height: var(--ui-button-height);
  height: var(--ui-button-height);
  padding: 0 var(--ui-button-padding-x);
  font-size: var(--ui-button-font-size);
}

/* Atölye bakiye kutusunda dört para birimi satırı kullanılabilir yüksekliği eşit paylaşır. */
.stok-atolye-bakiye-box .cari-bakiye-table-wrap,
.stok-atolye-bakiye-box .cari-bakiye-table {
  min-height: 0;
}
.stok-atolye-bakiye-box .cari-bakiye-table-wrap {
  position: relative;
}
.stok-atolye-bakiye-box .cari-bakiye-table {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.stok-atolye-bakiye-box .cari-bakiye-table tbody {
  min-height: 0;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  grid-auto-rows: unset;
}
.stok-atolye-bakiye-box .cari-bakiye-table tbody tr {
  min-height: 0;
  height: 100%;
}

/* İşlem kontrol: her hareket tek satır; dar ekranda tablo yatay kayar. */
body.islem-kontrol-page {
  max-width: none;
}

.kontrol-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(120px, 1fr)) minmax(200px, 2fr);
  align-items: end;
}

.kontrol-tarih-row {
  margin-bottom: 0.4rem;
}

.kontrol-tarih-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.kontrol-tarih-row input {
  width: 10.5rem;
}

.kontrol-filter-row.filter-row--actions {
  grid-template-columns: repeat(3, minmax(135px, 1fr)) repeat(3, auto) minmax(180px, 1fr);
}

.kontrol-filter-row label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  white-space: normal;
  font-size: 0.82rem;
  font-weight: 650;
}

.kontrol-filter-row input,
.kontrol-filter-row select {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.kontrol-table {
  min-width: 1680px;
  table-layout: auto;
  font-size: 0.8rem;
}

.kontrol-table th,
.kontrol-table td {
  padding: 0.45rem 0.5rem;
  white-space: nowrap;
}

.kontrol-table .kontrol-aciklama {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 980px) {
  .kontrol-filter-row,
  .kontrol-filter-row.filter-row--actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
