:root {
  --bg: #f4f5f7;
  --card: #fff;
  --border: #e2e5ea;
  --text: #1a1d23;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #059669;
  --danger: #dc2626;
  --resmi-bg: #eff6ff;
  --elden-bg: #fef3c7;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

header {
  margin-bottom: 28px;
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-logo {
  text-decoration: none;
  color: inherit;
}

.site-logo h1 {
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-toggle {
  display: none;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.period {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.period select {
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.period select:focus {
  outline: 2px solid var(--accent);
  border-radius: 4px;
}

.grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card h2 {
  margin: 0;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fafbfc;
}

th.num,
td.num {
  text-align: right;
  width: 120px;
}

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

td.idx {
  width: 36px;
  color: var(--muted);
  font-size: 13px;
}

td.name {
  font-weight: 500;
  min-width: 100px;
}

input.cell-input {
  width: 100%;
  max-width: 110px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

input.cell-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input.cell-input.resmi {
  background: var(--resmi-bg);
}

input.cell-input.elden {
  background: var(--elden-bg);
}

input.cell-text {
  text-align: left;
  max-width: 100%;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.summary-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.summary-item .label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.summary-item .value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-item.net .value {
  color: var(--accent);
}

.summary-item.net.negative .value {
  color: var(--danger);
}

.summary-item.gelir .value {
  color: var(--success);
}

.summary-item.gider .value {
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
}

.btn-ghost:hover {
  background: #f3f4f6;
  color: var(--text);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 13px;
}

.gelir-actions {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.btn-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
}

.btn-delete:hover {
  color: var(--danger);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
}

.loading {
  opacity: 0.5;
  pointer-events: none;
}

.empty-hint {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav a,
.btn {
  -webkit-tap-highlight-color: transparent;
}

.nav a {
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav a:hover {
  background: #eef2ff;
  color: var(--accent);
}

.nav a.active {
  background: var(--accent);
  color: #fff;
}

.nav-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
  align-self: center;
}

.nav-logout {
  color: var(--danger) !important;
}

.nav-logout:hover {
  background: #fef2f2 !important;
}

/* Login */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 24px;
  background: linear-gradient(135deg, #eff6ff 0%, #f4f5f7 60%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 32px 28px;
}

.login-logo {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.login-sub {
  margin: 6px 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .field input {
  min-height: 46px;
  font-size: 16px;
}

.login-btn {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  font-size: 16px;
  margin-top: 4px;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
}

/* Dashboard */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.dash-hero.negative {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

.dash-hero-main {
  flex: 1;
  min-width: 200px;
}

.dash-donem {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-label {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.dash-net {
  margin: 4px 0 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--success);
}

.dash-hero.negative .dash-net {
  color: var(--danger);
}

.dash-hero-side {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-mini {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 140px;
}

.dash-mini.gelir .dash-mini-value {
  color: var(--success);
}

.dash-mini.gider .dash-mini-value {
  color: var(--danger);
}

.dash-mini-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.dash-mini-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.stat-grid-inline {
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat-card.stat-gelir {
  border-left: 3px solid var(--success);
}

.stat-card.stat-gider {
  border-left: 3px solid var(--danger);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
}

.stat-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.dash-grid {
  margin-top: 0;
}

.card-foot {
  margin: 0;
  padding: 12px 18px;
  font-size: 14px;
  border-top: 1px solid var(--border);
  background: #f9fafb;
}

.card-foot a {
  color: var(--accent);
}

.text-gelir {
  color: var(--success);
  font-weight: 600;
}

.text-gider {
  color: var(--danger);
  font-weight: 600;
}

@media (min-width: 900px) {
  .wrap {
    max-width: 1200px;
  }
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.field-sm {
  flex: 0 0 120px;
  min-width: 100px;
}

.field-btn {
  flex: 0 0 auto;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.card-desc {
  margin: 0;
  padding: 0 18px 12px;
  font-size: 13px;
  color: var(--muted);
}

.odeme-ozet {
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.ozet-chip {
  font-size: 12px;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-resmi {
  background: var(--resmi-bg);
  color: #1d4ed8;
}

.badge-elden {
  background: var(--elden-bg);
  color: #b45309;
}

.badge-muted {
  background: #f3f4f6;
  color: var(--muted);
  text-transform: none;
  font-weight: 500;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

tr.inactive {
  opacity: 0.55;
}

.actions {
  white-space: nowrap;
  text-align: right;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fef2f2;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-box h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.maas-input {
  max-width: 130px;
  margin-left: auto;
}

.maas-tutar {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.maas-action {
  width: 120px;
  text-align: center;
}

.btn-maas {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-maas-pay {
  background: var(--accent);
  color: #fff;
}

.btn-maas-pay:hover {
  background: var(--accent-hover);
}

.btn-maas-borc {
  background: #fef3c7;
  color: #b45309;
}

.btn-maas-borc:hover {
  background: #fde68a;
}

.btn-borc {
  background: #fef3c7;
  color: #b45309;
}

.btn-borc:hover {
  background: #fde68a;
}

.btn-odeme {
  background: #ecfdf5;
  color: #047857;
}

.btn-odeme:hover {
  background: #d1fae5;
}

.btn-avans {
  background: #fff7ed;
  color: #c2410c;
}

.btn-avans:hover {
  background: #ffedd5;
}

.btn-odeme-personel {
  background: #ecfdf5;
  color: #047857;
}

.btn-odeme-personel:hover {
  background: #d1fae5;
}

.odeme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.badge-borc {
  background: #fef3c7;
  color: #b45309;
}

.badge-tahsil {
  background: #ecfdf5;
  color: var(--success);
}

.bakiye-pos {
  color: var(--danger);
  font-weight: 600;
}

.bakiye-neg {
  color: var(--success);
  font-weight: 600;
}

.cell-select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.badge-maas {
  background: #ecfdf5;
  color: var(--success);
  text-transform: none;
  font-weight: 600;
  margin-left: 4px;
}

.card-desc a {
  color: var(--accent);
}

.gider-form {
  border-top: 1px solid var(--border);
}

.gider-alt td {
  background: #fafbfc;
  font-size: 14px;
}

.gider-alt-label {
  padding-left: 28px !important;
  position: relative;
}

.gider-alt-label::before {
  content: '↳';
  position: absolute;
  left: 14px;
  color: var(--muted);
}

.gider-alt-toplam td {
  border-top: 1px dashed var(--border);
  font-weight: 600;
}

.btn-delete-sm {
  margin-left: 8px;
  vertical-align: middle;
  font-size: 16px;
}

/* Notlar */
.modal-box-wide {
  max-width: 560px;
  width: 100%;
}

.not-filters {
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--border);
}

.not-form {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.not-form-page {
  background: #f9fafb;
}

.not-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  resize: vertical;
  min-height: 88px;
}

.not-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.not-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  max-height: 360px;
  overflow-y: auto;
}

.not-list-page {
  max-height: none;
  padding-top: 8px;
}

.not-empty {
  margin: 0;
  padding: 8px 0;
}

.not-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}

.not-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.not-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.not-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.not-tag-firma {
  background: #eff6ff;
  color: #1d4ed8;
}

.not-tag-personel {
  background: #fef3c7;
  color: #b45309;
}

.not-tag-genel {
  background: #f3f4f6;
  color: var(--muted);
}

.not-time {
  font-size: 12px;
  color: var(--muted);
}

.not-body {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.not-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  justify-content: flex-end;
}

.modal-actions-foot {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 0;
}

.firma-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.firma-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.firma-detay-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.firma-detay-header h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.firma-detay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.firma-filters {
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--border);
}

/* ─── Mobil & tablet ─── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-scroll table {
  min-width: 520px;
}

.table-scroll-hint {
  display: none;
  margin: 0;
  padding: 8px 18px 0;
  font-size: 12px;
  color: var(--muted);
}

.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  .wrap {
    padding: 16px 14px 24px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--bg);
    margin: -16px -14px 20px;
    padding: 16px 14px 12px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    border-bottom: 1px solid var(--border);
    gap: 0;
  }

  .header-bar {
    width: 100%;
  }

  .header-left {
    flex: 0 0 auto;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 6px max(4px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-right));
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }

  .nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 6px 2px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
  }

  .nav a.active {
    color: var(--accent);
    background: #eff6ff;
  }

  .nav a::before {
    content: attr(data-icon);
    font-size: 18px;
    line-height: 1;
  }

  .nav-sep {
    display: none;
  }

  h1 {
    font-size: 1.35rem;
  }

  .header-right {
    width: 100%;
    justify-content: stretch;
  }

  .period {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px;
  }

  .period select {
    flex: 1;
    font-size: 16px;
    padding: 6px 4px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn,
  .header-actions a.btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 15px;
  }

  .dash-hero {
    padding: 18px 16px;
    gap: 16px;
  }

  .dash-net {
    font-size: 2rem;
  }

  .dash-hero-side {
    width: 100%;
  }

  .dash-mini {
    flex: 1;
    min-width: 0;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 14px 12px;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-sub {
    font-size: 12px;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-item {
    padding: 14px 12px;
  }

  .summary-item .value {
    font-size: 1.15rem;
  }

  .card h2 {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .card-desc {
    padding: 0 14px 12px;
  }

  .table-scroll-hint {
    display: block;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 14px;
  }

  input.cell-input {
    max-width: 100%;
    min-width: 88px;
    font-size: 16px;
    padding: 10px;
  }

  .maas-input {
    max-width: 100%;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 14px;
  }

  .field,
  .field-sm,
  .field-btn {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .field-btn .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 16px;
  }

  .field input,
  .field select {
    font-size: 16px;
    min-height: 44px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .firma-detay-header {
    flex-direction: column;
    gap: 12px;
  }

  .firma-detay-header h2 {
    font-size: 1.25rem;
  }

  .firma-detay-actions {
    width: 100%;
  }

  .firma-detay-actions .btn {
    flex: 1;
    min-width: calc(50% - 4px);
    min-height: 44px;
    justify-content: center;
  }

  .firma-filters,
  .not-filters {
    padding: 0 14px 14px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 110px;
  }

  .actions .btn,
  .actions .btn-sm {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .btn {
    min-height: 40px;
  }

  .btn-maas {
    min-height: 40px;
    width: 100%;
  }

  .maas-action {
    width: auto;
    min-width: 100px;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    max-width: none;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: min(92vh, 720px);
    overflow-y: auto;
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }

  .modal-box-wide {
    max-width: none;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .modal-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .not-form-actions {
    flex-direction: column-reverse;
  }

  .not-form-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .not-list {
    padding: 12px 14px;
    max-height: none;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  .gelir-actions {
    padding: 12px 14px;
  }

  .gelir-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .odeme-ozet {
    padding: 10px 14px;
  }

  .ozet-chip {
    font-size: 11px;
  }

  .card-foot {
    padding: 12px 14px;
  }
}

@media (max-width: 400px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .dash-hero-side {
    flex-direction: column;
  }

  .firma-detay-actions .btn {
    min-width: 100%;
  }
}

@media (min-width: 769px) {
  .nav a::before {
    display: none;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav actions";
    align-items: center;
    gap: 16px 20px;
  }

  .header-bar {
    display: contents;
  }

  .header-left {
    grid-area: logo;
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .nav {
    grid-area: nav;
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
  }

  .header-right {
    grid-area: actions;
  }
}
