:root {
  /* Colors - Light Theme */
  --bg-primary: #f4f6f8;
  --bg-secondary: #ffffff;
  --bg-glass: #ffffff;
  --border-glass: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  
  --primary: #007684;
  --primary-hover: #005f6b;
  --secondary: #475569;
  
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;

  /* Geometry */
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  /* Shadows */
  --shadow-glass: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* Inter Google Fonts'tan gelir; internet yoksa yuklenmez.
     Yedek zincir olmadan tarayici varsayilanina dusuyordu. */
  font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Panel Style - Solid Light */
.glass-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

/* --- LOGIN PAGE --- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e5e7eb;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 40px;
  text-align: center;
}

.login-header {
  margin-bottom: 30px;
}

.logo-circle {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  color: white;
}

/* ABYS harf monogramı — emoji yerine. Emoji her işletim sisteminde farklı
   çiziliyor ve markalaşmıyor; harf monogramı her yerde aynı görünür.
   Dört harf dairenin içine sığsın diye punto ve harf aralığı daireye göre
   ayarlanıyor (aşağıda yan menü için ayrıca küçültülüyor). */
.logo-circle.monogram {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .5px;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, #00323a 100%);
  box-shadow: 0 2px 8px rgba(0, 118, 132, 0.35);
  user-select: none;
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:hover, .form-group select:hover, .form-group textarea:hover,
.input-modern:hover {
  border-color: #cbd5e1;
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 118, 132, 0.12);
}

.form-group input:disabled {
  background: #f1f5f9;
  color: var(--text-secondary);
  cursor: not-allowed;
}

.form-group select option {
  background: white;
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px; /* Pill shape for buttons */
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px -4px rgba(0, 118, 132, 0.5);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(0, 118, 132, 0.55);
}

.btn:active { transform: translateY(0); }

.btn-block {
  width: 100%;
}

/* Buton boyutları — kod genelinde kullanılıyordu ama tanımsızdı (butonlar hep tam boy çıkıyordu) */
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  gap: 6px;
}
.btn-sm i,
.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.error-text {
  color: var(--danger);
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
}

