:root {
  /* Sol menü — koyu, mavi eğilimli nötrler. Düz gri yerine hafif mavi
     kaydırılmış tonlar seçildi; aksan rengiyle aynı aileden olduğu için
     menü "seçilmiş" görünüyor, varsayılan görünmüyor. */
  --sb-w: 264px;
  --sb-bg: #12161f;
  --sb-bg-soft: #1a202b;
  --sb-rule: #242c3a;
  --sb-text: #dde3ec;
  --sb-dim: #838ea1;
  --sb-faint: #5a6474;
  --sb-accent: #5b9bff;
  --sb-accent-soft: rgba(91, 155, 255, .12);
  --sb-danger: #ff5d55;
  --sb-warning: #f5b544;

  --ufuk-sidebar: #1f2937;
  --ufuk-sidebar-dark: #111827;
  --ufuk-bg: #f4f6f9;
  --ufuk-border: #dee2e6;
  --ufuk-text: #212529;
  --ufuk-muted: #6c757d;
  --ufuk-primary: #0d6efd;
  --ufuk-success: #198754;
  --ufuk-danger: #dc3545;
  --ufuk-warning: #ffc107;
  --ufuk-info: #0dcaf0;
}

* { box-sizing: border-box; }
body {
  background: var(--ufuk-bg);
  color: var(--ufuk-text);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  margin: 0;
}
a { text-decoration: none; }

.app-wrapper {
  min-height: 100vh;
  position: relative;
}
.app-header {
  height: 57px;
  margin-left: var(--sb-w);
  position: sticky;
  top: 0;
  transition: margin-left .18s ease;
  z-index: 1030;
}

/* ==================================================================
   SOL MENÜ
   Üç bölge: marka, kaydırılan menü gövdesi, sabit alt blok.
   Gövde flex:1 + min-height:0 ile kaydığı için alt blok her zaman
   ekranın dibinde kalır, menü uzasa bile kaybolmaz.
   ================================================================== */
.app-sidebar {
  background: var(--sb-bg);
  border-right: 1px solid #0a0d13;
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  inset: 0 auto 0 0;
  position: fixed;
  width: var(--sb-w);
  z-index: 1038;
}

