:root {
  --primary-color: #0d6efd;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --card-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

/* Dark mode variables */
[data-theme="dark"] {
  --light-bg: #0e1421;
  --dark-text: #e9ecef;
  --card-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.4);
}

body {
  background-color: var(--light-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark-text);
}

/* Header Styles - Index ile aynı */
.main-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

[data-theme="dark"] .main-header {
  background: linear-gradient(135deg, #1a2b6b 0%, #3a1f60 100%);
}

.main-header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Portfolio Summary Cards - Index.html ile aynı */
.portfolio-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0 1rem;
}

.summary-card-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .summary-card-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.summary-card-item.combined-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  min-height: auto;
}

.summary-card-item.form-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  min-height: auto;
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .summary-header {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.summary-icon.total {
  background: linear-gradient(135deg, #4BC0C0 0%, #36A2EB 100%);
  color: white;
}

.summary-content {
  flex: 1;
  min-width: 0;
}

.summary-label {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.form-summary .summary-details {
  display: flex;
  flex-direction: row;
  gap: 0;
  justify-content: center;
}

.form-summary .summary-header {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.summary-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.summary-icon-small.usd {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.summary-label-small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  line-height: 1.2;
}

[data-theme="dark"] .summary-label-small {
  color: #e9ecef;
}

.summary-value-small {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  word-break: break-word;
}

[data-theme="dark"] .summary-value-small {
  color: #ffffff;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Responsive Design for Header */
@media (max-width: 768px) {
  .portfolio-summary-cards {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0 0.5rem;
    margin: 1rem 0;
  }
  
  .summary-card-item.combined-summary {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .summary-header {
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .summary-details {
    gap: 0.5rem;
  }
  
  .summary-row {
    gap: 0.75rem;
  }
  
  .summary-item {
    gap: 0.5rem;
  }
  
  .summary-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .summary-icon-small {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .summary-value {
    font-size: 1.25rem;
  }
  
  .summary-label-small {
    font-size: 0.65rem;
  }
  
  .summary-value-small {
    font-size: 0.8rem;
  }
}

/* Card Styles - Index ile aynı */
.portfolio-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="dark"] .portfolio-card {
  background: #121826;
  border: 1px solid rgba(255,255,255,0.08);
}

.portfolio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

.card-header-custom {
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #f8f9fa, #ffffff);
}

[data-theme="dark"] .card-header-custom {
  background: linear-gradient(to right, #0e1421, #121826);
  border-bottom-color: rgba(255,255,255,0.08);
}

.card-header-custom h3 {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-body {
  padding: 1.5rem;
}

/* Form Styles */
.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .form-label {
  color: #e9ecef;
}

.form-control, .form-select {
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: #121826;
  border-color: rgba(255,255,255,0.08);
  color: #e9ecef;
}
  
[data-theme="dark"] .form-control::placeholder {
  color: #a1aab6;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Collapsible header (index.css ile uyumlu) */
.collapsible-header { cursor: pointer; transition: all 0.2s ease; }
.collapsible-header:hover { background: linear-gradient(to right, #f8f9fa, #e9ecef); }
[data-theme="dark"] .collapsible-header:hover { background: linear-gradient(to right, #1a1f2e, #0e1421); }
.collapsible-header .toggle-icon { transition: transform 0.2s ease; color: #6c757d; font-size: 1.1rem; }
.collapsible-header[aria-expanded="true"] .toggle-icon { transform: rotate(180deg); }
.collapsible-header { border-left: 3px solid transparent; }
.collapsible-header:hover { border-left-color: #667eea; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

/* Header icon colors to match other sections */
.icon-gold { color: #f6c343; }
.icon-stock { color: #20c997; }
.icon-cash { color: #6aa1ff; }

/* Auto-calculation display */
.calculation-display {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border: 2px solid #667eea;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  display: none;
  animation: slideIn 0.3s ease;
}

[data-theme="dark"] .calculation-display {
  background: linear-gradient(135deg, #0e1421, #121826);
  border-color: #667eea;
}

.calculation-display.show {
  display: block;
}

.calculation-display h6 {
  color: #667eea;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

/* Nakit ekleme: TL / USD / EUR bölümlerini daha belirgin kartlara dönüştür */
.section-body .row.g-3 > .col-md-4 {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.04);
}

[data-theme="dark"] .section-body .row.g-3 > .col-md-4 {
  background: #0f1624; /* #121826'tan bir ton koyu, içerikten ayrışsın */
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.25);
}

/* Her para birimine ince vurgu (sol şerit) */
.section-body .row.g-3 > .col-md-4:nth-child(1) { border-left: 4px solid #20c997; }
.section-body .row.g-3 > .col-md-4:nth-child(2) { border-left: 4px solid #36a2eb; }
.section-body .row.g-3 > .col-md-4:nth-child(3) { border-left: 4px solid #a78bfa; }

/* Kart içi aralıklar */
.section-body .row.g-3 > .col-md-4 .form-label { margin-bottom: 0.25rem; }
.section-body .row.g-3 > .col-md-4 .form-control + .form-control { margin-top: 0.5rem; }

/* Mobilde bu kartlar arasında ekstra boşluk */
@media (max-width: 768px) {
  .section-body .row.g-3 > .col-md-4 { margin-bottom: 0.75rem; }
}

.calculation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  font-size: 0.8rem;
}

.calculation-row:last-child {
  border-bottom: none;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Dark mode: Otomatik Hesaplama içindeki metinleri beyaz yap */
[data-theme="dark"] .calculation-display .calculation-row span { color: #ffffff; }
/* Son satırda (Toplam Tutar) sadece sağdaki değeri vurgula */
[data-theme="dark"] .calculation-display .calculation-row:last-child span:last-child { color: #667eea; }

/* Dark mode: inline #1C2128 metinlerini beyaza çevir */
[data-theme="dark"] *[style*="#1C2128"],
[data-theme="dark"] *[style*="#1c2128"] {
  color: #ffffff !important;
}

/* Dark mode: Nakit ekleme kartlarındaki "Kur:" bilgisini beyaz yap */
[data-theme="dark"] .section-body .row.g-3 > .col-md-4 small.text-muted {
  color: #ffffff !important;
}

/* Form validation feedback */
.form-control.is-invalid, .form-select.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid, .form-select.is-valid {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback, .valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.invalid-feedback {
  color: #dc3545;
}

.valid-feedback {
  color: #198754;
}

/* Smart input suggestions */
.input-suggestion {
  position: absolute;
  top: 100%;
  right: 0.75rem;
  background: var(--bs-body-bg, #ffffff);
  color: var(--bs-body-color, #212529);
  border: 1px solid var(--bs-border-color, #dee2e6);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  z-index: 10;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

[data-theme="dark"] .input-suggestion {
  background: var(--bs-dark, #212529);
  color: var(--bs-light, #f8f9fa);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.input-suggestion.show {
  opacity: 1;
  transform: translateY(0);
}

/* Quick action buttons */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.quick-action-btn {
  background: var(--bs-body-bg, #ffffff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #495057);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

[data-theme="dark"] .quick-action-btn {
  background: var(--bs-dark, #212529);
  border-color: rgba(255,255,255,0.2);
  color: var(--bs-light, #e9ecef);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.quick-action-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Aktif/seçili buton stili */
.quick-action-btn.active,
.quick-action-btn:active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Dark mode'da ortadaki beyaz buton sorunu için */
[data-theme="dark"] .quick-action-btn {
  background: #2a2f3e !important;
  border-color: rgba(255,255,255,0.3) !important;
  color: #e9ecef !important;
}

/* Enhanced mobile experience */
@media (max-width: 768px) {
  .form-control, .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
  }
  
  .calculation-display {
    margin: 1rem -0.5rem 0;
    border-radius: 0.5rem;
  }
  
  .quick-actions {
    justify-content: center;
  }
  
  .btn-add-asset {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
  }
}

/* Loading states */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  margin-left: -0.5rem;
  margin-top: -0.5rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Button Styles - Index ile uyumlu */
.btn-add-asset {
  background: linear-gradient(135deg, var(--success-color), #157347);
  border: none;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(25, 135, 84, 0.3);
}

.btn-add-asset:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(25, 135, 84, 0.4);
  background: linear-gradient(135deg, #157347, var(--success-color));
  color: white;
}

.btn-action {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  transition: all 0.2s ease;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Icon Styles - Index ile aynı */
.icon-gold {
  color: #FFD700;
  font-size: 1.5rem;
}

.icon-stock {
  color: #20c997;
  font-size: 1.5rem;
}

.icon-cash {
  color: #6aa1ff;
  font-size: 1.5rem;
}

.icon-tl {
  color: #17a2b8;
  font-size: 1.5rem;
}

/* Altın lot inline edit - responsive */
.gold-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.gold-edit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1;  
}

.gold-edit-row .form-control-sm {
  min-width: 120px;
  flex: 1;
  max-width: 160px;
}



.gold-edit-row .delete-form {
  flex-shrink: 0;
}

/* Mobil optimizasyonu */
@media (max-width: 768px) {
  .gold-edit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .gold-edit-form {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .gold-edit-row .form-control-sm {
    width: 100%;
    max-width: none;
    min-width: auto;
  }
  
  .gold-edit-row .btn {
    width: 100%;
    min-width: auto;
  }
  
  .gold-edit-row .delete-form {
    align-self: stretch;
  }
  
  .gold-edit-row .delete-form .btn {
    width: 100%;
    min-width: auto;
  }
}

/* Çok küçük ekranlar için */
@media (max-width: 480px) {
  .gold-edit-row {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .gold-edit-form {
    gap: 0.375rem;
  }
}

/* Form check label dark mode fix */
[data-theme="dark"] .form-check-label {
  color: #e9ecef;
}

/* Dark mode text fixes */
[data-theme="dark"] .text-muted {
  color: #adb5bd !important;
}

/* Sat (FIFO) buton stili - genel buton rengi ile uyumlu */
.btn-warning {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Buton genişlik düzeltmeleri - responsive */
.gold-edit-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 100px;
  width: 100px;
  font-size: 0.75rem;
  padding: 0.375rem 0.25rem;
  text-align: center;
}

/* Tablet boyutları (768px - 1200px) */
@media (min-width: 768px) and (max-width: 1200px) {
  .gold-edit-row .btn {
    min-width: 90px;
    width: 90px;
    font-size: 0.7rem;
    padding: 0.375rem 0.2rem;
  }
}

/* Büyük desktop */
@media (min-width: 1201px) {
  .gold-edit-row .btn {
    min-width: 120px;
    width: 120px;
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
  }
}

/* Mobil */
@media (max-width: 767px) {
  .gold-edit-row .btn {
    min-width: auto;
    width: 100%;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Badge Styles - Index ile aynı */
.badge-count {
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}

/* Accordion özel stilleri - Yenilendi */
.accordion {
  border: none;
}

.accordion-item {
  background: transparent;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
}

[data-theme="dark"] .accordion-item {
  background: #121826;
  border: 1px solid rgba(255,255,255,0.08);
}

.accordion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

.accordion-header {
  background: transparent;
}

.accordion-button {
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  color: #212529;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  min-height: 72px; /* başlık yüksekliğini standardize et */
  box-shadow: none !important;
  border: none;
  border-bottom: none;
}

/* Üst üç form başlığında ikon ve metin hizasını/ölçüsünü eşitle */
#goldFormAccordion .accordion-button .bi,
#stockFormAccordion .accordion-button .bi,
#cashManageAccordion .accordion-button .bi {
  font-size: 1.5rem;
  margin-right: 0.5rem;
  line-height: 1;
}

[data-theme="dark"] .accordion-button {
  background: linear-gradient(to right, #0e1421, #121826);
  color: #e9ecef;
  border-bottom-color: rgba(255,255,255,0.08);
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(to right, #f8f9fa, #e9ecef);
  color: #212529;
  border-bottom: none;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
  background: linear-gradient(to right, #1a1f2e, #0e1421);
  color: #e9ecef;
}

.accordion-button:hover {
  background: linear-gradient(to right, #e9ecef, #f8f9fa);
}

[data-theme="dark"] .accordion-button:hover {
  background: linear-gradient(to right, #1a1f2e, #0e1421);
}

.accordion-button:not(.collapsed):hover {
  background: linear-gradient(to right, #e9ecef, #dee2e6);
}

[data-theme="dark"] .accordion-button:not(.collapsed):hover {
  background: linear-gradient(to right, #2a2f3e, #1a1f2e);
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23667eea'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}

.asset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.asset-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.asset-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  margin-right: 1rem;
}

.accordion-button:not(.collapsed) .asset-stats {
  color: rgba(255,255,255,0.9);
}

.accordion-button:not(.collapsed) .badge-count {
  background: rgba(255,255,255,0.3);
}

.accordion-body {
  padding: 1.25rem;
  background: #fefefe;
}

[data-theme="dark"] .accordion-body {
  background: #121826;
}

/* TL Mevcut Nakit: kayıtların iç içe görünmesini azalt */
#tlAssetsAccordion .accordion-item {
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(102, 126, 234, 0.25);
}

#tlAssetsAccordion .accordion-header .accordion-button {
  padding: 0.75rem 1rem;
}

#tlAssetsAccordion .accordion-body {
  padding: 1rem 1.25rem 1.25rem;
}

/* Kayıtlar arasında görsel nefes boşluğu */
#tlAssetsAccordion .accordion-item + .accordion-item {
  margin-top: 0.5rem;
}

/* Kayıtları ayırmak için ince çizgi */
#tlAssetsAccordion .accordion-body .entry-actions {
  border-top: 1px dashed rgba(102, 126, 234, 0.35);
  padding-top: 1rem;
  margin-top: 0.75rem;
}

/* Her TL kaydının altına ayırıcı çizgi */
#tlAssetsAccordion .accordion-collapse .accordion-body {
  position: relative;
}
#tlAssetsAccordion .accordion-collapse .accordion-body::after {
  content: "";
  display: block;
  height: 1px;
  background: rgba(0,0,0,0.18);
  margin-top: 1rem;
}
[data-theme="dark"] #tlAssetsAccordion .accordion-collapse .accordion-body::after {
  background: rgba(255,255,255,0.6);
}

/* Mobilde ekstra boşluk ve yığılmayı azalt */
@media (max-width: 768px) {
  #tlAssetsAccordion .asset-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  #tlAssetsAccordion .asset-stats { width: 100%; display: flex; flex-wrap: wrap; gap: 0.5rem; }
  #tlAssetsAccordion .accordion-header .accordion-button { padding: 0.75rem; }
}

/* Mevcut Nakit Varlıkları → para birimi içindeki kayıtları ayır (TL dahil) */
#cashAccordion .cash-entry { padding: 0.75rem 0; }
#cashAccordion .cash-entry + .cash-entry { border-top: 1px solid rgba(0,0,0,0.2); margin-top: 0.75rem; }
[data-theme="dark"] #cashAccordion .cash-entry + .cash-entry { border-top: 1px solid rgba(255,255,255,0.6); }

/* Kayıt içi düzenleme alanının üstüne de ince çizgi koy */
#cashAccordion .cash-entry .entry-actions { border-top: 1px solid rgba(102,126,234,0.45); padding-top: 0.75rem; margin-top: 0.5rem; }
[data-theme="dark"] #cashAccordion .cash-entry .entry-actions { border-top-color: rgba(255,255,255,0.6); }

/* Delete button positioning so it doesn't look isolated */
/* Alt buton çubuğu hizalama */
.entry-actions-bottom .btn { min-width: 110px; }

.stock-entry, .gold-entry {
  background-color: var(--light-bg);
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  border: 1px solid #e9ecef;
}

.stock-entry:hover, .gold-entry:hover {
  background-color: white;
  border-color: #667eea;
  transform: translateX(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

[data-theme="dark"] .stock-entry:hover,
[data-theme="dark"] .gold-entry:hover {
  background-color: #121826;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.entry-info {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.entry-info span {
  font-size: 0.9375rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.entry-info span strong {
  color: var(--dark-text);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999 !important;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
  pointer-events: auto;
}

[data-theme="dark"] .suggestions-dropdown {
  background: #121826;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.4);
}

/* Delete button style tweaks */
.delete-btn-cash,
.delete-btn-tl {
  border-radius: 0.5rem;
}
[data-theme="dark"] .delete-btn-cash,
[data-theme="dark"] .delete-btn-tl {
  color: #ff7b7b;
  border-color: rgba(255,255,255,0.25);
}
[data-theme="dark"] .delete-btn-cash:hover,
[data-theme="dark"] .delete-btn-tl:hover {
  background: rgba(255, 99, 132, 0.12);
  border-color: #ff7b7b;
  color: #ff9aa2;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
  width: 100%;
  text-align: left;
  background: none;
}

.suggestion-item:hover {
  background-color: var(--light-bg);
}

[data-theme="dark"] .suggestion-item {
  color: #e9ecef;
}

[data-theme="dark"] .suggestion-item:hover {
  background-color: #1a1f2e;
}

.suggestion-item:focus {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  outline: none;
}

/* Empty State - Index ile aynı */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.total-summary {
  background: linear-gradient(to right, #e9ecef, #f8f9fa);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
  border-left: 4px solid #667eea;
}

[data-theme="dark"] .total-summary {
  background: linear-gradient(to right, #0e1421, #121826);
  color: #e9ecef;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #dee2e6, transparent);
  margin: 2rem 0;
}

/* Form section headers */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}

.form-section-header h5 {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}
[data-theme="dark"] .form-section-header h5 { color: #ffffff; }



/* Güncelleme butonu stili */
#refresh-btn {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

#refresh-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: white;
  transform: translateY(-1px);
}

#refresh-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

#refresh-btn.loading i {
  animation: rotate 1s linear infinite;
}

/* Geçen süre göstergesi */
#time-elapsed {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

/* Animasyonlar */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.portfolio-card {
  animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .main-header h1 {
    font-size: 2rem;
  }

  .row > div {
    margin-bottom: 0.5rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }

  .asset-stats {
    display: none;
  }

  .entry-info {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* TL Assets Specific Styles */
.info-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
  transition: all 0.3s ease;
}

[data-theme="dark"] .info-card {
  background: #121826;
  border-color: rgba(255,255,255,0.08);
}

/* Dark mode için faiz, vergi ve net getiri kutuları */
[data-theme="dark"] input[style*="#fff3cd"] {
  background-color: #3d3a1a !important; /* Koyu sarı */
  color: #f0e68c !important;
}

[data-theme="dark"] input[style*="#f8d7da"] {
  background-color: #3d1a1a !important; /* Koyu kırmızı */
  color: #f5a3a3 !important;
}

[data-theme="dark"] input[style*="#e8f5e8"] {
  background-color: #121826 !important; /* Koyu lacivert arka plan */
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

/* Net getiri kutusu (açık mavi inline arka plan) için dark mode düzeltmesi */
[data-theme="dark"] input[style*="#d1edff"] {
  background-color: #121826 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

/* "Günlük faiz otomatik hesaplanıyor..." bilgisini dark mode'da beyaz yap */
[data-theme="dark"] small.text-info {
  color: #ffffff !important;
}

/* Modal içinde TL Nakit (text-info) ikonunu beyaz yap */
[data-theme="dark"] .modal-body .text-info {
  color: #ffffff !important;
}

/* Ekleme formu: Net kazanç önizleme kutusu (daily_net_preview_TL) siyah olsun */
[data-theme="dark"] input[name="daily_net_preview_TL"] {
  background-color: #121826 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

.info-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

.info-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.info-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-content {
  flex: 1;
  min-width: 0;
}

.info-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.info-value {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #212529;
  word-break: break-word;
}

.header-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 500;
}

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

/* Mobile responsive for TL assets */
@media (max-width: 768px) {
  .info-card {
    padding: 1rem;
  }

  .header-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .info-item {
    gap: 0.5rem;
  }
}

/* Extra small devices: mobil görünüm iyileştirmeleri */
@media (max-width: 576px) {
  /* Genel yatay taşmayı engelle */
  html, body {
    overflow-x: hidden;
  }

  /* Kart içi gridleri tek sütuna düşür */
  .portfolio-card .row.g-2 > [class^="col-"],
  .portfolio-card .row.g-3 > [class^="col-"],
  .portfolio-card .row.g-1 > [class^="col-"],
  .portfolio-card .row.mb-2 > [class^="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Faiz/Vergi/Net Getiri satırı tek sütun */
  .portfolio-card .row.g-2.mb-2 > .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Input grup elemanları sarılsın ve tam genişlik olsun */
  .portfolio-card .input-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .portfolio-card .input-group .form-control,
  .portfolio-card .input-group .form-select {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .portfolio-card .input-group .btn {
    flex: 0 0 100%;
    width: 100%;
  }

  /* Başlık ve metin boyutları biraz küçülsün */
  .summary-value { font-size: 1.1rem; }
  .summary-label { font-size: 0.8rem; }

  /* Aksiyon butonları tek sütun ve tam genişlik */
  .action-buttons { flex-direction: column; }
  .action-buttons .btn,
  .btn-back { width: 100%; }
}

/* Flash message styles */
.flash-message {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  border-left: 4px solid;
  font-weight: 500;
  animation: slideInFromTop 0.4s ease-out;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flash-message.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  border-left-color: #28a745;
  color: #155724;
}

.flash-message.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  border-left-color: #dc3545;
  color: #721c24;
}

.flash-message.info {
  background: linear-gradient(135deg, #cce7f8, #b8daff);
  border-left-color: #007bff;
  color: #004085;
}

.flash-message.warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-left-color: #ffc107;
  color: #856404;
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Modal Styles */
.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
  overflow: hidden;
}

[data-theme="dark"] .modal-content {
  background: #0e1421;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
  padding: 1.5rem;
}

[data-theme="dark"] .modal-header {
  background: linear-gradient(135deg, #4c63d2 0%, #5a4788 100%);
}

.modal-header h5 {
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 2rem;
  color: #333;
}

[data-theme="dark"] .modal-body {
  color: #e2e8f0;
  background: #0e1421;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1rem 2rem;
  background: #f8f9fa;
}

[data-theme="dark"] .modal-footer {
  background: #0e1421;
  border-top-color: rgba(255,255,255,0.08);
}

/* Modal içindeki card'lar için dark mode */
[data-theme="dark"] .modal-body .card,
[data-theme="dark"] .modal-body .alert {
  background: #0e1421 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: white !important;
}

[data-theme="dark"] .modal-body .text-muted {
  color: #cbd5e1 !important;
}

/* Modal içindeki ikonlar */
[data-theme="dark"] .modal-body i {
  color: #cbd5e1;
}

/* Modal içindeki tüm yazılar beyaz */
[data-theme="dark"] .modal-body p,
[data-theme="dark"] .modal-body span,
[data-theme="dark"] .modal-body div {
  color: white !important;
}

/* Dark mode: JS tarafında oluşturulan bg-light kutusunu karart */
[data-theme="dark"] .modal-body .bg-light {
  background: #0e1421 !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

/* Modal backdrop dark mode */
[data-theme="dark"] .modal-backdrop {
  background-color: rgba(0,0,0,0.8);
}

/* Modal butonları dark mode */
[data-theme="dark"] .modal-footer .btn-secondary {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .modal-footer .btn-secondary:hover {
  background: #4b5563;
  border-color: #6b7280;
}

[data-theme="dark"] .modal-footer .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
}

[data-theme="dark"] .modal-footer .btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.item-details {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

[data-theme="dark"] .item-details {
  background: #0e1421;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.detail-row:not(:last-child) {
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0.25rem;
  padding-bottom: 0.5rem;
}

.detail-label {
  font-weight: 600;
  color: #6c757d;
  font-size: 0.875rem;
}

.detail-value {
  font-weight: 500;
  color: #212529;
}

/* Modal responsive design */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-header h5 {
    font-size: 1rem;
  }
  
  .modal-header .modal-icon {
    display: none;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-footer .btn {
    width: 100%;
    margin: 0;
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* Profit/Loss indicator styles */
.profit-positive {
  color: var(--success-color);
  font-weight: 600;
}

.profit-negative {
  color: var(--danger-color);
  font-weight: 600;
}

/* Home button style */
.btn-home {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-home i {
  margin-right: 0.5rem;
}

/* Yeni Varlık Ekleme Butonu - Index ile aynı stil */
.btn-new-asset {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-new-asset:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-new-asset i {
  margin-right: 0.5rem;
}

/* Ana Sayfaya Dön Butonu - Yeni Varlık Ekle ile aynı stil */
.btn-back {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-back i {
  margin-right: 0.5rem;
} 