/* public/assets/styles.css — Estilos compartidos PWA mobile-first */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surf2: #222638;
  --border: #2e3248;
  --accent: #4f6ef7;
  --accent-2: #38bdf8;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --r: 12px;
  --shadow: 0 6px 18px rgba(0,0,0,.32);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }

a { color: var(--accent-2); text-decoration: none; }
button, .btn {
  appearance: none; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 14px 22px; border-radius: var(--r); font-size: 15px;
  transition: transform .08s ease, opacity .15s ease;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
button:active, .btn:active { transform: scale(.97); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: var(--surf2); color: var(--text); border: 1px solid var(--border); }
.btn-success { background: var(--success); }
.btn-danger  { background: var(--danger); }
.btn-warn    { background: var(--warning); color: #1f1500; }
.btn-block { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.title { font-size: 18px; font-weight: 700; }
.subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }

input, select, textarea {
  width: 100%; background: var(--surf2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 15px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: .8px; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surf2); color: var(--muted); border: 1px solid var(--border); }
.badge.ok  { background: rgba(34,197,94,.15);  color: #4ade80; border-color: rgba(34,197,94,.4); }
.badge.err { background: rgba(239,68,68,.15);  color: #fca5a5; border-color: rgba(239,68,68,.4); }
.badge.wrn { background: rgba(245,158,11,.15); color: #fbbf24; border-color: rgba(245,158,11,.4); }
.badge.inf { background: rgba(56,189,248,.15); color: #38bdf8; border-color: rgba(56,189,248,.4); }

.appbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 14px 16px env(safe-area-inset-bottom, 14px);
  display: flex; align-items: center; gap: 10px;
}
.appbar h1 { font-size: 17px; font-weight: 700; }
.appbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

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

.tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 56px; z-index: 9; }
.tab { flex: 1; padding: 12px 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--surf2); display: grid; place-items: center; font-weight: 700; color: var(--accent); border: 1px solid var(--border); flex-shrink: 0; }

.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; padding: 8px env(safe-area-inset-right, 8px) calc(8px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 8px);
  z-index: 12;
}
.bottom-bar a { flex: 1; text-align: center; padding: 8px 4px; color: var(--muted); font-size: 11px; }
.bottom-bar a.active { color: var(--accent); }
.bottom-bar a svg { display: block; margin: 0 auto 2px; width: 20px; height: 20px; }

.fab {
  position: fixed; right: 16px; bottom: 80px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(79,110,247,.5);
  font-size: 24px; cursor: pointer; z-index: 11;
}

.video-wrap { position: relative; width: 100%; max-width: 480px; margin: 0 auto; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 3/4; }
.video-wrap video, .video-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-overlay { position: absolute; inset: 0; pointer-events: none; }
.face-box { position: absolute; border: 3px solid var(--success); border-radius: 8px; transition: all .12s ease; }
.face-label { position: absolute; bottom: -28px; left: 0; background: rgba(0,0,0,.7); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--surface); color: var(--text); padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 100; opacity: 0; transition: opacity .2s; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; }
.toast.ok  { border-color: var(--success); }
.toast.err { border-color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; background: var(--surf2); }

.kiosk-mode { background: linear-gradient(180deg, #0a0b10 0%, #0f1117 100%); min-height: 100vh; }
.kiosk-mode .center-card { max-width: 520px; margin: 24px auto; padding: 24px; }
.kiosk-mode .big-time { font-size: 56px; font-weight: 800; text-align: center; letter-spacing: 1px; }
.kiosk-mode .date-line { font-size: 16px; text-align: center; color: var(--muted); margin-top: 4px; }

.hidden { display: none !important; }

@media (max-width: 360px) {
  .big-time { font-size: 44px !important; }
}
