:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #d7deea;
  --text: #172033;
  --text-muted: #5a657a;
  --primary: #1f4fa3;
  --primary-dark: #153973;
  --success-bg: #eaf6ee;
  --success-text: #166534;
  --warning-bg: #fff7e6;
  --warning-text: #9a6700;
  --error-bg: #fcebea;
  --error-text: #b42318;
  --info-bg: #eef4ff;
  --info-text: #23468c;
  --shadow: 0 18px 40px rgba(21, 57, 115, 0.08);
  --radius: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f8faff 0%, var(--bg) 100%);
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.sidenav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 20px 14px;
  background: linear-gradient(180deg, #16365f 0%, #1e4578 55%, #24528a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 8px 0 28px rgba(15, 40, 80, 0.12);
  z-index: 20;
}

.sidenav__company {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidenav__logo {
  display: block;
  max-width: 160px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 8px;
}

.sidenav__unvan {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #fff;
  word-break: break-word;
}

.sidenav__brand {
  padding: 8px 12px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.sidenav__title {
  padding: 0 12px;
  margin: -8px 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

.sidenav__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidenav__nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.25;
}

.sidenav__nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidenav__nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 #9ec5ff;
}

.sidenav__logout {
  margin-top: auto;
  padding: 8px 4px 0;
}

.sidenav__logout button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.sidenav__logout button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.page {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px 48px;
  display: grid;
  gap: var(--space-5);
  min-width: 0;
  align-content: start;
}

/* Eski yatay menü sınıfları — geriye dönük */
.topnav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topnav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.topnav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidenav {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
  }

  .sidenav__brand,
  .sidenav__title {
    padding: 0;
    margin: 0;
  }

  .sidenav__nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 4px;
  }

  .sidenav__nav a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .page {
    padding: 20px 16px 40px;
  }
}

.form-grid--narrow {
  max-width: 420px;
}

.form-grid--card-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.panel--nested {
  box-shadow: none;
  margin-top: var(--space-4);
}

.settings-banks {
  display: grid;
  gap: var(--space-4);
}

.hint {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hesap-list {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
}

.field--full {
  grid-column: 1 / -1;
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-2);
}

.tabs__tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
}

.tabs__tab.is-active {
  color: var(--primary);
  background: var(--surface-muted);
  border-color: var(--border);
  border-bottom-color: var(--surface-muted);
}

.tabs__panel {
  display: none;
}

.tabs__panel.is-active {
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  min-width: 0;
  max-width: 100%;
}

.panel__header {
  margin-bottom: var(--space-5);
}

.panel__header--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.bank-health {
  flex: 0 1 auto;
  min-width: 12rem;
  text-align: right;
}

.bank-health__hint {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bank-health__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.65rem;
}

.bank-health__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bank-health__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}

.bank-health__item--ok .bank-health__dot {
  background: #16a34a;
}

.bank-health__item--error .bank-health__dot {
  background: #dc2626;
}

.bank-health__item--unknown .bank-health__dot {
  background: #9ca3af;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.3;
}

.panel__intro,
.section-heading p {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.form-grid--filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.form-grid--filters .actions {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field span {
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  min-height: 46px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.field textarea {
  min-height: 96px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
  line-height: 1.45;
}

.field input[type="checkbox"] {
  min-height: auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  flex-shrink: 0;
}

.field--check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field--check span {
  font-weight: 600;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.button:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 79, 163, 0.14);
}

.actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.button {
  min-height: 46px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}

a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1.2;
}

a.button:hover,
a.button:focus {
  text-decoration: none;
}

.button:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button--secondary {
  background: #2b6cb0;
}

.button--ghost {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
}

.button--ghost:hover:not(:disabled) {
  background: #f5f8ff;
}

.status {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.status--info {
  background: var(--info-bg);
  color: var(--info-text);
}

.status--success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status--warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status--error {
  background: var(--error-bg);
  color: var(--error-text);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section-heading > div {
  min-width: 0;
}

.results-search {
  display: block;
  flex: 0 1 280px;
  min-width: 180px;
}

.results-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 14px;
}

.results-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 79, 163, 0.14);
}

.results-search input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 100%;
}

.results-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.results-table th {
  background: #eef3fb;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-table tbody tr.is-exported {
  background: #d4edda;
  opacity: 1;
}

.results-table tbody tr:nth-child(even):not(.is-exported):not(.is-giren):not(.is-cikan) {
  background: #fbfcfe;
}

