:root { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; }
body { margin:0; background:#fafafa; color:#111; }
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.topbar { background: #0f172a; color:#fff; }
.topbar .container { display:flex; align-items:center; justify-content:space-between; }
.brand { font-weight:700; }
.nav a { color:#cbd5e1; text-decoration:none; margin-left:12px; }
.nav a:hover { color:#fff; }

h1 { margin-top: 8px; }
.row { display:flex; align-items:center; justify-content:space-between; gap:12px; }

.btn { background:#0ea5e9; color:#fff; border:none; padding:8px 12px; border-radius:10px; text-decoration:none; display:inline-block; cursor:pointer; }
.btn:hover { filter:brightness(0.95); }
.btn.ghost { background:transparent; color:#0ea5e9; border:1px solid #0ea5e9; }
.link { background:none; border:none; color:#0ea5e9; cursor:pointer; padding:0; text-decoration:underline; font: inherit; }
.link.danger { color:#ef4444; }

.search { display:flex; gap:10px; margin: 10px 0 16px; flex-wrap:wrap; }
.search input, .search select { padding:8px 10px; border-radius:10px; border:1px solid #e5e7eb; min-width: 240px; background:#fff; }

.form { display:grid; gap:10px; max-width: 560px; }
.form input, .form select { padding:10px; border-radius:10px; border:1px solid #e5e7eb; background:#fff; }
.form.inline { grid-template-columns: repeat(5, minmax(120px, 1fr)); align-items:end; max-width: 100%; }

.actions { display:flex; gap:10px; margin-top: 6px; flex-wrap:wrap; }

table { width:100%; border-collapse:collapse; background:#fff; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; }
th, td { padding:10px; border-bottom:1px solid #e5e7eb; text-align:left; }
th { background:#f1f5f9; font-weight:700; }
.td-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.flash-wrap { margin: 12px 0; display:grid; gap:8px; }
.flash { padding:10px 12px; border-radius:12px; }
.flash.ok { background:#dcfce7; color:#166534; border:1px solid #86efac; }
.flash.error { background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; }

.cards { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:12px; margin: 12px 0 18px; }
.card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; }
.kpi { font-size: 30px; font-weight:800; }
.label { color:#475569; }

.pill { padding:3px 10px; border-radius:999px; font-weight:600; font-size: 12px; }
.pill.ok { background:#dcfce7; color:#166534; }
.pill.warn { background:#ffedd5; color:#9a3412; }

.muted { color:#64748b; }
.seed { margin: 14px 0; padding: 10px; background:#fff; border:1px dashed #cbd5e1; border-radius:12px; }