:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: rgba(15, 23, 42, 0.1);
  --text: #1e293b;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.12);
  --success: #059669;
  --campaign: #d97706;
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow), transparent),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(217, 119, 6, 0.06), transparent);
  color: var(--text);
  line-height: 1.5;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.panel-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.panel-left .card {
  margin-bottom: 0;
}

.panel-left .card-input {
  flex-shrink: 0;
}

.panel-left .card-banks {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.panel-right {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--surface-2);
  border-color: rgba(15, 23, 42, 0.15);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-ghost {
  background: transparent;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field {
  flex: 1;
  min-width: 0;
}

.field-amount input {
  font-size: 1.75rem;
  text-align: center;
  padding: 1rem;
}

.panel-left .checkbox-field {
  width: 100%;
  min-width: 0;
  margin-top: 0.75rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  min-width: 220px;
}

.checkbox-field input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--campaign);
  cursor: pointer;
}

.checkbox-field.campaign-active {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.08);
}

.checkbox-field span {
  font-size: 0.95rem;
  font-weight: 500;
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hint.campaign-on {
  color: var(--campaign);
}

.results-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

.results-list-header,
.result-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(220px, 1.4fr);
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.15rem;
}

.results-list-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.header-label,
.header-caption {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.result-row {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row:hover {
  background: var(--surface-2);
}

.row-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.row-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

.header-caption-left,
.row-monthly {
  text-align: left;
}

.header-caption-right,
.row-total {
  text-align: right;
}

.amount-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row-monthly {
  color: var(--accent);
}

.row-total {
  color: var(--success);
}

/* Tek çekim: sadece sol tutar, sağ sütun yok */
.result-row.is-single .row-amounts {
  grid-template-columns: 1fr;
}

.result-row.is-single .row-total {
  display: none;
}

.result-row.is-single .row-monthly {
  color: var(--success);
  font-size: 1.55rem;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.85rem;
  align-content: start;
  flex: 1;
  padding: 0.25rem 0;
}

.bank-grid img {
  width: 100%;
  height: 40px;
  object-fit: contain;
  padding: 0.35rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  opacity: 0.9;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.bank-grid img:hover {
  opacity: 1;
  box-shadow: var(--shadow);
}

.bank-grid-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem 0.5rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
  transform: scale(0.96);
  transition: transform 0.2s;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal.modal-wide {
  max-width: 720px;
}

.modal h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.admin-rates {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.admin-rate-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.admin-rate-row .name {
  color: var(--muted);
  font-weight: 500;
}

.admin-rate-row input {
  padding: 0.45rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.thresholds-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.error-msg {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.success-msg {
  color: var(--success);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .panel-left .card-banks {
    min-height: auto;
  }

  .bank-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  .results-list-header,
  .result-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .row-amounts {
    gap: 0.75rem;
  }

  .amount-value {
    font-size: 1.3rem;
  }

  .result-row.is-single .row-monthly {
    font-size: 1.4rem;
  }
}

@media (max-width: 600px) {
  .admin-rate-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