.results-table tbody tr.is-giren {
  background: #f1f8f4;
}

.results-table tbody tr.is-cikan {
  background: #f8f2f1;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge--ok {
  background: #d8f0e0;
  color: #1b6b3a;
}

.muted {
  color: var(--text-muted);
  font-size: 12px;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.cari-combo {
  position: relative;
  min-width: 220px;
  max-width: 320px;
}

.cari-combo__input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 14px;
}

.cari-combo__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 79, 163, 0.14);
}

.cari-combo__list {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 40, 80, 0.14);
}

.cari-combo__list--up {
  box-shadow: 0 -12px 28px rgba(20, 40, 80, 0.14);
}

.cari-combo__list[hidden] {
  display: none !important;
}

.cari-combo__item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}

.cari-combo__item:hover,
.cari-combo__item.is-active {
  background: #eef3fb;
}

.cari-combo__empty {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Wolvox eşleştirme — okunur satırlar, aktarım mantığı aynı */
.page-wolvox-match .match-source {
  margin: var(--space-2) 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text, #172033);
}

.page-wolvox-match .match-source__meta {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted, #5a657a);
}

.page-wolvox-match .match-help {
  margin-top: var(--space-3);
}

.page-wolvox-match .match-help summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.page-wolvox-match .match-help .panel__intro {
  margin-top: var(--space-2);
}

.page-wolvox-match .match-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
}

.page-wolvox-match .match-toolbar__primary,
.page-wolvox-match .match-toolbar__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.page-wolvox-match .match-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.page-wolvox-match .match-hesap-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 0 0 var(--space-3);
  margin: 0 0 var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.page-wolvox-match .match-hesap-tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.page-wolvox-match .match-hesap-tab span {
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.page-wolvox-match .match-hesap-tab[aria-current="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-wolvox-match .match-hesap-tab[aria-current="true"] span {
  color: rgba(255, 255, 255, 0.8);
}

.page-wolvox-match .match-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
}

.page-wolvox-match .section-heading {
  align-items: center;
  flex-wrap: wrap;
}

.page-wolvox-match .section-heading #summary {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-size: 13px;
}

.page-wolvox-match .table-wrap--match {
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 17rem);
  overflow: auto;
}

.page-wolvox-match .results-table--match {
  min-width: 1120px;
  table-layout: fixed;
  width: 100%;
}

.page-wolvox-match .results-table--match th,
.page-wolvox-match .results-table--match td {
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  vertical-align: middle;
}

.page-wolvox-match .results-table--match thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #e8eef8;
  box-shadow: 0 1px 0 var(--border);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.page-wolvox-match .results-table--match col.c-check { width: 2.6rem; }
.page-wolvox-match .results-table--match col.c-durum { width: 7.2rem; }
.page-wolvox-match .results-table--match .btn-masraf {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
}
.page-wolvox-match .results-table--match col.c-tarih { width: 6.2rem; }
.page-wolvox-match .results-table--match col.c-acik { width: 22%; }
.page-wolvox-match .results-table--match col.c-tutar { width: 7rem; }
.page-wolvox-match .results-table--match col.c-ba { width: 4.6rem; }
.page-wolvox-match .results-table--match col.c-iban { width: 8rem; }
.page-wolvox-match .results-table--match col.c-hedef { width: 12%; }
.page-wolvox-match .results-table--match col.c-combo { width: 13%; }

.page-wolvox-match .results-table--match .cell-clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}

.page-wolvox-match .results-table--match .cell-acik {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  max-width: none;
}

