:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666666;
  --border: #dddddd;
  --accent: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
}

h1, h2 {
  line-height: 1.2;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

th, td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}

input, select, button {
  font-size: 1rem;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.entry-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.table-scroll {
  overflow-x: auto;
}

.entry-row label {
  flex: 1 1 120px;
}

@media (max-width: 480px) {
  .entry-row {
    flex-direction: column;
    align-items: stretch;
  }
}
