/* DEMO Ubesol Fábrica 5.0 — estilos comunes (paleta pizarra + estados) */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Fira+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #f1f5f9; --card: #ffffff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0;
  --primary: #1e293b; --brand: #0e7490; --brand-soft: #e0f2fe;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --bad: #b91c1c; --bad-soft: #fee2e2;
  --agent: #6d28d9; --agent-soft: #ede9fe;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.05);
  --mono: 'Fira Code', ui-monospace, Consolas, monospace;
  --sans: 'Fira Sans', system-ui, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* Barra superior */
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--primary); color: #f8fafc; }
.topbar .marca { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.topbar .marca small { font-weight: 400; color: #94a3b8; }
.topbar nav { display: flex; gap: 4px; margin-left: 12px; }
.topbar nav a { color: #cbd5e1; text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.topbar nav a[aria-current="page"], .topbar nav a:hover { background: #334155; color: #fff; }
.topbar .der { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: #94a3b8; }
.demo-tag { font-size: 12px; background: #334155; color: #e2e8f0; padding: 3px 8px; border-radius: 999px; }

/* Tarjetas y rejilla */
main { padding: 16px 20px 40px; max-width: 1600px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card > header h2 { font-size: 14px; margin: 0; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.card > header .der { margin-left: auto; }
.card .body { padding: 14px 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--brand-soft); color: var(--brand); }
.pill.agent { background: var(--agent-soft); color: var(--agent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 9px 16px;
       font-weight: 600; min-height: 40px; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: #155e75; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.ok:hover { background: #166534; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: #f8fafc; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Mandos discretos del presentador */
.presentador { position: fixed; left: 12px; bottom: 12px; display: flex; gap: 6px; opacity: .35; transition: opacity .2s; z-index: 50; }
.presentador:hover, .presentador:focus-within { opacity: 1; }
.presentador button { font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid #475569; background: #1e293b; color: #e2e8f0; }

/* Feed de actividad */
.feed { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; font-size: 13px; }
.feed li { display: grid; grid-template-columns: 62px 104px 1fr; gap: 8px; padding: 7px 16px; border-bottom: 1px solid var(--line); }
.feed li:first-child { animation: entra .5s ease-out; }
.feed .hora { font-family: var(--mono); color: var(--muted); }
.feed .sis { font-weight: 600; color: var(--brand); }
.feed .actor { color: var(--agent); font-weight: 600; }
@keyframes entra { from { background: #fef9c3; } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
