:root {
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #1c2522;
  --muted: #5d6b66;
  --line: #dde3e0;
  --brand: #14614a;
  --good-bg: #d9f2e6;
  --good: #0f5c41;
  --bad-bg: #fbe3df;
  --bad: #9c2b1c;
  --neutral-bg: #e8ecea;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 16px;
  background: var(--brand);
  color: #fff;
}
.brand { font-size: 20px; font-weight: 700; }
.tagline { font-size: 14px; opacity: 0.9; }

.container { max-width: 960px; margin: 0 auto; padding: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}

h1, h2 { margin: 0; font-size: 20px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, Menlo, monospace; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.badge { padding: 2px 10px; border-radius: 999px; background: var(--neutral-bg); font-size: 14px; font-weight: 600; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

/* position: relative contiene al texto .sr, que de otro modo ensancha toda la página. */
.scroll { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.actions { display: flex; gap: 6px; }

label { display: block; margin: 10px 0 4px; font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #aab5b0; border-radius: 6px; background: #fff; color: inherit; font: inherit; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.grid button { margin-top: 14px; grid-column: 1 / -1; justify-self: start; }

button { min-height: 34px; padding: 4px 12px; border-radius: 6px; border: 1px solid transparent; font: inherit; font-size: 14px; cursor: pointer; }
.primary { min-height: 40px; background: var(--brand); color: #fff; }
.secondary { background: #fff; border-color: #aab5b0; color: var(--text); }
.danger { background: #fff; border-color: var(--bad); color: var(--bad); }
:focus-visible { outline: 3px solid #4d90fe; outline-offset: 1px; }

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 420px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  text-align: center;
}
