/*
======================================================================
TEMA TANIMLARI
======================================================================
*/

/* --- KOYU TEMALAR --- */
/* Varsayılan (Kırmızı) */
:root {
  --brand: #ff4a57;
  --brand-600: #e63f4b;
  --brand-700: #cc3541;
  --brand-800: #b32b36;
  --bg: #0e0f13;
  --card: #13151b;
  --soft: #1a1d26;
  --ring: #2b3140;
  --text: #e9edf7;
  --muted: #a7adbf;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius-base: 12px;
  --radius-card: 18px;
  --radius-input: 12px;
}
/* Abyss Blue */
.theme-abyss-blue {
  --brand: #4a8dff;
  --brand-600: #437fec;
  --brand-700: #3d71d9;
  --brand-800: #3563c6;
  --bg: #0d121c;
  --card: #1a2333;
  --soft: #26344d;
  --ring: #354664;
}
/* Emerald Green */
.theme-emerald-green {
  --brand: #10b981;
  --brand-600: #0e9f6e;
  --brand-700: #0c855a;
  --brand-800: #0a6c46;
  --bg: #141614;
  --card: #1a201a;
  --soft: #252c25;
  --ring: #384038;
  --success: #10b981;
  --radius-base: 6px;
  --radius-card: 12px;
  --radius-input: 6px;
}
/* Royal Purple */
.theme-royal-purple {
  --brand: #8b5cf6;
  --brand-600: #7c4dff;
  --brand-700: #6d3dff;
  --brand-800: #5e2dff;
  --bg: #181121;
  --card: #241a2e;
  --soft: #33293e;
  --ring: #443853;
}
/* Sunset Gold */
.theme-sunset-gold {
  --brand: #f59e0b;
  --brand-600: #d97706;
  --brand-700: #b45309;
  --brand-800: #92400e;
  --bg: #18140d;
  --card: #241d16;
  --soft: #332920;
  --ring: #4d3e2c;
  --radius-base: 6px;
  --radius-card: 12px;
  --radius-input: 6px;
}
/* BM Makina (Koyu) */
.theme-bm-makina {
  --brand: #f97316;
  --brand-600: #ea580c;
  --brand-700: #c2410c;
  --brand-800: #9a3412;
  --bg: #18191a;
  --card: #242526;
  --soft: #3a3b3c;
  --ring: #4e4f50;
  --text: #e4e6eb;
  --muted: #b0b3b8;
  --radius-base: 12px;
  --radius-card: 8px;
  --radius-input: 6px;
}

/* --- AYDINLIK TEMALAR --- */
/* Genel Aydınlık Mod (Temel) */
.light-mode {
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-800: #1e3a8a;
  --bg: #f7f9fc;
  --card: #ffffff;
  --soft: #eef2f8;
  --ring: #d9e2ec;
  --text: #212529;
  --muted: #6c757d;
  --radius-base: 12px;
  --radius-card: 18px;
  --radius-input: 12px;
}
/* BM Makina (Aydınlık) - Genel Aydınlık Mod'un marka rengini ve kenarlıklarını ezer */
.theme-bm-makina-light {
  --brand: #f97316;
  --brand-600: #ea580c;
  --brand-700: #c2410c;
  --brand-800: #9a3412;
  --radius-base: 12px;
  --radius-card: 8px;
  --radius-input: 6px;
}

