: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);
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;
}

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

/* Tema değişimi için kök değişkenleri uyarlayın */
[data-theme="dark"] {
  --light-bg: #0b0f19;
  --dark-text: #e9ecef;
  --card-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.5);
}

/* Sticky summary bar */
.sticky-summary {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(12px);
  background: linear-gradient(to right, rgba(248,249,250,0.95), rgba(255,255,255,0.95));
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

[data-theme="dark"] .sticky-summary {
  background: linear-gradient(to right, rgba(14,20,33,0.95), rgba(18,24,38,0.95));
  border-bottom-color: rgba(255,255,255,0.12);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.sticky-summary .container {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  max-width: 1200px;
}

.sticky-summary .label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-right: 0.75rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

[data-theme="dark"] .sticky-summary .label {
  color: #94a3b8;
}

.sticky-summary .value {
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

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

.sticky-summary .btn {
  border-radius: 12px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.sticky-summary .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

[data-theme="dark"] .sticky-summary .btn {
  background: linear-gradient(135deg, #4c63d2 0%, #5a4788 100%);
  box-shadow: 0 2px 8px rgba(76, 99, 210, 0.25);
}

[data-theme="dark"] .sticky-summary .btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  box-shadow: 0 4px 12px rgba(76, 99, 210, 0.35);
}

/* Sticky search bar */
.sticky-search {
  position: sticky;
  top: var(--summary-height, 56px); /* summary bar'ın altında dursun */
  z-index: 1029;
  background: linear-gradient(to right, rgba(248,249,250,0.95), rgba(255,255,255,0.95));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0.875rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

[data-theme="dark"] .sticky-search {
  background: linear-gradient(to right, rgba(14,20,33,0.95), rgba(18,24,38,0.95));
  border-bottom-color: rgba(255,255,255,0.12);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.sticky-search .container {
  max-width: 1200px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.sticky-search input.form-control {
  max-width: 400px;
  border-radius: 12px;
  border: 2px solid rgba(102, 126, 234, 0.15);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
  flex: 1;
  min-width: 250px;
}

.sticky-search input.form-control:focus {
  border-color: #667eea;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
  outline: none;
  transform: translateY(-1px);
}

[data-theme="dark"] .sticky-search input.form-control {
  background: rgba(30,41,59,0.8);
  border-color: rgba(102, 126, 234, 0.25);
  color: #e2e8f0;
}

[data-theme="dark"] .sticky-search input.form-control:focus {
  background: rgba(30,41,59,0.95);
  border-color: #667eea;
  color: #f1f5f9;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .sticky-search input.form-control::placeholder {
  color: #94a3b8;
}

.sticky-search .btn {
  border-radius: 12px;
  min-width: 90px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.25);
}

.sticky-search .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

[data-theme="dark"] .sticky-search .btn {
  background: linear-gradient(135deg, #4c63d2 0%, #5a4788 100%);
  box-shadow: 0 3px 12px rgba(76, 99, 210, 0.3);
}

[data-theme="dark"] .sticky-search .btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  box-shadow: 0 6px 20px rgba(76, 99, 210, 0.4);
}

/* Search bar responsive genişlikler */
@media (min-width: 1200px) {
  .sticky-search .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .sticky-search input.form-control {
    max-width: 500px; /* Desktop'ta daha geniş ama aşırı değil */
  }
}

@media (max-width: 1199px) and (min-width: 992px) {
  .sticky-search input.form-control {
    max-width: 400px; /* Laptop boyutu */
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .sticky-search .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  .sticky-search input.form-control {
    max-width: 320px; /* Tablet boyutu */
  }
  
  .sticky-search .btn {
    min-width: 80px;
    padding: 0.75rem 1.25rem;
  }
}

@media (max-width: 767px) {
  .sticky-search {
    padding: 0.75rem 0; /* Mobilde daha az padding */
  }
  
  .sticky-search .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .sticky-search input.form-control {
    max-width: none; /* Mobilde tam genişlik kullan */
    flex: 1; /* Flexbox ile alan paylaşımı */
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }
  
  .sticky-search .btn {
    min-width: 70px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    flex-shrink: 0; /* Button'ın küçülmesini engelle */
  }
  
  .sticky-search .container {
    gap: 0.75rem !important; /* Mobilde daha az gap */
    justify-content: space-between !important; /* Mobilde space-between */
  }
}

@media (max-width: 576px) {
  .sticky-search {
    padding: 0.65rem 0; /* Küçük mobillerde daha az padding */
  }
  
  .sticky-search .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.5rem !important; /* Çok küçük gap */
  }
  
  .sticky-search input.form-control {
    font-size: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px; /* Küçük mobillerde daha küçük radius */
  }
  
  .sticky-search .btn {
    min-width: 60px;
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }
  
  .sticky-search .btn i {
    margin-right: 0; /* İkon ile text arasındaki margin'i kaldır */
  }
  
  .sticky-search .btn .d-none.d-sm-inline {
    display: none !important; /* Çok küçük ekranlarda text'i gizle */
  }
}

@media (max-width: 480px) {
  .sticky-search input.form-control {
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }
  
  .sticky-search .btn {
    min-width: 50px;
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
  }
}

/* Summary bar responsive tasarım */
@media (min-width: 1200px) {
  .sticky-summary .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .sticky-summary .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  .sticky-summary .label {
    font-size: 0.8rem;
    margin-right: 0.5rem;
  }
  
  .sticky-summary .value {
    font-size: 0.9rem;
  }
  
  .sticky-summary .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 767px) {
  .sticky-summary {
    padding: 0;
  }
  
  .sticky-summary .container {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 1rem !important;
    justify-content: space-between !important; /* Mobilde space-between */
  }
  
  .sticky-summary .label {
    font-size: 0.75rem;
    margin-right: 0.4rem;
  }
  
  .sticky-summary .value {
    font-size: 0.85rem;
  }
  
  .sticky-summary .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 10px;
  }
}

@media (max-width: 576px) {
  .sticky-summary .container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.75rem !important;
  }
  
  .sticky-summary .label {
    font-size: 0.7rem;
    margin-right: 0.3rem;
  }
  
  .sticky-summary .value {
    font-size: 0.8rem;
  }
  
  .sticky-summary .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    min-width: 60px;
  }
}

@media (max-width: 480px) {
  .sticky-summary .container {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    gap: 0.5rem !important;
  }
  
  .sticky-summary .label {
    font-size: 0.65rem;
  }
  
  .sticky-summary .value {
    font-size: 0.75rem;
  }
  
  .sticky-summary .btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.65rem;
    min-width: 50px;
  }
}

/* Search highlight */
.search-hit {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  animation: hitFlash 1.2s ease;
}

@keyframes hitFlash {
  0% { box-shadow: 0 0 0 rgba(102,126,234,0.8); }
  50% { box-shadow: 0 0 16px rgba(102,126,234,0.8); }
  100% { box-shadow: 0 0 0 rgba(102,126,234,0.8); }
}

.sticky-summary .summary-badge {
  font-size: 0.75rem;
}

/* Header Styles */
.main-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.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: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .main-header {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
  }
  
  .main-header h1 {
    font-size: 1.5rem;
  }
  
  .main-header .container {
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
  }
  
  .main-header h1 {
    font-size: 1.25rem;
  }
}

/* Geri sayım için stil */
#last-update-timer {
  display: inline-block;
  transition: all 0.3s ease;
  min-width: 250px;
}

#last-update-timer i {
  margin-right: 4px;
}

/* Güncelleniyor animasyonu */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#last-update-timer i.bi-hourglass-split {
  animation: rotate 2s linear infinite;
}

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

[data-theme="dark"] .portfolio-card {
  background: #121826;
  color: var(--dark-text);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.4);
}

.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);
  position: relative;
}

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

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

[data-theme="dark"] .card-header-custom h3 {
  color: #ffffff;
}

/* Table Styles */
.custom-table {
  margin-bottom: 0;
  table-layout: fixed;
  width: 100%;
}