.page-wolvox-match .results-table--match .cell-tutar {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

.page-wolvox-match .results-table--match .cell-tarih,
.page-wolvox-match .results-table--match .cell-ba {
  white-space: nowrap;
}

.page-wolvox-match .results-table--match .cell-check {
  text-align: center;
}

.page-wolvox-match .results-table--match .row-check {
  width: 16px;
  height: 16px;
}

.page-wolvox-match .results-table--match .cari-combo {
  min-width: 0;
  max-width: none;
  width: 100%;
}

.page-wolvox-match .results-table--match .cari-combo__input {
  min-height: 36px;
  padding: 0 var(--space-2);
  font-size: 13px;
  border-radius: 8px;
  text-overflow: ellipsis;
}

.page-wolvox-match .results-table tbody tr.is-exported {
  background: #f4faf6;
  box-shadow: inset 3px 0 0 #2f8f57;
}

.page-wolvox-match .results-table tbody tr.is-skipped {
  background: #fdf6ee;
  box-shadow: inset 3px 0 0 #d97706;
}

.page-wolvox-match .results-table tbody tr.is-unmatched {
  box-shadow: inset 3px 0 0 #c9851a;
}

.page-wolvox-match .results-table tbody tr.is-masraf-row {
  box-shadow: inset 3px 0 0 #6b7280;
}

.page-wolvox-match .results-table tbody tr:hover {
  background: #eef4ff;
}

.page-wolvox-match .results-table tbody tr.is-exported:hover {
  background: #e7f5ec;
}

.page-wolvox-match .results-table tbody tr.is-skipped:hover {
  background: #faecd9;
}

.page-wolvox-match .table-wrap--match.hide-exported tr.is-exported,
.page-wolvox-match .table-wrap--match.hide-exported tr.is-skipped {
  display: none;
}

.page-wolvox-match .modal__dialog.iban-onay {
  width: min(760px, 96vw);
}

.page-wolvox-match .iban-onay .results-table {
  min-width: 0;
}

.page-wolvox-match .iban-onay__soru {
  margin: 0 0 var(--space-3);
  font-weight: 600;
}

.page-wolvox-match .iban-onay__iban {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  white-space: nowrap;
}

.page-wolvox-match .iban-onay__actions {
  justify-content: flex-end;
  margin-top: var(--space-3);
}

.page-wolvox-match .badge--info {
  background: var(--info-bg);
  color: var(--info-text);
}

.page-wolvox-match .badge--warn {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.page-wolvox-match .badge--masraf {
  background: #eef0f4;
  color: #3d4658;
}

.page-wolvox-match .ba-pill {
  display: inline-block;
  min-width: 3.4rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.page-wolvox-match .ba-pill--b {
  background: #f8e8e6;
  color: #9b2c1f;
}

.page-wolvox-match .ba-pill--a {
  background: #e6f4ea;
  color: #1b6b3a;
}

.empty-row {
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 840px) {
  .page {
    padding: var(--space-5) var(--space-4);
  }

  .panel {
    padding: var(--space-4);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid--filters {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .bank-health {
    text-align: left;
    width: 100%;
  }

  .bank-health__list {
    justify-content: flex-start;
  }

  h1 {
    font-size: 28px;
  }
}

.results-table tr.is-clickable {
  cursor: pointer;
}

.results-table tr.is-clickable:hover {
  background: var(--info-bg);
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 51, 0.45);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, 98vw);
  max-height: min(92vh, 980px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: var(--space-5);
}

.modal__dialog .table-wrap {
  overflow-x: auto;
}

.modal__dialog .results-table {
  min-width: 900px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}

.modal__header h2 {
  margin: 0;
  font-size: 22px;
}

.modal__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 14px;
}

.modal__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.modal__field {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-3);
  background: var(--surface-muted);
}

.modal__field dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  word-break: break-word;
}

.modal__field dd {
  margin: 0;
  font-size: 14px;
  word-break: break-word;
}

.modal__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.modal__tabs .button.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.modal__panel {
  min-height: 120px;
}

@media (max-width: 840px) {
  .modal__body {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none !important;
  }
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.dash-card {
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  color: #fff;
  box-shadow: var(--shadow);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dash-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}

.dash-card__head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
}

.dash-card__btn {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
  white-space: nowrap;
}

.dash-card__btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

.dash-card__value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dash-card__foot {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.dash-card__err {
  margin: 0;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: 8px;
}

.dash-card__list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: 0.8rem;
}

.dash-card__list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  opacity: 0.92;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 0;
}

.dash-card__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.dash-card__split span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.85;
}

.dash-card__split strong {
  font-size: 1.25rem;
}

