@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131c2e;
  --bg-card: rgba(20, 30, 54, 0.6);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-indigo: #6366f1;
  --font-family: 'Outfit', sans-serif;
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(12px);
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Hide scrollbars globally but keep functionality */
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

* {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.5rem calc(5rem + env(safe-area-inset-bottom, 0px)) 1.5rem;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  touch-action: pan-x pan-y; /* completely disables double-tap zoom globally */
}

/* App Container */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
}

.scrollable-content {
  width: 100%;
}

/* Glassmorphism Card style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Header styling */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.logo-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Base currency button select styles */
.currency-selector-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.currency-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 7px;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.currency-btn.active {
  background: var(--accent-emerald);
  color: #0b0f19;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.currency-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Quick summary cards grid */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  margin-bottom: 2rem;
}

.summary-card-single {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.75rem;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--accent-indigo);
  transition: border-color 0.3s ease, transform 0.2s ease;
  gap: 0.5rem;
}

.summary-card-single:hover {
  transform: translateY(-2px);
}

.summary-card-single .summary-label {
  font-size: 0.9rem;
}

.summary-card-single .summary-value {
  font-size: 2.25rem;
  margin-top: 0.25rem;
}

.summary-card-single .summary-change {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.summary-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
  word-break: break-all;
}

.summary-change {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.summary-change.up { color: var(--accent-emerald); }
.summary-change.down { color: var(--accent-rose); }

/* Main layout sections */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Charts and visuals */
.chart-container {
  position: relative;
  height: 250px;
  width: 100%;
  min-width: 0; /* stops Chart.js canvas from stretching the grid cell */
}

.charts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

@media (max-width: 768px) {
  .charts-row {
    grid-template-columns: minmax(0, 1fr);
  }
  
  body {
    padding: 1rem 1rem 5rem 1rem;
  }
}

/* Tabs implementation for assets */
.assets-section {
  display: flex;
  flex-direction: column;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  gap: 1rem;
  overflow-x: auto !important;
  overflow-y: hidden !important; /* completely blocks vertical scrolling/bouncing in the tab list */
  scrollbar-width: none;
  touch-action: pan-x !important; /* restricts touch gestures to horizontal panning only */
}

.tabs-header::-webkit-scrollbar {
  display: none;
}

.tab-link {
  color: var(--text-secondary);
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  font-family: var(--font-family);
  transition: color 0.2s ease;
}

.tab-link.active {
  color: var(--accent-emerald);
}

.tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.tab-link:hover:not(.active) {
  color: var(--text-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Responsive Table layout */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.02);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.text-right {
  text-align: right;
}

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

.broker-badge {
  display: inline-block;
  white-space: nowrap;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-emerald);
  color: #0b0f19;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
  background: var(--accent-rose);
  color: #0b0f19;
}

.btn-action {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  color-scheme: dark; /* Forces native browser elements (like select dropdowns) to render in dark mode */
}

.form-control option {
  background-color: #111827; /* Matches the modal backdrop */
  color: var(--text-primary); /* Ensures white text */
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* History lists / snapshot updates */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.85rem;
}

.history-info {
  display: flex;
  flex-direction: column;
}

.history-date {
  font-weight: 600;
  color: var(--text-primary);
}

.history-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.history-val {
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Floating Install button for PWA */
.pwa-badge {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-cyan) 100%);
  color: #0b0f19;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
  cursor: pointer;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.error {
  border-left: 4px solid var(--accent-rose);
}

/* Responsive bottom actions for PWA layout - Styled like Apple Tab bar with safe area */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 15, 25, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 1.5rem;
  display: none;
  justify-content: space-around;
  z-index: 900;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.bottom-nav button, 
button, 
select, 
input, 
a, 
.tab-link, 
.currency-btn {
  touch-action: manipulation !important; /* completely disables double-tap zoom delay */
}

@media (max-width: 600px) {
  html, body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden !important;
  }

  body {
    padding: 0 !important;
  }
  
  .app-container {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .bottom-nav {
    display: flex;
  }
  
  header {
    position: relative !important; /* no longer sticky since container limits height */
    z-index: 950 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 0 16px 16px !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px)) !important;
    background: rgba(11, 18, 33, 0.82) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.85rem;
    flex-shrink: 0;
  }

  .scrollable-content {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0.85rem calc(6.5rem + env(safe-area-inset-bottom, 0px)) 0.85rem;
  }
  
  .logo-section {
    justify-content: center;
  }
  
  .header-actions {
    flex-direction: column; /* stacks Yükle button and currency selector vertically */
    justify-content: center;
    width: 100%;
    gap: 0.75rem;
  }
  
  .pwa-badge {
    width: 100%;
    justify-content: center;
  }

  .currency-selector-group {
    width: 100%;
    justify-content: space-around;
  }

  .currency-btn {
    flex-grow: 1;
    text-align: center;
    padding: 0.4rem 0.25rem;
    font-size: 0.8rem;
  }

  .summary-card-single {
    min-height: 120px;
    padding: 1.25rem;
  }

  .summary-card-single .summary-value {
    font-size: 1.85rem !important;
  }

  .modal-content {
    padding: 1.25rem;
    border-radius: 12px;
    margin: 10px;
    width: calc(100% - 20px);
  }

  .charts-row {
    gap: 1.5rem;
  }
  
  .chart-container {
    height: 220px;
  }

  /* Prevent chart control overflow on very small devices */
  .chart-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .chart-select {
    width: 100% !important;
    height: 34px !important;
  }

  .time-range-group {
    width: 100% !important;
    justify-content: space-around !important;
  }

  .time-range-group .btn-action {
    flex-grow: 1 !important;
    text-align: center !important;
  }

  /* Prevent column squishing inside tab tables */
  .table-responsive table {
    min-width: 580px !important; /* enforces smooth horizontal scroll inside the card */
  }

  /* Specific height expansion for history chart box to avoid squishing of stacked elements */
  .chart-container.history-chart-box {
    height: 350px !important; 
  }
}

