:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #262b36;
  --text: #e6e8ec;
  --muted: #8a92a3;
  --accent: #5b8cff;
  --ok: #3ecf8e;
  --warn: #f5a623;
  --bad: #f0556b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.health {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.panel h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.panel-header h2 { margin: 0; }

.filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

form#form-tarea {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
form#form-tarea textarea {
  grid-column: 1 / -1;
  min-height: 60px;
  resize: vertical;
}
form#form-tarea button {
  grid-column: 1 / -1;
}

input, select, textarea, button {
  font: inherit;
  background: #10131a;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
}

button {
  cursor: pointer;
  background: var(--accent);
  border: none;
  color: white;
  font-weight: 600;
}
button:hover { opacity: 0.9; }
button.secundario {
  background: #232734;
  color: var(--text);
}
button.peligro {
  background: var(--bad);
}

.lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: #12151c;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.card-top .titulo {
  font-weight: 600;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge.pendiente { background: #2a2f3d; color: var(--muted); }
.badge.en_progreso { background: rgba(91,140,255,0.15); color: var(--accent); }
.badge.bloqueada { background: rgba(240,85,107,0.15); color: var(--bad); }
.badge.completada { background: rgba(62,207,142,0.15); color: var(--ok); }
.badge.fallida { background: rgba(240,85,107,0.15); color: var(--bad); }
.badge.atendida { background: rgba(62,207,142,0.15); color: var(--ok); }

.meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.desc {
  font-size: 13px;
  margin-top: 8px;
  color: #c3c7d1;
  white-space: pre-wrap;
}

.prompt-box {
  font-size: 12px;
  background: #0b0d12;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
  color: #c3c7d1;
}

.acciones {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.acciones input {
  flex: 1;
  min-width: 140px;
}

.vacio {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}

label.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
