/* styles.css = presentation only. No business logic here (easier QA: "layout bug" vs "calculation bug"). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.5;
}

.page-header {
  padding: 1.5rem 1.25rem 0.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0;
  color: #94a3b8;
  max-width: 60ch;
}

.layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .layout {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

form {
  display: grid;
  gap: 0.65rem;
}

label {
  font-size: 0.9rem;
  color: #cbd5e1;
}

input,
select,
button {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0b1220;
  color: #e2e8f0;
}

button {
  cursor: pointer;
  border-color: #38bdf8;
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  color: #0b1220;
  font-weight: 600;
}

button.secondary {
  border-color: #475569;
  background: #1f2937;
  color: #e2e8f0;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.message {
  min-height: 1.25rem;
  margin: 0.5rem 0 0;
  color: #fbbf24;
}

.expense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.expense-table th,
.expense-table td {
  border-bottom: 1px solid #1f2937;
  padding: 0.55rem 0.45rem;
  text-align: left;
}

.expense-table tfoot th,
.expense-table tfoot td {
  border-bottom: none;
  font-weight: 700;
}

.hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}
