/* Small additions on top of simple.css. */
body { min-height: 100dvh; grid-template-rows: auto 1fr auto; }
/* Wider than simple.css's default: tables need the room. */
body { grid-template-columns: 1fr min(60rem, 90%) 1fr; }

.watch { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.watch input { flex: 1 1 20rem; margin: 0; }
.watch button { margin: 0; }
.watch .error { flex: 1 1 100%; margin: 0; }
.error { color: #c33; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.filters input, .filters select, .filters button { margin: 0; }
.filters input { flex: 1 1 15rem; }

.table-wrap { overflow-x: auto; }
.items { width: 100%; }
.items td.key, .items td.date { white-space: nowrap; }
.items form, .items button { margin: 0; }
.items button { padding: 0.2rem 0.6rem; font-size: 0.9em; }
.kind { color: var(--text-light); font-size: 0.85em; }

/* Mobile: rows become cards, so the action button stays in view. */
@media (width <= 720px) {
  .items, .items tbody, .items tr, .items td { display: block; }
  .items thead { display: none; }
  .items tr { border: 1px solid var(--border); border-radius: 5px; padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
  .items td { border: none; padding: 0.15rem 0; white-space: normal; }
  .items td.state, .items td.date { display: inline; color: var(--text-light); font-size: 0.9em; }
  .items td.state:has(+ td.date)::after { content: " · "; }
  .items td.action { margin-top: 0.4rem; }
}

/* Settings: lighter than simple.css's bordered sections and big headings. */
.setting { border: none; padding: 0; margin-block: 1.5rem; }
.setting h2 { font-size: 1.4rem; margin-block: 0 0.5rem; }
.setting label { display: block; }

/* Tighter header than simple.css defaults. */
body > header { padding: 0 0.5rem 0.5rem; }
body > header > :only-child { margin-block-start: 0.5rem; }
header nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; padding: 0.5rem 0 0; }
header nav .auth { margin: 0 0.5rem 1rem; }
/* Name and button may still break apart when the name is too long for the row. */
header nav .logout { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.25rem 0.5rem; margin: 0; }
header nav .logout button { margin: 0; padding: 0.2rem 0.6rem; }
header nav .auth a { margin: 0; }

/* Tighter footer than simple.css defaults. */
body > footer { margin-top: 0.5rem; padding: 0.5rem 1rem; }
body > footer p { margin-block: 0; }
