:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --accent: #2563eb;
  --danger: #dc2626;
  --ok: #16a34a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213;
    --fg: #eaeaea;
    --muted: #999;
    --border: #333;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}
.container { max-width: 960px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 480px; }

a { color: var(--accent); }

h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }

.nav {
  display: flex;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
}
.nav a { text-decoration: none; font-size: 0.9rem; color: var(--fg); }
.nav a.active { color: var(--accent); font-weight: 600; }
.nav .spacer { flex: 1; }

label { display: block; font-size: 0.85rem; margin: 12px 0 4px; color: var(--muted); }
input, select, textarea, button {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}
textarea { min-height: 80px; }
button {
  width: auto;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 600;
}
button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }
button.danger { background: var(--danger); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.status.pending { background: #fef3c7; color: #92400e; }
.status.approved { background: #dcfce7; color: #166534; }
.status.rejected { background: #fee2e2; color: #991b1b; }
.status.hold { background: #fde68a; color: #78350f; }
.status.draft { background: #e5e7eb; color: #374151; }

.error { color: var(--danger); font-size: 0.9rem; margin-top: 8px; }
.success { color: var(--ok); font-size: 0.9rem; margin-top: 8px; }
.muted { color: var(--muted); font-size: 0.85rem; }

.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 32px 0 16px;
  padding-top: 16px;
  opacity: 0.55;
  font-size: 0.75rem;
  color: var(--muted);
}
.powered-by img { height: 16px; width: auto; }
