/**
 * HomFin - Ana Stil Dosyası
 */

:root {
  /* Ana Renkler */
  --primary: #F97316;
  --success: #22C55E;
  --danger: #DC2626;
  --accent: #FFEDD5;
  --background: #FFF7ED;
  --card: #FFFFFF;
  --text-primary: #3F3F46;
  --text-muted: #A1A1AA;
  
  /* Gölgeler */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Kenar Yuvarlaklığı */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 1rem;
}

/* Koyu Tema */
[data-theme="dark"] {
  --primary: #F97316;
  --success: #22C55E;
  --danger: #DC2626;
  --accent: #451A03;
  --background: #1C1917;
  --card: #292524;
  --text-primary: #F5F5F5;
  --text-muted: #A8A29E;
}

body {
  font-family: 'Inter', 'Manrope', 'Open Sans', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Temel stiller */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #EA580C; /* Darker orange */
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #EA580C;
  border-color: #EA580C;
}

.btn-success {
  background-color: var(--success);
  border-color: var(--success);
}

.btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
}

/* Card Stilleri */
.card {
  background-color: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: none;
}

.card-header {
  background-color: var(--card);
  border-bottom: 1px solid var(--accent);
  font-weight: 600;
}

/* Form Öğeleri */
.form-control, .form-select {
  background-color: var(--card);
  border: 1px solid var(--accent);
  color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.25);
}

/* Tablo Stilleri */
.table {
  color: var(--text-primary);
}

.table-hover tbody tr:hover {
  background-color: var(--accent);
}

/* Navbar */
.navbar {
  background-color: var(--card);
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary);
}

.nav-link {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

/* Ana İçerik */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 1rem 0;
  background-color: var(--card);
  color: var(--text-muted);
  border-top: 1px solid var(--accent);
}

/* Login ekranı */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  max-width: 400px;
  width: 100%;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* Dashboard */
.dashboard-stats {
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-card.income {
  background-color: rgba(34, 197, 94, 0.1);
  border-left: 4px solid var(--success);
}

.stat-card.expense {
  background-color: rgba(220, 38, 38, 0.1);
  border-left: 4px solid var(--danger);
}

.stat-card.balance {
  background-color: rgba(249, 115, 22, 0.1);
  border-left: 4px solid var(--primary);
}

/* Grafikler */
.chart-container {
  background-color: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

/* Kategoriler */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.category-icon {
  margin-right: 0.5rem;
}

/* Harcama ve Gelir Detayları */
.transaction-list {
  margin-bottom: 2rem;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--accent);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-details {
  display: flex;
  align-items: center;
}

.transaction-category {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.transaction-text h5 {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.transaction-text p {
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.transaction-amount {
  font-weight: 600;
}

.transaction-amount.income {
  color: var(--success);
}

.transaction-amount.expense {
  color: var(--danger);
}

/* Ayarlar */
.settings-section {
  margin-bottom: 2rem;
}

.settings-section h4 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent);
}

/* Bildirimler */
.notification-item {
  padding: 1rem;
  border-bottom: 1px solid var(--accent);
  transition: background-color 0.3s ease;
}

.notification-item:hover {
  background-color: var(--accent);
}

.notification-item.unread {
  border-left: 3px solid var(--primary);
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .stat-card h3 {
    font-size: 1.5rem;
  }
  
  .transaction-category {
    width: 32px;
    height: 32px;
  }
  
  .transaction-text h5 {
    font-size: 0.9rem;
  }
}

/* PWA Özellikleri */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--card);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.pwa-install-banner.show {
  transform: translateY(0);
}

.pwa-app-icon {
  width: 48px;
  height: 48px;
  margin-right: 1rem;
  border-radius: var(--radius);
}

/* Animasyonlar */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

.slide-up {
  animation: slideUp 0.5s ease-in-out;
}

/* Yükleme Ekranı */
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--background);
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--accent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* EV Tipi - Ortak Harcamalar */
.shared-expense-badge {
  background-color: var(--accent);
  color: var(--primary);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
}

/* Tema toggle butonu */
.theme-toggle {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--accent);
}

/* Tooltip */
.tooltip-inner {
  background-color: var(--card);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--accent);
}

.bs-tooltip-auto[x-placement^=top] .arrow::before,
.bs-tooltip-top .arrow::before {
  border-top-color: var(--accent);
}

/* Bütçe Göstergeleri */
.budget-progress {
  height: 8px;
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
}

.budget-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.budget-spent {
  color: var(--text-muted);
}

.budget-limit {
  font-weight: 600;
}

/* Geç Ödeme Uyarısı */
.overdue-warning {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
}
