:root { --fg: #1c1c1e; --bg: #fafafa; --accent: #0a5; }
* { box-sizing: border-box; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
       color: var(--fg); background: var(--bg); }
header { padding: 1rem 1.25rem; border-bottom: 1px solid #e5e5e7; }
main { padding: 1.25rem; max-width: 60rem; margin: 0 auto; }
h1 { margin: 0; font-size: 1.25rem; }

.nav { display: flex; gap: 1rem; align-items: baseline; }
.nav a { text-decoration: none; color: var(--fg); }
.nav a:hover { color: var(--accent); }
.nav a:first-child { font-weight: 600; }

table.data { border-collapse: collapse; width: 100%; margin: 1rem 0; }
table.data th, table.data td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #e5e5e7; text-align: left; }
table.data th { background: #f5f5f7; font-weight: 600; }

form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 30rem; margin: 1rem 0; }
form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
form input, form select, form textarea {
  padding: 0.4rem 0.5rem; border: 1px solid #d1d1d6; border-radius: 4px;
  font: inherit; background: white;
}
form button { padding: 0.5rem 1rem; background: var(--accent); color: white;
  border: none; border-radius: 4px; cursor: pointer; align-self: flex-start; }
form button:hover { opacity: 0.9; }

.errors { color: #c00; background: #fee; padding: 0.5rem 1rem; border-radius: 4px; list-style: none; }
.button, button.link-button {
  display: inline-block; padding: 0.4rem 0.8rem; background: var(--accent); color: white;
  text-decoration: none; border-radius: 4px; border: none; cursor: pointer; font: inherit;
}
button.link-button { background: transparent; color: #c00; padding: 0; }

dl { display: grid; grid-template-columns: 10rem 1fr; gap: 0.4rem 1rem; }
dt { font-weight: 600; color: #555; }

table.data tr.overdue { background: #fee; }
table.data tr.today { background: #eef; font-weight: 600; }
table.data tr.shortage { background: #ffd; }

.exec-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.exec-meta { color: #555; margin-top: 0; font-size: 0.9rem; }
.exec-form { gap: 1rem; max-width: 100%; }
.exec-steps { padding-left: 1.25rem; }
.exec-step { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.5rem 0; }
.exec-step input { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; }
.exec-submit { font-size: 1.1rem; padding: 0.75rem 1.5rem; }
.exec-completed { background: #efe; padding: 1rem; border-radius: 6px; }
@media (max-width: 600px) {
  .exec-form { gap: 0.75rem; }
  .exec-submit { width: 100%; }
}

.citation-badge {
  display: inline-block; padding: 0 0.4em;
  background: var(--accent, #0066cc); color: white;
  border-radius: 0.4em; font-size: 0.85em; cursor: help;
}
.chat-citations { list-style: none; padding-left: 0; }
.chat-citations li { padding: 0.25rem 0; font-size: 0.9em; }
.ai-cost-summary { color: #666; }
