/* Full Life Clock - estilos (móvil primero) */
:root {
    --verde: #1d6f5a;
    --verde-osc: #14503f;
    --rojo: #b3261e;
    --gris: #5f6b66;
    --borde: #d8e2de;
    --fondo: #f4f7f5;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--fondo);
    color: #17251f;
    font-size: 16px;
}
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--verde); color: #fff; padding: 10px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.brand-logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
.top-user { font-size: 0.9em; opacity: 0.9; }
.mainnav {
    display: flex; flex-wrap: wrap; gap: 4px;
    background: var(--verde-osc); padding: 6px 10px;
}
.mainnav a {
    color: #eaf4f0; text-decoration: none; padding: 7px 10px;
    border-radius: 8px; font-size: 0.95em;
}
.mainnav a:hover { background: rgba(255,255,255,0.15); }
.wrap { max-width: 880px; margin: 0 auto; padding: 14px; }
.foot { text-align: center; color: var(--gris); padding: 18px 10px 26px; }
h1 { font-size: 1.35em; margin: 6px 0 12px; }
h2 { font-size: 1.1em; margin: 0 0 10px; }
.card {
    background: #fff; border: 1px solid var(--borde); border-radius: 14px;
    padding: 16px; margin-bottom: 16px;
}
.login-card { max-width: 430px; margin: 26px auto; text-align: center; }
.login-logo { width: 110px; height: 110px; }
.login-card form { text-align: left; }
label { display: block; margin: 10px 0; font-weight: 600; font-size: 0.95em; }
input, select, textarea {
    width: 100%; padding: 11px; margin-top: 5px;
    border: 1px solid var(--borde); border-radius: 10px; font-size: 1em;
    background: #fff; font-weight: 400;
}
fieldset { border: 1px solid var(--borde); border-radius: 10px; margin: 12px 0; }
legend { font-weight: 700; padding: 0 6px; }
.btn {
    display: inline-block; border: 1px solid var(--borde); background: #fff; color: #17251f;
    padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 1em;
    text-decoration: none; margin: 4px 2px;
}
.btn-primary { background: var(--verde); border-color: var(--verde); color: #fff; font-weight: 700; }
.btn-danger { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.btn-big { width: 100%; padding: 14px; font-size: 1.05em; }
.btn-huge { width: 100%; padding: 22px; font-size: 1.3em; font-weight: 800; border-radius: 14px; border: none; color: #fff; }
.btn-entrada { background: var(--verde); }
.btn-salida { background: #8a5a12; }
.btn-huge:disabled { background: #9db8b0; cursor: not-allowed; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.flash { background: #e3f2e9; border: 1px solid #9fd3ae; color: #14532d; padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.error { background: #fdecea; border: 1px solid #f0b3ae; color: var(--rojo); padding: 12px; border-radius: 10px; margin: 10px 0; text-align: left; }
.msg { margin-top: 12px; min-height: 1.4em; font-weight: 600; }
.muted { color: var(--gris); font-weight: 400; }
.grande { font-size: 1.25em; font-weight: 700; margin: 4px 0; }
.distancia { font-size: 1.05em; font-weight: 700; padding: 12px; border-radius: 10px; background: #eef3f1; margin: 12px 0; }
.distancia.dentro { background: #e3f2e9; color: #14532d; }
.distancia.fuera { background: #fdecea; color: var(--rojo); }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filtros label { margin: 0; }
.tabla { width: 100%; border-collapse: collapse; font-size: 0.94em; }
.tabla th, .tabla td { border-bottom: 1px solid var(--borde); padding: 8px 6px; text-align: left; vertical-align: top; }
.tabla th { background: #eef3f1; }
.badge { padding: 2px 9px; border-radius: 999px; font-size: 0.85em; font-weight: 700; }
.badge.ok { background: #e3f2e9; color: #14532d; }
.badge.out { background: #fdf0e0; color: #8a5a12; }
.persona { border-bottom: 1px solid var(--borde); padding: 10px 0; }
.persona:last-child { border-bottom: none; }
.persona .muted { display: block; margin-top: 2px; }
.persona.inactiva { opacity: 0.55; }
.mini-form { border-top: 1px dashed var(--borde); padding-top: 8px; margin-top: 8px; }
.inline-form { display: inline; }
.fila { display: flex; gap: 10px; }
.fila label { flex: 1; }
.acciones { white-space: nowrap; }
details summary { cursor: pointer; color: var(--verde); font-weight: 600; margin-top: 6px; }
.tarea { border-bottom: 1px solid var(--borde); padding: 10px 0; }
.tarea:last-child { border-bottom: none; }
.tarea-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.tarea-check input { width: 26px; height: 26px; margin-top: 2px; flex: none; }
.tareas-reporte { margin: 6px 0 0; padding-left: 18px; }
.reloj { text-align: center; }
.reloj label { text-align: left; }
@media (max-width: 560px) {
    .tabla { font-size: 0.86em; }
    .fila { flex-direction: column; gap: 0; }
}