.custom-table thead {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

[data-theme="dark"] .custom-table thead {
  background: linear-gradient(135deg, #3d4aa7, #5a2b93);
}

.custom-table thead th {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;  
  padding: 1rem;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sütun genişlik ayarları */
.custom-table th:nth-child(1),
.custom-table td:nth-child(1) {
  width: 18%;
  padding: 0.5rem;
  overflow: visible;
  white-space: normal;
  vertical-align: top;
}

/* HTMX güncellemesi sırasında layout shift'i önle */
.custom-table .stock-row td:first-child,
.custom-table .gold-row td:first-child {
  transition: none !important;
  transform: none !important;
}

/* Zebra satırlar */
.custom-table tbody tr:nth-child(odd) {
  background-color: rgba(0,0,0,0.02);
}
[data-theme="dark"] .custom-table tbody tr:nth-child(odd) {
  background-color: rgba(255,255,255,0.04);
}

/* Sticky ilk sütun */
.custom-table th:first-child,
.custom-table td:first-child {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
}
.custom-table thead th:first-child {
  z-index: 2;
  box-shadow: 4px 0 0 rgba(0,0,0,0.04);
}
[data-theme="dark"] .custom-table thead th:first-child {
  box-shadow: 4px 0 0 rgba(255,255,255,0.06);
}

.custom-table th:nth-child(2),
.custom-table td:nth-child(2) {
  width: 12%;
  padding: 0.5rem;
}

.custom-table th:nth-child(3),
.custom-table td:nth-child(3) {
  width: 12%;
  padding: 0.5rem;
}

.custom-table th:nth-child(4),
.custom-table td:nth-child(4) {
  width: 10%;
  text-align: right;
  padding: 0.5rem;
}

.custom-table th:nth-child(5),
.custom-table td:nth-child(5) {
  width: 12%;
  padding: 0.5rem;
}

.custom-table th:nth-child(6),
.custom-table td:nth-child(6) {
  width: 12%;
  padding: 0.5rem;
}

.custom-table th:nth-child(7),
.custom-table td:nth-child(7) {
  width: 12%;
  padding: 0.5rem;
}

.custom-table th:nth-child(8),
.custom-table td:nth-child(8) {
  width: 12%;
  text-align: right;
  padding: 0.5rem;
}

.custom-table th:nth-child(9),
.custom-table td:nth-child(9) {
  width: 10%;
  text-align: right;
  padding: 0.5rem;
}

/* Altın tablosu için özel sütun genişlikleri - hem ana sayfa hem de HTMX için */
.portfolio-card:first-child .custom-table th:nth-child(1),
.portfolio-card:first-child .custom-table td:nth-child(1),
div:first-child.portfolio-card .custom-table th:nth-child(1),
div:first-child.portfolio-card .custom-table td:nth-child(1) {
  width: 25% !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(2),
.portfolio-card:first-child .custom-table td:nth-child(2),
div:first-child.portfolio-card .custom-table th:nth-child(2),
div:first-child.portfolio-card .custom-table td:nth-child(2) {
  width: 15% !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(3),
.portfolio-card:first-child .custom-table td:nth-child(3),
div:first-child.portfolio-card .custom-table th:nth-child(3),
div:first-child.portfolio-card .custom-table td:nth-child(3) {
  width: 15% !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(4),
.portfolio-card:first-child .custom-table td:nth-child(4),
div:first-child.portfolio-card .custom-table th:nth-child(4),
div:first-child.portfolio-card .custom-table td:nth-child(4) {
  width: 12% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(5),
.portfolio-card:first-child .custom-table td:nth-child(5),
div:first-child.portfolio-card .custom-table th:nth-child(5),
div:first-child.portfolio-card .custom-table td:nth-child(5) {
  width: 15% !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(6),
.portfolio-card:first-child .custom-table td:nth-child(6),
div:first-child.portfolio-card .custom-table th:nth-child(6),
div:first-child.portfolio-card .custom-table td:nth-child(6) {
  width: 15% !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(7),
.portfolio-card:first-child .custom-table td:nth-child(7),
div:first-child.portfolio-card .custom-table th:nth-child(7),
div:first-child.portfolio-card .custom-table td:nth-child(7) {
  width: 15% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

.portfolio-card:first-child .custom-table th:nth-child(8),
.portfolio-card:first-child .custom-table td:nth-child(8),
div:first-child.portfolio-card .custom-table th:nth-child(8),
div:first-child.portfolio-card .custom-table td:nth-child(8) {
  width: 13% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

/* Hisse senedi tablosu için özel sütun genişlikleri - hem ana sayfa hem de HTMX için */
.portfolio-card:nth-child(2) .custom-table th:nth-child(1),
.portfolio-card:nth-child(2) .custom-table td:nth-child(1),
div:nth-child(2).portfolio-card .custom-table th:nth-child(1),
div:nth-child(2).portfolio-card .custom-table td:nth-child(1) {
  width: 15% !important;
  padding: 0.5rem !important;
  overflow: visible !important;
  white-space: normal !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(2),
.portfolio-card:nth-child(2) .custom-table td:nth-child(2),
div:nth-child(2).portfolio-card .custom-table th:nth-child(2),
div:nth-child(2).portfolio-card .custom-table td:nth-child(2) {
  width: 11% !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(3),
.portfolio-card:nth-child(2) .custom-table td:nth-child(3),
div:nth-child(2).portfolio-card .custom-table th:nth-child(3),
div:nth-child(2).portfolio-card .custom-table td:nth-child(3) {
  width: 10% !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(4),
.portfolio-card:nth-child(2) .custom-table td:nth-child(4),
div:nth-child(2).portfolio-card .custom-table th:nth-child(4),
div:nth-child(2).portfolio-card .custom-table td:nth-child(4) {
  width: 8% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(5),
.portfolio-card:nth-child(2) .custom-table td:nth-child(5),
div:nth-child(2).portfolio-card .custom-table th:nth-child(5),
div:nth-child(2).portfolio-card .custom-table td:nth-child(5) {
  width: 11% !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(6),
.portfolio-card:nth-child(2) .custom-table td:nth-child(6),
div:nth-child(2).portfolio-card .custom-table th:nth-child(6),
div:nth-child(2).portfolio-card .custom-table td:nth-child(6) {
  width: 11% !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(7),
.portfolio-card:nth-child(2) .custom-table td:nth-child(7),
div:nth-child(2).portfolio-card .custom-table th:nth-child(7),
div:nth-child(2).portfolio-card .custom-table td:nth-child(7) {
  width: 10% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(8),
.portfolio-card:nth-child(2) .custom-table td:nth-child(8),
div:nth-child(2).portfolio-card .custom-table th:nth-child(8),
div:nth-child(2).portfolio-card .custom-table td:nth-child(8) {
  width: 12% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(9),
.portfolio-card:nth-child(2) .custom-table td:nth-child(9),
div:nth-child(2).portfolio-card .custom-table th:nth-child(9),
div:nth-child(2).portfolio-card .custom-table td:nth-child(9) {
  width: 9% !important;
  text-align: right !important;
  padding: 0.5rem !important;
}

.portfolio-card:nth-child(2) .custom-table th:nth-child(10),
.portfolio-card:nth-child(2) .custom-table td:nth-child(10),
div:nth-child(2).portfolio-card .custom-table th:nth-child(10),
div:nth-child(2).portfolio-card .custom-table td:nth-child(10) {
  width: 13% !important;
  padding: 0.5rem !important;
}

.custom-table tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kâr ve değişim sütunları için özel stil */
.custom-table td:nth-child(7),
.custom-table td:nth-child(8),
.custom-table td:nth-child(9) {
  font-weight: 600;
}

.custom-table tbody tr {
  transition: all 0.2s ease;
}

/* Improve sticky first column readability over zebra */
.custom-table tbody td:first-child {
  background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.85));
}
[data-theme="dark"] .custom-table tbody td:first-child {
  background: linear-gradient(to right, rgba(18,24,38,0.95), rgba(18,24,38,0.9));
}

@media (min-width: 769px) {
.custom-table tbody tr:hover {
  background-color: #f8f9fa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
}



.recommendation-details {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Tooltip stilleri */
.tooltip {
  font-size: 0.8rem;
  max-width: 250px;
}

.tooltip-inner {
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 400;
  line-height: 1.3;
}

/* Market Time Styles */
.market-time {
  font-size: 0.65rem;
  color: #6c757d;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.1rem;
  display: block;
  white-space: nowrap;
  overflow: visible;
  position: relative;
  min-height: 14px;
  opacity: 1;
  transition: none;
}

.market-status-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  margin-top: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
  min-height: 20px;
  opacity: 1;
  transition: none;
}

/* Market Status Banner */
.market-status-banner {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
  color: white;
  border-radius: 8px;
  margin: 0 15px 1rem 15px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.market-status-banner:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.market-status-banner .badge {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.market-status-banner i {
  font-size: 1.3rem;
  opacity: 0.9;
}

/* Hisse sembol hücresinin stable layout'u için */
.custom-table .stock-row td:first-child {
  vertical-align: top;
  position: relative;
  min-height: 60px;
  padding-top: 0.3rem !important;
  padding-bottom: 0.3rem !important;
}

/* Stable layout için basit CSS kuralları */
.stable-layout {
  transform: none !important;
  transition: none !important;
  position: static !important;
  visibility: visible !important;
}

/* Market time ve status elemanları için sabit yükseklik */
.custom-table .stock-row td:first-child {
  min-height: 60px;
  vertical-align: top;
  padding-top: 0.5rem !important;
  line-height: 1.3;
}

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

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

/* Summary Footer */
.summary-footer {
  background: linear-gradient(to right, #e9ecef, #f8f9fa);
  font-weight: 600;
}

.summary-footer td, .summary-footer th {
  padding: 1rem !important;
  font-size: 1rem;
}

/* Grand Total Card */
.grand-total-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.grand-total-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.grand-total-card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.9;
}

.grand-total-card .amount {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Button Styles */
.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);
}

/* Odak görünürlüğü (erişilebilirlik) */
.btn:focus-visible,
.btn-action:focus-visible,
.action-buttons-row .btn:focus-visible,
.news-item:focus-visible,
.news-chip:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Hisse, altın ve nakit satırları ile aksiyon satırları */
.stock-row, .gold-row, .cash-row {
  cursor: pointer;
  position: relative;
  border-bottom: none !important;
}

.stock-action-row, .gold-action-row, .cash-action-row {
  background: #fafbfc;
  border-top: none !important;
  border-left: 3px solid #667eea;
  display: none;
}

.action-cell {
  padding: 0 !important;
  border-bottom: 1px solid #e9ecef !important;
}

.action-content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

.action-content .btn-action {
  opacity: 1;
  visibility: visible;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  min-width: auto;
  font-weight: 500;
  border: 1px solid #dee2e6;
  background: #ffffff;
  color: #495057;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.action-content .btn-action:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.action-content .btn-action i {
  font-size: 0.875rem;
  margin-right: 0.375rem;
}

/* Expand/Collapse animasyonu */
.stock-action-row, .gold-action-row, .cash-action-row {
  transition: all 0.3s ease;
}

/* Action satırlarında overflow kurallarını geçersiz kıl */
.gold-action-row td,
.stock-action-row td,
.cash-action-row td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

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

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

[data-theme="dark"] .icon-stock {
  color: white;
}

/* bi-graph-up ikonunu dark mode'da beyaz yap - tüm durumlar için */
[data-theme="dark"] .bi-graph-up {
  color: white !important;
}

[data-theme="dark"] .bi-graph-up-arrow {
  color: white !important;
}

/* Hisse ile ilgili tüm ikonları beyaz yap */
[data-theme="dark"] .summary-icon-small.stock i {
  color: white !important;
}

[data-theme="dark"] .text-primary .bi-graph-up {
  color: white !important;
}

/* En genel kural - tüm graph ikonları için */
[data-theme="dark"] i.bi-graph-up,
[data-theme="dark"] i.bi-graph-up-arrow,
[data-theme="dark"] .bi.bi-graph-up,
[data-theme="dark"] .bi.bi-graph-up-arrow {
  color: white !important;
}

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

.icon-cash {
  color: #28a745;
  font-size: 1.5rem;
}

/* Badge Styles */
.badge-count {
  background: #667eea;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  display: inline-block;
}

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

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

/* Summary Card Styles */
.summary-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

[data-theme="dark"] .summary-card {
  background: linear-gradient(135deg, #0e1421 0%, #121826 100%);
  border-color: rgba(255,255,255,0.08);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
  justify-content: space-between;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.75rem;
  margin: -0.75rem -0.75rem 0.6rem -0.75rem;
}

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

.summary-header:hover {
  background-color: rgba(0,0,0,0.02);
}

[data-theme="dark"] .summary-header:hover {
  background-color: rgba(255,255,255,0.04);
}

.summary-header .toggle-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  color: #6c757d;
  margin-left: auto;
}

.summary-header[aria-expanded="false"] .toggle-icon {
  transform: rotate(-90deg);
}

.summary-header .left-content {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.summary-header h5 {
  margin: 0;
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

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

.summary-header i {
  font-size: 1rem;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.summary-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: white;
  border-radius: 0.4rem;
  border: 1px solid #f1f3f4;
  transition: all 0.2s ease;
}

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

.summary-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.summary-stat .stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #495057;
}

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

/* Chart Icon Style */
.icon-chart {
  color: #6f42c1;
}

.chart-body {
  padding: 1.5rem;
  background: #ffffff;
}

.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 0.4rem;
  border: 1px solid #e9ecef;
}

.period-selector {
  display: flex;
  gap: 0.3rem;
}

.period-selector button {
  padding: 0.3rem 0.75rem;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.period-selector button:hover {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

[data-theme="dark"] .period-selector button:hover {
  background: #1a1f2e;
  border-color: #667eea;
  color: #667eea;
}

.period-selector button.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.legend-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
}

[data-theme="dark"] .legend-text {
  color: white;
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.stat-card {
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.4rem;
  background: #f8f9fa;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.stat-card:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card .stat-icon {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.stat-card .stat-value {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.2rem 0;
  line-height: 1.2;
}

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

.stat-gold .stat-icon { color: #FFD700; }
.stat-stock .stat-icon { color: #20c997; }
.stat-total .stat-icon { color: #667eea; }



/* Canvas container for better aspect ratio */
.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Chart optimizasyonları */
.chart-container { width: 100%; }
#profitChart { width: 100%; min-width: 0; }
#goldChartModal .chart-container { width: 100%; }
#goldChartModal #chart { width: 100%; min-width: 0; }

/* Mobile tap hint */
.mobile-tap-hint {
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #6c757d;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

/* Skeleton loaders */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.12), rgba(0,0,0,0.06));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-line {
  height: 0.9rem;
  min-width: 5rem;
}

.skeleton-badge {
  height: 1.6rem;
  width: 90px;
  border-radius: 0.5rem;
  display: inline-block;
}

.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-75 { width: 75%; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

  .header-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header-info-item {
    font-size: 0.8rem !important;
  }

  /* Mobilde bazı kolonları gizle */
  .hide-mobile {
    display: none !important;
  }

  /* Mobilde tablo font boyutunu küçült */
  .custom-table {
    font-size: 0.8rem;
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
  }

  .custom-table thead th {
    font-size: 0.7rem;
    padding: 0.5rem 0.3rem;
  }

  .custom-table tbody td {
    padding: 0.5rem 0.3rem;
    word-wrap: break-word;
  }

  /* Altın tablosu sütun genişlikleri */
  .portfolio-card:first-of-type .custom-table th:nth-child(1),
  .portfolio-card:first-of-type .custom-table td:nth-child(1) {
    width: 22%;
  }
  
  .portfolio-card:first-of-type .custom-table th:nth-child(4),
  .portfolio-card:first-of-type .custom-table td:nth-child(4) {
    width: 13%;
  }
  
  .portfolio-card:first-of-type .custom-table th:nth-child(6),
  .portfolio-card:first-of-type .custom-table td:nth-child(6) {
    width: 23%;
  }
  
  .portfolio-card:first-of-type .custom-table th:nth-child(7),
  .portfolio-card:first-of-type .custom-table td:nth-child(7) {
    width: 22%;
  }
  
  .portfolio-card:first-of-type .custom-table th:nth-child(8),
  .portfolio-card:first-of-type .custom-table td:nth-child(8) {
    width: 20%;
  }

  /* Hisse tablosu sütun genişlikleri */
  .portfolio-card:last-of-type .custom-table th:nth-child(1),
  .portfolio-card:last-of-type .custom-table td:nth-child(1) {
    width: 25%;
  }
  
  .portfolio-card:last-of-type .custom-table th:nth-child(4),
  .portfolio-card:last-of-type .custom-table td:nth-child(4) {
    width: 15%;
  }
  
  .portfolio-card:last-of-type .custom-table th:nth-child(8),
  .portfolio-card:last-of-type .custom-table td:nth-child(8) {
    width: 35%;
  }
  
  .portfolio-card:last-of-type .custom-table th:nth-child(9),
  .portfolio-card:last-of-type .custom-table td:nth-child(9) {
    width: 25%;
  }

  .custom-table {
    font-size: 0.875rem;
  }

  .custom-table thead th {
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
  }

  .custom-table tbody td {
    padding: 0.75rem 0.5rem;
  }

  .grand-total-card .amount {
    font-size: 2rem;
  }

  .chart-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .period-selector {
    justify-content: center;
  }
  
  .chart-legend {
    justify-content: center;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .chart-body {
    padding: 1rem;
  }

  /* Mobilde aksiyon butonlarını görünür yap */
  .action-content {
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0.375rem;
    margin: 0.5rem;
  }

  .mobile-detail-card .action-content {
    padding: 0;
    background: none;
    border-radius: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-detail-card .btn-action {
    font-size: 0.8rem;
    padding: 0.5rem 1.25rem;
    min-width: 120px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    border-radius: 0.4rem;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .mobile-detail-card .btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2, #667eea);
  }

  .mobile-detail-card .btn-action i {
    font-size: 0.8rem;
    margin-right: 0.4rem;
  }

  /* Mobilde expanded alan daha belirgin */
  .stock-action-row, .gold-action-row, .cash-action-row {
    background: #ffffff;
    border: none;
    display: none;
  }
  
  .stock-action-row.show, .gold-action-row.show, .cash-action-row.show {
    display: table-row !important;
  }

  .action-cell {
    padding: 0 !important;
    border: none !important;
  }

  /* Mobilde satır seçimi görsel efekti */
  .gold-row.expanded, .stock-row.expanded, .cash-row.expanded {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    border-left: 4px solid #667eea;
    transform: none !important;
    box-shadow: none !important;
  }

  /* Mobilde detay gösterimi */
  .mobile-detail-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 0.5rem;
    padding: 0.8rem;
    margin: 0.4rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    font-size: 0.85rem;
    max-width: 100%;
    overflow: hidden;
  }

  .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.3rem;
    margin-bottom: 1rem;
  }

  .detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.25rem;
    background: white;
    border-radius: 0.25rem;
    border: 1px solid #f1f3f4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    text-align: center;
  }

  .detail-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.1;
  }



  /* Mobilde action cell'i düzelt */
  .action-cell.d-md-none {
    border: none !important;
    padding: 0 !important;
    vertical-align: top;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  /* Action satırlarında metin sarmalama */
  .gold-action-row td,
  .stock-action-row td,
  .cash-action-row td {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  /* Mobilde kâr sütunları için küçük font */
  .custom-table td:nth-child(7),
  .custom-table td:nth-child(8),
  .custom-table td:nth-child(9) {
    font-size: 0.75rem;
  }

  /* Mobilde detay kartı genişliğini sınırla */
  .mobile-detail-card {
    max-width: calc(100vw - 2rem);
    overflow-x: auto;
  }
  
  .action-cell.d-md-none {
    max-width: 0;
    width: auto;
  }

  /* Mobilde özet kartları daha kompakt */
  .summary-card {
    padding: 0.5rem;
    margin-top: 0.4rem;
  }

  .summary-header {
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
  }

  .summary-header h5 {
    font-size: 0.85rem;
  }

  .summary-header i {
    font-size: 0.9rem;
  }

  .summary-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .summary-stat {
    padding: 0.35rem;
    flex-direction: column;
    text-align: center;
    gap: 0.1rem;
  }

  .summary-stat .stat-label {
    font-size: 0.7rem;
  }

  .summary-stat .stat-value {
    font-size: 0.8rem;
  }
}

/* Yenilenme animasyonu */
@keyframes refreshPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.pulse-animation {
  animation: refreshPulse 2s infinite;
}

/* Yeni Varlık Ekleme Butonu */
.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);
}

/* Gündüz modunda sticky summary'deki güncelle butonu */
html:not([data-theme="dark"]) .sticky-summary .btn-new-asset {
  color: white;
}

html:not([data-theme="dark"]) .sticky-summary .btn-new-asset:hover {
  color: white;
}

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

/* HTMX Loading Styles */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request #refresh-btn {
  opacity: 0.6;
  pointer-events: none;
}

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

/* İyileştirilmiş Daily Change Badge'i */
.daily-change {
  /* Layout & Typography */
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.2;
  letter-spacing: 0.025em;
  
  /* Flexbox */
  display: table;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  
  /* Spacing */
  padding: 0.5rem 0.75rem;
  margin: 0.125rem;
  
  /* Appearance */
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* User interaction */
  cursor: default;
  user-select: none;
  
  /* Accessibility */
  position: relative;
  overflow: hidden;
}



/* Focus state for accessibility */
.daily-change:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Positive change (up) */
.daily-change.up {
  background: linear-gradient(135deg, 
    rgba(40, 167, 69, 0.12) 0%, 
    rgba(32, 201, 151, 0.08) 100%);
  color: #155724;
  border-color: rgba(40, 167, 69, 0.25);
}


/* Negative change (down) */
.daily-change.down {
  background: linear-gradient(135deg, 
    rgba(220, 53, 69, 0.12) 0%, 
    rgba(231, 76, 60, 0.08) 100%);
  color: #721c24;
  border-color: rgba(220, 53, 69, 0.25);
}

.daily-change.down:hover {
  background: linear-gradient(135deg, 
    rgba(220, 53, 69, 0.18) 0%, 
    rgba(231, 76, 60, 0.12) 100%);
  border-color: rgba(220, 53, 69, 0.35);
}

/* No change (same) */
.daily-change.same {
  background: linear-gradient(135deg, 
    rgba(108, 117, 125, 0.08) 0%, 
    rgba(134, 142, 150, 0.06) 100%);
  color: #495057;
  border-color: rgba(108, 117, 125, 0.15);
}



/* Emoji styling */
.daily-change .emoji {
  font-size: 1.1em;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s ease;
}


/* Percentage styling */
.daily-change .percentage {
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Icon alternatifi (emoji yerine) */
.daily-change .icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.daily-change.up .icon {
  background: rgba(40, 167, 69, 0.2);
  color: #155724;
}

.daily-change.down .icon {
  background: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

.daily-change.same .icon {
  background: rgba(108, 117, 125, 0.2);
  color: #495057;
}

/* Responsive design */
@media (max-width: 768px) {
  .daily-change {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
    gap: 0.25rem;
  }
  
  .daily-change .percentage {
    font-size: 0.75rem;
  }
  
  .daily-change .emoji {
    font-size: 1em;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .daily-change {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .daily-change.up {
    background: linear-gradient(135deg, 
      rgba(40, 167, 69, 0.15) 0%, 
      rgba(32, 201, 151, 0.1) 100%);
    color: #90ee90;
    border-color: rgba(40, 167, 69, 0.3);
  }
  
  .daily-change.down {
    background: linear-gradient(135deg, 
      rgba(220, 53, 69, 0.15) 0%, 
      rgba(231, 76, 60, 0.1) 100%);
    color: #ffb3ba;
    border-color: rgba(220, 53, 69, 0.3);
  }
  
  .daily-change.same {
    color: #a8a8a8;
  }
}



/* Size variants */
.daily-change.small {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  gap: 0.25rem;
}

.daily-change.large {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
}

.daily-change.small .percentage {
  font-size: 0.7rem;
}

.daily-change.large .percentage {
  font-size: 0.9rem;
}



/* Mobil uyumluluk */
@media (max-width: 768px) {
  .daily-change {
    min-width: 65px;
    padding: 4px 8px;
    font-size: 0.75rem;
  }
  
  .daily-change .percentage {
    font-size: 0.7rem;
  }
}

/* Individual Entries Styles */
.individual-entries {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
}

.entry-detail {
  border-bottom: 1px solid #eee;
  padding: 8px 12px;
}

.entry-detail:last-child {
  border-bottom: none;
}

.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.entry-amount {
  font-weight: 600;
  color: #2c5282;
  min-width: 80px;
}

.entry-desc {
  flex: 1;
  color: #4a5568;
  margin: 0 8px;
  text-align: center;
}

.entry-date {
  color: #718096;
  font-size: 0.8rem;
  min-width: 70px;
  text-align: right;
}

/* Mobile responsive for entries */
@media (max-width: 576px) {
  .entry-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  
  .entry-desc {
    margin: 0;
    text-align: left;
  }
  
  .entry-date {
    text-align: left;
    font-size: 0.75rem;
  }
}

/* Small badge for mobile */
.badge-sm {
  font-size: 0.7rem;
  padding: 2px 6px;
}

/* Mobile cash table improvements */
@media (max-width: 767px) {

  
  .asset-name small {
    font-size: 0.8rem;
  }
  
  .custom-table td, .custom-table th {
    padding: 0.5rem 0.25rem;
  }
  
  .asset-name {
    min-width: 0;
  }
} 

/* ===== COMPANY NEWS STYLES ===== */
.icon-news {
  color: #6c757d;
}

.news-group {
  margin-bottom: 1rem;
}

.news-head {
  margin-bottom: 0.5rem;
}

.news-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* News chip styles */
.news-chip {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: 1px solid #667eea;
  background: #f8f9ff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #01040a;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.news-chip:hover {
  background: #667eea;
  border-color: #667eea;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.news-chip:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* News chip content structure for headline, source, and date */
.news-chip-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.news-headline {
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.7rem;
  line-height: 1.1;
  color: #6c757d;
  opacity: 0.8;
}

.news-source {
  font-weight: 500;
  color: #495057;
}

[data-theme="dark"] .news-source {
  color: #b9c2cf;
}

.news-separator {
  color: #adb5bd;
  font-weight: 300;
}

.news-date {
  font-weight: 400;
  color: #6c757d;
}

.news-chip:hover .news-meta {
  color: rgba(255, 255, 255, 0.8);
}

.news-chip:hover .news-source {
  color: rgba(255, 255, 255, 0.9);
}

.news-chip:hover .news-separator {
  color: rgba(255, 255, 255, 0.6);
}

.news-chip:hover .news-date {
  color: rgba(255, 255, 255, 0.8);
}

/* Haberler button styles - matching the design pattern from the image */
.btn-haberler {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
  cursor: pointer;
  min-width: 120px;
}

.btn-haberler:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.btn-haberler:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-haberler:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-haberler i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

/* Mobile responsive for haberler button */
@media (max-width: 768px) {
  .btn-haberler {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-width: 100px;
  }
  
  .btn-haberler i {
    margin-right: 0.4rem;
    font-size: 0.85rem;
  }
}

/* Dark mode support for haberler button */
@media (prefers-color-scheme: dark) {
  .btn-haberler {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
  }
  
  .btn-haberler:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
  }
}

/* Mobile responsive for news */
@media (max-width: 768px) {
  .news-chip-list {
    gap: 0.25rem;
  }
  
  .news-chip {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .news-chip-content {
    gap: 0.15rem;
  }
  
  .news-headline {
    font-size: 0.75rem;
  }
  
  .news-meta {
    font-size: 0.65rem;
    gap: 0.05rem;
  }
  
  .news-source {
    font-size: 0.65rem;
  }
  
  .news-date {
    font-size: 0.65rem;
  }
  
  .news-head {
    margin-bottom: 0.25rem;
  }
}

/* News actions styling */
.news-actions .btn {
  white-space: nowrap;
  font-size: 0.8rem;
}

/* Dark mode support for news */
@media (prefers-color-scheme: dark) {
  .news-chip {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #000000;
  }
  
  .news-chip:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
  }
} 

/* Google Translate Widget Styles */
#google_translate_element {
  display: inline-block;
  margin: 0 auto;
}

#google_translate_element .goog-te-gadget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9rem;
}

#google_translate_element .goog-te-gadget .goog-te-combo {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
  color: #495057;
  transition: all 0.2s ease;
}

#google_translate_element .goog-te-gadget .goog-te-combo:hover {
  border-color: #adb5bd;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#google_translate_element .goog-te-gadget .goog-te-combo:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Mobile responsive for Google Translate */
@media (max-width: 768px) {
  #google_translate_element {
    margin: 0.5rem auto;
  }
  
  #google_translate_element .goog-te-gadget .goog-te-combo {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
  }
}

/* News section specific Google Translate styles */
#company-news-card .card-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

#company-news-card .card-header-custom h3 {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

#company-news-card #google_translate_element {
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #company-news-card .card-header-custom {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  #company-news-card .card-header-custom h3 {
    text-align: center;
  }
  
  #company-news-card #google_translate_element {
    text-align: center;
  }
}

/* Stock portfolio header with news button */
.portfolio-card .card-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-card .card-header-custom h3 {
  margin: 0;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portfolio-card .card-header-custom .btn {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

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

@media (max-width: 768px) {
  .portfolio-card .card-header-custom {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .portfolio-card .card-header-custom h3 {
    text-align: left;
    flex: 1;
  }
  
  .portfolio-card .card-header-custom .btn {
    margin-left: auto;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
  }
}

/* Prevent translation of other page elements */
.notranslate {
  /* Google Translate will ignore this class */
}

/* News chips that should be translated */
.translate-news {
  /* These will be translated by Google Translate */
}

/* Prevent page scroll on translation */
body.translated {
  scroll-behavior: auto;
}

/* Sembol hover efekti */
.custom-table .stock-row td:first-child strong {
  cursor: help;
  transition: color 0.2s ease;
}

.custom-table .stock-row td:first-child strong:hover {
  color: #0d6efd;
}

/* Stock Cards Layout */
.stock-cards-container {
  padding: 1rem 0;
}

.stock-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.stock-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.stock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f3f4;
}

.stock-symbol h5 {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
  color: #2c3e50;
}

.stock-price {
  text-align: right;
  font-size: 1.1rem;
  font-weight: 600;
}

.stock-card-body {
  margin-bottom: 1rem;
}

.stock-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

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

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

.metric-value {
  font-weight: 600;
  color: #2c3e50;
}

.stock-changes {
  margin-bottom: 1rem;
}

.stock-recommendation {
  text-align: center;
}

.stock-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f3f4;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .stock-metrics {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .stock-card {
    padding: 1rem;
  }
  
  .stock-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .stock-price {
    text-align: left;
  }
} 

/* ===== YENİ KART TASARIMI ===== */

/* Assets Grid */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

/* Asset Card */
.asset-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

[data-theme="dark"] .asset-card {
  background: #121826;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

[data-theme="dark"] .asset-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}

.asset-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.asset-card.expanded {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}



/* Asset Header */
.asset-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e9ecef;
  position: relative;
}

[data-theme="dark"] .asset-header {
  background: linear-gradient(135deg, #0e1421 0%, #121826 100%);
  border-bottom-color: rgba(255,255,255,0.08);
}

.asset-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.gold-asset .asset-icon {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #8B4513;
}

.stock-asset .asset-icon {
  background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
  color: white;
}

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



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

.asset-name {
  margin: 0 0 0.4rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.2;
}

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

.asset-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.asset-quantity {
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
}

[data-theme="dark"] .asset-quantity {
  color: #b9c2cf;
}

.asset-currency {
  font-size: 0.75rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
}

[data-theme="dark"] .asset-currency {
  color: #a1aab6;
  background: #0e1421;
}

.asset-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.entry-date {
  text-align: right;
  font-size: 0.75rem;
}

/* Asset Details */
.asset-details {
  padding: 0.75rem 1rem;
  background: white;
}

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

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f8f9fa;
}

[data-theme="dark"] .detail-row {
  border-bottom-color: rgba(255,255,255,0.06);
}

.detail-row:last-child {
  border-bottom: none;
}

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

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

.detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: right;
}

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

/* Asset Performance */
.asset-performance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

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

.performance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.6rem;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e9ecef;
}

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

.performance-label {
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

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

.performance-value {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Asset Actions Toggle */
.asset-actions {
  padding: 0.75rem 1rem;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  opacity: 0;
}

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

.asset-card.expanded .asset-actions {
  max-height: 300px;
  opacity: 1;
}

.action-buttons-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.action-buttons-row .btn {
  flex: 1 1 100%;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  width: 500%;
}

/* Altın portföyü yönet butonları tam genişlik */
.gold-asset .asset-actions .action-buttons-row .btn {
  width: 100%;
  flex: 1 1 100%;
  max-width: none;
}

/* Hisse portföyü yönet butonları tam genişlik */
.stock-asset .asset-actions .action-buttons-row .btn {
  width: 100%;
  flex: 1 1 100%;
}

.action-buttons-row .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.action-buttons-row .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  color: white;
  text-decoration: none;
}

.action-buttons-row .btn-outline-secondary {
  background: white;
  border: 2px solid #6c757d;
  color: #6c757d;
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

[data-theme="dark"] .action-buttons-row .btn-outline-secondary {
  background: #121826;
  border-color: rgba(255,255,255,0.3);
  color: #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.action-buttons-row .btn-outline-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
  background: #6c757d;
  color: white;
  border-color: #6c757d;
}

[data-theme="dark"] .action-buttons-row .btn-outline-secondary:hover {
  background: #1a1f2e;
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.action-buttons-row .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

.action-buttons-row .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.35);
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  color: white;
  text-decoration: none;
}

.action-buttons-row .btn:active {
  transform: translateY(0);
}

.action-buttons-row .btn i {
  font-size: 1rem;
}

/* Special handling for 3-button layouts */
.action-buttons-row:has(.btn:nth-child(3):last-child) {
  justify-content: space-between;
}

.action-buttons-row:has(.btn:nth-child(3):last-child) .btn {
  flex: 1;
  max-width: none;
  min-width: 150px;
}

/* Fallback for browsers without :has() support */
.action-buttons-row .btn:nth-child(3):last-child {
  flex: 1;
  max-width: none;
  min-width: 150px;
}

/* Peers Section */
.peers-section {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e9ecef;
}

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

.peers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

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

.peers-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

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

.peers-loading {
  font-size: 0.75rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.peers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.peer-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: #495057;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.peer-item:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

[data-theme="dark"] .peer-item:hover {
  background: #1a1f2e;
  border-color: rgba(255,255,255,0.15);
}

.peer-item .peer-symbol {
  font-weight: 600;
  color: #2c3e50;
}

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

.peer-item .peer-change {
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.peer-item .peer-change.positive {
  color: #28a745;
}

.peer-item .peer-change.negative {
  color: #dc3545;
}

/* News Section Styles */
.news-section {
  border-top: 1px dashed rgba(0,0,0,0.08);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.news-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--dark-text);
}

.news-loading {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.news-loading i {
  animation: rotate 2s linear infinite;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background: #f8f9fa;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.news-item:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
}

[data-theme="dark"] .news-item {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .news-item:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.news-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #e9ecef;
}

/* Blur-up görseller */
.news-thumb.blur-up {
  filter: blur(8px);
  transform: scale(1.05);
}
.news-thumb.loaded {
  filter: blur(0);
  transform: none;
  transition: filter 300ms ease, transform 300ms ease;
}

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

.news-headline {
  font-weight: 600;
  line-height: 1.25;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--dark-text);
}

.news-meta {
  font-size: 0.75rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-source {
  font-weight: 500;
}

.news-separator {
  color: #adb5bd;
}

.news-date {
  color: #6c757d;
}

[data-theme="dark"] .news-date {
  color: #a1aab6;
}

.news-summary {
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.4;
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Design for Asset Actions */
@media (max-width: 768px) {
  .asset-actions {
    padding: 0.6rem 0.75rem;
  }
  
  .action-buttons-row {
    gap: 0.4rem;
    margin-bottom: 0.6rem;
  }
  
  .action-buttons-row .btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    flex: 1 1 100%;
    width: 100%;
  }
  
  .action-buttons-row .btn i {
    font-size: 0.9rem;
  }
  
  .peers-section {
    padding: 0.6rem;
  }
  
  .peers-title {
    font-size: 0.8rem;
  }
  
  .peers-loading {
    font-size: 0.7rem;
  }
  
  .peer-item {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }

  .news-section {
    margin-top: 0.75rem;
  }

  .news-title {
    font-size: 0.8rem;
  }

  .news-loading {
    font-size: 0.7rem;
  }

  .news-item {
    padding: 0.375rem;
    gap: 0.5rem;
  }

  .news-thumb {
    width: 40px;
    height: 40px;
  }

  .news-headline {
    font-size: 0.8rem;
  }

  .news-meta {
    font-size: 0.7rem;
  }

  .news-summary {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .asset-actions {
    padding: 0.5rem 0.6rem;
  }
  
  .action-buttons-row {
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
  }
  
  .action-buttons-row .btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    flex: 1 1 100%;
    width: 100%;
  }
  
  .action-buttons-row .btn i {
    font-size: 0.85rem;
  }
  
  .peers-section {
    padding: 0.5rem;
  }
  
  .peers-title {
    font-size: 0.75rem;
  }
  
  .peers-loading {
    font-size: 0.65rem;
  }
  
  .peer-item {
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
  }

  .news-section {
    margin-top: 0.5rem;
  }

  .news-title {
    font-size: 0.75rem;
  }

  .news-loading {
    font-size: 0.65rem;
  }

  .news-item {
    padding: 0.25rem;
    gap: 0.375rem;
  }

  .news-thumb {
    width: 36px;
    height: 36px;
  }

  .news-headline {
    font-size: 0.75rem;
  }

  .news-meta {
    font-size: 0.65rem;
  }

  .news-summary {
    font-size: 0.7rem;
  }
}

/* ===== YENİ HEADER TASARIMI ===== */

/* Portfolio Summary Cards */
.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: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-height: 80px;
}

/* Percent badge for summary values */
.percent-badge {
  margin-left: 0.4rem;
  font-weight: 700;
}

.summary-card-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.summary-card-item.total {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Combined Summary Card */
.summary-card-item.combined-summary {
  flex-direction: column;
  align-items: stretch;
  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);
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.summary-row {
  display: grid;
  gap: 1rem;
}

/* İlk satır: 2 sütun (USD, EUR) */
.summary-row:first-child {
  grid-template-columns: 1fr 1fr;
}

/* İkinci satır: 2 sütun (Altın, Hisse) */
.summary-row:nth-child(2) {
  grid-template-columns: 1fr 1fr;
}

/* İkinci satır TL nakit yoksa ortada hizalı */
.summary-details:has(.summary-row-single) .summary-row:nth-child(2) {
  grid-template-columns: 1fr 1fr;
}

.summary-details:not(:has(.summary-row-single)) .summary-row:nth-child(2) {
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  gap: 2rem;
}

/* Üçüncü satır: 1 sütun ortada (TL Nakit) */
.summary-row-single {
  grid-template-columns: 1fr;
  justify-items: center;
}

.summary-row-single .summary-item {
  max-width: 300px;
  width: 100%;
}

/* Altın fiyat güncelleme efekti - sadece tutar için */
@keyframes goldValueUpdate {
  0% { 
    color: inherit;
    transform: scale(1);
  }
  50% { 
    color: #ffc107;
    transform: scale(1.05);
  }
  100% { 
    color: inherit;
    transform: scale(1);
  }
}

.gold-value-updating {
  animation: goldValueUpdate 0.8s ease-in-out;
}

/* Döviz kuru güncelleme efekti */
.currency-value-updating {
  animation: currencyValueUpdate 0.8s ease-in-out;
}

@keyframes currencyValueUpdate {
  0% { 
    transform: scale(1);
    color: inherit;
  }
  20% { 
    transform: scale(1.05);
    color: #0d6efd;
    font-weight: 600;
  }
  50% { 
    transform: scale(1.02);
    color: #0d6efd;
    font-weight: 600;
  }
  100% { 
    transform: scale(1);
    color: inherit;
    font-weight: inherit;
  }
}

/* Sticky bar toplam tutar güncelleme efekti */
@keyframes stickyValueUpdate {
  0% { 
    transform: scale(1);
    color: inherit;
  }
  50% { 
    transform: scale(1.02);
    color: #667eea;
  }
  100% { 
    transform: scale(1);
    color: inherit;
  }
}

.sticky-value-updating {
  animation: stickyValueUpdate 0.6s ease-in-out;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.summary-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.summary-icon-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  flex-shrink: 0;
  color: white;
}

.summary-icon-small.usd {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.summary-icon-small.eur {
  background: linear-gradient(135deg, #0066CC 0%, #003d7a 100%);
  color: white;
}

.summary-icon-small.gold {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.summary-icon-small.stock {
  background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
}

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

.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;
}

/* Update Info Cards */
.update-info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0 0.5rem;
}

.update-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.6rem;
  padding: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.update-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.update-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  flex-shrink: 0;
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

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

.update-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.update-time {
  font-size: 0.85rem;
  color: white;
  font-weight: 600;
}

.update-time small {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.update-status {
  font-size: 0.85rem;
}

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

.btn-refresh {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.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;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.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);
}

/* 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 {
    padding: 0.6rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .summary-card-item.combined-summary {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .summary-header {
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .summary-details {
    gap: 0.75rem;
  }
  
  .summary-row {
    gap: 0.75rem;
  }
  
  /* Mobilde ikinci satır 2 sütun kalacak */
  .summary-row:nth-child(2) {
    grid-template-columns: 1fr 1fr;
  }
  
  /* İkinci satır TL nakit yoksa ortada hizalı */
  .summary-details:not(:has(.summary-row-single)) .summary-row:nth-child(2) {
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 1.5rem;
  }
  
  /* Üçüncü satır ortada */
  .summary-row-single {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  
  .summary-row-single .summary-item {
    max-width: 280px;
    width: 100%;
  }
  
  .summary-item {
    padding: 0.6rem;
    gap: 0.6rem;
  }
  
  .summary-icon-small {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  
  .summary-label-small {
    font-size: 0.65rem;
  }
  
  .summary-value-small {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .portfolio-summary-cards {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0 0.4rem;
  }
  
  .summary-card-item {
    padding: 0.5rem;
    flex-direction: row;
    text-align: left;
    gap: 0.6rem;
  }
  
  .summary-card-item.combined-summary {
    padding: 0.75rem;
    gap: 0.6rem;
  }
  
  .summary-header {
    gap: 0.6rem;
    padding-bottom: 0.6rem;
  }
  
  .summary-details {
    gap: 0.6rem;
  }
  
  .summary-row {
    gap: 0.6rem;
  }
  
  /* Küçük mobilde ikinci satır 2 sütun */
  .summary-row:nth-child(2) {
    grid-template-columns: 1fr 1fr;
  }
  
  /* İkinci satır TL nakit yoksa ortada hizalı */
  .summary-details:not(:has(.summary-row-single)) .summary-row:nth-child(2) {
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 1rem;
  }
  
  /* Üçüncü satır ortada */
  .summary-row-single {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  
  .summary-row-single .summary-item {
    max-width: 260px;
    width: 100%;
  }
  
  .summary-item {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .summary-icon-small {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  
  .summary-label-small {
    font-size: 0.6rem;
  }
  
  .summary-value-small {
    font-size: 0.75rem;
  }
}

/* Show More Button */
.show-more-btn {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
  color: #6c757d !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  background: #e9ecef !important;
  border-color: #adb5bd !important;
  color: #495057 !important;
  transform: translateY(-1px);
}

.show-more-btn.expanded {
  background: #e9ecef !important;
  border-color: #adb5bd !important;
  color: #495057 !important;
}

.show-more-text {
  font-size: 0.75rem;
  font-weight: 500;
}

.show-more-btn i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.show-more-btn.expanded i {
  transform: rotate(180deg);
}

/* Combined Update Card */
.update-card.combined-update {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
}

.update-card.combined-update .update-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.update-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.update-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.update-item .update-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.update-item .update-time {
  font-size: 0.75rem;
  color: white;
  font-weight: 600;
  text-align: right;
}

.update-item .update-time small {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin-left: 0.25rem;
}

.update-item .update-status {
  font-size: 0.8rem;
}

.update-item .update-status .badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
}

/* Collapsible Header */
.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 .header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.collapsible-header .api-info {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
}

.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:hover .toggle-icon {
  color: #495057;
}

/* Add subtle border and shadow to indicate clickable area */
.collapsible-header {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.collapsible-header:hover {
  border-left-color: #667eea;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Remove the "Tıklayın" text to avoid overlap */
.collapsible-header::after {
  display: none;
}

/* Ensure proper positioning */
.card-header-custom {
  position: relative;
}

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

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

.icon-chart {
  color: #6f42c1;
}

/* Chart Body Styles */
.chart-body {
  padding: 1.5rem;
  background: #ffffff;
}

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

.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

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

.period-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.period-selector .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.4rem;
  transition: all 0.2s ease;
}

.period-selector .btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.period-selector .btn:hover:not(.active) {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: white;
  border-radius: 0.3rem;
  border: 1px solid #e9ecef;
}

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

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.legend-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
}

[data-theme="dark"] .legend-text {
  color: white;
}

.chart-container {
  position: relative;
  height: 420px;
  margin: 1rem 0;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e9ecef;
  padding: 1rem;
}

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

/* Hareketi azalt tercihine saygı göster (erişilebilirlik) */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  #last-update-timer i.bi-hourglass-split {
    animation: none !important;
  }
  .pulse-animation {
    animation: none !important;
  }
}

/* Chart Stats using existing summary-stats styles */
.chart-body .summary-stats {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.chart-body .summary-stats .summary-stat {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1rem;
  transition: all 0.2s ease;
  text-align: center;
}

[data-theme="dark"] .chart-body .summary-stats .summary-stat {
  background: #0e1421;
  border-color: rgba(255,255,255,0.08);
}

.chart-body .summary-stats .summary-stat:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

[data-theme="dark"] .chart-body .summary-stats .summary-stat:hover {
  background: #1a1f2e;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.chart-body .summary-stats .summary-label-small {
  color: #495057;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

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

.chart-body .summary-stats .summary-value-small {
  color: #212529;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
}

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

.chart-body .summary-stats .summary-icon-small {
  color: #6c757d;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.chart-body .summary-stats .summary-icon-small.gold {
  color: white;
}

.chart-body .summary-stats .summary-icon-small.stock {
  color: white;
}

.chart-body .summary-stats .summary-icon-small.total {
  color: #4BC0C0;
}

.chart-body .summary-stats .summary-icon-small.info {
  color: #6c757d;
}

/* Data count card - single card below */
.chart-body .summary-stats .summary-stat:last-child {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.chart-body .summary-stats .summary-stat:last-child .summary-icon-small {
  margin-bottom: 0;
  font-size: 1rem;
}

.chart-body .summary-stats .summary-stat:last-child .summary-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-body .summary-stats .summary-stat:last-child .summary-label-small {
  margin-bottom: 0;
  font-size: 0.875rem;
}

[data-theme="dark"] .chart-body .summary-stats .summary-stat:last-child .summary-label-small {
  color: #e9ecef;
}

.chart-body .summary-stats .summary-stat:last-child .summary-value-small {
  font-size: 1rem;
}

[data-theme="dark"] .chart-body .summary-stats .summary-stat:last-child .summary-value-small {
  color: #ffffff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chart-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .period-selector {
    justify-content: center;
  }
  
  .chart-legend {
    justify-content: center;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .chart-body {
    padding: 1rem;
  }
  
  .chart-body .summary-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child {
    grid-column: 1 / -1;
    max-width: none;
    margin: 0;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-icon-small {
    margin-bottom: 0;
    font-size: 0.9rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-label-small {
    margin-bottom: 0;
    font-size: 0.8rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-value-small {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .period-selector .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
  
  .legend-item {
    padding: 0.2rem 0.4rem;
  }
  
  .legend-text {
    font-size: 0.75rem;
  }
  
  .chart-container {
    height: 250px;
  }
  
  .chart-body .summary-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }
  
  .chart-body .summary-stats .summary-stat {
    padding: 0.5rem;
  }
  
  .chart-body .summary-stats .summary-stat .summary-label-small {
    font-size: 0.7rem;
  }
  
  .chart-body .summary-stats .summary-stat .summary-value-small {
    font-size: 0.8rem;
  }
  
  .chart-body .summary-stats .summary-stat .summary-icon-small {
    font-size: 1rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child {
    grid-column: 1 / -1;
    max-width: none;
    margin: 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-icon-small {
    margin-bottom: 0;
    font-size: 0.8rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-text {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-label-small {
    margin-bottom: 0;
    font-size: 0.75rem;
  }
  
  .chart-body .summary-stats .summary-stat:last-child .summary-value-small {
    font-size: 0.8rem;
  }
}


.asset-card.expanded .asset-actions {
  max-height: none;         /* yükseklik kısıtını kaldır */
  overflow: visible;        /* içeriği kesme */
  opacity: 1;
}

/* Buton satırı her durumda görünsün */
.asset-actions .action-buttons-row {
  display: flex !important;
}

/* Large screen breakpoint for better button layout */
@media (max-width: 1200px) {
  .action-buttons-row {
    gap: 0.4rem;
  }
  
  .action-buttons-row .btn {
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
    min-width: 140px;
    max-width: 180px;
  }
  
  .action-buttons-row .btn i {
    font-size: 0.9rem;
  }
}

/* Tablet breakpoint for better button layout */
@media (max-width: 1024px) {
  .action-buttons-row {
    gap: 0.4rem;
  }
  
  .action-buttons-row .btn {
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
    min-width: 120px;
    max-width: 160px;
  }
  
  .action-buttons-row .btn i {
    font-size: 0.9rem;
  }
}


/* Market selector buttons */
.market-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.market-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.market-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.market-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.market-btn i {
  font-size: 1rem;
  opacity: 0.8;
}

.market-btn.active i {
  opacity: 1;
}

.market-text {
  font-weight: 500;
}

@media (max-width: 768px) {
  .market-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
  }
  
  .market-btn .market-text {
    display: none;
  }
  
  .market-btn i {
    font-size: 1.1rem;
  }
}

/* Altın Grafik Modal Stilleri */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
}

[data-theme="dark"] .modal-content {
  background-color: #1a1f2e;
  color: #e9ecef;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

[data-theme="dark"] .modal-header {
  border-bottom-color: #2d3748;
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.modal-header h5 {
  margin: 0;
  font-weight: 600;
  color: #2d3748;
  font-size: 1.25rem;
}

[data-theme="dark"] .modal-header h5 {
  color: #e9ecef;
}

.modal-header .btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header .btn-close:hover {
  background-color: #e9ecef;
  color: #495057;
}

[data-theme="dark"] .modal-header .btn-close {
  color: #a0aec0;
}

[data-theme="dark"] .modal-header .btn-close:hover {
  background-color: #2d3748;
  color: #e9ecef;
}

.modal-body {
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

[data-theme="dark"] .modal-body {
  background-color: #1a1f2e;
}

#goldChartContainer {
  width: 100%;
  min-height: 400px;
}

#chart {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

/* Dark mode chart stilleri */
[data-theme="dark"] #chart {
  background-color: #1a1f2e;
}

/* Chart canvas stilleri */
#chart canvas {
  border-radius: 8px;
}

/* Loading spinner */
.spin {
  animation: spin 1s linear infinite;
}

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

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-header h5 {
    font-size: 1.1rem;
  }
}

/* Zaman Aralığı Butonları - Genel tasarımla uyumlu */
.chart-period-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chart-period-selector .btn-group {
  display: flex;
  gap: 0.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-wrap: wrap;
}

.chart-period-selector .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  min-width: 80px;
  border: 2px solid #6c757d;
  background: white;
  color: #6c757d;
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.chart-period-selector .btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.chart-period-selector .btn i {
  font-size: 1rem;
}

/* Dark tema buton stilleri */
[data-theme="dark"] .chart-period-selector .btn {
  background: #121826;
  border-color: rgba(255,255,255,0.3);
  color: #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .chart-period-selector .btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

/* Metric butonları için özel stiller */
.metric-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  min-width: 100px;
  border: 2px solid #6c757d;
  background: white;
  color: #6c757d;
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.metric-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.metric-btn i {
  font-size: 1rem;
}

/* Dark tema metric buton stilleri */
[data-theme="dark"] .metric-btn {
  background: #121826;
  border-color: rgba(255,255,255,0.3);
  color: #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .metric-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

/* Chart container yükseklik ayarları */
.chart-container {
  position: relative;
  height: 420px;
  width: 100%;
  margin: 1rem 0;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e9ecef;
  padding: 1rem;
  overflow: hidden;
}

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

/* Modal içindeki chart container */
.modal-body .chart-container {
  height: 400px;
  max-height: 60vh;
}

/* Değer artış grafiği için özel stiller - altın grafiği ile aynı */
.value-increase-chart .chart-container {
  height: 420px;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e9ecef;
  padding: 1rem;
  margin: 1rem 0;
}

[data-theme="dark"] .value-increase-chart .chart-container {
  background: #0e1421;
  border-color: rgba(255,255,255,0.08);
}

/* Değer artış grafiği chart body stilleri */
.value-increase-chart .chart-body {
  padding: 1.5rem;
  background: #ffffff;
}

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

/* Değer artış grafiği chart controls stilleri */
.value-increase-chart .chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

[data-theme="dark"] .value-increase-chart .chart-controls {
  background: #0e1421;
  border-color: rgba(255,255,255,0.08);
}

/* Altın grafiği için özel stiller - değer artış grafiği ile aynı */
#goldChartModal .chart-container {
  height: 420px;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e9ecef;
  padding: 1rem;
  margin: 1rem 0;
}

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

/* Altın grafiği chart body stilleri */
#goldChartModal .chart-body {
  padding: 1.5rem;
  background: #ffffff;
}

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

/* Altın grafiği chart controls stilleri */
#goldChartModal .chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

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

/* Mobil responsive buton stilleri */
@media (max-width: 768px) {
  .chart-period-selector {
    margin-bottom: 1rem;
    gap: 0.5rem;
  }
  
  .chart-period-selector .btn-group {
    gap: 0.3rem;
  }
  
  .chart-period-selector .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 70px;
    gap: 0.3rem;
  }
  
  .chart-period-selector .btn i {
    font-size: 0.9rem;
  }
  
  .metric-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 85px;
    gap: 0.3rem;
  }
  
  .metric-btn i {
    font-size: 0.9rem;
  }
  
  .chart-container {
    height: 350px;
  }
  
  .value-increase-chart .chart-container {
    height: 350px;
  }
  
  #goldChartModal .chart-container {
    height: 350px;
  }
  
  .modal-body .chart-container {
    height: 350px;
    max-height: 50vh;
  }
}

@media (max-width: 480px) {
  .chart-period-selector {
    margin-bottom: 0.75rem;
    gap: 0.4rem;
  }
  
  .chart-period-selector .btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    min-width: 60px;
  }
  
  .chart-period-selector .btn i {
    font-size: 0.8rem;
  }
  
  .metric-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    min-width: 75px;
  }
  
  .metric-btn i {
    font-size: 0.8rem;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .value-increase-chart .chart-container {
    height: 300px;
  }
  
  #goldChartModal .chart-container {
    height: 300px;
  }
  
  .modal-body .chart-container {
    height: 300px;
    max-height: 45vh;
  }
}

/* Loading spinner */
.spin {
  animation: spin 1s linear infinite;
}