/* --- Marka --- */
.sb-brand {
  align-items: center;
  border-bottom: 1px solid var(--sb-rule);
  display: flex;
  flex: none;
  gap: 10px;
  height: 57px;
  padding: 0 14px;
}
.sb-logo {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 10px;
  min-width: 0;
}
.sb-logo:hover { color: inherit; }
.sb-mark {
  align-items: center;
  border: 1.5px solid var(--sb-accent);
  border-radius: 8px;
  color: var(--sb-accent);
  display: inline-flex;
  flex: none;
  font-size: 12px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  letter-spacing: .02em;
  width: 32px;
}
.sb-logo-text {
  display: grid;
  line-height: 1.15;
  min-width: 0;
}
.sb-logo-text strong {
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.sb-logo-text small {
  color: var(--sb-dim);
  font-size: 11px;
}

/* --- Arama --- */
.sb-search {
  align-items: center;
  background: var(--sb-bg-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  flex: none;
  gap: 8px;
  margin: 10px 12px 2px;
  padding: 7px 9px;
}
.sb-search:focus-within {
  background: #0e121a;
  border-color: var(--sb-accent);
}
.sb-search > i {
  color: var(--sb-faint);
  flex: none;
  font-size: 13px;
}
.sb-search input {
  background: transparent;
  border: 0;
  color: var(--sb-text);
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  min-width: 0;
  outline: 0;
  padding: 2px 0;
}
.sb-search input::placeholder { color: var(--sb-faint); }
.sb-search input::-webkit-search-cancel-button { filter: invert(.6); }
.sb-search kbd {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--sb-rule);
  border-radius: 4px;
  color: var(--sb-faint);
  flex: none;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.4;
  padding: 0 5px;
}
.sb-search:focus-within kbd { opacity: 0; }

/* --- Menü gövdesi --- */
.sb-nav {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 10px 12px;
  scrollbar-color: #2b3442 transparent;
  scrollbar-width: thin;
}
.sb-nav::-webkit-scrollbar { width: 9px; }
.sb-nav::-webkit-scrollbar-track { background: transparent; }
.sb-nav::-webkit-scrollbar-thumb {
  background: #2b3442;
  border: 3px solid var(--sb-bg);
  border-radius: 99px;
}
.sb-list,
.sb-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sb-list { display: flex; flex-direction: column; gap: 1px; }
/* Arama filtresi satırları hidden ile gizliyor; flex/blok bağlamında
   tarayıcı varsayılanı yetmediği için açıkça bastırılıyor. */
.sb-list > li[hidden],
.sb-sub > li[hidden] { display: none; }

.sb-section {
  color: var(--sb-faint);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .14em;
  margin: 15px 0 5px;
  padding: 0 10px;
  text-transform: uppercase;
}

/* --- Menü satırı --- */
.sb-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--sb-text);
  cursor: pointer;
  display: flex;
  font-family: inherit;
  gap: 10px;
  padding: 8px 10px;
  position: relative;
  text-align: left;
  width: 100%;
}
.sb-item:hover { background: var(--sb-bg-soft); color: #fff; }
.sb-item:focus-visible {
  outline: 2px solid var(--sb-accent);
  outline-offset: -2px;
}
.sb-icon {
  color: var(--sb-dim);
  flex: none;
  font-size: 15px;
  text-align: center;
  width: 18px;
}
.sb-item:hover .sb-icon { color: var(--sb-text); }
.sb-label {
  flex: 1;
  font-size: 13.2px;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-top .sb-label,
.sb-toggle .sb-label { font-weight: 600; }

/* Aktif kayıt: dolu mavi hap yerine kenardaki ince işaret + soluk zemin. */
.sb-item.is-active { background: var(--sb-accent-soft); color: #fff; }
.sb-item.is-active .sb-icon { color: var(--sb-accent); }
.sb-item.is-active .sb-label { font-weight: 600; }
.sb-item.is-active::before {
  background: var(--sb-accent);
  border-radius: 2px;
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.sb-top.is-active::before { height: 17px; left: -10px; width: 2.5px; }

.sb-chevron {
  color: var(--sb-faint);
  flex: none;
  font-size: 10px;
  transition: transform .18s ease;
}
.sb-group.is-open > .sb-toggle { color: #fff; }
.sb-group.is-open > .sb-toggle .sb-icon { color: var(--sb-accent); }
.sb-group.is-open > .sb-toggle .sb-chevron { transform: rotate(180deg); }

/* Alt kalemler defter kenarı gibi ince bir çizgiye asılır; ikon
   kullanılmaz, hiyerarşiyi girinti ve çizgi taşır. */
.sb-sub {
  display: none;
  margin: 2px 0 7px;
  padding-left: 18px;
  position: relative;
}
.sb-group.is-open > .sb-sub { display: block; }
.sb-sub::before {
  background: var(--sb-rule);
  bottom: 5px;
  content: "";
  left: 18px;
  position: absolute;
  top: 3px;
  width: 1px;
}
.sb-child { padding-left: 14px; }
.sb-child.is-active::before { height: 15px; left: -1px; width: 2px; }

/* --- Sayaçlar --- */
.sb-count {
  border-radius: 5px;
  flex: none;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  min-width: 20px;
  padding: 2px 5px;
  text-align: center;
}
.sb-count-danger { background: rgba(255, 93, 85, .16); color: #ff8a83; }
.sb-count-warning { background: rgba(245, 181, 68, .16); color: #f5c46e; }
/* Grup açıkken rakam alt kalemde zaten görünüyor, başlıkta tekrarlanmaz. */
.sb-group.is-open > .sb-toggle .sb-count-rolled { display: none; }

/* --- Yakında --- */
.sb-child.is-soon { color: var(--sb-faint); cursor: default; }
.sb-child.is-soon:hover { background: transparent; color: var(--sb-faint); }
.sb-soon-tag {
  color: #4b5464;
  flex: none;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.hide-soon [data-soon="1"],
body.hide-soon [data-soon-group="1"] { display: none; }

.sb-noresult {
  color: var(--sb-faint);
  font-size: 12px;
  margin: 0;
  padding: 16px 10px;
  text-align: center;
}

/* --- Alt blok --- */
.sb-foot {
  border-top: 1px solid var(--sb-rule);
  flex: none;
  padding: 8px 10px 10px;
}
.sb-foot-tools { display: flex; gap: 4px; }
.sb-soon-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--sb-faint);
  cursor: pointer;
  display: flex;
  flex: 1;
  font-family: inherit;
  font-size: 11.5px;
  gap: 7px;
  min-width: 0;
  padding: 6px 8px;
}
.sb-soon-toggle:hover { background: var(--sb-bg-soft); color: var(--sb-dim); }
.sb-soon-toggle[aria-pressed="true"] { color: var(--sb-accent); }
.sb-soon-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-rail-btn {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--sb-faint);
  cursor: pointer;
  flex: none;
  font-size: 12px;
  line-height: 1;
  padding: 7px 8px;
}
.sb-rail-btn:hover { background: var(--sb-bg-soft); color: var(--sb-text); }
.sb-user {
  align-items: center;
  background: var(--sb-bg-soft);
  border-radius: 8px;
  display: flex;
  gap: 9px;
  margin-top: 6px;
  padding: 8px 9px;
}
.sb-avatar {
  align-items: center;
  background: #2a3446;
  border-radius: 7px;
  color: #c9d3e3;
  display: inline-flex;
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.sb-user-text {
  display: grid;
  flex: 1;
  line-height: 1.25;
  min-width: 0;
}
.sb-user-text strong {
  color: var(--sb-text);
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-user-text small {
  color: var(--sb-faint);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .09em;
}
.sb-logout {
  border-radius: 6px;
  color: var(--sb-faint);
  flex: none;
  font-size: 14px;
  line-height: 1;
  padding: 6px 7px;
}
.sb-logout:hover { background: rgba(255, 93, 85, .14); color: #ff8a83; }

/* --- Daraltılmış (ray) mod --- */
body.sidebar-rail { --sb-w: 68px; }
body.sidebar-rail .sb-logo-text,
body.sidebar-rail .sb-search,
body.sidebar-rail .sb-section,
body.sidebar-rail .sb-label,
body.sidebar-rail .sb-chevron,
body.sidebar-rail .sb-soon-toggle,
body.sidebar-rail .sb-user-text,
body.sidebar-rail .sb-logout,
body.sidebar-rail .sb-noresult { display: none; }
/* Açık grubun .sb-group.is-open > .sb-sub kuralı (0,3,0) buradaki gizlemeyi
   yenmesin diye eşit/üstün özgüllükle bastırılır. */
body.sidebar-rail .sb-group > .sb-sub,
body.sidebar-rail .sb-group.is-open > .sb-sub { display: none; }
body.sidebar-rail .sb-brand { justify-content: center; padding: 0; }
body.sidebar-rail .sb-nav { padding: 8px 8px 12px; }
body.sidebar-rail .sb-item { justify-content: center; padding: 10px 0; }
body.sidebar-rail .sb-icon { font-size: 16px; width: auto; }
body.sidebar-rail .sb-top.is-active::before { left: -8px; }
body.sidebar-rail .sb-count {
  font-size: 9px;
  min-width: 0;
  padding: 1px 4px;
  position: absolute;
  right: 6px;
  top: 3px;
}
/* Ray modunda alt kalemler gizli olduğundan rakam başlıkta kalmalı. */
body.sidebar-rail .sb-group.is-open > .sb-toggle .sb-count-rolled { display: block; }
body.sidebar-rail .sb-foot { padding: 8px 8px 10px; }
body.sidebar-rail .sb-foot-tools { justify-content: center; }
body.sidebar-rail .sb-user { justify-content: center; padding: 8px 0; }

.sb-backdrop { display: none; }

.app-main {
  margin-left: var(--sb-w);
  min-height: calc(100vh - 57px);
  transition: margin-left .18s ease;
}
.app-content-header {
  padding: 20px 0 10px;
}
.app-content-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
}
.app-content {
  padding: 0 0 24px;
}
.sidebar-toggle {
  color: #495057;
  font-size: 22px;
  padding: 4px 9px;
}
.navbar-user {
  align-items: center;
  display: flex;
  gap: 10px;
}
.navbar-user strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
}
.navbar-user span {
  color: var(--ufuk-muted);
  display: block;
  font-size: 12px;
}
.user-avatar {
  align-items: center;
  background: #e9ecef;
  border-radius: 50%;
  color: #495057;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}
.summary-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.info-box {
  align-items: stretch;
  background: linear-gradient(180deg, #fff, #fbfdff);
  border: 1px solid #e7edf5;
  border-radius: 12px;
  box-shadow: 0 .45rem 1.1rem rgba(15,23,42,.06);
  display: flex;
  min-height: 112px;
  overflow: hidden;
}
.info-box-icon {
  align-items: center;
  display: flex;
  flex: 0 0 66px;
  font-size: 24px;
  justify-content: center;
  margin: 14px 0 14px 14px;
  border-radius: 12px;
}
.info-box-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 14px 14px 14px 12px;
}
.info-box-content span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}
.info-box-content strong {
  display: block;
  font-size: clamp(17px, 1.35vw, 23px);
  line-height: 1.2;
  margin: 7px 0 5px;
  /* Para tutarları asla ortadan bölünmemeli. */
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}
.info-box-content small {
  color: var(--ufuk-muted);
  font-size: 12px;
}
.loan-kpi-grid {
  gap: 12px;
}
.loan-kpi-grid .info-box {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  box-shadow: 0 7px 18px rgba(18,38,63,.06);
  display: block;
  min-height: 118px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.loan-kpi-grid .info-box-icon {
  border-radius: 10px;
  font-size: 19px;
  height: 42px;
  margin: 0;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
}
.loan-kpi-grid .info-box-content {
  display: grid;
  gap: 7px;
  justify-content: stretch;
  min-height: 118px;
  min-width: 0;
  overflow: hidden;
  padding: 16px 14px 14px;
}
.loan-kpi-grid .info-box-content span {
  align-self: start;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  max-width: calc(100% - 48px);
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.loan-kpi-grid .info-box-content strong {
  align-self: end;
  color: #111827;
  display: block;
  font-size: clamp(17px, 1.15vw, 23px);
  font-weight: 850;
  letter-spacing: -.01em;
  line-height: 1.05;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}
.loan-kpi-grid .info-box-content small {
  align-self: end;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-breakdown-summary {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  box-shadow: 0 7px 18px rgba(18,38,63,.055);
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
  padding: 18px;
}
.loan-breakdown-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
.loan-breakdown-head h3 {
  color: #111827;
  font-size: 17px;
  font-weight: 850;
  margin: 0;
}
.loan-breakdown-head span {
  background: #f3f6f9;
  border: 1px solid #e8edf3;
  border-radius: 999px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}
.loan-breakdown-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.loan-breakdown-grid div {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 1px solid #edf2f7;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  display: grid;
  gap: 5px;
  min-height: 112px;
  min-width: 0;
  padding: 15px;
}
.loan-breakdown-grid span {
  color: var(--ufuk-muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.loan-breakdown-grid strong {
  display: block;
  color: #111827;
  font-size: clamp(16px, 1.1vw, 20px);
  font-weight: 850;
  line-height: 1.12;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}
.loan-breakdown-grid small {
  color: var(--ufuk-muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.loan-breakdown-warning {
  background: #fff8e1;
  border: 1px solid #ffe8a1;
  border-radius: 8px;
  color: #664d03;
  display: grid;
  font-size: 12px;
  gap: 4px;
  padding: 9px 10px;
}

.panel-card,
.panel {
  border: 1px solid var(--ufuk-border);
  border-radius: 6px;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
  margin-bottom: 16px;
}
.panel { background: #fff; padding: 16px; }
.card-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--ufuk-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 50px;
}
.card-title,
.section-head h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 0;
}
.muted,
.text-muted {
  color: var(--ufuk-muted) !important;
}

.btn {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-weight: 600;
  gap: 6px;
  justify-content: center;
}
.btn.primary { background: var(--ufuk-primary); border-color: var(--ufuk-primary); color: #fff; }
.btn.light { background: #f8f9fa; border-color: #dee2e6; color: #343a40; }
.btn.success { background: #d1e7dd; border-color: #badbcc; color: #0f5132; }
.btn.warn { background: #fff3cd; border-color: #ffecb5; color: #664d03; }
.btn.warning { background: #fff3cd; border-color: #ffecb5; color: #664d03; }
.btn.violet { background: #ede7f6; border-color: #d5c5ef; color: #5b2a86; }
.btn.danger { background: #f8d7da; border-color: #f5c2c7; color: #842029; }
.btn.mini { font-size: 12px; padding: 4px 8px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  color: #495057;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
}
.chip:hover { background: #eef2ff; color: #0d6efd; }
.chip.active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.25fr repeat(5, minmax(120px, 1fr)) auto auto;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  color: var(--ufuk-text);
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
  outline: 0;
}
label {
  color: #343a40;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}
.form-grid {
  display: grid;
  gap: 12px;
}
.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.span-2 { grid-column: span 2; }
.checkbox-inline {
  align-items: center;
  display: flex;
  font-weight: 400;
  gap: 8px;
}
.checkbox-inline input {
  height: 16px;
  width: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
}
.period-form {
  align-items: end;
  display: flex;
  gap: 12px;
}

.table-wrap,
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  min-width: 760px;
}
table th,
.table th {
  background: #f8f9fa;
  color: #495057;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
table td,
.table td {
  font-size: 13px;
  padding-bottom: .6rem;
  padding-top: .6rem;
  vertical-align: middle;
}
.title-cell { max-width: 260px; }
.title-cell small,
td small {
  color: var(--ufuk-muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.title-cell strong {
  display: -webkit-box;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 180px;
}

.badge,
.priority,
.count-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
}
.count-badge {
  background: #f8f9fa;
  border: 1px solid var(--ufuk-border);
  color: #495057;
}
.status-paid { background: #d1e7dd !important; color: #0f5132 !important; }
.status-waiting { background: #e9ecef !important; color: #343a40 !important; }
.status-partial { background: #fff3cd !important; color: #664d03 !important; }
.status-overdue { background: #f8d7da !important; color: #842029 !important; }
.status-cancelled { background: #dee2e6 !important; color: #495057 !important; }
.status-closed { background: #e9ecef !important; color: #495057 !important; }
.loan-card-widget:has(.status-closed),
.loan-card-widget:has(.status-cancelled) {
  background: #fff;
}
.loan-card-widget:has(.status-closed) .loan-card-money .highlight,
.loan-card-widget:has(.status-cancelled) .loan-card-money .highlight {
  background: #f8f9fa;
  border-color: #e9ecef;
}
.priority-low { background: #f8f9fa; color: #6c757d; }
.priority-normal { background: #cfe2ff; color: #084298; }
.priority-high { background: #fff3cd; color: #664d03; }
.priority-critical { background: #f8d7da; color: #842029; }

/* Monthly plan dashboard */
.monthly-hero {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 18px 20px;
}
.monthly-eyebrow {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.monthly-hero h1,
.monthly-panel h2 {
  color: #111827;
  font-size: 24px;
  font-weight: 800;
  margin: 2px 0;
}
.monthly-hero p,
.monthly-panel-head p {
  color: #64748b;
  margin: 0;
}
.monthly-period-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.monthly-period-toolbar input,
.monthly-filter-card select,
.monthly-filter-card input,
.monthly-table-toolbar select {
  background: #fff;
  border: 1px solid #d7dde8;
  border-radius: 9px;
  color: #111827;
  font-size: 13px;
  height: 38px;
  outline: none;
  padding: 0 10px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.monthly-period-toolbar input:focus,
.monthly-filter-card select:focus,
.monthly-filter-card input:focus,
.monthly-table-toolbar select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.monthly-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}
.monthly-kpi {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
  display: flex;
  gap: 12px;
  min-height: 112px;
  min-width: 0;
  padding: 14px;
}
.monthly-kpi div {
  min-width: 0;
}
.monthly-kpi small {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 800;
}
.monthly-kpi strong {
  color: #111827;
  display: block;
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 850;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monthly-kpi em {
  color: #94a3b8;
  display: block;
  font-size: 11px;
  font-style: normal;
  margin-top: 4px;
}
.kpi-icon {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
  width: 40px;
}
.kpi-blue { background: #dbeafe; color: #1d4ed8; }
.kpi-green { background: #dcfce7; color: #15803d; }
.kpi-amber { background: #fef3c7; color: #b45309; }
.kpi-red { background: #fee2e2; color: #b91c1c; }
.kpi-cyan { background: #cffafe; color: #0e7490; }
.monthly-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  margin-bottom: 16px;
  overflow: hidden;
}
.monthly-panel-head {
  align-items: flex-start;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 18px;
}
.monthly-count {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}
.monthly-filter-card {
  align-items: end;
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) minmax(220px, 1.5fr) auto auto;
  padding: 14px 18px;
}
.monthly-filter-card label,
.monthly-table-toolbar label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}
.monthly-check {
  align-items: center;
  align-self: center;
  display: inline-flex !important;
  gap: 8px !important;
  white-space: nowrap;
}
.monthly-check input {
  height: auto;
}
.monthly-filter-actions {
  display: flex;
  gap: 8px;
}
.monthly-filter-actions .btn,
.monthly-period-toolbar .btn,
.monthly-pagination .btn,
.monthly-modal-actions .btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  min-height: 38px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.monthly-filter-actions .btn:hover,
.monthly-period-toolbar .btn:hover,
.monthly-pagination .btn:hover,
.monthly-modal-actions .btn:hover,
.monthly-table .btn:hover {
  box-shadow: 0 8px 16px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.monthly-filter-actions .btn:active,
.monthly-period-toolbar .btn:active,
.monthly-pagination .btn:active,
.monthly-modal-actions .btn:active,
.monthly-table .btn:active {
  box-shadow: none;
  transform: translateY(0);
}
.monthly-table-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
}
.monthly-table-toolbar label {
  align-items: center;
  display: flex;
  flex-direction: row;
}
.monthly-table-wrap,
.monthly-summary-table-wrap {
  overflow-x: auto;
}
.monthly-table,
.monthly-summary-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1040px;
  width: 100%;
}
.monthly-summary-table {
  min-width: 720px;
}
.monthly-table th,
.monthly-table td,
.monthly-summary-table th,
.monthly-summary-table td {
  border-top: 1px solid #eef2f7;
  color: #1f2937;
  font-size: 13px;
  padding: 10px 12px;
  vertical-align: middle;
}
.monthly-table th,
.monthly-summary-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.monthly-table tbody tr:hover,
.monthly-summary-table tbody tr:hover {
  background: #f8fbff;
}
.monthly-title-cell {
  max-width: 280px;
}
.monthly-title-cell strong {
  color: #111827;
  display: -webkit-box;
  font-weight: 800;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.monthly-title-cell small {
  color: #94a3b8;
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.money-col {
  text-align: right;
  white-space: nowrap;
}
.date-col {
  text-align: center;
  white-space: nowrap;
}
.monthly-status,
.monthly-priority {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}
.monthly-status-waiting { background: #f1f5f9; color: #475569; }
.monthly-status-paid { background: #dcfce7; color: #166534; }
.monthly-status-partial { background: #fef3c7; color: #92400e; }
.monthly-status-overdue { background: #fee2e2; color: #991b1b; }
.monthly-status-cancelled { background: #e5e7eb; color: #374151; }
.monthly-priority-low { background: #f8fafc; color: #64748b; }
.monthly-priority-normal { background: #dbeafe; color: #1d4ed8; }
.monthly-priority-high { background: #fef3c7; color: #92400e; }
.monthly-priority-critical { background: #fee2e2; color: #991b1b; }
.owner-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}
.owner-commercial {
  background: #dcfce7;
  color: #166534;
}
.owner-personal {
  background: #f3e8ff;
  color: #6b21a8;
}
.monthly-empty {
  color: #64748b;
  display: none;
  font-weight: 700;
  padding: 22px;
  text-align: center;
}
.monthly-pagination {
  align-items: center;
  border-top: 1px solid #eef2f7;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
}
.monthly-pagination button:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}
.monthly-tabs {
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}
.monthly-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
  padding: 8px 12px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.monthly-tabs button:hover {
  background: #eef6ff;
  color: #1d4ed8;
}
.monthly-tabs button.active {
  background: #fff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .08);
}
.monthly-modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, .52);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 2000;
}
.monthly-modal-backdrop[hidden] {
  display: none;
}
.monthly-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
  max-width: 760px;
  overflow: hidden;
  width: min(94vw, 760px);
}
.monthly-modal-head {
  align-items: flex-start;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  justify-content: space-between;
  padding: 18px;
}
.monthly-modal-head h3 {
  font-size: 20px;
  font-weight: 850;
  margin: 2px 0 0;
}
.monthly-modal-close {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #475569;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.monthly-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}
.monthly-detail-grid div {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 8px;
}
.monthly-detail-grid span {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 800;
}
.monthly-detail-grid strong {
  color: #111827;
  display: block;
  font-size: 14px;
  margin-top: 3px;
}
.monthly-note {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  color: #475569;
  margin: 0 18px 18px;
  padding: 12px;
}
.monthly-modal-actions {
  border-top: 1px solid #eef2f7;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px;
}
.monthly-modal-open {
  overflow: hidden;
}

@media (max-width: 1400px) {
  .monthly-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .monthly-filter-card {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
  .monthly-search {
    grid-column: span 2;
  }
}

@media (max-width: 992px) {
  .monthly-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .monthly-period-toolbar {
    justify-content: flex-start;
  }
  .monthly-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monthly-panel-head {
    flex-direction: column;
  }
  .monthly-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monthly-search {
    grid-column: auto;
  }
  .monthly-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .monthly-hero,
  .monthly-panel {
    border-radius: 12px;
  }
  .monthly-period-toolbar .btn,
  .monthly-period-toolbar input,
  .monthly-filter-actions .btn {
    width: 100%;
  }
  .monthly-period-toolbar,
  .monthly-filter-actions {
    width: 100%;
  }
  .monthly-kpi-grid,
  .monthly-filter-card,
  .monthly-detail-grid {
    grid-template-columns: 1fr;
  }
  .monthly-table,
  .monthly-summary-table {
    min-width: 900px;
  }
  .monthly-table-toolbar,
  .monthly-pagination,
  .monthly-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .monthly-pagination .btn,
  .monthly-modal-actions .btn {
    width: 100%;
  }
}

.empty-state {
  background: #f8f9fa;
  border: 1px dashed #ced4da;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 20px;
}
.info-note {
  background: #e7f1ff;
  border: 1px solid #b6d4fe;
  border-radius: 6px;
  color: #084298;
  font-size: 13px;
  margin: -4px 0 16px;
  padding: 10px 12px;
}

.modal {
  align-items: center;
  background: rgba(0,0,0,.5);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 1060;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 8px;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
  max-height: calc(100vh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  width: 720px;
}
.modal-card.wide { width: min(920px, 96vw); }
.modal-card.extra-wide { width: min(1180px, 98vw); }
.modal-card.small { width: min(460px, 96vw); }
.modal-head {
  align-items: center;
  border-bottom: 1px solid var(--ufuk-border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 16px;
}
.modal-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.modal-title-edit {
  display: none;
}
.modal.is-editing .modal-title-detail {
  display: none;
}
.modal.is-editing .modal-title-edit {
  display: inline;
}
.modal-card > form,
.modal-card > .detail-view,
.modal-card > .edit-form,
.modal-card > .document-box {
  margin: 12px 16px;
}
.modal-actions {
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid var(--ufuk-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  /* Alt boşluk daha önce negatif margin ile sıfırlanıyordu; butonlar
     modalın kenarına yapışık görünüyordu. */
  margin: 18px -16px -12px;
  padding: 14px 16px;
}
.modal-actions .btn {
  min-width: 78px;
}
.modal-card > .modal-actions {
  margin: 0;
  padding: 10px 16px 14px;
}
.modal-close {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #6c757d;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  width: 34px;
}
.modal-close:hover { background: #f1f3f5; color: #212529; }

.document-box {
  background: #f8f9fa;
  border: 1px dashed #ced4da;
  border-radius: 6px;
  padding: 12px;
}
.document-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.document-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.upload-inline {
  align-items: center;
  display: flex;
  gap: 8px;
}
.upload-inline input[type="file"] {
  max-width: 320px;
}
.document-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.document-list a,
.document-list-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-radius: 6px;
  color: var(--ufuk-text);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}
.document-list-item a {
  border: 0;
  color: var(--ufuk-text);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0;
}
.document-list span {
  color: var(--ufuk-muted);
  font-size: 12px;
}
.detail-hero {
  align-items: stretch;
  background: #f8f9fa;
  border: 1px solid var(--ufuk-border);
  border-left: 4px solid var(--ufuk-primary);
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 190px;
  padding: 12px;
}
.detail-hero h3 {
  font-size: 18px;
  margin: 8px 0 4px;
}
.detail-hero p {
  color: var(--ufuk-muted);
  margin: 0;
}
.amount-stack {
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-radius: 6px;
  display: grid;
  gap: 6px;
  padding: 12px;
}
.amount-stack span,
.detail-grid span {
  color: var(--ufuk-muted);
  font-size: 12px;
  font-weight: 700;
}
.amount-stack strong {
  font-size: 20px;
  white-space: nowrap;
}
.amount-stack small { color: var(--ufuk-muted); }
.detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
}
.detail-grid div,
.note-box {
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-radius: 6px;
  padding: 9px 10px;
}
.detail-grid strong {
  display: block;
  font-size: 13px;
  margin-top: 3px;
}
.note-box { margin-top: 10px; }
.note-box p {
  color: var(--ufuk-muted);
  margin: 8px 0 0;
}
.is-hidden { display: none !important; }

.modal-card .form-grid {
  gap: 10px;
}
.modal-card input,
.modal-card select,
.modal-card textarea {
  padding: 8px 9px;
}
.loan-installments {
  border-top: 1px solid var(--ufuk-border);
  margin: 12px 16px;
  padding-top: 12px;
}
.loan-installments h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.loan-installment-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.loan-installment-head h3 {
  margin: 0;
}
.loan-installment-tools,
.loan-header-actions,
.quick-edit-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.loan-header-actions {
  gap: 10px;
}
.loan-header-actions .btn,
.loan-filter-actions .btn {
  min-height: 38px;
  white-space: nowrap;
}
.loan-export-dropdown {
  position: relative;
}
.loan-export-dropdown > summary {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  list-style: none;
}
.loan-export-dropdown > summary::-webkit-details-marker {
  display: none;
}
.loan-export-menu {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 25;
}
.loan-export-menu a,
.loan-export-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #1f2937;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
  width: 100%;
}
.loan-export-menu a:hover,
.loan-export-menu button:not(:disabled):hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.loan-export-menu button:not(:disabled) {
  cursor: pointer;
}
.loan-export-menu button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}
.loan-export-menu span {
  background: #f1f5f9;
  border-radius: 999px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  margin-left: auto;
  padding: 3px 6px;
}
.bank-loan-summary-body {
  padding: 0 14px 4px;
}
.modal-card.bank-loan-summary-modal {
  width: min(1500px, 96vw);
}
.bank-loan-summary-modal .modal-head {
  align-items: flex-start;
  gap: 12px;
}
.bank-summary-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.bank-loan-summary-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow-x: visible;
}
.bank-loan-summary-table {
  table-layout: fixed;
  margin: 0;
  width: 100%;
}
.bank-loan-summary-table th,
.bank-loan-summary-table td {
  border-color: #edf2f7;
  font-size: 12px;
  line-height: 1.2;
  padding: 8px 7px;
  vertical-align: middle;
  white-space: nowrap;
}
.bank-loan-summary-table th:first-child,
.bank-loan-summary-table td:first-child {
  width: 15%;
}
.bank-loan-summary-table .count-col {
  text-align: center;
  width: 5%;
}
.bank-loan-summary-table thead th {
  background: #eff6ff;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
}
.bank-loan-summary-table tfoot th {
  background: #fff7d6;
  color: #111827;
  font-weight: 850;
}
.bank-loan-summary-table .money-col {
  text-align: right;
}
@media (max-width: 1200px) {
  .bank-loan-summary-table-wrap {
    overflow-x: auto;
  }
  .bank-loan-summary-table {
    min-width: 1080px;
  }
}
@media (max-width: 768px) {
  .bank-loan-summary-modal .modal-head {
    align-items: stretch;
  }
  .bank-summary-head-actions {
    margin-left: 0;
    width: 100%;
  }
}
.loan-empty-state.compact {
  margin: 0;
  padding: 22px;
}
.loan-print-report {
  display: none;
}
.loan-list-panel {
  border-radius: 14px;
  overflow: hidden;
}
.loan-list-panel > .card-header {
  background: #fff;
  border-bottom: 1px solid #eef2f7;
  padding: 18px;
}
.loan-list-panel .card-title {
  color: #111827;
  font-size: 19px;
  font-weight: 850;
}
.loan-list-panel .muted {
  color: #64748b;
}
.loan-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.loan-filter-panel {
  background: #fbfcfe;
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}
.loan-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.loan-filter-grid label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}
.loan-filter-grid select,
.loan-filter-grid input {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  color: #111827;
  min-height: 40px;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}
.loan-filter-grid select:focus,
.loan-filter-grid input:focus {
  border-color: #a7c7ff;
  box-shadow: 0 0 0 .18rem rgba(13,110,253,.08);
  outline: 0;
}
.loan-filter-actions {
  align-items: center;
  color: var(--ufuk-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
}
.loan-filter-actions > span {
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 999px;
  padding: 7px 11px;
}
.loan-filter-actions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.loan-card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}
.loan-card-group-title {
  align-items: baseline;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: 2px;
  padding: 9px 12px;
}
.loan-card-group-title:first-child {
  margin-top: 0;
}
.loan-card-group-title strong {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}
.loan-card-group-title span {
  color: #64748b;
  font-size: 12px;
}
.loan-card-widget {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(18,38,63,.07);
  color: var(--ufuk-text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 14px 14px 12px 18px;
  position: relative;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.loan-card-widget::before {
  background: var(--loan-status-accent, #198754);
  border-radius: 14px 0 0 14px;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}
.loan-card-widget:hover {
  border-color: rgba(13,110,253,.35);
  box-shadow: 0 14px 28px rgba(18,38,63,.13);
  color: var(--ufuk-text);
  transform: translateY(-2px);
}
.loan-card-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.loan-bank-brand {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.loan-bank-logo {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 11px;
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
  overflow: hidden;
  width: 30px;
}
.loan-bank-logo img {
  display: block;
  height: 24px;
  max-width: 24px;
  object-fit: contain;
  width: 24px;
}
.loan-bank-logo-fallback {
  align-items: center;
  background: rgba(59,130,246,.08);
  color: var(--loan-bank-accent, #3b82f6);
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 100%;
  justify-content: center;
  letter-spacing: .02em;
  width: 100%;
}
.loan-bank-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.loan-card-top strong {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-bank-title small {
  color: var(--ufuk-muted);
  display: block;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-card-top .badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
}
.loan-card-widget h3 {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.28;
  margin: 0;
  min-height: 40px;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.loan-card-meta {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.loan-card-meta span {
  align-items: center;
  background: #fbfcfe;
  border: 1px solid #edf2f7;
  border-radius: 9px;
  color: var(--ufuk-muted);
  display: flex;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  min-height: 31px;
  min-width: 0;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-card-meta i {
  color: var(--loan-bank-accent, #3b82f6);
  flex: 0 0 auto;
  margin-right: 4px;
}
.loan-next-payment {
  align-items: center;
  background: linear-gradient(180deg, #f8fbff, #f4f8fd);
  border: 1px solid #e2ebf7;
  border-radius: 12px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  padding: 9px 10px;
}
.loan-next-payment div {
  min-width: 0;
}
.loan-next-payment span {
  color: var(--ufuk-muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.loan-next-payment strong {
  display: block;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  margin-top: 2px;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-next-payment small {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  grid-column: 1 / -1;
  justify-self: stretch;
  padding: 4px 8px;
  text-align: center;
}
.loan-next-payment.is-upcoming small {
  background: #e7f1ff;
  color: #084298;
}
.loan-next-payment.is-today small {
  background: #fff3cd;
  color: #664d03;
}
.loan-next-payment.is-overdue small {
  background: #f8d7da;
  color: #842029;
}
.loan-next-payment.is-paid small {
  background: #d1e7dd;
  color: #0f5132;
}
.loan-next-payment.is-empty small {
  background: #e9ecef;
  color: #495057;
}
.loan-card-money {
  border-top: 1px solid #e7edf5;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
  padding-top: 9px;
}
.loan-card-money div {
  background: #fbfcfe;
  border: 1px solid #edf2f7;
  border-radius: 11px;
  display: grid;
  gap: 3px;
  min-height: 58px;
  min-width: 0;
  padding: 8px;
}
.loan-card-money .highlight {
  background: #f0f7ff;
  border-color: #d6e9ff;
}
.loan-card-money span {
  color: var(--ufuk-muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.loan-card-money strong {
  display: block;
  color: #111827;
  font-size: clamp(12px, .95vw, 15px);
  font-weight: 850;
  line-height: 1.15;
  margin-top: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}
.loan-card-footer {
  align-items: center;
  color: var(--ufuk-primary);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 0;
}
.loan-import-modal form {
  margin: 12px 16px;
}
.loan-import-modal select {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-import-modal label {
  min-width: 0;
}
.import-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 16px;
}
.import-steps span {
  background: #f8f9fa;
  border: 1px solid var(--ufuk-border);
  border-radius: 999px;
  color: var(--ufuk-muted);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
}
.import-steps span.active {
  background: #e7f1ff;
  border-color: #b6d4fe;
  color: #084298;
}
.form-section-title {
  color: #212529;
  font-size: 14px;
  font-weight: 800;
  margin: 14px 16px 10px;
}
.loan-import-modal form .form-section-title {
  margin-left: 0;
  margin-right: 0;
}
.file-import-box,
.import-summary {
  background: #f8fafc;
  border: 1px solid var(--ufuk-border);
  border-radius: 8px;
  margin: 0 16px 12px;
  padding: 12px;
}
.loan-import-modal form .file-import-box {
  margin-left: 0;
  margin-right: 0;
}
.import-summary {
  display: grid;
  gap: 4px;
}
.import-summary span {
  color: var(--ufuk-muted);
  font-size: 13px;
}
.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.import-mapping-grid {
  margin: 0 16px 12px;
}
.import-preview-table {
  margin: 0 16px 12px;
}
.import-preview-table .table {
  min-width: 1080px;
}
.modal-actions.compact {
  border-top: 0;
  margin-top: 0;
}
.quick-edit-actions {
  display: none;
  margin-bottom: 10px;
}
.quick-edit-actions-bottom {
  margin: 10px 0 0;
}
.quick-input {
  display: none;
  min-width: 118px;
  padding: 6px 7px;
}
.quick-input.money-input {
  min-width: 132px;
  text-align: right;
}
[data-installment-quick-form].is-quick-editing .quick-edit-actions {
  display: flex;
}
[data-installment-quick-form].is-quick-editing .quick-display,
[data-installment-quick-form].is-quick-editing .loan-action-group {
  display: none;
}
[data-installment-quick-form].is-quick-editing .quick-input {
  display: block;
}
.loan-modal .table {
  min-width: 0;
}
.loan-modal .installment-breakdown-table {
  min-width: 1460px;
}
.loan-list-table {
  min-width: 1360px;
  table-layout: fixed;
}
.loan-list-table th,
.loan-list-table td {
  vertical-align: middle;
}
.loan-list-table th:nth-child(1),
.loan-list-table td:nth-child(1) {
  min-width: 210px;
  width: 230px;
}
.loan-list-table th:nth-child(2),
.loan-list-table td:nth-child(2) {
  min-width: 220px;
  width: 250px;
}
.loan-list-table th:nth-child(3),
.loan-list-table td:nth-child(3) {
  width: 92px;
}
.loan-list-table th:nth-child(4),
.loan-list-table td:nth-child(4),
.loan-list-table th:nth-child(5),
.loan-list-table td:nth-child(5) {
  width: 98px;
}
.loan-list-table th:nth-child(6),
.loan-list-table td:nth-child(6) {
  text-align: center;
  width: 58px;
}
.loan-list-table th:nth-child(7),
.loan-list-table td:nth-child(7),
.loan-list-table th:nth-child(8),
.loan-list-table td:nth-child(8),
.loan-list-table th:nth-child(9),
.loan-list-table td:nth-child(9),
.loan-list-table th:nth-child(10),
.loan-list-table td:nth-child(10) {
  width: 112px;
}
.loan-list-table th:nth-child(11),
.loan-list-table td:nth-child(11) {
  width: 92px;
}
.loan-list-table th:nth-child(12),
.loan-list-table td:nth-child(12) {
  width: 74px;
}
.loan-list-table td:first-child strong,
.loan-list-table td:first-child small,
.loan-list-table .title-cell strong,
.loan-list-table .title-cell small {
  display: block;
  min-width: 0;
}
.loan-list-table td:first-child strong,
.loan-list-table .title-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-list-table td:first-child small {
  color: var(--ufuk-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.money-col {
  text-align: right;
  white-space: nowrap;
}
.loan-modal .table th,
.loan-modal .table td {
  font-size: 12px;
  padding-left: .45rem;
  padding-right: .45rem;
}
.loan-modal .table th:nth-child(1),
.loan-modal .table td:nth-child(1) {
  width: 72px;
  white-space: nowrap;
}
.loan-modal .table th:nth-child(2),
.loan-modal .table td:nth-child(2) {
  width: 96px;
  white-space: nowrap;
}
.loan-modal .installment-breakdown-table th,
.loan-modal .installment-breakdown-table td {
  white-space: nowrap;
}
.loan-modal .installment-breakdown-table th:nth-child(12),
.loan-modal .installment-breakdown-table td:nth-child(12) {
  max-width: 140px;
}
.loan-modal .installment-breakdown-table td:nth-child(12) strong,
.loan-modal .installment-breakdown-table td:nth-child(12) small,
.loan-list-table .title-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  max-width: 164px;
}
.loan-action-group .btn.mini {
  font-size: 11px;
  min-width: auto;
  padding: 4px 7px;
}
.loan-installment-form {
  align-items: start;
}
.loan-installment-form label small {
  color: var(--ufuk-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}
.selected-bank-account {
  background: #f8f9fa;
  border: 1px solid var(--ufuk-border);
  border-radius: 6px;
  padding: 10px 12px;
}
.selected-bank-account > strong {
  color: #212529;
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}
.selected-bank-account-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.selected-bank-account-grid span {
  color: var(--ufuk-muted);
  font-size: 12px;
  min-width: 0;
}
.selected-bank-account-grid b {
  color: #212529;
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.bank-account-table {
  min-width: 980px;
}
.compact-text {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkbox-field {
  align-content: end;
  display: flex;
  gap: 8px;
  padding: 30px 0 8px;
}
.checkbox-field input {
  width: auto;
}

.feedback-layout .card-body {
  min-height: 0;
}

.login-page {
  align-items: center;
  background: linear-gradient(135deg, #111827, #0d6efd);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-box {
  width: min(420px, 100%);
}
.login-logo {
  color: #fff;
  display: grid;
  margin-bottom: 14px;
  text-align: center;
}
.login-logo strong {
  font-size: 30px;
  font-weight: 800;
}
.login-logo span {
  color: rgba(255,255,255,.78);
}
.login-card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.28);
}
.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 10px 0 4px;
}
.login-card p {
  color: var(--ufuk-muted);
  margin: 0 0 16px;
}
.login-card .demo-badge {
  background: #fff3cd;
  border-color: #ffecb5;
  color: #664d03;
  margin: 0;
}
.login-demo {
  color: var(--ufuk-muted);
  display: block;
  margin-top: 12px;
  text-align: center;
}

.bank-account-table {
  min-width: 980px;
}
.bank-account-table .compact-text {
  max-width: 180px;
}
.bank-account-form {
  display: grid;
  gap: 14px;
}
.bank-account-form .form-section {
  border: 1px solid var(--ufuk-border);
  border-radius: 8px;
  padding: 14px;
}
.bank-account-form .form-section h3 {
  color: var(--ufuk-text);
  font-size: .92rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.bank-account-form .checkbox-field {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--ufuk-border);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  min-height: 42px;
  padding: 9px 11px;
}
.bank-account-form .checkbox-field input {
  width: auto;
}
.input-with-action {
  align-items: center;
  display: flex;
  gap: 8px;
}
.input-with-action input {
  flex: 1;
}
.share-card {
  background: #f8fafc;
  border: 1px solid var(--ufuk-border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}
.share-card dl {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: 90px 1fr;
  margin: 0;
}
.share-card dt {
  color: var(--ufuk-muted);
  font-size: 12px;
  font-weight: 700;
}
.share-card dd {
  margin: 0;
}
.share-card textarea {
  min-height: 150px;
  resize: vertical;
}
.copy-feedback {
  margin: 0;
  min-height: 18px;
}
.bank-account-filter {
  align-items: end;
  margin-bottom: 14px;
}
.bank-account-filter .filter-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.loan-detail-page {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.loan-detail-hero {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(18,38,63,.07);
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr minmax(260px, .9fr);
  padding: 18px;
}
.loan-detail-block {
  border-right: 1px solid #eef2f7;
  min-width: 0;
  padding-right: 16px;
}
.loan-detail-block span,
.loan-detail-amounts span {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.loan-detail-block h2 {
  color: #111827;
  font-size: clamp(17px, 1.25vw, 21px);
  font-weight: 850;
  line-height: 1.25;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.loan-detail-block p {
  color: #64748b;
  font-size: 13px;
  margin: 0 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-detail-block dl {
  display: grid;
  gap: 7px 12px;
  grid-template-columns: 92px minmax(0, 1fr);
  margin: 0;
}
.loan-detail-block dt {
  color: #64748b;
  font-size: 12px;
}
.loan-detail-block dd {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-detail-next-payment {
  background: transparent;
  border: 0;
  border-top: 1px solid #eef2f7;
  display: block;
  margin-top: 9px;
  min-width: 0;
  padding: 8px 0 0;
}
.loan-detail-next-payment div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.loan-detail-next-payment span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}
.loan-detail-next-payment strong {
  color: #111827;
  display: block;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-detail-next-payment small {
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  justify-content: center;
  margin-top: 0;
  padding: 3px 7px;
  width: fit-content;
}
.loan-detail-next-payment.is-overdue small {
  background: #f8d7da;
  color: #842029;
}
.loan-detail-next-payment.is-today small,
.loan-detail-next-payment.is-soon small {
  background: #ffe5c2;
  color: #9a4b00;
}
.loan-detail-next-payment.is-medium small {
  background: #fff3cd;
  color: #664d03;
}
.loan-detail-next-payment.is-upcoming small {
  background: #e7f1ff;
  color: #084298;
}
.loan-detail-next-payment.is-paid small {
  background: #d1e7dd;
  color: #0f5132;
}
.loan-detail-amounts {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.loan-detail-amounts div {
  background: linear-gradient(180deg, #fbfcfe, #f8fafc);
  border: 1px solid #edf2f7;
  border-radius: 12px;
  min-width: 0;
  padding: 12px 13px;
}
.loan-detail-amounts strong {
  color: #111827;
  display: block;
  font-size: clamp(17px, 1.45vw, 24px);
  font-weight: 850;
  line-height: 1.12;
  margin-top: 4px;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-detail-toolbar,
.loan-detail-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.loan-detail-toolbar.split {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(18,38,63,.045);
  gap: 14px;
  justify-content: space-between;
  padding: 10px;
}
.loan-detail-actions,
.loan-danger-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.loan-detail-actions {
  flex: 1 1 420px;
}
.loan-detail-actions .btn,
.loan-danger-actions .btn,
.loan-installment-tools .btn,
.loan-action-group .btn,
.quick-edit-actions .btn {
  min-height: 34px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}
.loan-detail-actions .btn:hover,
.loan-danger-actions .btn:hover,
.loan-installment-tools .btn:hover,
.loan-action-group .btn:hover,
.quick-edit-actions .btn:hover {
  box-shadow: 0 8px 16px rgba(18,38,63,.12);
  transform: translateY(-1px);
}
.loan-detail-actions .btn:active,
.loan-danger-actions .btn:active,
.loan-installment-tools .btn:active,
.loan-action-group .btn:active,
.quick-edit-actions .btn:active {
  box-shadow: 0 3px 8px rgba(18,38,63,.08);
  transform: translateY(0);
}
.loan-detail-actions .btn:focus-visible,
.loan-danger-actions .btn:focus-visible,
.loan-installment-tools .btn:focus-visible,
.loan-action-group .btn:focus-visible,
.quick-edit-actions .btn:focus-visible {
  outline: 3px solid rgba(13,110,253,.22);
  outline-offset: 2px;
}
.loan-danger-actions {
  background: #fffafa;
  border: 1px solid #f5d0d5;
  border-radius: 10px;
  flex: 0 1 auto;
  padding: 7px;
}
.loan-danger-actions > span {
  color: #842029;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.loan-detail-tabs {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(18,38,63,.045);
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: -4px;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px;
  scrollbar-width: thin;
}
.loan-detail-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #64748b;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 12px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.loan-detail-tabs button.active {
  background: var(--ufuk-primary);
  border-color: var(--ufuk-primary);
  box-shadow: 0 5px 12px rgba(13,110,253,.18);
  color: #fff;
}
.loan-detail-tabs button:not(.active):hover {
  background: #f3f6f9;
  border-color: #e8edf3;
  color: #111827;
  transform: translateY(-1px);
}
.loan-detail-tabs button:active {
  box-shadow: none;
  transform: translateY(0);
}
.loan-detail-tabs button:focus-visible {
  outline: 3px solid rgba(13,110,253,.22);
  outline-offset: 2px;
}
.loan-tab-panel {
  display: none;
  max-width: 100%;
  min-width: 0;
}
.loan-tab-panel.active {
  display: block;
}
.loan-tab-panel .panel-card,
.loan-tab-panel form {
  max-width: 100%;
  min-width: 0;
}
.loan-plan-summary {
  background: #fbfcfe;
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 12px 16px;
}
.loan-plan-summary div {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  min-width: 0;
  padding: 9px 10px;
}
.loan-plan-summary span {
  color: #64748b;
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.loan-plan-summary strong {
  color: #111827;
  display: block;
  font-size: clamp(12px, .95vw, 15px);
  font-weight: 850;
  line-height: 1.15;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-general-card {
  overflow: hidden;
}
.loan-general-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}
.loan-general-section {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(18,38,63,.035);
  min-width: 0;
  padding: 16px;
}
.loan-general-section h3 {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  margin: 0 0 10px;
}
.loan-general-fields {
  display: grid;
  column-gap: 18px;
  row-gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.loan-general-fields div {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  min-width: 0;
  padding: 9px 0;
}
.loan-general-fields .span-2 {
  grid-column: span 2;
}
.loan-general-fields span {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.loan-general-fields strong {
  color: #111827;
  display: block;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.loan-general-note {
  grid-column: 1 / -1;
}
.loan-general-note .note-box {
  background: #fbfcfe;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  margin-top: 0;
  min-height: 0;
  padding: 12px;
}
.loan-general-note .note-box p {
  color: #334155;
  line-height: 1.55;
  margin: 0;
}
.loan-detail-plan-table {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior: auto;
  overscroll-behavior-y: auto;
  padding-bottom: 8px;
  scroll-behavior: auto;
  touch-action: pan-x pan-y;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}
.loan-detail-plan-table .installment-breakdown-table {
  min-width: 1000px;
  table-layout: fixed;
  width: 100%;
}
.loan-plan-table th,
.loan-plan-table td {
  font-size: 11.5px;
  padding: .48rem .4rem;
  vertical-align: middle;
}
.loan-plan-table th:nth-child(1),
.loan-plan-table td:nth-child(1) {
  text-align: center;
  width: 58px;
}
.loan-plan-table th:nth-child(2),
.loan-plan-table td:nth-child(2) {
  width: 96px;
}
.loan-plan-table th:nth-child(3),
.loan-plan-table td:nth-child(3) {
  width: 108px;
}
.loan-plan-table th:nth-child(5),
.loan-plan-table td:nth-child(5),
.loan-plan-table th:nth-child(6),
.loan-plan-table td:nth-child(6) {
  width: 104px;
}
.loan-plan-table th:nth-child(7),
.loan-plan-table td:nth-child(7) {
  width: 116px;
}
.loan-plan-table th:nth-child(4),
.loan-plan-table td:nth-child(4) {
  width: 176px;
}
.loan-plan-table th:nth-child(8),
.loan-plan-table td:nth-child(8) {
  width: 82px;
}
.loan-plan-table th:nth-child(9),
.loan-plan-table td:nth-child(9) {
  width: 148px;
}
.loan-plan-table tbody tr {
  transition: background-color .16s ease, box-shadow .16s ease;
}
.loan-plan-table tbody tr:hover {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 rgba(13,110,253,.18);
}
.loan-plan-table .loan-action-group {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  max-width: 128px;
  min-width: 124px;
}
.loan-plan-table .loan-action-group .btn.mini {
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.1;
  min-height: 23px;
  padding: 3px 4px;
  white-space: nowrap;
}
.loan-plan-table .badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10.5px;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 24px;
  min-width: 68px;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
}
.installment-no {
  align-items: center;
  background: #eef2f7;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 25px;
  justify-content: center;
  min-width: 28px;
  padding: 0 7px;
}
.due-date-strong,
.total-installment .quick-display {
  color: #111827;
  font-weight: 850;
}
.installment-breakdown-lines {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.installment-breakdown-lines span,
.installment-breakdown-lines small {
  color: #64748b;
  display: block;
  font-size: 10.5px;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.installment-breakdown-lines small {
  color: #94a3b8;
  font-size: 10px;
  margin-top: 1px;
}
.installment-breakdown-lines b {
  color: #111827;
  font-weight: 800;
}
.installment-breakdown-lines .late-fee,
.installment-breakdown-lines .late-fee b {
  color: #b42318;
}
.breakdown-quick-grid {
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}
[data-installment-quick-form].is-quick-editing .breakdown-quick-grid.quick-input {
  display: grid;
}
.breakdown-quick-grid label {
  color: #64748b;
  display: grid;
  font-size: 10px;
  font-weight: 800;
  gap: 3px;
  margin: 0;
}
.breakdown-quick-grid .span-2 {
  grid-column: span 2;
}
.breakdown-quick-grid input {
  min-width: 0;
  width: 100%;
}
.loan-detail-plan-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.loan-detail-plan-table .installment-breakdown-table th:last-child,
.loan-detail-plan-table .installment-breakdown-table td:last-child {
  background: #fff;
  box-shadow: -5px 0 10px rgba(0,0,0,.035);
  position: sticky;
  right: 0;
  z-index: 3;
}
.loan-detail-plan-table .installment-breakdown-table thead th:last-child {
  background: #f8f9fa;
  z-index: 4;
}
.loan-documents-card {
  overflow: hidden;
}
.loan-documents-card > .section-head {
  padding: 14px 16px;
}
.loan-documents-empty {
  align-items: center;
  background: #fbfcfe;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  display: grid;
  gap: 9px;
  justify-items: center;
  margin: 16px;
  padding: 26px 18px;
  text-align: center;
}
.loan-documents-empty strong {
  color: #111827;
  font-size: 16px;
}
.loan-documents-empty span {
  color: #64748b;
  font-size: 13px;
}
.loan-documents-table {
  max-width: 100%;
  overflow-x: auto;
}
.loan-documents-table table {
  min-width: 960px;
}
.loan-documents-table td {
  vertical-align: middle;
}
.document-file-name {
  color: #111827;
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-note {
  color: #475569;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  min-width: 170px;
}
.loan-document-actions .btn.mini {
  min-height: 25px;
  padding: 4px 7px;
}
.loan-activity-card {
  overflow: hidden;
}
.loan-activity-card > .section-head {
  padding: 14px 16px;
}
.loan-activity-empty {
  align-items: center;
  background: #fbfcfe;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 16px;
  padding: 26px 18px;
  text-align: center;
}
.loan-activity-empty strong {
  color: #111827;
  font-size: 16px;
}
.loan-activity-empty span {
  color: #64748b;
  font-size: 13px;
}
.loan-activity-timeline {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.payment-activity-timeline {
  max-height: 320px;
  overflow-y: auto;
}
.loan-activity-item {
  align-items: flex-start;
  display: grid;
  gap: 12px;
  grid-template-columns: 18px minmax(0, 1fr);
}
.loan-activity-dot {
  background: #2563eb;
  border: 4px solid #dbeafe;
  border-radius: 999px;
  height: 16px;
  margin-top: 14px;
  width: 16px;
}
.loan-activity-item.is-installment .loan-activity-dot { background: #16a34a; border-color: #dcfce7; }
.loan-activity-item.is-document .loan-activity-dot { background: #7c3aed; border-color: #ede9fe; }
.loan-activity-item.is-danger .loan-activity-dot { background: #dc2626; border-color: #fee2e2; }
.loan-activity-body {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.loan-activity-body:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}
.loan-activity-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.loan-activity-head time {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}
.loan-activity-head h3 {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}
.loan-activity-type {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}
.loan-activity-item.is-installment .loan-activity-type { background: #ecfdf5; color: #047857; }
.loan-activity-item.is-document .loan-activity-type { background: #f5f3ff; color: #6d28d9; }
.loan-activity-item.is-danger .loan-activity-type { background: #fef2f2; color: #b91c1c; }
.loan-activity-body p {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  margin: 7px 0 0;
}
.loan-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.loan-activity-meta span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}

@media (max-width: 1200px) {
  .summary-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loan-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loan-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loan-plan-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loan-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selected-bank-account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loan-general-grid { grid-template-columns: 1fr; }
  .loan-detail-hero { grid-template-columns: 1fr; }
  .loan-detail-block { border-right: 0; border-bottom: 1px solid var(--ufuk-border); padding-bottom: 12px; padding-right: 0; }
}

@media (max-width: 992px) {
  .app-header,
  .app-main {
    margin-left: 0;
  }
  /* Dar ekranda ray modu anlamsız; menü tam genişlikte üste kayar. */
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease-in-out;
    width: 280px;
  }
  body.sidebar-open .app-sidebar {
    box-shadow: 0 0 44px rgba(0, 0, 0, .55);
    transform: translateX(0);
  }
  body.sidebar-rail .sb-logo-text,
  body.sidebar-rail .sb-search,
  body.sidebar-rail .sb-section,
  body.sidebar-rail .sb-label,
  body.sidebar-rail .sb-chevron,
  body.sidebar-rail .sb-soon-toggle,
  body.sidebar-rail .sb-user-text,
  body.sidebar-rail .sb-logout { display: revert; }
  body.sidebar-rail .sb-group.is-open > .sb-sub { display: block; }
  body.sidebar-rail .sb-brand { justify-content: flex-start; padding: 0 14px; }
  body.sidebar-rail .sb-item { justify-content: flex-start; padding: 8px 10px; }
  body.sidebar-rail .sb-icon { width: 18px; }
  body.sidebar-rail .sb-count { position: static; }
  body.sidebar-rail .sb-user { justify-content: flex-start; padding: 8px 9px; }
  .sb-rail-btn { display: none; }
  .sb-backdrop {
    background: rgba(7, 10, 15, .58);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 1037;
  }
  .sb-backdrop[hidden] { display: none; }
  .summary-grid,
  .summary-grid.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .loan-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .loan-list-panel > .card-header {
    align-items: stretch;
    flex-direction: column;
  }
  .loan-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .app-content-header .breadcrumb { display: none; }
  .navbar-user div { display: none; }
  .summary-grid,
  .summary-grid.five,
  .loan-breakdown-grid,
  .filter-grid,
  .form-grid.two-col,
  .detail-grid,
  .selected-bank-account-grid,
  .loan-filter-grid,
  .loan-card-meta,
  .loan-card-money,
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .loan-card-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .info-box {
    min-height: 96px;
  }
  .info-box-icon {
    flex-basis: 54px;
    font-size: 21px;
    margin: 12px 0 12px 12px;
  }
  .info-box-content {
    padding: 12px;
  }
  .loan-breakdown-summary,
  .loan-filter-panel {
    padding: 12px;
  }
  .loan-filter-actions,
  .loan-filter-actions div,
  .loan-header-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .loan-filter-actions .btn,
  .loan-header-actions .btn {
    width: 100%;
  }
  .loan-detail-toolbar.split,
  .loan-detail-actions,
  .loan-danger-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .loan-detail-actions,
  .loan-danger-actions {
    flex: 1 1 auto;
    width: 100%;
  }
  .loan-detail-actions .btn,
  .loan-danger-actions .btn {
    justify-content: center;
    width: 100%;
  }
  .loan-general-fields {
    grid-template-columns: 1fr;
  }
  .loan-general-fields .span-2 {
    grid-column: span 1;
  }
  .loan-plan-summary {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .loan-detail-plan-table {
    max-height: none;
    overflow-x: hidden;
  }
  .loan-detail-plan-table .loan-plan-table {
    min-width: 0;
    width: 100%;
  }
  .loan-plan-table thead {
    display: none;
  }
  .loan-plan-table,
  .loan-plan-table tbody,
  .loan-plan-table tr,
  .loan-plan-table td {
    display: block;
    width: 100% !important;
  }
  .loan-plan-table tbody tr {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(18,38,63,.045);
    margin: 0 0 12px;
    padding: 10px;
  }
  .loan-plan-table tbody tr:hover {
    background: #fff;
  }
  .loan-plan-table td {
    align-items: flex-start;
    border: 0;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 7px 2px;
    text-align: right;
  }
  .loan-plan-table td::before {
    color: #64748b;
    content: attr(data-label);
    flex: 0 0 116px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
  }
  .loan-detail-plan-table .loan-plan-table td:last-child {
    background: transparent;
    box-shadow: none;
    position: static;
    right: auto;
    z-index: auto;
  }
  .loan-plan-table .loan-action-group {
    justify-content: flex-end;
    max-width: none;
  }
  .loan-documents-table {
    overflow-x: hidden;
  }
  .loan-documents-table table,
  .loan-documents-table tbody,
  .loan-documents-table tr,
  .loan-documents-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .loan-documents-table thead {
    display: none;
  }
  .loan-documents-table tr {
    border: 1px solid #edf2f7;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(18,38,63,.045);
    margin: 0 0 12px;
    padding: 10px;
  }
  .loan-documents-table td {
    border: 0;
    padding: 7px 2px;
  }
  .document-file-name,
  .document-note {
    max-width: 100%;
    white-space: normal;
  }
  .loan-document-actions {
    justify-content: flex-start;
    min-width: 0;
  }
  .loan-activity-timeline {
    padding: 12px;
  }
  .loan-activity-item {
    gap: 9px;
    grid-template-columns: 14px minmax(0, 1fr);
  }
  .loan-activity-dot {
    border-width: 3px;
    height: 13px;
    width: 13px;
  }
  .loan-activity-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .breakdown-quick-grid {
    grid-template-columns: 1fr;
  }
  .breakdown-quick-grid .span-2 {
    grid-column: span 1;
  }
  .loan-card-top {
    align-items: flex-start;
  }
  .loan-card-top .badge {
    margin-top: 2px;
  }
  .span-2 { grid-column: span 1; }
  .period-form,
  .section-head,
  .document-head,
  .upload-inline {
    align-items: stretch;
    flex-direction: column;
  }
  .modal {
    padding: 10px;
  }
  .document-list a,
  .document-list-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

.password-mode-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.password-mode-choice .radio-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.password-mode-choice .radio-inline input {
  width: auto;
}

.pagination-bar {
  align-items: center;
  border-top: 1px solid var(--ufuk-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
}
.pagination-controls {
  align-items: center;
  display: flex;
  gap: 10px;
}
.pagination-current {
  color: var(--ufuk-muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.pagination-btn-disabled {
  cursor: not-allowed;
  opacity: .5;
  pointer-events: none;
}

.recurring-badge {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: #4338ca;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
}

.sort-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}
.sort-link:hover {
  color: var(--ufuk-primary, #4361ee);
}
.sort-icon {
  color: var(--ufuk-muted);
  font-size: 12px;
}
.sort-icon.active {
  color: var(--ufuk-primary, #4361ee);
}

.bulk-action-bar {
  align-items: center;
  background: #fff7ed;
  border-bottom: 1px solid var(--ufuk-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 16px;
}
.bulk-action-bar.is-hidden {
  display: none;
}
.bulk-action-buttons {
  display: flex;
  gap: 8px;
}
th:has([data-select-all]),
td:has([data-row-select]) {
  width: 36px;
}
[data-select-all],
[data-row-select] {
  cursor: pointer;
  height: 16px;
  width: 16px;
}

/* ============================================================
   ÖDEME TAKİP — yenilenmiş liste ekranı (2026-07-27)
   ============================================================ */

/* Rakamlar her yerde hizalı ve bölünmez. */
.payment-table .num,
.kpi-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- KPI kartları ---------- */
.kpi-grid {
  display: grid;
  gap: 12px;
  /* 215px taban: en uzun tutar kırılmadan sığar (17px'te ~126px + bol pay).
     Dar ekranda kart sayısı 5→4→3→2→1 olarak kendiliğinden azalır. */
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  margin-bottom: 16px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 13px 15px 14px;
  position: relative;
}
.kpi::before {
  background: var(--kpi-accent, #cbd5e1);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 3px;
}
.kpi-head {
  align-items: center;
  color: var(--ufuk-muted);
  display: flex;
  font-size: 10.5px;
  font-weight: 750;
  gap: 6px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.kpi-dot {
  background: var(--kpi-accent, #94a3b8);
  border-radius: 50%;
  flex: 0 0 7px;
  height: 7px;
}
.kpi-value {
  font-size: clamp(17px, 1.55vw, 20px);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin: 6px 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-foot {
  color: #94a3b8;
  font-size: 11.5px;
}
.kpi.is-danger { --kpi-accent: #dc2626; }
.kpi.is-warn   { --kpi-accent: #b45309; }
.kpi.is-ok     { --kpi-accent: #15803d; }
.kpi.is-info   { --kpi-accent: var(--ufuk-primary); }
.kpi.is-danger .kpi-value { color: #dc2626; }
.kpi.is-ok .kpi-value { color: #15803d; }

/* ---------- Hızlı filtre rozetleri ---------- */
/* Rozetler tek satırda kalır ve yatay kaydırılır; sarmalanınca mobilde
   3 satır yer kaplayıp içeriği aşağı itiyordu. */
.chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; }
.chip-count {
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--ufuk-muted);
  font-size: 11px;
  font-weight: 750;
  margin-left: 6px;
  padding: 1px 7px;
}
.chip.active .chip-count { background: rgba(255, 255, 255, .26); color: #fff; }
.chip.alarm { border-color: #dc2626; color: #dc2626; }
.chip.alarm .chip-count { background: #dc2626; color: #fff; }
.chip.alarm.active { background: #dc2626; color: #fff; }

/* Ödeme filtreleri 10 alana çıktı; paylaşılan 8 kolonluk .filter-grid
   şablonu taşıyordu. Burada alan sayısına göre kendiliğinden dizilir. */
.filter-grid.payments-filter {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}
.filter-grid.payments-filter > input[name="q"] {
  grid-column: span 2;
}
.filter-grid.payments-filter > .btn { white-space: nowrap; }

/* Cari filtresi 5 alanlık kısa bir form; auto-fit ızgarası geniş ekranda
   boş kolon bırakıp alanları kaydırıyordu. Esnek dizilim bunu yaşamaz:
   arama büyür, seçimler sabit tabanlı, düğmeler içeriği kadar. */
.contacts-filter {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contacts-filter > input[name="q"] { flex: 2 1 320px; min-width: 220px; }
.contacts-filter > select { flex: 1 1 170px; min-width: 140px; }
.contacts-filter > .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 760px) {
  .contacts-filter > input[name="q"],
  .contacts-filter > select { flex-basis: 100%; }
  .contacts-filter > .btn { flex: 1 1 45%; }
}

/* Tarih filtreleri: iOS'ta boş bir date input tamamen boş görünüyor,
   bu yüzden ne olduğunu söyleyen küçük bir etiket şart. */
.filter-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.filter-date > span {
  color: var(--ufuk-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.filter-date > input { width: 100%; }

/* ---------- Tablo ---------- */
.payment-table thead th.right,
.payment-table tbody td.right { text-align: right; }
.payment-table .col-check { width: 36px; }

.payment-table tbody td:first-child { border-left: 3px solid transparent; }
.payment-table tr.row-overdue td:first-child { border-left-color: #dc2626; }
.payment-table tr.row-today td:first-child { border-left-color: #b45309; }
.payment-table tr.row-done td { color: var(--ufuk-muted); }

.payment-table .cell-title {
  font-weight: 650;
  line-height: 1.35;
}
.payment-table .cell-sub {
  align-items: center;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  font-size: 11.5px;
  gap: 6px;
  margin-top: 2px;
}
.payment-table .money { font-weight: 700; }
.payment-table .money.zero { color: #94a3b8; font-weight: 500; }
.payment-table .money.open { color: #dc2626; }
.payment-table tr.row-done .money { font-weight: 600; }
.payment-table tr.row-done .money.open { color: var(--ufuk-muted); }

.due-flag {
  background: #dc2626;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}
.due-flag.today { background: #b45309; }

/* ---------- Sayfalama ---------- */
.pagination-info { color: var(--ufuk-muted); font-size: 12.5px; }
.pagination-gap { color: #94a3b8; padding: 0 2px; }
.pagination-current-page {
  background: var(--ufuk-primary);
  border-color: var(--ufuk-primary);
  color: #fff;
  cursor: default;
}
.per-page-select {
  align-items: center;
  border: 1px solid var(--ufuk-border);
  border-radius: 7px;
  display: inline-flex;
  gap: 2px;
  margin-right: 6px;
  padding: 2px;
}
.per-page-option {
  border-radius: 5px;
  color: var(--ufuk-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  text-decoration: none;
}
.per-page-option.active { background: var(--ufuk-primary); color: #fff; }
.per-page-label { color: #94a3b8; font-size: 11.5px; padding: 0 6px 0 2px; }

/* ---------- Mobil: tabloyu kart görünümüne çevir ---------- */
@media (max-width: 820px) {
  .payment-table,
  .payment-table tbody,
  .payment-table tr,
  .payment-table td {
    display: block;
    width: 100%;
  }
  .payment-table { min-width: 0; }
  .payment-table thead { display: none; }
  .table-responsive:has(.payment-table) { overflow: visible; }

  .payment-table tbody tr {
    border: 1px solid var(--ufuk-border);
    border-left: 3px solid #cbd5e1;
    border-radius: 9px;
    margin: 12px 0;
    padding: 4px 0 8px;
  }
  .payment-table tbody tr.row-overdue { border-left-color: #dc2626; }
  .payment-table tbody tr.row-today { border-left-color: #b45309; }
  .payment-table tbody tr.row-done { background: #f8fafc; }

  .payment-table tbody td {
    border: 0;
    border-left: 0 !important;
    padding: 6px 13px;
  }
  .payment-table tbody td.col-check { display: none; }
  .payment-table tbody td[data-label] {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
  }
  .payment-table tbody td[data-label]::before {
    color: #94a3b8;
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .payment-table tbody td.cell-main { padding-bottom: 2px; padding-top: 10px; }
  .payment-table tbody td.right { text-align: left; }

  .payment-table .rowactions {
    display: flex;
    gap: 8px;
    padding-top: 6px;
  }
  .payment-table .rowactions .btn {
    flex: 1;
    justify-content: center;
    min-height: 42px;
    text-align: center;
  }

  .pagination-bar { align-items: stretch; flex-direction: column; }
  .pagination-controls { flex-wrap: wrap; justify-content: center; }
}

/* ---------- Excel / CSV içe aktarma ---------- */
.import-preview { border-left: 3px solid var(--ufuk-primary); }
.import-preview .text-ok { color: #15803d; }
.import-preview .text-danger { color: #dc2626; }

.import-table tbody td { vertical-align: top; }
.import-table tbody td small { color: #94a3b8; display: block; font-size: 11.5px; }
.import-table .right { text-align: right; }
.import-table tr.row-invalid { background: #fef2f2; }
.import-table tr.row-warning { background: #fffbeb; }
.import-note {
  color: var(--ufuk-muted);
  font-size: 11.5px;
  line-height: 1.4;
  margin-top: 4px;
  max-width: 340px;
}
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-success { background: #dcfce7; color: #15803d; }

.import-steps {
  color: var(--ufuk-text);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 16px;
  padding-left: 20px;
}
.import-steps li { margin-bottom: 4px; }
.import-hint {
  background: #f8fafc;
  border: 1px solid var(--ufuk-border);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 14px 0;
  padding: 10px 12px;
}
.import-file {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.import-file > span { font-size: 12.5px; font-weight: 700; }
.import-file input[type="file"] { font-size: 13px; padding: 8px; }

@media (max-width: 820px) {
  .import-table { min-width: 640px; }
  .import-note { max-width: none; }
}

/* ============================================================
   ÖDEME FORMU — bölümlü, finans odaklı düzen
   ============================================================ */
.payment-form .form-section + .form-section {
  border-top: 1px solid var(--ufuk-border);
  margin-top: 20px;
  padding-top: 18px;
}
.form-section-title {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  gap: 8px;
  letter-spacing: .05em;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.form-section-icon {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 13px;
  height: 26px;
  justify-content: center;
}
.form-section-icon.is-primary { background: #eff6ff; color: #2563eb; }
.form-section-icon.is-info    { background: #eef2ff; color: #4338ca; }
.form-section-icon.is-ok      { background: #f0fdf4; color: #15803d; }
.form-section-icon.is-warn    { background: #fffbeb; color: #b45309; }
.form-section-icon.is-muted   { background: #f1f5f9; color: #64748b; }

.payment-form label {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  font-weight: 700;
  gap: 5px;
}
.payment-form label.checkbox-inline {
  align-items: center;
  flex-direction: row;
  font-weight: 400;
}
.payment-form .field-label {
  align-items: baseline;
  display: inline-flex;
  gap: 3px;
}
.payment-form .req { color: #dc2626; font-weight: 700; }
.field-hint {
  color: var(--ufuk-muted);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.45;
}

/* Para alanları: büyük, hizalı rakam ve ₺ eki */
.money-input { position: relative; display: block; }
.money-input input {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.01em;
  padding-right: 34px;
}
.money-suffix {
  color: var(--ufuk-muted);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* Tutar / ödenen / kalan özeti */
.balance-strip {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--ufuk-border);
  border-radius: 9px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
  overflow: hidden;
}
.balance-cell {
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
}
.balance-cell span {
  color: var(--ufuk-muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.balance-cell strong {
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}
.balance-cell strong.is-ok { color: #15803d; }
.balance-cell strong.is-open { color: #dc2626; }
.balance-cell strong.is-settled { color: #15803d; }

/* Öncelik seçimi: renk kodlu düğmeler */
.priority-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.priority-option {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row !important;
  font-size: 12.5px;
  font-weight: 650;
  gap: 7px;
  padding: 7px 14px;
}
.priority-option input { display: none; }
.priority-dot {
  background: var(--tone, #94a3b8);
  border-radius: 50%;
  flex: 0 0 9px;
  height: 9px;
}
.priority-option.tone-low      { --tone: #64748b; }
.priority-option.tone-normal   { --tone: #2563eb; }
.priority-option.tone-high     { --tone: #b45309; }
.priority-option.tone-critical { --tone: #dc2626; }
.priority-option.is-active {
  background: color-mix(in srgb, var(--tone) 10%, #fff);
  border-color: var(--tone);
  color: var(--tone);
}

/* Tekrar bloğu */
.recurrence-fields {
  background: #fffdf7;
  border: 1px solid #f2e6c9;
  border-radius: 9px;
  margin-top: 12px;
  padding: 14px;
}
.recurrence-fields.is-hidden { display: none; }
.recurrence-summary {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #f2e6c9;
  border-radius: 7px;
  color: #92400e;
  display: flex;
  font-size: 12px;
  gap: 7px;
  line-height: 1.5;
  margin: 12px 0 0;
  padding: 9px 11px;
}
.recurrence-summary.is-muted { color: var(--ufuk-muted); }
.recurrence-summary strong { font-weight: 750; }

@media (max-width: 700px) {
  .balance-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .payment-form .form-grid.two-col { grid-template-columns: 1fr; }
  .payment-form .span-2 { grid-column: span 1; }
  .modal-actions .btn { flex: 1; min-height: 44px; }
}

/* ---------- Cari hesaplar ---------- */
.contact-type {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  white-space: nowrap;
}
.contact-type.tone-supplier { background: #eef2ff; color: #4338ca; }
.contact-type.tone-customer { background: #f0fdf4; color: #15803d; }
.contact-type.tone-staff    { background: #fffbeb; color: #b45309; }
.contact-type.tone-other    { background: #f1f5f9; color: #64748b; }
.contact-type.tone-expense  { background: #fdf2f8; color: #be185d; }

/* Ayarlar ana sayfası: alt ekran kartları */
.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.settings-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-radius: 10px;
  color: inherit;
  display: flex;
  gap: 13px;
  padding: 14px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.settings-card:hover {
  border-color: #0d6efd;
  box-shadow: 0 4px 14px rgba(13, 110, 253, .12);
  color: inherit;
}
.settings-icon {
  align-items: center;
  background: #eef2ff;
  border-radius: 9px;
  color: #4338ca;
  display: inline-flex;
  flex: none;
  font-size: 18px;
  height: 40px;
  justify-content: center;
  width: 40px;
}
.settings-body { display: grid; gap: 3px; min-width: 0; }
.settings-body strong { font-size: 14.5px; font-weight: 650; }
.settings-body small { color: var(--ufuk-muted); font-size: 12.5px; line-height: 1.45; }
.settings-count {
  flex: none;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  margin-left: auto;
  text-align: right;
}
.settings-count em { color: var(--ufuk-muted); display: block; font-size: 10.5px; font-style: normal; font-weight: 600; }
@media (max-width: 760px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.contact-code {
  background: #f1f5f9;
  border-radius: 4px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
}
.badge-passive { background: #f1f5f9; color: #64748b; }
.badge-synced { background: #eff6ff; color: #2563eb; }

.contact-hero-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contact-hero-title .card-title { margin: 0; }
.external-note { font-size: 12.5px; margin-bottom: 16px; }

.payment-table .cell-title a { color: inherit; text-decoration: none; }
.payment-table .cell-title a:hover { color: var(--ufuk-primary); text-decoration: underline; }

/* ==================== Ana Ekran (dashboard) ==================== */
/* Sol: birleşik ödeme ajandası. Sağ: banka yükü + aylık çıkış grafiği.
   Dar ekranda tek sütuna iner. */
.dash-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  margin-bottom: 16px;
}
.dash-side { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* Ajanda satırındaki takvim yaprağı görünümlü tarih hücresi */
.dash-date {
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  width: 52px;
}
.dash-date-day { display: block; font-size: 17px; font-weight: 750; }
.dash-date-month {
  color: var(--ufuk-muted);
  display: block;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dash-flag { white-space: nowrap; }

/* Tür rozeti: kalem çek mi, kredi taksidi mi, elle ödeme mi */
.dash-type {
  border-radius: 4px;
  display: inline-block;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .03em;
  margin-right: 6px;
  padding: 2px 7px;
  text-transform: uppercase;
  vertical-align: 1px;
}
.dash-type-cheque  { background: #eff6ff; color: #1d4ed8; }
.dash-type-loan    { background: #f5f3ff; color: #6d28d9; }
.dash-type-payment { background: #f1f5f9; color: #475569; }

/* Banka yükü çubukları */
.dash-bars { display: grid; gap: 12px; }
.dash-bar-meta {
  display: flex;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
}
.dash-bar-name { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar-value { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.dash-bar-track {
  background: #f1f5f9;
  border-radius: 999px;
  height: 7px;
  margin-top: 5px;
  overflow: hidden;
}
.dash-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 999px;
  height: 100%;
}
.dash-bar-sub { color: #94a3b8; font-size: 11px; margin-top: 3px; }

/* Aylık nakit çıkış grafiği — kitaplıksız, saf CSS sütun grafik */
.dash-chart {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: 170px;
}
.dash-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  text-align: center;
}
.dash-col-value {
  color: var(--ufuk-muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.dash-col-track {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: 4px;
}
.dash-col-stack {
  background: #bfdbfe;            /* kredi + ödeme payı (açık ton) */
  border-radius: 5px 5px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.dash-col-cheque { background: #2563eb; }   /* çek payı (koyu ton) */
.dash-col-label {
  color: var(--ufuk-muted);
  font-size: 11px;
  font-weight: 650;
  margin-top: 6px;
  white-space: nowrap;
}
.dash-legend {
  color: var(--ufuk-muted);
  display: flex;
  font-size: 11.5px;
  gap: 14px;
  justify-content: center;
  margin-top: 12px;
}
.dash-legend span { align-items: center; display: inline-flex; gap: 5px; }
.dash-swatch { border-radius: 3px; display: inline-block; height: 10px; width: 10px; }
.dash-swatch-cheque { background: #2563eb; }
.dash-swatch-other  { background: #bfdbfe; }

/* Alt portföy şeridi */
.dash-portfolio {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 16px;
}
.dash-portfolio .settings-card { text-decoration: none; }
.dash-portfolio .dash-static { cursor: default; }
.dash-portfolio .dash-static:hover { border-color: var(--ufuk-border); box-shadow: none; }

/* Ajanda mobilde: takvim yaprağı satır içine döner, hücreler etiketle dizilir */
@media (max-width: 768px) {
  .dash-agenda .dash-date { width: auto; }
  .dash-agenda .dash-date-day,
  .dash-agenda .dash-date-month { display: inline; font-size: 13px; }
  .dash-agenda .dash-date-month { margin-left: 4px; }
}

/* Ajanda: ana hücre esner, uzun başlık üç noktayla kısalır — tutar sütunu
   dar ekranda asla taşmaz. max-width:0 + width:100% tablo hücresini
   "kalan tüm alanı al ama taşırma" moduna sokar. */
.dash-agenda td.cell-main { max-width: 0; width: 100%; }
.dash-agenda .cell-title,
.dash-agenda .cell-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ajanda taşması — kesin çözüm. table-layout:auto'da hücreye verilen
   max-width, nowrap içeriğin min-content genişliğini SINIRLAMAZ; tablo
   yine sarıcıdan geniş hesaplanıp tutar sütunu kesilebiliyordu (canlıda
   görüldü). fixed yerleşimde sütun genişlikleri kesindir: dar sütunlar
   sabit, ana sütun kalanı alır ve içerik üç noktayla kısalır. */
.dash-agenda table { table-layout: fixed; width: 100%; }
.dash-agenda td.dash-date { width: 58px; }
.dash-agenda td.dash-flag { overflow: hidden; width: 112px; }
.dash-agenda td[data-label="Tutar"] { overflow: hidden; width: 142px; }
@media (max-width: 768px) {
  /* Mobilde hücreler bloklara ayrılır; sabit genişlikler anlamsız kalır. */
  .dash-agenda td.dash-date,
  .dash-agenda td.dash-flag,
  .dash-agenda td[data-label="Tutar"] { width: auto; }
}

/* ==== Ajanda yerleşimi — NİHAİ sürüm ====
   Önceki iki deneme (max-width:0 hilesi, sonra table-layout:fixed +
   sabit sütunlar) kullanıcının ortamında yine kırptı; sabit piksel
   genişlikleri büyütülmüş yazı boyutunda yetmiyor. Bu sürümde hiçbir
   sabit genişlik yok: dar sütunlar width:1%%+nowrap ile içeriğine
   büzülür, uzun başlık ALT SATIRA SARAR. Yazı boyutu/yakınlaştırma ne
   olursa olsun tablo sarıcısını aşamaz. Aşağıdaki kurallar öncekileri
   bilerek geçersiz kılar. */
.dash-agenda table { table-layout: auto; }
.dash-agenda td.cell-main { max-width: none; width: auto; }
.dash-agenda .cell-title,
.dash-agenda .cell-sub {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.dash-agenda td.dash-date,
.dash-agenda td.dash-flag,
.dash-agenda td[data-label="Tutar"] {
  white-space: nowrap;
  width: 1%;
}

/* Kök neden: .payment-table genel kuralı min-width:760px dayatıyor; ajanda
   sütunu çoğu ekranda bundan dar. Ajandada satırlar sarabildiği için bu
   taban gereksiz — kaldırılınca tablo her genişliğe oturur. */
.dash-agenda .payment-table { min-width: 0; }

/* ==================== Çek Takip ekranı ==================== */

/* KPI şeridi: tutar önde, adet destek bilgisi. Tıklanınca hızlı süzgeç. */
.cek-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}
.cek-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-left: 4px solid var(--ufuk-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ufuk-text);
  transition: box-shadow .12s ease, transform .12s ease;
}
.cek-kpi:hover { box-shadow: 0 3px 10px rgba(17, 24, 39, .10); transform: translateY(-1px); color: var(--ufuk-text); }
.cek-kpi .k-head {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ufuk-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cek-kpi .k-amount {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cek-kpi .k-count { font-size: 12px; color: var(--ufuk-muted); }
.cek-kpi.warn    { border-left-color: #f59e0b; }
.cek-kpi.danger  { border-left-color: var(--ufuk-danger); }
.cek-kpi.danger .k-amount { color: var(--ufuk-danger); }
.cek-kpi.danger.is-zero .k-amount { color: var(--ufuk-success); }
.cek-kpi.info    { border-left-color: var(--ufuk-primary); }
.cek-kpi.muted   { border-left-color: #94a3b8; }
.cek-kpi.success { border-left-color: var(--ufuk-success); }
.cek-kpi.active {
  border-color: var(--ufuk-primary);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, .18);
}
.cek-kpi-meta {
  font-size: 12.5px;
  color: var(--ufuk-muted);
  margin: 0 2px 14px;
}

/* Katlanabilir banka yükü kartı */
details.cek-fold { padding: 0; margin-bottom: 16px; }
details.cek-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  user-select: none;
}
details.cek-fold > summary::-webkit-details-marker { display: none; }
details.cek-fold .fold-title { font-size: 15px; font-weight: 700; }
details.cek-fold .fold-title i { color: var(--ufuk-primary); margin-right: 4px; }
details.cek-fold .fold-summary {
  font-size: 13px;
  color: var(--ufuk-muted);
  margin-left: auto;
  white-space: nowrap;
}
details.cek-fold .fold-arrow { transition: transform .15s ease; color: var(--ufuk-muted); }
details.cek-fold[open] .fold-arrow { transform: rotate(180deg); }
details.cek-fold .fold-note { font-size: 12.5px; margin: 0 18px 8px; }
.cek-bank-table td, .cek-bank-table th { padding-top: 8px; padding-bottom: 8px; }
.cek-bank-row { cursor: pointer; }
.cek-bank-row:hover td { background: rgba(13, 110, 253, .05); }
.fold-bar-col { width: 90px; }
.share-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #eef1f5;
  overflow: hidden;
  min-width: 60px;
}
.share-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #5b9bff, #0d6efd);
}

/* Liste iyileştirmeleri */
.cek-table td.amount, .cek-bank-table td.amount { font-variant-numeric: tabular-nums; }
.cek-table tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--ufuk-danger); }
.cek-check-col { width: 34px; text-align: center; }
.cek-check-col input { width: 16px; height: 16px; cursor: pointer; }

/* Toplu işlem çubuğu */
.cek-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 18px 10px;
  padding: 10px 14px;
  border: 1px solid rgba(25, 135, 84, .35);
  background: rgba(25, 135, 84, .07);
  border-radius: 8px;
  font-size: 13.5px;
}
.cek-bulk-bar strong { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .cek-kpis { grid-template-columns: repeat(2, 1fr); }
  details.cek-fold .fold-summary { display: none; }
}

/* ==================== Çek Takip 2.0 — komuta paneli ==================== */

.cek-hero {
  display: grid;
  grid-template-columns: 240px 1fr 250px;
  gap: 0;
  margin-bottom: 14px;
  overflow: hidden;
}
.cek-hero > * { padding: 16px 18px; min-width: 0; }
.hero-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ufuk-muted);
  margin-bottom: 6px;
}

/* Sol: açık yük */
.hero-load {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ufuk-text);
  border-right: 1px solid var(--ufuk-border);
  background: linear-gradient(160deg, rgba(13, 110, 253, .05), transparent 55%);
}
.hero-load:hover { background: rgba(13, 110, 253, .07); color: var(--ufuk-text); }
.hero-amount {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.hero-sub { font-size: 12.5px; color: var(--ufuk-muted); }
.hero-flag {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.hero-flag.is-bad { color: var(--ufuk-danger); }
.hero-flag.is-good { color: var(--ufuk-success); }

/* Orta: 12 haftalık takvim */
.hero-timeline { border-right: 1px solid var(--ufuk-border); display: flex; flex-direction: column; }
.hero-tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hero-tl-hint { font-size: 11px; color: var(--ufuk-muted); white-space: nowrap; }
.hero-tl-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ufuk-muted);
  font-size: 13px;
  min-height: 110px;
}
.hero-tl-bars {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-height: 118px;
}
.tl-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: var(--ufuk-muted);
  text-align: center;
  border-radius: 6px;
  padding: 2px 1px;
}
.tl-bar:hover { background: rgba(13, 110, 253, .08); color: var(--ufuk-text); }
.tl-val {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #3f4a5a;
  min-height: 14px;
}
.tl-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 64px;
}
.tl-col i {
  display: block;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7cb1ff, #2f7bf0);
  min-height: 0;
}
.tl-bar.is-now .tl-col i { background: linear-gradient(180deg, #ffc861, #f59e0b); }
.tl-bar.is-overdue .tl-col i { background: linear-gradient(180deg, #ff8a84, #dc3545); }
.tl-bar.is-later .tl-col i {
  background: repeating-linear-gradient(45deg, #b9c6da 0 4px, #cdd7e6 4px 8px);
}
.tl-label {
  font-size: 10px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-bar.is-overdue .tl-label { color: var(--ufuk-danger); font-weight: 700; }
.tl-bar.is-now .tl-label { font-weight: 700; color: #b45309; }

/* Sağ: dağılım */
.hero-dist { display: flex; flex-direction: column; }
.dist-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: #eef1f5;
  margin: 4px 0 10px;
}
.dist-bar i { display: block; height: 100%; }
.seg-open  { background: #f59e0b; }
.seg-defer { background: #64748b; }
.seg-paid  { background: var(--ufuk-success); }
.dist-legend { display: flex; flex-direction: column; gap: 5px; }
.dist-legend a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ufuk-text);
  text-decoration: none;
}
.dist-legend a:hover { color: var(--ufuk-primary); }
.dist-legend strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.dist-legend .dot {
  width: 9px; height: 9px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.hero-meta {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--ufuk-muted);
  border-top: 1px dashed var(--ufuk-border);
  padding-top: 8px;
}

/* Banka yükü + tedarikçi yan yana */
.cek-mid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 2px;
}
.cek-mid details.cek-fold { margin-bottom: 14px; }

/* Banka monogramı */
.cek-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  flex: 0 0 auto;
}
.cek-bank-name { display: flex; align-items: center; gap: 9px; min-width: 0; }

/* En yüklü tedarikçiler */
.cek-top-sup { margin-bottom: 14px; }
.cek-top-sup .card-header { padding: 13px 16px; }
.sup-list { display: flex; flex-direction: column; }
.sup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--ufuk-text);
  border-top: 1px solid #f0f3f7;
}
.sup-row:hover { background: rgba(13, 110, 253, .05); color: var(--ufuk-text); }
.sup-rank {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #eef2f8;
  color: #4a5568;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.sup-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sup-info strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sup-info small { color: var(--ufuk-muted); font-size: 11.5px; }
.sup-info .share-bar { min-width: 0; height: 4px; }
.sup-amount { font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Liste: vade kovası grup satırları */
.cek-group-row td {
  background: #f6f8fb !important;
  padding: 7px 12px !important;
  border-top: 1px solid var(--ufuk-border);
  font-size: 11.5px;
}
.cek-group-row .g-name {
  font-weight: 800;
  letter-spacing: .05em;
}
.cek-group-row .g-sum { float: right; color: var(--ufuk-muted); font-variant-numeric: tabular-nums; }
.cek-group-row .g-sum em { font-style: normal; opacity: .7; }
.cek-group-row.is-overdue .g-name { color: var(--ufuk-danger); }
.cek-group-row.is-today .g-name { color: #b45309; }
.cek-group-row.is-week .g-name { color: #b45309; }
.cek-group-row.is-month .g-name { color: #1d4ed8; }
.cek-group-row.is-later .g-name { color: #475569; }
.cek-group-row.is-paid .g-name { color: var(--ufuk-success); }

@media (max-width: 1100px) {
  .cek-hero { grid-template-columns: 1fr 1fr; }
  .hero-timeline { grid-column: 1 / -1; order: 3; border-right: 0; border-top: 1px solid var(--ufuk-border); }
  .hero-dist { border-right: 0; }
  .cek-mid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cek-hero { grid-template-columns: 1fr; }
  .hero-load { border-right: 0; border-bottom: 1px solid var(--ufuk-border); }
  .hero-tl-bars { overflow-x: auto; }
  .tl-bar { min-width: 42px; }
}

/* ==================== Çek Takip — filtre alanı ==================== */
.cek-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin: 0 0 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
}
.cek-filter > label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ufuk-muted);
}
.cek-filter input,
.cek-filter select {
  min-height: 40px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ufuk-text);
}
.cek-filter .f-search { grid-column: span 2; }
.f-search-box { position: relative; }
/* Kutunun solundaki ikon (büyüteç, barkod...): hangisi olursa olsun içeride durur. */
.f-search-box > i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ufuk-muted);
  font-size: 14px;
  pointer-events: none;
  line-height: 1;
}
.f-search-box input { padding-left: 32px; }
.cek-filter .f-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.cek-filter .f-actions .btn { min-height: 38px; }
.f-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--ufuk-primary);
  background: rgba(13, 110, 253, .08);
  border-radius: 20px;
  padding: 4px 11px;
  margin-right: auto;
}
@media (max-width: 900px) {
  .cek-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .cek-filter { grid-template-columns: 1fr; }
  .cek-filter .f-search { grid-column: auto; }
}

/* Çek sayfasında çipler ve filtre paneli aynı iç hizada dursun. */
.cek-chips { margin: 12px 14px 12px; }
.cek-filter { margin: 0 14px 14px; }

/* ==================== Çek Takip — satır işlem düğmeleri ==================== */
.cek-actions { white-space: nowrap; }
.cek-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease, transform .08s ease;
}
.cek-btn:active { transform: translateY(1px); }
.cek-btn i { font-size: 13px; }
.cek-btn.pay {
  background: var(--ufuk-success);
  border-color: var(--ufuk-success);
  color: #fff;
  box-shadow: 0 1px 2px rgba(25, 135, 84, .28);
}
.cek-btn.pay:hover { background: #157347; }
.cek-btn.defer {
  background: #fff;
  border-color: #eab30880;
  color: #92400e;
}
.cek-btn.defer:hover { background: #fef6e0; border-color: #d9a406; }
.cek-btn.undo {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}
.cek-btn.undo:hover { background: #f1f5f9; }

/* Çek listesinde açıklama göstergesi */
.cek-note-flag { color: #b45309; font-size: 13px; margin-left: 4px; cursor: help; }

/* Tutar hücresinde ₺ simgesi asla alt satıra düşmesin. */
.cek-table td.amount { white-space: nowrap; }

/* Çek listesinde açıklama etiketi: notun ilk kelimeleri görünen sarı rozet.
   (Eski minik .cek-note-flag ikonunun yerini aldı.) */
.cek-note-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 190px;
  margin-top: 4px;
  padding: 3px 9px;
  background: #fef3c7;
  border: 1px solid #f2d49b;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: #92400e;
  text-decoration: none;
  white-space: nowrap;
}
.cek-note-pill:hover { background: #fde9a8; color: #78350f; }
.cek-note-pill i { font-size: 11px; flex: 0 0 auto; }
.cek-note-pill span { overflow: hidden; text-overflow: ellipsis; }

/* ==================== Borç Yönetimi ==================== */

/* Kaynak renkleri (tek yerden): kredi mavi, çek kehribar, elden gri. */
.seg-kredi { background: #2f6fed; }
.seg-cek   { background: #f59e0b; }
.seg-elden { background: #64748b; }
.seg-later { background: repeating-linear-gradient(45deg, #b9c6da 0 4px, #cdd7e6 4px 8px); }

/* 1) Hero: koyu zemin, tek büyük rakam */
.borc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 0;
  margin-bottom: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #101b33 0%, #16264a 55%, #1b3060 100%);
  border: 0;
  color: #eef2f9;
}
.borc-hero-main { padding: 22px 26px; min-width: 0; }
.borc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  color: #8fa3c8;
}
.borc-total {
  display: block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.borc-flag { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.borc-flag.good { color: #6fdc9c; }
.borc-flag.bad { color: #ff8a84; }

.borc-split {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  margin: 16px 0 12px;
}
.borc-split i { display: block; height: 100%; }

.borc-sources { display: flex; gap: 10px; flex-wrap: wrap; }
.borc-source {
  flex: 1 1 150px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  text-decoration: none;
  color: #eef2f9;
  transition: background .12s ease;
}
.borc-source:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.borc-source .dot { width: 9px; height: 9px; border-radius: 3px; margin-bottom: 2px; }
.borc-source .src-name { font-size: 11.5px; font-weight: 600; color: #aebbd6; letter-spacing: .03em; }
.borc-source strong { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.borc-source small { font-size: 11px; color: #8fa3c8; }

.borc-hero-side {
  padding: 22px 24px;
  background: rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.borc-stat span { display: block; font-size: 11.5px; color: #8fa3c8; margin-bottom: 1px; }
.borc-stat strong { font-size: 16.5px; font-variant-numeric: tabular-nums; }
.borc-stat strong.tone-warn { color: #ffc861; }
.borc-stat small { display: block; font-size: 11px; color: #8fa3c8; }

/* 2) Vade duvarı */
.borc-wall { padding-bottom: 12px; margin-bottom: 14px; }
.borc-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ufuk-muted); white-space: nowrap; }
.borc-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.borc-wall-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 14px 16px 6px;
  overflow-x: auto;
}
.bw-bar {
  flex: 1;
  min-width: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  border-radius: 6px;
  padding: 2px 1px;
  color: var(--ufuk-muted);
}
.bw-bar:hover { background: rgba(13, 110, 253, .07); }
.bw-val {
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #3f4a5a;
  min-height: 15px;
}
/* Sabit yükseklikli kılıf; içindeki sütun yüzdeyle büyür (çek grafiği kalıbı). */
.bw-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 132px;
}
.bw-col {
  display: flex;
  flex-direction: column;
  /* segmentler flex-grow oranıyla (tutar) bölünür; üstte kredi, altta çek */
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}
.bw-col i { display: block; width: 100%; min-height: 2px; }
.bw-label { font-size: 10.5px; margin-top: 5px; white-space: nowrap; }
.bw-bar.is-now .bw-label { font-weight: 700; color: #1d4ed8; }
.bw-bar.is-overdue .bw-label { font-weight: 700; color: var(--ufuk-danger); }

/* 3-4) Alt ızgara */
.borc-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 14px;
  align-items: start;
}
.borc-mid .card { margin-bottom: 14px; }
.borc-bank-table td, .borc-bank-table th { padding-top: 9px; padding-bottom: 9px; }
.borc-rate {
  min-width: 64px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #b42318;
  background: #fee4e2;
  border-radius: 8px;
  padding: 6px 8px;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

@media (max-width: 1000px) {
  .borc-hero { grid-template-columns: 1fr; }
  .borc-hero-side { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .borc-hero-side .borc-stat { flex: 1 1 40%; }
  .borc-mid { grid-template-columns: 1fr; }
}

/* ==================== Ürün Envanter ==================== */
.urn-stok.var { color: var(--ufuk-success); font-size: 14px; }
.urn-stok.eksi { color: var(--ufuk-danger); font-size: 14px; }
.urn-depolar { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.urn-depo {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: #eef4ff;
  color: #1d4ed8;
  border: 1px solid #d6e4ff;
  white-space: nowrap;
}
.urn-depo b { font-variant-numeric: tabular-nums; }
.urn-depo.eksi { background: #fee4e2; color: #b42318; border-color: #fecdca; }

/* Depo kırılımı: ürün satırının hemen altında yatay şerit — tıklamasız
   görünür, ana satırlar hep eşit yükseklikte kalır. */
.urn-sub > td {
  border-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 12px;
}
.urn-sub .urn-depolar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: none;
}
.urn-depo-etiket {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted, #9aa1ad);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 3px;
  white-space: nowrap;
}
.urn-depo-etiket i { font-size: 11px; margin-right: 2px; }

/* Kart Satırlar (Tasarım C): her ürün ayrı kart; soldaki renk şeridi stok
   sağlığı — yeşil temiz, kırmızı eksi stoklu depo var, gri stok yok. */
.urn-cards-wrap { overflow-x: auto; }
.urn-cards {
  min-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.urn-chead, .urn-cust {
  display: grid;
  grid-template-columns: var(--urncols);
  gap: 12px;
  align-items: center;
}
.urn-chead { padding: 0 18px 2px; }
.urn-chead a, .urn-chead span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted, #8b93a1);
  text-decoration: none;
  white-space: nowrap;
}
.urn-chead a:hover { color: #1d4ed8; }
.urn-chead .r, .urn-cust .r { text-align: right; }
.urn-card {
  background: #fff;
  border: 1px solid var(--border, #e5e8ee);
  border-left: 4px solid #16a34a;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.urn-card:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .10); }
.urn-card.uyari { border-left-color: #dc2626; }
.urn-card.notr { border-left-color: #cbd5e1; }
.urn-card.row-done { opacity: .55; }
.urn-cust { padding: 11px 18px; }
.c-kod strong {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  white-space: nowrap;
}
.c-kod small { display: block; color: var(--muted, #8b93a1); font-size: 11px; }
.c-ad { min-width: 0; }
.c-ad > span { font-weight: 600; font-size: 12.5px; line-height: 1.35; overflow-wrap: break-word; }
.c-num { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; }
.urn-calt {
  background: #f8fafc;
  border-top: 1px solid #eef1f5;
  padding: 7px 18px;
}

/* Envanter ızgarası: etiket + sabit sayıda eşit sütun — TEK satır, her
   kartta aynı depo aynı hizada; çip içinde ad solda, adet sağda. */
.urn-env {
  display: grid;
  grid-template-columns: 72px repeat(var(--depon, 8), minmax(0, 1fr));
  gap: 5px;
  align-items: center;
}
.urn-env .urn-depo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  padding: 3px 9px;
  font-size: 10.5px;
}
.urn-env .dp-ad {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.urn-env .urn-depo b { flex-shrink: 0; }
.urn-cgroup {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 6px 2px;
}
.urn-cgroup .g-name { font-weight: 700; font-size: 13.5px; }
.urn-cgroup .g-name i { color: #1d4ed8; margin-right: 4px; }
.urn-cgroup .g-sum { font-size: 12px; color: var(--muted, #8b93a1); }
.urn-cgroup .g-sum em { font-style: normal; opacity: .7; }
.urn-bos {
  background: #fff;
  border: 1px dashed #dfe3ea;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: var(--muted, #8b93a1);
}
.urn-depo.sifir {
  background: var(--soft, #f4f5f7);
  color: #9aa1ad;
  border-color: var(--border, #e2e5ea);
}
.urn-depo.sifir b { color: #6b7280; }

/* ==================== Ürün Sorgula (personel ekranı) ==================== */
.urnq-wrap { max-width: 860px; margin: 0 auto; }
.urnq-search { margin-bottom: 18px; }
.urnq-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid #1d4ed8;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 2px 10px rgba(29, 78, 216, .10);
}
.urnq-box i { font-size: 22px; color: #1d4ed8; }
.urnq-box input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 17px;
  min-width: 0;
  background: transparent;
}
.urnq-cam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d6e4ff;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 19px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s ease;
}
.urnq-cam:hover { background: #dbe8ff; }
.urnq-cam-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 16px;
}
.urnq-cam-modal[hidden] { display: none; }
.urnq-cam-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 430px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .35);
}
.urnq-cam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--border, #e5e8ee);
}
.urnq-cam-head i { color: #1d4ed8; margin-right: 4px; }
.urnq-cam-head button {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--muted, #6b7280);
  cursor: pointer;
}
#urnqCamAlan { min-height: 240px; background: #0f172a; }
#urnqCamAlan video { width: 100% !important; }
.urnq-cam-not {
  padding: 11px 16px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  text-align: center;
}
.urnq-live { font-size: 12px; color: var(--muted, #6b7280); margin: 8px 4px 0; }
.urnq-live i { color: #1d4ed8; }
.urnq-empty {
  background: #fff;
  border: 1px dashed #d7dbe2;
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted, #6b7280);
}
.urnq-empty i { font-size: 40px; color: #c3cad6; }
.urnq-empty strong { color: var(--ink, #1a202c); font-size: 15px; }
.urnq-empty span { font-size: 13px; max-width: 46ch; margin: 0 auto; line-height: 1.5; }

/* Çoklu eşleşme listesi */
.urnq-list { background: #fff; border: 1px solid var(--border, #e5e8ee); border-radius: 14px; overflow: hidden; }
.urnq-list-head { padding: 12px 16px; font-size: 12.5px; color: var(--muted, #6b7280); border-bottom: 1px solid var(--border, #eef0f4); }
.urnq-list-row {
  display: grid;
  grid-template-columns: 130px 1fr 110px 80px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border, #f0f1f4);
}
.urnq-list-row:last-child { border-bottom: 0; }
.urnq-list-row:hover { background: #eef4ff; }
.urnq-list-kod { font-family: Consolas, ui-monospace, monospace; font-size: 12px; font-weight: 700; }
.urnq-list-ad { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urnq-list-fiyat { text-align: right; font-variant-numeric: tabular-nums; color: #047857; font-weight: 700; }
.urnq-list-stok { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted, #6b7280); }

/* Tek ürün kartı */
.urnq-card { background: #fff; border: 1px solid var(--border, #e5e8ee); border-radius: 14px; padding: 20px 22px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.urnq-kod {
  font-family: Consolas, ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted, #6b7280);
  background: var(--soft, #f4f5f7);
  border: 1px solid var(--border, #e7e9ee);
  border-radius: 6px;
  padding: 2px 9px;
}
.urnq-barkod { background: #eef4ff; color: #1d4ed8; border-color: #d6e4ff; margin-left: 6px; }
.urnq-barkod i { margin-right: 3px; }
.urnq-etiket-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  float: right;
  font-size: 12.5px;
  font-weight: 600;
  color: #1d4ed8;
  background: #eef4ff;
  border: 1px solid #d6e4ff;
  border-radius: 9px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background .12s ease;
}
.urnq-etiket-btn:hover { background: #dbe8ff; color: #1e40af; }

/* ==================== Toplu Etiket Basımı ==================== */
.lbl-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .lbl-wrap { grid-template-columns: 1fr; } }
.lbl-sol { display: flex; flex-direction: column; gap: 18px; }
.lbl-ekle { display: flex; gap: 8px; }
.lbl-ekle input {
  flex: 1;
  min-width: 0;
  border: 2px solid #1d4ed8;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 15px;
  outline: none;
}
.lbl-durum { font-size: 12.5px; color: #047857; min-height: 20px; margin-top: 8px; }
.lbl-durum.hata { color: #b42318; }
.lbl-secim { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.lbl-secenek {
  text-align: left;
  font-size: 12.5px;
  background: var(--soft, #f6f8fa);
  border: 1px solid var(--border, #e5e8ee);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}
.lbl-secenek:hover { background: #eef4ff; border-color: #d6e4ff; }
.lbl-hizli { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.lbl-hizli .btn { justify-content: flex-start; }
.lbl-ayar { display: flex; flex-direction: column; gap: 12px; }
.lbl-ayar label { font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.lbl-ayar select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; }
.lbl-onay { flex-direction: row !important; align-items: center; gap: 8px !important; }
.lbl-onay input { width: auto; }
.lbl-yazdir { font-size: 15px; padding: 11px; }
.lbl-satir {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border, #f0f1f4);
}
.lbl-satir:last-child { border-bottom: 0; }
.lbl-bilgi { flex: 1; min-width: 0; }
.lbl-bilgi strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbl-kod { font-family: Consolas, monospace; font-size: 11px; color: var(--muted, #6b7280); }
.lbl-fiyat { font-variant-numeric: tabular-nums; font-size: 12.5px; color: #047857; font-weight: 700; white-space: nowrap; }
.lbl-adet { display: flex; align-items: center; gap: 4px; }
.lbl-adet input[type=number] { width: 52px; padding: 5px 4px; border: 1px solid #cbd5e1; border-radius: 7px; text-align: center; -moz-appearance: textfield; }
.lbl-adet input[type=number]::-webkit-outer-spin-button,
.lbl-adet input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lbl-eksi, .lbl-arti {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #d6e4ff;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s ease;
}
.lbl-eksi:hover, .lbl-arti:hover { background: #dbe8ff; }
.lbl-sil { border: 0; background: transparent; color: #b42318; cursor: pointer; font-size: 14px; padding: 4px 7px; }
.lbl-bos { text-align: center; color: var(--muted, #8b93a1); padding: 36px 12px; display: flex; flex-direction: column; gap: 6px; }
.lbl-bos i { font-size: 34px; color: #c3cad6; }

/* ==================== Sevkiyat / Teslimat ==================== */
.st-info { background: #eff6ff; color: #1d4ed8; }
.st-road { background: #eef2ff; color: #4338ca; }
.sv-gec { color: #b42318; }
.sv-musteri { font-weight: 700; color: inherit; text-decoration: none; }
.sv-musteri:hover { color: #1d4ed8; }
.sv-urunler { font-size: 12.5px; }
.sv-arti {
  font-size: 10.5px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eef4ff;
  border-radius: 6px;
  padding: 1px 7px;
  margin-left: 4px;
  cursor: default;
  white-space: nowrap;
}
.sv-tip { font-size: 12px; font-weight: 700; color: #047857; }
.sv-tip.taksit { color: #4338ca; }
.sv-islem { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.sv-islem form { display: inline; }
.sv-btn-teslim { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.sv-btn-teslim:hover { background: #d1fae5; color: #065f46; }
.sv-btn-iptal { color: #b42318; }
.sv-planla { position: relative; display: inline-block; }
.sv-planla summary { list-style: none; cursor: pointer; }
.sv-planla summary::-webkit-details-marker { display: none; }
.sv-planla-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--border, #e5e8ee);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.sv-planla-pop input[type=date] { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 13px; }
.sv-gun-yazdir { display: inline-flex; gap: 8px; align-items: center; }
.sv-gun-yazdir input[type=date] { padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; }
.sv-table td { vertical-align: middle; }

/* Yeni kayıt formu */
.sv-form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) { .sv-form-wrap { grid-template-columns: 1fr; } }
.sv-form-liste { margin-top: 8px; }
.sv-form-alanlar { display: flex; flex-direction: column; gap: 13px; }
.sv-form-alanlar label { font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.sv-form-alanlar input, .sv-form-alanlar select, .sv-form-alanlar textarea {
  padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px;
}
.sv-iki { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sv-tip-secim { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sv-tip-kutu { position: relative; }
.sv-tip-kutu input { position: absolute; opacity: 0; }
.sv-tip-kutu span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 2px solid var(--border, #e2e5ea);
  border-radius: 11px;
  padding: 11px 13px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .12s ease;
}
.sv-tip-kutu span small { font-weight: 400; font-size: 11px; color: var(--muted, #8b93a1); }
.sv-tip-kutu span i { font-size: 16px; color: #1d4ed8; }
.sv-tip-kutu input:checked + span { border-color: #1d4ed8; background: #eef4ff; }
.sv-tip-kutu.ufak span { flex-direction: row; justify-content: center; padding: 8px; }
.sv-adres { display: flex; flex-direction: column; gap: 13px; }
.sv-kaydet { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.sv-kaydet .btn-primary { font-size: 15px; padding: 10px 26px; }

/* Detay */
.sv-detay-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .sv-detay-grid { grid-template-columns: 1fr; } }
.sv-detay-bilgi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sv-detay-bilgi > div { display: flex; flex-direction: column; gap: 2px; }
.sv-detay-bilgi .e, .sv-detay-adres .e {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted, #8b93a1);
}
.sv-detay-adres { background: var(--soft, #f6f8fa); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.sv-detay-adres p { margin: 3px 0 0; font-size: 13.5px; }
.sv-alt-baslik { font-size: 13.5px; font-weight: 700; margin: 18px 0 8px; }
.sv-alt-baslik i { color: #1d4ed8; margin-right: 4px; }
.sv-detay-islem { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sv-detay-planla { display: inline-flex; gap: 8px; align-items: center; }
.sv-detay-planla input[type=date] { padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 8px; }
.sv-zaman { display: flex; flex-direction: column; gap: 12px; }
.sv-zaman-satir { display: flex; gap: 10px; align-items: flex-start; }
.sv-zaman-satir > div { display: flex; flex-direction: column; font-size: 12.5px; }
.sv-zaman-satir small { color: var(--muted, #8b93a1); }
.sv-zaman-satir em { font-style: normal; color: #475569; font-size: 12px; }

/* ==================== Tekli Etiket Basım ==================== */
.tek-wrap { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.tek-ust { background: #fff; border: 1px solid var(--border, #e5e8ee); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tek-buyuk {
  border: 0;
  border-radius: 16px;
  background: #047857;
  color: #fff;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  box-shadow: 0 6px 18px rgba(4, 120, 87, .3);
}
.tek-buyuk:hover { background: #065f46; }
.tek-buyuk:active { transform: scale(.98); }
.tek-buyuk i { font-size: 40px; }
.tek-buyuk span { font-size: 20px; font-weight: 800; }
.tek-buyuk small { font-size: 11.5px; opacity: .85; }
.tek-yazici { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tek-yazici-durum {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  padding: 6px 14px;
}
.tek-yazici-durum.bagli { color: #047857; background: #ecfdf5; border-color: #059669; }
.tek-elle { display: flex; gap: 8px; }
.tek-elle input {
  flex: 1;
  min-width: 0;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  outline: none;
}
.tek-elle input:focus { border-color: #1d4ed8; }
.tek-ayar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.tek-ayar label { display: flex; align-items: center; gap: 7px; }
.tek-sayac { color: var(--muted, #6b7280); font-variant-numeric: tabular-nums; }
.tek-son {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 16px 20px;
}
.tek-son-baslik { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #047857; margin-bottom: 6px; }
.tek-son-baslik i { margin-right: 4px; }
.tek-son-ad { font-size: 15.5px; font-weight: 700; }
.tek-son-alt { font-size: 12.5px; color: #065f46; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ==================== Personel (İK) ==================== */
.pers-hesap-ac {
  border: 1px dashed var(--border, #d7dbe2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pers-bagla {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border-top: 1px dashed var(--border, #e5e8ee);
  padding-top: 12px;
}
.pers-bagla label { flex: 1; font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.pers-bagla select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; }

/* Baskı alanı: ekranda gizli, yazdırırken YALNIZ o görünür */
#lblBaskiAlan { display: none; }
@media print {
  body * { visibility: hidden; }
  #lblBaskiAlan, #lblBaskiAlan * { visibility: visible; }
  #lblBaskiAlan {
    display: flex !important;
    position: absolute;
    inset: 0;
    flex-wrap: wrap;
    gap: 4mm;
    align-content: flex-start;
    background: #fff;
  }
  .lbl-baski .etiket {
    background: #fff;
    border: 1px solid #000;
    border-radius: 2mm;
    width: 90mm;
    padding: 4mm 5mm;
    display: flex;
    flex-direction: column;
    gap: 1.5mm;
    page-break-inside: avoid;
    font-family: "Segoe UI", Arial, sans-serif;
  }
  .lbl-baski .etiket .ad { font-size: 12.5pt; font-weight: 700; line-height: 1.25; }
  .lbl-baski .etiket .kod { font-family: Consolas, monospace; font-size: 8pt; color: #333; }
  .lbl-baski .etiket svg { width: 100%; height: 16mm; }
  .lbl-baski .fiyatlar { display: flex; align-items: flex-end; justify-content: space-between; gap: 4mm; }
  .lbl-baski .pesin .e, .lbl-baski .taksit .e { font-size: 7.5pt; font-weight: 700; letter-spacing: .5px; }
  .lbl-baski .pesin .f { font-size: 20pt; font-weight: 800; line-height: 1; }
  .lbl-baski .taksit { text-align: right; }
  .lbl-baski .taksit .f { font-size: 12pt; font-weight: 700; }
  .lbl-baski .firma { font-size: 6.5pt; text-align: center; letter-spacing: 1px; color: #666; }
  .lbl-baski.fiyatsiz .fiyatlar { display: none; }
  .lbl-baski.kucuk .etiket { width: 60mm; padding: 3mm 4mm; }
  .lbl-baski.kucuk .etiket .ad { font-size: 9.5pt; }
  .lbl-baski.kucuk .etiket svg { height: 12mm; }
  .lbl-baski.kucuk .pesin .f { font-size: 14pt; }
  .lbl-baski.kucuk .taksit .f { font-size: 10pt; }
  /* Zebra ZQ511 rulo 57×40mm: her etiket kendi sayfası, kenarlıksız.
     Yazıcının baskı alanı 72mm — 57mm'lik etiket rahat sığar. */
  .lbl-baski.rulo5740 { gap: 0; }
  .lbl-baski.rulo5740 .etiket {
    border: 0;
    border-radius: 0;
    page-break-after: always;
    width: 57mm;
    height: 40mm;
    padding: 2mm 2.5mm;
    gap: .8mm;
  }
  .lbl-baski.rulo5740 .etiket .ad {
    font-size: 7.5pt;
    line-height: 1.2;
    max-height: 8mm;
    overflow: hidden;
  }
  .lbl-baski.rulo5740 .etiket .kod { display: none; }
  .lbl-baski.rulo5740 .etiket svg { height: 11mm; }
  .lbl-baski.rulo5740 .fiyatlar { margin-top: .5mm; }
  .lbl-baski.rulo5740 .pesin .f { font-size: 12.5pt; }
  .lbl-baski.rulo5740 .taksit .f { font-size: 8.5pt; }
  .lbl-baski.rulo5740 .firma { display: none; }
}
.urnq-ad { font-size: 19px; font-weight: 700; margin: 8px 0 6px; line-height: 1.3; }
.urnq-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.urnq-grup {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  background: var(--soft, #f4f5f7);
  border: 1px solid var(--border, #e7e9ee);
  border-radius: 999px;
  padding: 2px 10px;
}
.urnq-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.urnq-tile { border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.urnq-tile .t-etiket { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; opacity: .75; }
.urnq-tile .t-deger { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.urnq-tile .t-deger small { font-size: 13px; font-weight: 600; }
.urnq-tile-cash { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.urnq-tile-inst { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.urnq-tile-stok { background: #f8fafc; color: #1a202c; border: 1px solid #e2e8f0; }

/* Depo envanter tablosu */
.urnq-depo-tablo { border: 1px solid var(--border, #e5e8ee); border-radius: 12px; overflow: hidden; }
.urnq-depo-baslik, .urnq-depo-satir {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 16px;
}
.urnq-depo-baslik {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted, #8b93a1);
  background: var(--soft, #f6f8fa);
  border-bottom: 1px solid var(--border, #e5e8ee);
}
.urnq-depo-satir { border-bottom: 1px solid var(--border, #f0f1f4); font-size: 13.5px; }
.urnq-depo-satir:last-child { border-bottom: 0; }
.urnq-depo-satir b { font-variant-numeric: tabular-nums; font-size: 14.5px; }
.urnq-depo-satir.var b { color: #047857; }
.urnq-depo-satir.yok { color: var(--muted, #9aa1ad); }
.urnq-depo-satir.yok b { color: #9aa1ad; font-weight: 600; }
.urnq-depo-satir.eksi b { color: #b42318; }
.urnq-depo-satir.dim { opacity: .55; }
.urnq-depo-satir.var { background: #fbfefc; }

/* Fiyat sütunları: peşin koyu/baskın, taksitli mor, alış soluk */
.urn-cash strong { color: #047857; }
.urn-inst { color: #4338ca; }
.urn-cost { color: var(--muted, #9aa1ad); }
.urn-fiyatsiz {
  font-size: 11px;
  color: var(--muted, #b0b6c1);
  border: 1px dashed var(--border, #d7dbe2);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.cek-table td.amount, .cek-table th.text-end { font-variant-numeric: tabular-nums; }
.cek-table tbody td { vertical-align: middle; }

/* Durum rozetleri: dolu badge yerine noktalı hafif etiket */
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.st-ok { background: #ecfdf5; color: #047857; }
.st-warn { background: #fffbeb; color: #b45309; }
.st-off { background: #f3f4f6; color: #6b7280; }

/* Banka tablosu dar kartta sıkışıyordu: genel .payment-table min-width:760
   kuralı burada gereksiz (satırlar kısa) — kaldırınca tablo karta oturur. */
.borc-bank-table { min-width: 0; }
.borc-bank-table th, .borc-bank-table td { padding-left: 10px; padding-right: 10px; }
.borc-bank-table .fold-bar-col { width: 64px; }
.borc-bank-table .share-bar { min-width: 44px; }
.borc-bank-table td:first-child strong { white-space: nowrap; }
.borc-bank-table td:last-child { white-space: nowrap; }

/* ==================== Ürün Envanter 2.0 ==================== */
.urn-grup-chip {
  display: inline-block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  text-decoration: none;
}
.urn-grup-chip:hover { background: #e2e8f0; color: #1d4ed8; }
.f-range { display: flex; align-items: center; gap: 6px; }
.f-range span { color: var(--ufuk-muted); }
.f-range input { min-width: 0; }
.loan-header-actions .btn.active {
  background: var(--ufuk-primary);
  border-color: var(--ufuk-primary);
  color: #fff;
}

/* ==================== Veri Kalitesi ==================== */
.dq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  margin-bottom: 6px;
}
.dq-head-main h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.dq-head-main h2 i { color: var(--ufuk-primary); margin-right: 6px; }
.dq-head-main p { margin: 0; font-size: 13px; color: var(--ufuk-muted); max-width: 640px; line-height: 1.55; }
.dq-head-score {
  text-align: right;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.dq-head-score strong { display: block; font-size: 16px; color: #c2410c; }
.dq-head-score span { font-size: 12px; color: var(--ufuk-muted); }
.dq-head-score.ok { background: #f0fdf4; border-color: #bbf7d0; }
.dq-head-score.ok strong { color: var(--ufuk-success); }

.dq-group-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  margin: 18px 2px 10px;
}
.dq-group-title i { margin-right: 5px; color: var(--ufuk-primary); }

.dq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.dq-card {
  background: #fff;
  border: 1px solid var(--ufuk-border);
  border-left: 4px solid var(--ufuk-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dq-card.danger { border-left-color: var(--ufuk-danger); }
.dq-card.warn   { border-left-color: #f59e0b; }
.dq-card.info   { border-left-color: var(--ufuk-primary); }
.dq-card.ok     { border-left-color: var(--ufuk-success); opacity: .82; }

.dq-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dq-title { font-size: 14px; font-weight: 700; color: var(--ufuk-text); line-height: 1.35; }
.dq-badge {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  white-space: nowrap;
}
.dq-badge.danger { background: #fee2e2; color: #b91c1c; }
.dq-badge.warn   { background: #fef3c7; color: #92400e; }
.dq-badge.info   { background: #e0ecff; color: #1d4ed8; }
.dq-badge.ok     { background: #dcfce7; color: #15803d; }

.dq-count { display: flex; align-items: baseline; gap: 6px; }
.dq-count strong { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.dq-card.danger .dq-count strong { color: var(--ufuk-danger); }
.dq-card.warn .dq-count strong   { color: #b45309; }
.dq-card.ok .dq-count strong     { color: var(--ufuk-success); }
.dq-count span { font-size: 13px; color: var(--ufuk-muted); }

.dq-desc { margin: 0; font-size: 12.5px; line-height: 1.55; color: #5b6472; flex: 1; }

.dq-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ufuk-primary);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #c7dbff;
  border-radius: 8px;
  background: #f5f9ff;
}
.dq-action:hover { background: #e8f1ff; color: #0b5ed7; }

/* ==================== Aylık Plan 2.0 ==================== */

/* Günlük çıkış takvimi */
.mp-daily { padding-bottom: 10px; }
.mp-day-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 12px 16px 6px;
  overflow-x: auto;
}
.mp-day {
  flex: 1;
  min-width: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  text-align: center;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 2px 1px;
  cursor: pointer;
  color: var(--ufuk-muted);
}
.mp-day:hover { background: rgba(13, 110, 253, .08); }
.mp-day.is-active { background: rgba(13, 110, 253, .14); box-shadow: 0 0 0 2px rgba(13, 110, 253, .35); }
.mp-day.is-empty { cursor: default; }
.mp-day.is-empty:hover { background: none; }
.mp-day-val {
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #3f4a5a;
  min-height: 13px;
}
.mp-day-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 84px;
}
.mp-day-col i {
  display: block;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7cb1ff, #2f7bf0);
}
.mp-day.is-weekend .mp-day-col i { background: linear-gradient(180deg, #c3cede, #94a3b8); }
.mp-day.is-today .mp-day-col i { background: linear-gradient(180deg, #ffc861, #f59e0b); }
.mp-day-label { font-size: 10.5px; margin-top: 4px; }
.mp-day.is-today .mp-day-label { font-weight: 800; color: #b45309; }
.mp-day.is-weekend .mp-day-label { opacity: .7; }

/* Tabloda gün başlık satırları */
.mp-day-row td {
  background: #f6f8fb !important;
  padding: 7px 14px !important;
  border-top: 1px solid var(--ufuk-border);
  font-size: 11.5px;
}
.mp-day-row .mp-day-name { font-weight: 800; letter-spacing: .03em; color: #1d4ed8; }
.mp-day-row .mp-day-name i { margin-right: 4px; }
.mp-day-row .mp-day-sum { float: right; color: var(--ufuk-muted); font-variant-numeric: tabular-nums; }

/* Kaynak rozetleri */
.mp-src {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9px;
  margin-right: 4px;
  vertical-align: 1px;
}
.mp-src-kredi  { background: #e0ecff; color: #1d4ed8; }
.mp-src-cek    { background: #fef3c7; color: #92400e; }
.mp-src-manuel { background: #f1f5f9; color: #475569; }

/* ==================== Aylık Plan — dönem başlığı ==================== */
.mp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 24px;
  margin-bottom: 14px;
}
.mp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ufuk-primary);
}
.mp-title {
  margin: 2px 0 3px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.mp-sub { margin: 0; font-size: 13px; color: var(--ufuk-muted); }
.mp-sub strong { color: #b45309; }

.mp-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-period-nav {
  display: flex;
  align-items: stretch;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.mp-period-nav input[type="month"] {
  border: 0;
  border-left: 1px solid #eef2f7;
  border-right: 1px solid #eef2f7;
  border-radius: 0;
  min-height: 42px;
  padding: 0 12px;
  font-weight: 600;
  width: 172px;
}
.mp-period-nav input[type="month"]:focus { box-shadow: none; }
.mp-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  color: var(--ufuk-muted);
  text-decoration: none;
  transition: background .12s ease;
}
.mp-nav-btn:hover { background: #f1f5ff; color: var(--ufuk-primary); }
.mp-period .btn { min-height: 42px; display: inline-flex; align-items: center; gap: 6px; }
.mp-btn-active { border-color: var(--ufuk-primary); color: var(--ufuk-primary); font-weight: 700; }

/* KPI kartlarından tıklanabilir olanlar (button) kart görünümünü korur */
.mp-kpis { margin-bottom: 14px; }
button.cek-kpi {
  text-align: left;
  font: inherit;
  cursor: pointer;
  width: 100%;
}
button.cek-kpi:hover { border-color: #b8cdf3; }
.cek-kpi.active { border-color: var(--ufuk-primary); box-shadow: 0 0 0 2px rgba(13, 110, 253, .18); }

/* ==================== Ödeme Takip — tıklanabilir KPI ==================== */
a.kpi-link { text-decoration: none; color: inherit; display: block; transition: box-shadow .12s ease, transform .12s ease; }
a.kpi-link:hover { box-shadow: 0 3px 10px rgba(17, 24, 39, .10); transform: translateY(-1px); color: inherit; }
.kpi.active { outline: 2px solid var(--ufuk-primary); outline-offset: -1px; }
.kpi-mini-link { color: var(--ufuk-primary); text-decoration: none; font-weight: 600; }
.kpi-mini-link:hover { text-decoration: underline; }

/* ==================== Banka Kredileri — kompakt tablo ==================== */
.bl-table { min-width: 0; }
.bl-table th, .bl-table td { padding-left: 12px; padding-right: 12px; }
.bl-row { cursor: pointer; }
.bl-row:hover td { background: rgba(13, 110, 253, .04); }
.bl-bank-row .g-name { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.bl-bank-row .cek-mono { width: 26px; height: 26px; font-size: 10px; }
.bl-bar-col { width: 90px; }
.bl-bar-col .share-bar { margin-bottom: 2px; }
.bl-bar-col small { font-size: 10.5px; }
.bl-closed { margin: 14px; }

/* Banka Kredileri — süzgeç özeti bandı */
.bl-scope {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 14px 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f6ff, #f8fbff);
  border: 1px solid #cfe0f7;
  border-radius: 10px;
}
.bl-scope-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ufuk-primary);
  white-space: nowrap;
}
.bl-scope-title strong { font-size: 14.5px; }
.bl-scope-title span {
  font-size: 11.5px;
  background: #e0ecff;
  color: #1d4ed8;
  padding: 2px 9px;
  border-radius: 12px;
  font-weight: 700;
}
.bl-scope-items { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.bl-scope-items > div { min-width: 0; }
.bl-scope-items span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--ufuk-muted); text-transform: uppercase; }
.bl-scope-items strong { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-scope-items .vurgu strong { color: var(--ufuk-primary); font-size: 15px; }

.bl-scope-range { font-style: normal; font-size: 12px; color: #b45309; background: #fef3c7; padding: 2px 10px; border-radius: 12px; white-space: nowrap; }

/* ==================== Üst bant: selamlama + saat ==================== */
.hdr-greet { align-items: center; gap: 14px; }
.hdr-greet-text { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.hdr-greet-text strong { font-size: 13.5px; color: var(--ufuk-text); }
.hdr-greet-text span { font-size: 11.5px; color: var(--ufuk-muted); }
.hdr-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ufuk-primary);
  background: #f0f6ff;
  border: 1px solid #d6e4ff;
  border-radius: 10px;
  padding: 7px 12px;
}
.hdr-clock i { font-size: 13px; }

/* Depo izleme: soluk görünümler */
.urn-depo.dim { opacity: .5; border-style: dashed; }
.sup-row.is-dim { opacity: .55; }
.urn-dim-fold { border-top: 1px solid #eef2f7; }
.urn-dim-fold summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--ufuk-muted);
  user-select: none;
}
.urn-dim-fold summary::-webkit-details-marker { display: none; }
.urn-dim-fold summary i { margin-right: 5px; }

/* Ürün çipleri: bugün açılan / stoğa giren vurgusu */
.urn-chip-new { border-color: #c7f0d8; background: #f0fdf4; color: #15803d; }
.urn-chip-new:hover { background: #dcfce7; }
.urn-chip-new i { margin-right: 3px; }

/* Sistem kartları çipi: bilerek soluk — POS yardımcı kartlarına nadir erişim */
.urn-chip-dim { opacity: .55; border-style: dashed; }
.urn-chip-dim:hover, .urn-chip-dim.active { opacity: 1; }
.urn-chip-dim i { margin-right: 3px; }

/* Ana Ekran — bugünün ürün hareketi (yeni açılan / stoğa giren) */
.dash-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* Başlık rozeti */
.dash-prod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  margin-right: 8px;
  vertical-align: -8px;
  font-size: 15px;
}
.dash-prod-badge-new { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.dash-prod-badge-stock { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #047857; }

/* Satır iki katlı: üstte kod + ad (+ grup), altta fiyat rozetleri */
.dash-prod-body { padding-top: 2px; padding-bottom: 6px; }
.dash-prod-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  transition: background .15s ease, transform .15s ease;
}
.dash-prod-row + .dash-prod-row { border-top: 1px solid var(--border, #f0f1f4); }
.dash-prod-row:hover {
  background: var(--soft, #f6f8fa);
  transform: translateX(3px);
}
.dash-prod-top {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.dash-prod-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.dash-prod-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  color: var(--muted, #6b7280);
  background: var(--soft, #f4f5f7);
  border: 1px solid var(--border, #e7e9ee);
  border-radius: 5px;
  padding: 0 6px;
  white-space: nowrap;
}
.dash-prod-group {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted, #8b93a1);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Fiyat/stok rozetleri: etiketli, renkli, hizalı */
.dash-prod-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.pp {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}
.pp small {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .75;
}
.pp i { font-size: 11px; align-self: center; }
.pp-cash { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pp-inst { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.pp-stock { background: #047857; color: #fff; border: 1px solid #047857; }
.pp-none {
  background: transparent;
  color: var(--muted, #9aa1ad);
  border: 1px dashed var(--border, #d7dbe2);
  font-weight: 500;
  font-size: 11.5px;
}

/* Dar ekranda grup etiketi gizlenir, ada yer kalır */
@media (max-width: 560px) {
  .dash-prod-row:hover { transform: none; }
  .dash-prod-group { display: none; }
}
