:root {
  --fg: #222;
  --muted: #666;
  --bg: #fafaf7;
  --accent: #2a6fb3;
  --danger: #c43;
  --border: #ddd;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  line-height: 1.45;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

header h1 { margin: 0; font-size: 1.2rem; }
header h1 a { color: var(--fg); text-decoration: none; }
header nav a {
  margin-right: 1rem;
  color: var(--accent);
  text-decoration: none;
}
header nav a:hover { text-decoration: underline; }

main { max-width: 980px; margin: 1.5rem auto; padding: 0 1rem; }

h2 { margin-top: 0; }

.widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.empty { color: var(--muted); font-style: italic; }

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { background: #f3f3ee; font-weight: 600; }
tr:hover td { background: #f8f8f3; }

.overdue { color: var(--danger); font-weight: 600; }
.due-soon { color: #b87b00; }

a.button, button, input[type=submit] {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
a.button.secondary, button.secondary { background: #888; }
a.button.danger, button.danger { background: var(--danger); }

form.entry label {
  display: block;
  margin-top: 0.6rem;
  font-weight: 600;
}
form.entry input[type=text],
form.entry input[type=number],
form.entry input[type=date],
form.entry input[type=url],
form.entry select,
form.entry textarea {
  width: 100%;
  max-width: 32rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}
form.entry textarea { min-height: 4rem; }
form.entry .actions { margin-top: 1rem; display: flex; gap: 0.5rem; }

.inline-form { display: inline; }

ul.flashes {
  list-style: none;
  padding: 0.5rem 1rem;
  background: #fff7d6;
  border: 1px solid #e9d77a;
  border-radius: 4px;
}

footer.disclaimer {
  max-width: 980px;
  margin: 2.5rem auto 1.5rem;
  padding: 0.7rem 1.1rem;
  background: #fff4e2;
  border: 1px solid #e6c887;
  border-radius: 4px;
  color: #5a4400;
  font-size: 0.9rem;
  line-height: 1.5;
}
footer.disclaimer strong { color: #3a2c00; }
