body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* Layout */
.container {
  max-width: 1000px;
  margin: auto;
}

/* Cards */
.card {
  background: #1e293b;
  padding: 20px;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.subtitle {
  text-align: center;
  color: #94a3b8;
  margin-top: -10px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Upload */
.upload-card {
  text-align: center;
  padding-top: 30px;
  padding-bottom: 30px;
}

.upload-dropzone {
  border: 2px dashed #475569;
  border-radius: 12px;
  padding: 30px 20px;
  background: #0f172a;
  transition: 0.2s ease;
  cursor: pointer;
}

.upload-dropzone.dragover {
  border-color: #3b82f6;
  background: #1e3a8a;
  transform: scale(1.02);
}

.upload-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-subtext {
  color: #94a3b8;
  margin-bottom: 16px;
  font-size: 14px;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

input, button {
  padding: 10px;
  margin-top: 10px;
}

button {
  cursor: pointer;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  transition: 0.2s;
}

#analyzeButton {
  min-width: 140px;
}

button:hover {
  background: #2563eb;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#fileInput {
  margin-bottom: 10px;
  text-align: center;
  display: none;
}

.selected-file {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 14px;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.summary-item {
  background: #334155;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

/* Highlight important numbers */
.income {
  color: #22c55e;
}

.expense {
  color: #ef4444;
}

.net-positive {
  color: #22c55e;
}

.net-negative {
  color: #ef4444;
}

/* Categories */
#categoryList div {
  padding: 6px 0;
  border-bottom: 1px solid #334155;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.table-controls {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.table-controls input,
.table-controls select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #e2e8f0;
}

.monthly-breakdown-card {
  background: #334155;
  margin-bottom: 16px;
}

#monthlyBreakdown div {
  padding: 6px 0;
  border-bottom: 1px solid #475569;
}

th {
  background: #334155;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #334155;
  text-align: left;
}

/* Positive/Negative coloring */
.amount-positive {
  color: #22c55e;
}

.amount-negative {
  color: #ef4444;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.chart-box {
  background: #334155;
  padding: 16px;
  border-radius: 10px;
}

.chart-box h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
}

canvas {
  max-width: 100%;
  background: #1e293b;
  border-radius: 8px;
  padding: 10px;
}
@media (max-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .table-controls {
    grid-template-columns: 1fr;
  }
}
td.amount-positive,
td.amount-negative {
  text-align: right;
  font-weight: 500;
}
.status-loading {
  background: #1e40af;
  color: white;
  border-left: 4px solid #60a5fa;
}

.status-error {
  background: #7f1d1d;
  color: white;
  border-left: 4px solid #f87171;
}

.status-success {
  background: #14532d;
  color: white;
  border-left: 4px solid #4ade80;
}
.amount-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-wrapper {
  overflow-x: auto;
}
