/* BotOpenProject — estilos del dashboard */

:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --ok: #4ade80;
  --error: #f87171;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

main.wide {
  max-width: 1200px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

h1, h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 1rem;
}

select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0;
}

button, .btn {
  background: var(--accent);
  color: #082f49;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat {
  font-size: 2rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.message.ok {
  background: rgba(74, 222, 128, 0.15);
  color: var(--ok);
}

.message.error {
  background: rgba(248, 113, 113, 0.15);
  color: var(--error);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.kpi-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.kpi-card.danger {
  border-color: rgba(248, 113, 113, 0.5);
}

.kpi-card.warning {
  border-color: rgba(251, 191, 36, 0.5);
}

.kpi-card.ok {
  border-color: rgba(74, 222, 128, 0.4);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge.ok {
  background: rgba(74, 222, 128, 0.18);
  color: var(--ok);
}

.badge.warning {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}

.badge.danger {
  background: rgba(248, 113, 113, 0.18);
  color: var(--error);
}

.alert-box ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #fbbf24;
}

.resumen-list {
  display: grid;
  gap: 0.65rem;
}

.resumen-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form input {
  width: auto;
  min-width: 140px;
  margin-bottom: 0;
}

.status-active {
  color: var(--ok);
}

.status-inactive {
  color: var(--muted);
}
