* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #111827;
  color: #e2e8f0;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #10b981;
}

.subtitle {
  color: #94a3b8;
  font-size: 1rem;
}

.loading {
  text-align: center;
  padding: 4rem;
  font-size: 1.25rem;
  color: #94a3b8;
}

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

.stat-card {
  background: #1f2937;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
  transition: transform 0.2s;
}

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

.stat-card.green {
  border-left-color: #10b981;
}

.stat-card.blue {
  border-left-color: #3b82f6;
}

.stat-card.red {
  border-left-color: #ef4444;
}

.stat-card.yellow {
  border-left-color: #f59e0b;
}

.stat-card h3 {
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 1.875rem;
  font-weight: bold;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.stat-card .label {
  color: #64748b;
  font-size: 0.875rem;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 500;
}

.filter-group select,
.filter-group input {
  background: #1f2937;
  border: 1px solid #374151;
  color: #e2e8f0;
  padding: 0.625rem;
  border-radius: 6px;
  min-width: 200px;
  font-size: 0.875rem;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.table-container {
  background: #1f2937;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #111827;
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-top: 1px solid #374151;
  color: #e2e8f0;
}

.font-medium {
  font-weight: 500;
}

.status {
  padding: 0.375rem 0.875rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  display: inline-block;
}

.status-paid {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.status-sent {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.status-partial {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.status-overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.status-draft {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.amount {
  font-weight: 600;
  color: #10b981;
}

.btn {
  background: #10b981;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: #059669;
}

.btn-small {
  background: #10b981;
  color: white;
  border: none;
  padding: 0.375rem 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-small:hover {
  background: #059669;
}
