/* Base styles and variables */
:root {
  --primary-color: #3366ff;
  --primary-hover: #2952cc;
  --light-bg: #f8f9fa;
  --card-bg: #ffffff;
  --income-color: #28a745;
  --expense-color: #dc3545;
  --balance-color: #3366ff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: var(--light-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header styles */
.primary-header {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.logo-circle {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-display {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Dashboard card styles */
.dashboard-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  height: 100%;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-right: 1rem;
  color: white;
}

.dashboard-card.income .card-icon {
  background-color: var(--income-color);
}

.dashboard-card.expense .card-icon {
  background-color: var(--expense-color);
}

.dashboard-card.balance .card-icon {
  background-color: var(--balance-color);
}

.dashboard-card.transactions .card-icon {
  background-color: #6610f2;
}

.card-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  margin-bottom: 0.3rem;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* App card styles for sections */
.app-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Chart styles */
canvas {
  max-height: 250px;
  width: 100%;
}

.chart-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Transaction table styles */
.transaction-table-container {
  position: relative;
}

.transaction-table {
  border-collapse: separate;
  border-spacing: 0;
}

.transaction-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom-width: 1px;
  padding: 0.75rem;
}

.transaction-table td {
  padding: 0.75rem;
  border-top: none;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.search-container {
  position: relative;
  width: 250px;
}

.search-container input {
  padding-left: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

/* Empty state styles */
#no-transactions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
}

.empty-state-icon {
  color: var(--text-secondary);
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Action button styles */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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

.action-btns .btn {
  padding: 0.25rem 0.5rem;
}

/* Footer styles */
.footer {
  margin-top: auto;
  background-color: #24292e;
  color: #ffffff;
}

.footer-icons {
  display: flex;
  gap: 0.5rem;
}

.footer-icon-btn {
  color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.footer-icon-btn:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Transaction item animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.transaction-item {
  animation: fadeIn 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-card {
    margin-bottom: 1rem;
  }
  
  .search-container {
    width: 100%;
    margin-top: 1rem;
  }
}