/* Transaction history badge styles */
.tx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.tx-badge.tx-up {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.2);
}

.tx-badge.tx-down {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.2);
}

.tx-badge.tx-edit {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  border-color: rgba(99, 102, 241, 0.2);
}

/* Chart controls styling */
.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.chart-select {
  width: auto !important;
  height: 32px !important;
  padding: 0.2rem 0.5rem !important;
  font-size: 0.8rem !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--border-color) !important;
  border-radius: 6px !important;
  color: var(--text-primary) !important;
}

.time-range-group {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.15rem;
  gap: 0.15rem;
}

.time-range-group .btn-action {
  padding: 0.2rem 0.5rem !important;
  font-size: 0.75rem !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
}

.time-range-group .btn-action.active {
  background: var(--accent-emerald) !important;
  color: #0b0f19 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4) !important;
}

/* Time Machine Glass Indicator Styling */
.time-machine-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  animation: pulse-border 2s infinite ease-in-out;
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.25);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.tm-pulse-icon {
  font-size: 1rem;
  animation: tm-spin 4s infinite linear;
}

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

/* Dual canvas frozen Y-axis scroll layout styles */
.dual-chart-container {
  display: flex;
  width: 100%;
  height: 180px;
  position: relative;
  overflow: visible;
  margin-top: 0.5rem;
}

.chart-y-axis-container {
  width: 70px;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  background: rgba(19, 28, 46, 0.85); /* Solid backing so scrolling line doesn't peek behind ticks */
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-y-axis-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.chart-scroll-viewport {
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  position: relative;
  scrollbar-width: thin;
}

.chart-scroll-content {
  height: 100%;
}

.chart-scroll-viewport::-webkit-scrollbar {
  height: 4px !important;
  display: block !important;
}

.chart-scroll-viewport::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.3) !important; /* Elegant emerald scrollbar thumb */
  border-radius: 4px !important;
}

.chart-scroll-viewport::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01) !important;
}

/* Yenile Butonu Spinner Animasyonu */
@keyframes spin-anim {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinning {
  display: inline-block;
  animation: spin-anim 1s linear infinite;
}

/* Bottom Navigation Tab Button Styles */
.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-family);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.nav-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-tab-btn:hover .nav-icon {
  color: var(--text-primary);
}

.nav-tab-btn.active {
  color: var(--accent-emerald);
}

.nav-tab-btn.active .nav-icon {
  color: var(--accent-emerald);
  transform: scale(1.15);
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.45));
}

@media (max-width: 600px) {
  /* Hide sections belonging to other tabs */
  body[data-active-tab] #summary-section,
  body[data-active-tab] #charts-block,
  body[data-active-tab] #assets-block,
  body[data-active-tab] #transactions-block,
  body[data-active-tab] #data-management-block {
    display: none !important;
  }

  /* Show only active tab sections */
  body[data-active-tab="dashboard"] #summary-section {
    display: grid !important;
  }
  body[data-active-tab="dashboard"] #charts-block {
    display: block !important;
  }
  body[data-active-tab="assets"] #assets-block {
    display: flex !important;
  }
  body[data-active-tab="history"] #transactions-block {
    display: flex !important;
  }
  body[data-active-tab="data"] #data-management-block {
    display: flex !important;
  }

  /* Hide entire grid columns that have no active contents to avoid empty spacing and layout gaps */
  body[data-active-tab="dashboard"] .main-grid > section:last-of-type,
  body[data-active-tab="assets"] .main-grid > section:last-of-type {
    display: none !important;
  }

  body[data-active-tab="history"] .main-grid > section:first-of-type,
  body[data-active-tab="data"] .main-grid > section:first-of-type {
    display: none !important;
  }
}