/* --- AYDINLIK MOD GENEL DÜZELTMELERİ --- */
.light-mode .input,
.light-mode .select,
.light-mode textarea {
  background: var(--soft) !important;
  border-color: var(--ring) !important;
  color: var(--text) !important;
}
.light-mode .card {
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.light-mode .kbd {
  background: var(--soft);
}
.light-mode .badge,
.light-mode .pill {
  font-weight: 500;
}
.light-mode .badge.success,
.light-mode .pill.try {
  background-color: #dcfce7 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}
.light-mode .badge.wait,
.light-mode .pill.eur {
  background-color: #ffedd5 !important;
  color: #9a3412 !important;
  border-color: #fdba74 !important;
}
.light-mode .pill.usd {
  background-color: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}
.light-mode .badge.reject {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}

/*
======================================================================
GENEL STİL TANIMLARI
======================================================================
*/
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
}
a {
  color: var(--brand);
  text-decoration: none;
}
h3 {
  font-size: 16px;
}
.container {
  max-width: 1180px;
  margin: auto;
  padding: 24px;
}
.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-base);
  background: var(--soft);
  border: 1px solid var(--ring);
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s, border-color 0.2s;
}
.nav a.active {
  background: var(--brand);
  border-color: transparent;
  color: white;
}
.nav a:not(.active):hover {
  background: var(--brand-700);
  color: white;
}
.nav a.active:hover {
  background: var(--brand);
  cursor: default;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}
.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--brand);
}
.grid {
  display: grid;
  gap: 14px;
}
.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: background-color 0.3s, border-color 0.3s;
}
.card h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--muted);
}
.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat b {
  font-size: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-base);
  border: 1px solid var(--ring);
  background: var(--soft);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover {
  opacity: 0.9;
  background: var(--ring);
}
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover {
  background: var(--brand-700);
  opacity: 1;
}
.btn.ghost {
  background: transparent;
}
.btn.ghost:hover {
  background: var(--soft);
}
.btn.danger {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}
.btn.danger:hover {
  background: rgba(239, 68, 68, 0.9);
  opacity: 1;
}
.btn.success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.btn.success:hover {
  background: var(--success);
  opacity: 0.9;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12px;
  color: var(--muted);
}
.input,
.select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-input);
  border: 1px solid var(--ring);
  background: var(--soft);
  color: var(--text);
  font-size: 15px;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.2s,
    border-radius 0.3s;
}
.input:focus,
.select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25) !important;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-size: 15px;
}
.table tr {
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: var(--radius-card);
  transition: background-color 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.light-mode .table tr {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.table tr:hover {
  background: var(--soft);
  cursor: pointer;
}
.table td {
  padding: 12px;
}
.table thead {
  background-color: transparent;
}
.table th {
  background-color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  padding-top: 12px;
  padding-bottom: 12px;
  color: var(--text);
  text-align: left;
}
.light-mode .table thead th {
  color: var(--text);
}
.table thead th:first-child {
  border-top-left-radius: var(--radius-base);
}
.table thead th:last-child {
  border-top-right-radius: var(--radius-base);
}
.badge,
.pill {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--ring);
  background: var(--soft);
  font-weight: 500;
}
.badge.success {
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
  font-weight: 600;
}
.badge.wait {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--warning);
  background: #f59e0b4d;
  font-weight: 600;
}
.badge.reject {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ffd1d1;
  background: rgba(239, 68, 68, 0.08);
}
.badge.plan {
  border-color: rgba(99, 102, 241, 0.4);
  color: #d7d9ff;
  background: rgba(99, 102, 241, 0.08);
}
.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 800px) {
  .row {
    grid-template-columns: 1fr;
  }
}
.hr {
  height: 1px;
  background: var(--ring);
  margin: 14px 0;
}
.footer {
  opacity: 0.7;
  margin-top: 28px;
  font-size: 12px;
}
.accent {
  color: var(--brand);
}
.kbd {
  border: 1px solid var(--ring);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 12px;
}
.right {
  margin-left: auto;
}
.flex {
  display: flex;
  gap: 10px;
  align-items: center;
}
.space {
  height: 14px;
}

/*
======================================================================
YENİ EKLENEN ÖZELLİKLER İÇİN STİLLER
======================================================================
*/

/* MODAL (POP-UP) PENCERE STİLLERİ */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal {
  max-width: 720px;
  width: 100%;
  border: 1px solid var(--soft);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ring);
}
.modal header h2 {
  margin: 0;
}
.modal .input,
.modal .select,
.modal .textarea {
  background-color: var(--bg);
  border-color: var(--ring);
}
.light-mode .modal .input,
.light-mode .modal .select,
.light-mode .modal .textarea {
  background-color: #ffffff !important;
  border-color: var(--ring) !important;
}
.modal .btn.ghost {
  background-color: var(--soft);
}
.modal .btn.ghost:hover {
  background-color: var(--ring);
}
.modal header .btn.ghost {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  padding: 4px 12px;
}

