@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #eef1ef; --paper: #ffffff; --ink: #142019; --muted: #5d6b64; --line: #d6ddd9;
  --accent: #0e6b5c; --accent-ink: #ffffff; --soft: #e2efeb;
  --warn: #9a6a12; --warn-soft: #f6ecd3; --danger: #a33a2b; --danger-soft: #f5e0dc; --done: #2c7a4b; --done-soft: #dcefe3;
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 7px 12px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.small { padding: 4px 9px; font-size: 13px; }
button.ghost { background: transparent; }
button.danger { color: var(--danger); border-color: var(--danger-soft); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 17px; font-weight: 600; margin: 24px 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

.shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
nav.rail { background: var(--paper); border-right: 1px solid var(--line); padding: 18px 10px; position: sticky; top: 0; height: 100vh; }
nav.rail .brand { font-weight: 600; padding: 6px 10px 18px; }
nav.rail a { display: block; padding: 8px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
nav.rail a.active { background: var(--soft); color: var(--accent); font-weight: 500; }
nav.rail .bottom { position: absolute; bottom: 16px; left: 10px; right: 10px; }
main { padding: 22px clamp(14px, 3vw, 36px); max-width: 1080px; }
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  nav.rail { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; display: flex; gap: 2px; padding: 6px; border-right: 0; border-top: 1px solid var(--line); z-index: 5; overflow-x: auto; }
  nav.rail .brand, nav.rail .bottom { display: none; }
  nav.rail a { white-space: nowrap; font-size: 13px; }
  main { padding-bottom: 80px; }
}

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; }
.stat { display: inline-block; margin: 0 22px 8px 0; }
.stat b { font-size: 26px; font-weight: 600; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; background: var(--soft); color: var(--accent); }
.tag.todo { background: #e6e9e7; color: var(--muted); }
.tag.in_progress { background: #dbe8f5; color: #1f4f7a; }
.tag.done { background: var(--done-soft); color: var(--done); }
.tag.needs_admin { background: var(--warn-soft); color: var(--warn); }
.tag.blocked { background: var(--danger-soft); color: var(--danger); }
.tag.inbox { background: var(--warn-soft); color: var(--warn); }
.tag.approved { background: var(--done-soft); color: var(--done); }
.tag.rejected { background: #eee; color: var(--muted); }
pre.steps { white-space: pre-wrap; font: inherit; background: #f7f9f8; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; }
.copy { font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 14px; border-radius: var(--radius); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 9; }
.toast.show { opacity: 1; }
.login { max-width: 360px; margin: 14vh auto; }
.hidden { display: none !important; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.task { border-left: 4px solid var(--line); }
.task.in_progress { border-left-color: #1f4f7a; }
.task.done { border-left-color: var(--done); opacity: .75; }
.task.needs_admin { border-left-color: var(--warn); }
.task .title { font-weight: 500; font-size: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
