:root {
  --blue: #0277bd;
  --blue-dark: #01579b;
  --aqua: #e1f5fe;
  --ink: #102a43;
  --muted: #627d98;
  --line: #d9e2ec;
  --danger: #c62828;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f0f9ff 0%, #f7fbff 100%);
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 32px 16px 8px;
}

h1 { margin: 0; font-size: 2rem; color: var(--blue-dark); }
.subtitle { color: var(--muted); margin: 6px 0 0; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(2, 119, 189, 0.06);
  margin-bottom: 24px;
}

.card h2 { margin: 0 0 14px; font-size: 1.15rem; }

form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
}

textarea { resize: vertical; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.15);
}

.row { display: flex; gap: 12px; }
.row .grow { flex: 1; }
@media (max-width: 480px) { .row { flex-direction: column; } }

.actions { display: flex; gap: 10px; }

button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  padding: 10px 18px;
  border: none;
  background: var(--blue);
  color: #fff;
}
button:hover { background: var(--blue-dark); }
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
button.ghost:hover { background: #f0f4f8; }

.error { color: var(--danger); font-weight: 600; margin: 4px 0 0; }
.hidden { display: none; }

.entry {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.entry-head h3 { margin: 0; font-size: 1.05rem; }
.entry-date {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.entry-notes {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: #334e68;
}
.entry-actions { margin-top: 12px; display: flex; gap: 8px; }
.entry-actions button {
  padding: 6px 12px;
  font-size: 0.82rem;
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--line);
}
.entry-actions button:hover { background: var(--aqua); }
.entry-actions button.del { color: var(--danger); }
.entry-actions button.del:hover { background: #ffebee; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}