/* FLASH MESAJ STİLLERİ */
.flash-message {
  padding: 12px;
  border-radius: var(--radius-input);
  margin-bottom: 15px;
  text-align: center;
  border: 1px solid var(--ring);
}
.flash-success {
  background: rgba(34, 197, 94, 0.1);
  color: #b8f7cc;
  border-color: rgba(34, 197, 94, 0.4);
}
.flash-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ffd1d1;
  border-color: rgba(239, 68, 68, 0.4);
}
.light-mode .flash-success {
  color: #15803d;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
}
.light-mode .flash-danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}

/* SWEETALERT2 BUTON ÖZELLEŞTİRME */
.swal2-actions {
  gap: 10px !important;
}
.swal2-confirm,
.swal2-cancel {
  padding: 10px 14px !important;
  border-radius: var(--radius-base) !important;
  border: 1px solid var(--ring) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: opacity 0.2s !important;
}
.swal2-confirm {
  background-color: var(--danger) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.swal2-confirm:hover {
  opacity: 0.9 !important;
}
.swal2-cancel {
  background-color: var(--soft) !important;
  color: var(--text) !important;
}
.swal2-cancel:hover {
  background-color: var(--ring) !important;
}
.light-mode .swal2-cancel {
  background-color: var(--soft) !important;
  color: var(--text) !important;
  border-color: var(--ring) !important;
}
.light-mode .swal2-cancel:hover {
  background-color: var(--ring) !important;
}

/* SAYFALAMA (PAGINATION) STİLLERİ */
.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* YAZDIRMA (PRINT) STİLLERİ */
@media print {
  .no-print,
  nav,
  .footer,
  .btn,
  .toolbar form,
  .toolbar div a,
  .toolbar div button {
    display: none !important;
  }
  body,
  .card {
    background-color: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  table {
    width: 100%;
    border-collapse: collapse;
  }
  th,
  td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }
  thead {
    background-color: #f2f2f2;
  }
  .print-only {
    display: inline !important;
  }
}

/* SON GÖRSEL RÖTUŞLAR */
.toolbar {
  align-items: flex-end;
}
.toolbar .field {
  margin-bottom: 0;
}
.toolbar > .btn,
.toolbar > a.btn {
  height: 40.5px;
  box-sizing: border-box;
}
.stat-blue {
  border-left: 4px solid #4a8dff;
}
.stat-green {
  border-left: 4px solid var(--success);
}
.stat-purple {
  border-left: 4px solid #8b5cf6;
}
.stat-orange {
  border-left: 4px solid var(--warning);
}
.stat-red {
  border-left: 4px solid var(--danger);
}
.btn.link-view {
  background-color: #add8e626 !important;
  border-color: #e0e8f2 !important;
  color: #486899 !important;
}
.btn.edit:hover {
  background-color: rgba(245, 158, 11, 0.1) !important;
}
.pill.try {
  background-color: rgba(34, 197, 94, 0.1);
  color: #b8f7cc;
  border-color: rgba(34, 197, 94, 0.4);
}
.pill.usd {
  background-color: rgba(74, 141, 255, 0.1);
  color: #9ac0ff;
  border-color: rgba(74, 141, 255, 0.4);
}
.pill.eur {
  background-color: rgba(245, 158, 11, 0.1);
  color: #fae3b5;
  border-color: rgba(245, 158, 11, 0.4);
}
.light-mode .pill.try {
  color: #15803d;
}
.light-mode .pill.usd {
  color: #1e40af;
}
.light-mode .pill.eur {
  color: #b45309;
}
.theme-bm-makina-light .btn {
  border-color: var(--brand);
}
.theme-bm-makina-light .btn.ghost:hover {
  background-color: rgba(249, 115, 22, 0.05);
  border-color: var(--brand);
}
.theme-bm-makina .iban-entry,
.theme-bm-makina-light .iban-entry {
  border: 1px solid var(--brand) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}
.theme-bm-makina,
.theme-bm-makina-light {
  accent-color: var(--brand);
}
/* ======================================================================
   POP-UP PENCERESİ NİHAİ GÖRSEL AYARLARI
   ====================================================================== */

/* 1. Pop-up Penceresini Büyütme ve Ovalleştirme */
.modal {
  max-width: 850px; /* Genişliği artırarak %125'e yakın bir büyüme sağlıyoruz */
  border-radius: 24px; /* Kenarları daha oval yapıyoruz */
}

/* 2. Pop-up İçindeki Text-box'ların Yazı Rengini Turuncu Yapma */
/* Sadece BM Makina temaları aktifken geçerli olacak */
.theme-bm-makina .modal .input,
.theme-bm-makina-light .modal .input {
  color: var(--brand); /* Ana marka rengi olan turuncuyu kullan */
}

/* 3. Pop-up İçindeki Text-area'yı Beyaz Arka Plan ve Siyah Yazı Yapma */
.modal .textarea {
  background-color: #ffffff !important; /* Arka planı beyaz yap */
  color: #000000 !important; /* Yazı rengini siyah yap */
}

/* ======================================================================
   POP-UP PENCERESİ - İÇ BOŞLUK (PADDING) DÜZELTMESİ
   ====================================================================== */

.modal {
  /* Pencerenin içindeki tüm elemanlara (başlık, form vb.) 
       kenarlardan 24 piksellik bir iç boşluk vererek
       sıkışıklığı gideriyoruz. */
  padding: 24px !important;
}

/* ======================================================================
   AYDINLIK MOD - POP-UP PENCERESİ GÖRSEL REVİZYONU
   ====================================================================== */

/* Aydınlık modda, modal arka planı karartmak yerine açık bir tonda olsun */
.light-mode .modal-back {
  background: rgba(52, 73, 94, 0.6); /* Yarı şeffaf, soğuk bir gri */
}

/* Aydınlık modda, modal'ın kendisi saf beyaz olsun ve gölgesi daha yumuşak olsun */
.light-mode .modal {
  background-color: #ffffff !important;
  border: 1px solid var(--ring) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Modal başlığının yazı rengini koyu yap */
.light-mode .modal header h2 {
  color: var(--text);
}

/* Modal içindeki form elemanlarının arka planını, ana sayfadan biraz farklı,
   hafif gri bir tonda yapalım ki ayırt edilsin */
.light-mode .modal .input,
.light-mode .modal .select,
.light-mode .modal .textarea {
  background-color: #f7f9fc !important; /* Sayfanın ana arka plan rengi */
  border-color: #ced4da !important; /* Biraz daha belirgin bir çerçeve */
  color: #212529 !important; /* Yazı rengi siyah */
}

/* İptal butonunun aydınlık moddaki görünümünü düzeltelim */
.light-mode .modal .btn.ghost {
  background-color: var(--soft) !important;
  color: var(--muted) !important;
  border-color: var(--ring) !important;
}
.light-mode .modal .btn.ghost:hover {
  background-color: var(--ring) !important;
}
/* ======================================================================
   LOGO STİLLERİ
   ====================================================================== */
.brand-logo {
  display: flex;
  align-items: center;
}

.brand-logo img {
  height: 64px; /* Logonun yüksekliğini buradan ayarlayabilirsiniz */
  width: auto;
}

/* Varsayılan durum (koyu temalar): beyaz logoyu göster, renkli logoyu gizle */
.brand-logo .logo-light {
  display: none;
}
.brand-logo .logo-dark {
  display: block;
}

/* Aydınlık mod durumu: renkli logoyu göster, beyaz logoyu gizle */
.light-mode .brand-logo .logo-light {
  display: block;
}
.light-mode .brand-logo .logo-dark {
  display: none;
}
