:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2330; --muted: #6b7280; --border: #e3e6eb;
  --primary: #2563eb; --primary-text: #fff; --ok: #15803d; --ok-bg: #dcfce7; --err: #b91c1c; --err-bg: #fee2e2;
  --info-bg: #e0ecff; --entrada: #dcfce7; --salida: #fef3c7;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --card: #1b2027; --text: #e7eaee; --muted: #9aa3ae; --border: #2c333d;
          --ok-bg: #12321f; --err-bg: #3a1717; --info-bg: #172744; --entrada: #12321f; --salida: #3a3015;
          --ok: #4ade80; --err: #f87171; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
.container { max-width: 1000px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 460px; }
.center { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.center-text { text-align: center; }
h1 { font-size: 1.5rem; margin: 0 0 8px; } h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.topbar-right { display: flex; gap: 12px; align-items: center; } .topbar form { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.btn { font: inherit; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.big { width: 100%; padding: 18px; font-size: 1.15rem; font-weight: 600; }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.link.danger { color: var(--err); }
.clock { font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 20px; }
.actions { display: flex; flex-direction: column; gap: 12px; }
.alert { padding: 10px 12px; border-radius: 8px; margin: 16px 0 0; }
.alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.error { background: var(--err-bg); color: var(--err); }
.alert.info { background: var(--info-bg); }
.ok-text { color: var(--ok); } .error-text { color: var(--err); }
.list { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; } .list li a { margin-left: auto; }
.tag { font-size: .75rem; text-transform: uppercase; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--border); }
.tag.entrada { background: var(--entrada); } .tag.salida { background: var(--salida); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: .85rem; }
a { color: var(--primary); }
.user-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 12px 0; border-bottom: 1px solid var(--border); }
.user-row:last-child { border-bottom: 0; } .user-row .tag { align-self: center; }
.user-row label { flex: 1 1 160px; }
