:root {
    --brand: #146c94;
    --brand-dark: #0b405a;
    --ok: #1f8a5b;
    --warn: #b7791f;
    --bad: #b42318;
    --ink: #1f2937;
    --muted: #667085;
    --surface: #f6f8fb;
}

body { background: var(--surface); color: var(--ink); }
.login-bg { background: linear-gradient(135deg, #eaf3f8, #f8fafc); }
.login-card { width: min(440px, 100%); border-radius: 8px; }
.filters-bar { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; }
.summary-grid { display: grid; grid-template-columns: repeat(9, minmax(120px, 1fr)); gap: 12px; }
.summary-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; }
.summary-card strong { display: block; font-size: 1.8rem; line-height: 1; }
.status-pill { border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: .82rem; }
.st-puntual, .st-presente { background: #dcfce7; color: #166534; }
.st-tardanza { background: #fef3c7; color: #92400e; }
.st-ausente { background: #fee2e2; color: #991b1b; }
.st-descanso, .st-vacaciones, .st-permiso, .st-licencia { background: #e0f2fe; color: #075985; }
.st-marcacion_incompleta { background: #fde68a; color: #78350f; }
.st-pendiente, .st-sin_turno { background: #e5e7eb; color: #374151; }
.st-fija { background: #dbeafe; color: #1e40af; }
.st-unica { background: #ede9fe; color: #5b21b6; }
.st-mantenimiento { background: #ccfbf1; color: #115e59; }
.act-pendiente { background: #fef3c7; color: #92400e; }
.act-en_proceso { background: #dbeafe; color: #1e40af; }
.act-completada { background: #dcfce7; color: #166534; }
.act-cancelada { background: #e5e7eb; color: #374151; }
.act-atrasada { background: #fee2e2; color: #991b1b; }
.activity-filters { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)) auto; gap: 8px; }
.daily-agenda { background: #fff; border-top: 1px solid #d0d5dd; }
.agenda-hour { display: grid; grid-template-columns: 72px minmax(0, 1fr); border-bottom: 1px solid #e5e7eb; min-height: 64px; }
.agenda-hour-label { padding: 12px 8px; font-size: .875rem; font-weight: 600; color: #667085; border-right: 1px solid #e5e7eb; }
.agenda-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; padding: 10px; align-items: start; }
.agenda-current-hour { background: #f0fdf4; }
.agenda-current-hour .agenda-hour-label { color: #166534; }
.agenda-item { min-width: 0; background: #fff; border: 1px solid #d0d5dd; border-left: 4px solid #b7791f; border-radius: 6px; padding: 12px; overflow-wrap: anywhere; }
.agenda-item .status-pill { display: inline-block; }
.agenda-title { flex: 1 1 180px; font-size: 1rem; }
.agenda-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.agenda-details summary::-webkit-details-marker { display: none; }
.agenda-details summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 2px; }
.agenda-details .agenda-title { flex: 1; min-width: 0; }
.agenda-details-toggle { flex: 0 0 auto; color: var(--brand); font-size: .875rem; text-decoration: underline; }
.agenda-details-hide, .agenda-details[open] .agenda-details-show { display: none; }
.agenda-details[open] .agenda-details-hide { display: inline; }
.agenda-detail-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.agenda-en_proceso { border-left-color: #146c94; }
.agenda-completada { border-left-color: #1f8a5b; }
.agenda-cancelada { border-left-color: #667085; }
.agenda-late { border-left-color: #b42318; }
@media (max-width: 900px) { .activity-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .activity-filters { grid-template-columns: minmax(0, 1fr); } .agenda-hour { grid-template-columns: 54px minmax(0, 1fr); } .agenda-hour-label { padding: 12px 4px; } .agenda-items { padding: 8px; } }
.pr-baja { background: #e5e7eb; color: #374151; }
.pr-media { background: #e0f2fe; color: #075985; }
.pr-alta { background: #ffedd5; color: #9a3412; }
.pr-critica { background: #fee2e2; color: #991b1b; }
.thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.kiosk-bg { min-height: 100vh; background: #0f2836; }
.kiosk-panel { background: #fff; border-radius: 8px; padding: 24px; min-height: 76vh; }
.pin-display { width: 100%; font-size: 3rem; text-align: center; letter-spacing: 8px; border: 2px solid #d0d5dd; border-radius: 8px; padding: 16px; margin-bottom: 18px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key { border: 0; border-radius: 8px; background: var(--brand); color: #fff; min-height: 86px; font-size: 2rem; font-weight: 700; }
.key[data-key="B"] { background: #64748b; font-size: 1.2rem; }
.key[data-key="OK"] { background: var(--ok); }
.camera-box video { width: 100%; max-height: 470px; background: #111827; border-radius: 8px; object-fit: cover; }
.kiosk-status { margin-top: 16px; padding: 16px; border-radius: 8px; background: #eef6fb; font-size: 1.25rem; font-weight: 600; }
@media (max-width: 1100px) {
    .summary-grid { grid-template-columns: repeat(3, 1fr); }
    .filters-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .summary-grid, .filters-bar { grid-template-columns: 1fr; }
    .key { min-height: 70px; }
}