.dash-card--rose { background: linear-gradient(145deg, #be123c, #9f1239); }
.dash-card--emerald { background: linear-gradient(145deg, #059669, #047857); }
.dash-card--amber { background: linear-gradient(145deg, #d97706, #b45309); }
.dash-card--slate { background: linear-gradient(145deg, #475569, #334155); }
.dash-card--red { background: linear-gradient(145deg, #dc2626, #991b1b); }
.dash-card--yellow { background: linear-gradient(145deg, #ca8a04, #a16207); }
.dash-card--blue { background: linear-gradient(145deg, #2563eb, #1d4ed8); }
.dash-card--navy { background: linear-gradient(145deg, #1e3a5f, #0f2744); }
.dash-card--green { background: linear-gradient(145deg, #16a34a, #15803d); }
.dash-card--indigo { background: linear-gradient(145deg, #4f46e5, #3730a3); }

@media (max-width: 640px) {
  .dash-card__value { font-size: 1.4rem; }
  .dash-card__head { flex-direction: column; }
}

/* —— Müşteri portalı —— */
.portal-page {
  max-width: min(72rem, 100%);
  margin: 1.5rem auto;
  padding: 0 max(1rem, env(safe-area-inset-right, 0px))
    0 max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.portal-page--narrow {
  max-width: min(40rem, 100%);
}
.portal-letterhead { margin-bottom: 1rem; }
.portal-letterhead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
}
.portal-letterhead__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 18px;
  min-width: 0;
  flex: 1 1 18rem;
}
.portal-letterhead__logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex: 0 0 auto;
}
.portal-letterhead__text { min-width: 0; flex: 1 1 14rem; }
.portal-letterhead__unvan {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2b4a;
  letter-spacing: 0.01em;
  line-height: 1.35;
}
.portal-letterhead__line {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #5a6478;
}
.portal-letterhead__meta { margin-top: 2px; }
.portal-letterhead__sep { margin: 0 0.35em; color: #9aa3b2; }
.portal-letterhead__rule {
  margin-top: 12px;
  height: 2px;
  background: #1a2b4a;
  border: 0;
}
.portal-page-head {
  width: 100%;
  align-items: flex-start;
  margin-top: 0.15rem;
}
.portal-page-head__main {
  flex: 1 1 16rem;
  min-width: 0;
}
.portal-page-head__side {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  min-width: 10rem;
}
.portal-panel-contracts {
  flex: 0 0 auto;
  margin-left: 0;
  text-align: right;
  min-width: 10rem;
  padding-top: 0.15rem;
}
.portal-ariza-shortcut {
  width: 100%;
  max-width: 14.5rem;
}
.portal-ariza-shortcut__btn {
  width: 100%;
  min-height: 40px;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  justify-content: center;
}
.portal-panel-contracts__block + .portal-panel-contracts__block {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.portal-panel-contracts__seri {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a2b4a;
  letter-spacing: 0.02em;
}
.portal-panel-contracts__row {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  line-height: 1.45;
}
.portal-panel-contracts__label {
  font-size: 0.78rem;
  color: #5a6478;
  white-space: nowrap;
}
.portal-panel-contracts__value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a2b4a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
  justify-content: flex-end;
  align-items: center;
  flex: 0 0 auto;
}
.portal-nav a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.portal-nav a.button[aria-current="page"] {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
.portal-nav a.button[aria-current="page"]:hover {
  background: var(--primary-dark);
  color: #fff;
}
.portal-nav a.portal-nav__exit {
  color: #5a6478;
}
.portal-nav a.portal-nav__exit:hover {
  color: var(--primary);
}
.portal-table a.button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}
.portal-meta { margin: 0 0 4px; }
.portal-meta strong { font-weight: 600; }
.portal-meta--bakiye {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}
.portal-bakiye-pay {
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  min-height: 0;
}
.portal-legal {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text, #1a2b4a);
  max-width: 46rem;
}
.portal-legal h2 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text, #1a2b4a);
}
.portal-legal p,
.portal-legal ul {
  margin: 0 0 0.75rem;
}
.portal-legal ul {
  padding-left: 1.25rem;
}
.portal-legal a {
  color: var(--accent, #1e4fbf);
}
.portal-legal-footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
  font-size: 0.82rem;
  text-align: center;
}
.portal-legal-footer nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.portal-legal-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  justify-content: center;
}
.portal-legal-footer a {
  color: var(--accent, #1e4fbf);
  text-decoration: none;
  white-space: nowrap;
}
.portal-legal-footer a:hover {
  text-decoration: underline;
}
.portal-legal-footer__sep {
  color: #9aa3b2;
  user-select: none;
}
.portal-login {
  max-width: 22rem;
  margin: 3.5rem auto;
  padding: 0 max(1rem, env(safe-area-inset-right, 0px))
    0 max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.portal-login .panel {
  padding: 1.25rem 1.15rem 1.1rem;
}
.portal-login-logo {
  display: block;
  max-height: 72px;
  max-width: 100%;
  width: auto;
  margin: 0 auto 16px;
  object-fit: contain;
}
.portal-login-brand {
  text-align: center;
  margin-bottom: 8px;
}
.portal-login-brand__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #1a2b4a);
  margin: 0;
}
.portal-otp-input {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
}
.portal-login-back {
  text-align: center;
  margin-top: 12px;
}
.portal-cari-sec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.portal-cari-sec-list .button {
  width: 100%;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  min-height: 48px;
}
.portal-login .panel__header {
  text-align: center;
}
.portal-login__title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: clamp(1.1rem, 4.5vw, 1.45rem);
  line-height: 1.3;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.portal-login__title-brand {
  display: block;
  font-weight: 700;
}
.portal-login__title-sub {
  display: block;
  font-size: 0.92em;
  font-weight: 600;
  color: #2a3a52;
}
.portal-login .panel__intro {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  font-size: 0.92rem;
}
.portal-login form.form-grid {
  grid-template-columns: 1fr;
  justify-items: center;
  margin-left: auto;
  margin-right: auto;
  width: min(100%, 15rem);
}
.portal-login form .field {
  grid-column: 1 / -1;
  width: 100%;
  align-items: center;
  text-align: center;
}
.portal-login form .field span {
  width: 100%;
}
.portal-login form .field input {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.portal-login form .actions {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: center;
}
.portal-login form .actions .button {
  width: auto;
  min-width: 9.5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.portal-login .form-grid--narrow {
  max-width: 15rem;
  margin-left: auto;
  margin-right: auto;
}
.portal-login .portal-legal-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
}
.portal-login .portal-legal-footer nav {
  font-size: 0.76rem;
  line-height: 1.4;
}
.portal-legal-consent a {
  color: var(--accent, #1e4fbf);
}
.portal-pay-trust {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem 0.95rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #f8fafc;
}
.portal-pay-trust__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem 1.75rem;
}
.portal-pay-trust__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.portal-pay-trust__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7789;
}
.portal-pay-trust__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.portal-pay-brand {
  display: block;
  height: 32px;
  width: auto;
  border-radius: 4px;
}
.portal-pay-brand--wide {
  height: 32px;
}
.portal-pay-brand--provider {
  height: 26px;
  max-width: 8rem;
  object-fit: contain;
}
.portal-pay-trust__provider {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.portal-pay-trust__provider-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
}
.portal-pay-trust__wordmark {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2b4a;
  letter-spacing: -0.01em;
}
.portal-pay-trust__wordmark--muted {
  font-size: 0.82rem;
  font-weight: 600;
  color: #5b6779;
}
.portal-pay-trust__note {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #5b6779;
}
.portal-pay-trust__note strong {
  color: #1a2b4a;
}
.portal-cari-title {
  margin: 0.15rem 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2b4a;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.portal-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.portal-ariza-alert {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #f0c36d;
  background: linear-gradient(180deg, #fff8eb 0%, #fff3d6 100%);
  text-decoration: none;
  color: inherit;
}
.portal-ariza-alert:hover {
  border-color: #d9a23a;
}
.portal-ariza-alert__title {
  font-weight: 700;
  color: #8a5a00;
  font-size: 0.98rem;
}
.portal-ariza-alert__detail {
  font-size: 0.88rem;
  color: #6b5420;
  line-height: 1.4;
}
.portal-dash-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.portal-dash-card:hover {
  border-color: #1a2b4a;
  box-shadow: 0 2px 10px rgba(26, 43, 74, 0.08);
}
.portal-dash-card--alert {
  border-color: #f0c36d;
  background: #fffaf0;
}
.portal-dash-card__title {
  font-weight: 700;
  font-size: 1rem;
  color: #1a2b4a;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.portal-dash-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #8a5a00;
  color: #fff;
}
.portal-dash-card__desc {
  font-size: 0.85rem;
  color: #5a6478;
  line-height: 1.4;
}
.portal-dash-card--soon {
  opacity: 0.55;
  background: #f7f8fa;
  cursor: default;
}
.portal-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}
.results-table.portal-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.portal-table th,
.portal-table td {
  padding: 0.45rem 0.5rem;
  vertical-align: top;
  word-break: break-word;
}
.portal-table th.c-tarih,
.portal-table td.c-tarih { width: 6.5rem; white-space: nowrap; }
.portal-table th.c-evrak,
.portal-table td.c-evrak { width: 5.5rem; word-break: break-all; }
.portal-table th.c-acik,
.portal-table td.c-acik { width: auto; }
.portal-table th.c-num,
.portal-table td.c-num {
  width: 5.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.portal-table--asansor {
  table-layout: auto;
  min-width: 58rem;
}
.portal-table--asansor th,
.portal-table--asansor td {
  padding: 0.7rem 0.75rem;
  line-height: 1.45;
}
.portal-table--asansor th {
  line-height: 1.35;
  white-space: normal;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}
.portal-table--asansor tbody tr td {
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.portal-table--asansor .c-seri {
  min-width: 7rem;
  word-break: break-word;
}
.portal-table--asansor .c-tse {
  min-width: 4.75rem;
  width: 4.75rem;
}
.portal-table--asansor .c-kisa {
  min-width: 3.75rem;
  white-space: nowrap;
}
.portal-table--asansor .c-tarih {
  min-width: 7.5rem;
  white-space: nowrap;
}
.portal-table--asansor .c-kimlik {
  min-width: 9rem;
  word-break: break-word;
}
.portal-table--asansor .c-soz {
  min-width: 5.25rem;
  white-space: nowrap;
}
.portal-pdf-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.portal-pdf-links .button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1.2;
}
.portal-kart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .portal-page {
    margin: 0.75rem auto;
    padding: 0 max(0.65rem, env(safe-area-inset-right, 0px))
      0 max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .portal-page .panel {
    padding: 1rem;
  }

  .portal-page h1 {
    font-size: 1.45rem;
    line-height: 1.25;
  }

  .portal-page .form-grid--narrow {
    max-width: none;
  }

  .portal-letterhead__row {
    flex-direction: column;
    gap: 10px;
  }

  .portal-page-head {
    flex-direction: column;
    gap: 0.85rem;
  }

  .portal-page-head__side {
    margin-left: 0;
    width: 100%;
    align-items: stretch;
  }

  .portal-ariza-shortcut {
    max-width: none;
  }

  .portal-panel-contracts {
    margin-left: 0;
    width: 100%;
    text-align: left;
    padding-top: 0;
  }

  .portal-panel-contracts__row {
    justify-content: flex-start;
  }

  .portal-letterhead__brand {
    width: 100%;
    flex: 1 1 auto;
  }

  .portal-letterhead__logo {
    height: 48px;
    max-width: 120px;
  }

  .portal-letterhead__unvan {
    font-size: 0.88rem;
  }

  .portal-letterhead__line:not(.portal-letterhead__meta) {
    display: none;
  }

  .portal-letterhead__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.35rem;
  }

  .portal-letterhead__meta .portal-letterhead__sep {
    display: none;
  }

  .portal-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin: 0 -0.15rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .portal-nav::-webkit-scrollbar {
    display: none;
  }

  .portal-nav a.button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .portal-cari-title {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .portal-meta--bakiye {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .portal-bakiye-pay {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    box-sizing: border-box;
  }

  .portal-dash-grid {
    grid-template-columns: 1fr;
  }

  .portal-dash-card {
    min-height: 48px;
  }

  .portal-page .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-page .actions .button {
    width: 100%;
  }

  .portal-table-wrap .portal-table {
    min-width: 34rem;
    table-layout: auto;
  }

  .portal-table-wrap .portal-table--asansor {
    min-width: 44rem;
  }

  .portal-table--asansor th,
  .portal-table--asansor td {
    padding: 0.6rem 0.65rem;
  }

  .form-grid--card-row {
    gap: 8px;
  }

  .portal-kart-grid {
    grid-template-columns: 1fr;
  }

  .portal-login {
    margin: 1.25rem auto 2rem;
    max-width: 100%;
  }

  .portal-login .actions .button {
    width: auto;
    min-width: 9.5rem;
  }

  .portal-legal-footer nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .portal-pay-trust {
    padding: 0.8rem 0.85rem 0.85rem;
  }

  .portal-pay-trust__row {
    gap: 0.75rem 1.1rem;
  }

  .portal-pay-brand,
  .portal-pay-brand--wide {
    height: 28px;
  }

  .portal-pay-brand--provider {
    height: 24px;
  }
}

@media (max-width: 400px) {
  .form-grid--card-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid--card-row .field:last-child {
    grid-column: 1 / -1;
    max-width: 8rem;
  }
}
