:root { --bg: #f5f6f8; --card: #fff; --ink: #1d2330; --muted: #6b7280; --line: #e3e6eb; --brand: #1f4f8f; --ok: #157347; --warn: #b45309; --bad: #b42318; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: #16213a; color: #fff; flex-wrap: wrap; }
header .brand { color: #fff; font-weight: 700; font-size: 17px; }
header nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
header nav a { color: #cbd5e1; padding: 6px 9px; border-radius: 6px; }
header nav a.on, header nav a:hover { background: #26345a; color: #fff; text-decoration: none; }
header form { margin: 0; }
.badge { background: var(--bad); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; }
main { max-width: 1200px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 26px 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card .num { font-size: 26px; font-weight: 700; }
.card ul { list-style: none; padding: 0; margin: 6px 0 0; color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f2f5; font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; }
td.actions form { display: inline; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e5e7eb; color: #374151; white-space: nowrap; }
.tag[data-s="active"], .tag[data-s="pool"], .tag[data-s="free"], .tag[data-s="done"], .tag[data-s="sent"], .tag[data-s="info"], .tag[data-s="acknowledged"] { background: #d1fae5; color: #065f46; }
.tag[data-s="assigned"], .tag[data-s="in_use"], .tag[data-s="running"] { background: #dbeafe; color: #1e40af; }
.tag[data-s="creating"], .tag[data-s="configuring"], .tag[data-s="queued"], .tag[data-s="pending"], .tag[data-s="pending_ns"], .tag[data-s="waiting_account"], .tag[data-s="moving"], .tag[data-s="warning"], .tag[data-s="suspended"] { background: #fef3c7; color: #92400e; }
.tag[data-s="dead"], .tag[data-s="problem"], .tag[data-s="failed"], .tag[data-s="error"], .tag[data-s="deleting"] { background: #fee2e2; color: #991b1b; }
.tag[data-s="cancelled"], .tag[data-s="deleted"], .tag[data-s="disabled"] { background: #e5e7eb; color: #6b7280; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.erro { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.flash.aviso { background: #fef3c7; color: #92400e; border-color: #fde68a; }
form.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 18px; }
form.box .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea { width: 100%; padding: 7px 9px; border: 1px solid #cfd4dc; border-radius: 6px; font: inherit; background: #fff; }
.field { flex: 1 1 180px; min-width: 140px; }
.field.small { flex: 0 1 110px; }
.field.wide { flex: 2 1 320px; }
button, .btn { font: inherit; padding: 7px 13px; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; }
button.sec { background: #fff; color: var(--brand); }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
button.sm { padding: 3px 9px; font-size: 13px; }
button.link { background: none; border: 0; color: #cbd5e1; padding: 6px 9px; cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
pre { background: #f0f2f5; padding: 10px; border-radius: 6px; overflow: auto; margin: 0; }
.login { max-width: 360px; margin: 80px auto; }
.login h1 { text-align: center; }
.empty { padding: 18px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; }
details summary { cursor: pointer; color: var(--brand); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 700px) { header { padding: 8px 12px; } main { padding: 14px 12px 40px; } table { display: block; overflow-x: auto; } }