/* --- APP LAYOUT --- */
.app-body {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: #1e293b;
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo-circle {
  width: 36px;
  height: 36px;
  font-size: 18px;
  margin: 0;
}

/* Yan menüdeki daire 36px; dört harf ancak bu puntoyla sığıyor */
.sidebar-header .logo-circle.monogram {
  font-size: 9.5px;
  letter-spacing: .2px;
}

.brand-info h2 {
  font-size: 15px;
  margin-bottom: 2px;
}

.badge {
  background: var(--primary);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 15px 10px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  font-size: 14px;
  transition: all 0.2s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  /* min-width:0 ŞART ve yalnızca mobilde değil, HER genişlikte.
     .main-content bir flex öğesi; varsayılan "min-width:auto" onu içeriğinin
     doğal en dar hâlinden daha ince yapmaz. Hesaplar & İşlemler ekranı bu
     yüzden 1442px'de diretiyor, 250px'lik menüyle birlikte sayfayı 1692px'e
     çıkarıyordu: 1366/1400 gibi yaygın dizüstü genişliklerinde sayfa yatay
     kayıyor ve SAĞDAKİ SÜTUNLAR (bakiye, makbuz düğmesi) ekran dışında
     kalıyordu. Kullanıcı makbuz düğmesini bu yüzden bulamadı.
     Aynı düzeltme mobil için yapılmıştı ama masaüstünde açıkta kalmıştı. */
  min-width: 0;
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-icon {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 4px;
}

.btn-icon:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.input-glass {
  background: white;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.content-area {
  padding: 25px;
  flex: 1;
}

/* Common Layouts */
.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-actions h2 {
    font-size: 18px;
    color: var(--text-primary);
}

/* Dashboard Cards */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon.primary { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(5, 150, 105, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(217, 119, 6, 0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(220, 38, 38, 0.1); color: var(--danger); }

.stat-details h3 {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stat-details .amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Table Styles */
.table-container {
  width: 100%;
  overflow-x: auto;
  /* Uzun listelerde sayfa şişmesin: tablo kendi içinde kaysın */
  max-height: calc(100vh - 320px);
  min-height: 180px;
  overflow-y: auto;
  background: white;
}

/* Kaydırırken sütun başlıkları görünür kalsın */
.table-container thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 var(--border-glass);
}

/* Modal içindeki tablolar daha kısa alan kaplasın */
.modal .table-container {
  max-height: 45vh;
  min-height: 0;
}

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

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

th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

td {
    font-size: 14px;
}

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

tbody tr:hover {
  background: #f8fafc;
}

.badge-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success { background: #d1fae5; color: var(--success); }
.badge-danger { background: #fee2e2; color: var(--danger); }

/* Forms & Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  /* Uzun modaller ekrana sığsın: gerekirse overlay kayar */
  padding: 16px;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 100%;
  max-width: 500px;
  padding: 25px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15,23,42,0.04);
  /* İçerik ekrandan uzunsa modal kendi içinde kaysın; margin:auto flex kırpmasını önler */
  max-height: calc(100vh - 32px);
  overflow: hidden auto;
  margin: auto;
}

/* Başlık: modal genelinde tutarlı teal banner (kenarlara taşar) */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -25px -25px 20px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
}
.close-btn i, .close-btn svg { width: 18px; height: 18px; }

/* ACCOUNTING UI STYLES (V5) */
.accounting-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    position: relative;
    padding-bottom: 80px; /* Entry bar space */
}

.accounting-header {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 10px;
}

.accounting-header .summary-item .label {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.accounting-header .summary-item .value {
    font-size: 16px;
    font-weight: 600;
}

.accounting-header .balance-item .label {
    font-size: 12px;
    color: #475569;
    text-align: right;
    display: block;
}

.accounting-header .balance-item .value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

.accounting-list-container {
    flex: 1;
    overflow-y: auto;
    background: white;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
}

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

.accounting-row {
    border-bottom: 1px solid #f1f5f9;
}

.accounting-row:hover {
    background: #f8fafc;
}

.accounting-row td {
    padding: 10px 15px;
    font-size: 13px;
    vertical-align: middle;
}

.col-account { width: 40%; }
.col-type { width: 10%; color: #94a3b8; font-size: 11px; text-align: center; }
.col-date { width: 15%; color: #64748b; text-align: center; }
.col-amount { width: 15%; text-align: right; font-weight: 600; font-size: 14px; }
.col-balance { width: 20%; text-align: right; color: #1e293b; font-size: 14px; }

.acc-name { font-weight: 700; color: #0369a1; text-transform: uppercase; font-size: 12px; }
.acc-sub { font-size: 11px; color: #64748b; margin-top: 2px; }

.month-header {
    background: #f8fafc;
    font-weight: 800;
    padding: 8px 15px !important;
    font-size: 11px;
    color: #94a3b8;
    border-bottom: 1px solid #e2e8f0;
}

/* ENTRY BAR V2 (TWO ROWS) */
.accounting-entry-bar-v2 {
    position: fixed;
    bottom: 0;
    left: 280px; /* Sidebar width */
    right: 0;
    background: #f1f5f9;
    border-top: 2px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.entry-row-top, .entry-row-bottom {
    display: flex;
    align-items: stretch;
    height: 50px;
}

.entry-row-top {
    border-bottom: 1px solid #cbd5e1;
}

.entry-row-top .desc-field { flex: 1; }
.entry-row-top .amount-field { width: 150px; }
.entry-row-top .field input {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0 20px;
    background: white;
}

.entry-row-bottom {
    background: #f8fafc;
}

.entry-actions-v2 {
    display: flex;
    background: #fff;
    border-right: 1px solid #cbd5e1;
}

.entry-btn-v2 {
    width: 50px;
    border: none;
    background: white;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #f1f5f9;
}

.entry-btn-v2.active { background: #10b981; color: white; }

.entry-row-bottom .field {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.entry-row-bottom select, .entry-row-bottom input {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 10px;
}

.date-field { width: 180px; }
.category-field { width: 220px; }
.account-field { flex: 1; }

.btn-satis-v2, .btn-alis-v2 {
    width: 150px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-satis-v2 { background: #64748b; }
.btn-alis-v2 { background: #64748b; border-top: 1px solid #475569; }

.btn-satis-v2 span, .btn-alis-v2 span { font-size: 24px; }

@media (max-width: 1024px) {
    .accounting-entry-bar-v2 { left: 0; }
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modern Input Styles for Unified Modal */
.input-modern {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    background: #fff;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s;
}

.input-modern:focus {
    outline: none;
    border-color: #007684;
    box-shadow: 0 0 0 3px rgba(0, 118, 132, 0.1);
}

.input-modern::placeholder {
    color: #94a3b8;
}

#modalYeniHesap .modal {
    background: #f8fafc;
    border: 1px solid #fff;
}

#modalYeniHesap .modal-header {
    border-bottom: 1px solid #e2e8f0;
}

#modalYeniHesap .btn-primary {
    background: #007684 !important;
    font-weight: 700;
    font-size: 16px;
}

/* Ensure text-danger is visible */
.text-danger {
    color: #ef4444 !important; /* Brighter red for finance */
}

/* ==================== GECE MODU (defter.net paleti) ==================== */
:root[data-theme="dark"] {
  --bg-primary: #0e1a24;
  --bg-secondary: #15242f;
  --bg-glass: #15242f;
  --border-glass: #23394a;
  --text-primary: #e6edf3;
  --text-secondary: #8697a8;
  --secondary: #8697a8;
  --shadow-glass: 0 1px 3px rgba(0,0,0,0.5);
  --primary: #0d9aad;
  --primary-hover: #0b8497;
  color-scheme: dark;
}

/* Sol menü biraz daha koyu (defter.net'teki gibi) */
:root[data-theme="dark"] .sidebar { background: #0b1620; }

/* Beyaz zeminli sınıflar (glass-panel değişkenini ezenler dahil) → koyu */
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .table-container,
:root[data-theme="dark"] .accounting-list-container,
:root[data-theme="dark"] .chart-container,
:root[data-theme="dark"] .month-nav,
:root[data-theme="dark"] .yonetim-bolum {
  background: var(--bg-secondary) !important;
  color: var(--text-primary);
}

/* Tablolar */
:root[data-theme="dark"] .table-container thead th,
:root[data-theme="dark"] th { background: #1b2c3a !important; color: var(--text-secondary); }
:root[data-theme="dark"] th, :root[data-theme="dark"] td { border-color: var(--border-glass); }
:root[data-theme="dark"] tbody tr { background: transparent; }
:root[data-theme="dark"] tbody tr:hover,
:root[data-theme="dark"] tbody tr:hover td { background: rgba(255,255,255,0.04); }

/* Formlar */
:root[data-theme="dark"] .form-group input,
:root[data-theme="dark"] .form-group select,
:root[data-theme="dark"] .form-group textarea,
:root[data-theme="dark"] .input-modern,
:root[data-theme="dark"] .input-glass {
  background: #0c1720 !important; color: var(--text-primary); border-color: var(--border-glass);
}
:root[data-theme="dark"] select option { background: #15242f; color: var(--text-primary); }
:root[data-theme="dark"] ::placeholder { color: #5f7284; }

/* Butonlar */
:root[data-theme="dark"] .btn-icon:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
:root[data-theme="dark"] .btn-outline { color: var(--text-primary); border-color: var(--border-glass); }
:root[data-theme="dark"] .btn-outline:hover { background: rgba(255,255,255,0.06); }

/* Hesaplar & İşlemler (.defter-*) — defter.net tarzı koyu */
:root[data-theme="dark"] .defter-sidebar { background: #101c26 !important; border-right-color: var(--border-glass); }
:root[data-theme="dark"] .defter-sidebar-header { border-bottom-color: var(--border-glass); }
:root[data-theme="dark"] .defter-main { background: #0e1a24 !important; }
:root[data-theme="dark"] .defter-account-item:hover { background: rgba(255,255,255,0.04); }
:root[data-theme="dark"] .defter-account-item.active { background: rgba(13,148,136,0.16); border-left-color: #14b8a6; }
:root[data-theme="dark"] .defter-account-item .name { color: var(--text-primary); }
:root[data-theme="dark"] .defter-account-item .sub { color: var(--text-secondary); }
:root[data-theme="dark"] .defter-tr-row { border-bottom-color: rgba(255,255,255,0.06); }
:root[data-theme="dark"] .defter-tr-info .title { color: var(--text-primary); }
:root[data-theme="dark"] .defter-tr-info .cat { color: #2dd4bf; }
:root[data-theme="dark"] .defter-tr-info .desc { color: var(--text-secondary); }
:root[data-theme="dark"] .defter-tr-balance { color: #9fb0c0; }
:root[data-theme="dark"] .defter-entry-bar { background: #101c26 !important; border-top-color: var(--border-glass); }
:root[data-theme="dark"] .defter-input { background: #0c1720 !important; color: var(--text-primary); border-color: var(--border-glass); }
:root[data-theme="dark"] .defter-btn-gider { background: rgba(255,255,255,0.05); color: var(--text-secondary); border-color: var(--border-glass); }

/* Tahsilat tablosu: açık zeminli durum hücreleri → koyu metin + zebra koyu */
:root[data-theme="dark"] .tahsilat-tablo tbody tr:nth-child(even) { background: rgba(255,255,255,0.02) !important; }
:root[data-theme="dark"] .tahsilat-tablo tbody tr:hover { background: rgba(255,255,255,0.05) !important; }
:root[data-theme="dark"] .tahsilat-tablo .th-dolu,
:root[data-theme="dark"] .tahsilat-tablo .th-devir,
:root[data-theme="dark"] .tahsilat-tablo .th-toplam,
:root[data-theme="dark"] .tahsilat-tablo .th-gereken { color: #1e293b !important; }
:root[data-theme="dark"] .tahsilat-tablo .th-bos { background: rgba(255,255,255,0.03) !important; }

/* JS şablonlarındaki sabit açık zemin / koyu metinleri yakala */
:root[data-theme="dark"] [style*="background:#fff"],
:root[data-theme="dark"] [style*="background: #fff"],
:root[data-theme="dark"] [style*="background:#ffffff"],
:root[data-theme="dark"] [style*="background:white"],
:root[data-theme="dark"] [style*="background: white"],
:root[data-theme="dark"] [style*="background:#f8fafc"],
:root[data-theme="dark"] [style*="background: #f8fafc"],
:root[data-theme="dark"] [style*="background:#f1f5f9"],
:root[data-theme="dark"] [style*="background:#f9fafb"] {
  background: var(--bg-secondary) !important;
}
:root[data-theme="dark"] [style*="color:#1e293b"],
:root[data-theme="dark"] [style*="color: #1e293b"],
:root[data-theme="dark"] [style*="color:#0f172a"],
:root[data-theme="dark"] [style*="color: #0f172a"],
:root[data-theme="dark"] [style*="color:#0b0b0b"],
:root[data-theme="dark"] [style*="color:#334155"] {
  color: var(--text-primary) !important;
}

/* Yumuşak tehlike butonu (İşlem Düzenle → Sil).
   Açık pembe zemin gece modunda göz alıyordu; koyu temada kırmızının
   kendisi zemin değil VURGU olur — okunur kalır, parlamaz. */
.btn-tehlike-yumusak { background: #fee2e2; color: #dc2626; border: none; }
.btn-tehlike-yumusak:hover { background: #fecaca; }
:root[data-theme="dark"] .btn-tehlike-yumusak {
  background: rgba(220,38,38,.18); color: #fca5a5;
}
:root[data-theme="dark"] .btn-tehlike-yumusak:hover { background: rgba(220,38,38,.28); }
