* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #F4F8FC 0%, #FFFFFF 60%);
    color: #10428C;
    min-height: 100vh;
}

.announce {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 38px;
    background: #10428C;
    color: #FFFFFF;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.topbar {
    position: fixed;
    top: 38px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    padding: 20px 40px 0 40px;
    z-index: 999;
}

.topbar .logo {
    height: 110px;
    display: block;
    margin: 0;
}

.topbar .sig-title {
    margin-top: 16px;
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: center;
}

.topbar .divider {
    width: 100%;
    height: 8px;
    margin-top: 16px;
    display: block;
}

.hero {
    padding-top: 228px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.site-footer {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: #6B84AC;
}

.login-card {
    background: #FFFFFF;
    border: 1px solid rgba(16, 66, 140, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16, 66, 140, 0.08);
    padding: 32px 36px;
    width: 100%;
    max-width: 360px;
    text-align: left;
}

.login-card h2 {
    font-size: 20px;
    color: #10428C;
    text-align: center;
    margin-bottom: 22px;
}

.login-error {
    background: #FBEAEA;
    color: #B33A36;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    text-align: center;
}

.login-card label {
    display: block;
    font-size: 13px;
    color: #4A5F82;
    margin-bottom: 6px;
}

.login-card input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #C9D6EA;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #10428C;
    font-family: inherit;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #10428C;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.login-card button:hover {
    background: #0D3670;
}

@media (max-width: 600px) {
    .announce {
        height: 32px;
        font-size: 12px;
        padding: 0 16px;
        text-align: center;
    }

    .topbar {
        top: 32px;
        padding: 14px 20px 0 20px;
    }

    .topbar .logo {
        height: 56px;
    }

    .topbar .sig-title {
        font-size: 22px;
        margin-top: 12px;
    }

    .topbar .divider {
        margin-top: 12px;
        height: 6px;
    }

    .hero {
        padding-top: 200px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .login-card {
        padding: 24px 20px;
    }
}

.panel-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid rgba(16, 66, 140, 0.15);
    background: #FFFFFF;
    z-index: 999;
}

.panel-logo {
    height: 120px;
}

.panel-usuario {
    font-size: 14px;
    color: #4A5F82;
    display: flex;
    align-items: center;
    gap: 14px;
}

.panel-usuario a {
    color: #FFFFFF;
    background: #10428C;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.panel-usuario a:hover {
    background: #0D3670;
}

.panel-content {
    padding: 176px 40px 40px 40px;
}

.panel-content h2 {
    color: #10428C;
    margin-bottom: 12px;
}

.panel-hero {
    background: linear-gradient(135deg, #10428C 0%, #1B5FC2 100%);
    color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 66, 140, 0.2);
    padding: 60px 50px;
    text-align: center;
}

.panel-hero h2 {
    color: #FFFFFF;
    font-size: 38px;
    margin-bottom: 12px;
}

.panel-hero p {
    color: #FFFFFF;
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 26px;
}

.panel-reloj {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
}

.panel-acciones {
    display: flex;
    justify-content: flex-start;
    margin-top: 32px;
}

.boton-torniquete {
    background: #1E8F4E;
    color: #FFFFFF;
    border: none;
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(30, 143, 78, 0.3);
}

.boton-torniquete:hover {
    background: #176B3B;
}

.boton-torniquete:disabled {
    opacity: 0.6;
    cursor: default;
}

.panel-tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.tarjeta {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16, 66, 140, 0.08);
    padding: 28px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(16, 66, 140, 0.18);
}

.tarjeta-icono {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #EAF1FB;
    color: #10428C;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.tarjeta h3 {
    color: #10428C;
    font-size: 18px;
    margin-bottom: 8px;
}

.tarjeta > p {
    color: #4A5F82;
    font-size: 14px;
    margin-bottom: 20px;
}

.tarjeta-boton {
    display: inline-block;
    background: #10428C;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 6px;
}

.tarjeta-boton:hover {
    background: #0D3670;
}

.tarjeta-ancha {
    max-width: 500px;
    margin: 24px auto 0 auto;
    text-align: left;
}

.tarjeta-ancha .tarjeta-icono,
.tarjeta-ancha h3,
.tarjeta-ancha > p {
    text-align: center;
}

.barra-navegacion {
    position: sticky;
    top: 152px;
    z-index: 500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #F4F8FC 0%, rgba(255,255,255,0.98) 85%);
    padding: 10px 0 16px 0;
}

.tarjeta-regresar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    color: #10428C;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 8px;
    border: 1px solid rgba(16, 66, 140, 0.18);
    box-shadow: 0 4px 14px rgba(16, 66, 140, 0.1);
}

.tarjeta-regresar:hover {
    background: #EAF1FB;
}

.tarjeta-inicio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10428C;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(16, 66, 140, 0.15);
}

.tarjeta-inicio:hover {
    background: #0D3670;
}

button.tarjeta-boton {
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.formulario-tarjeta {
    max-width: 720px;
    margin: 24px auto 0 auto;
    text-align: left;
    cursor: default;
}

.formulario-tarjeta:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(16, 66, 140, 0.08);
}

.formulario-tarjeta .tarjeta-icono,
.formulario-tarjeta h3,
.tarjeta-tabla .tarjeta-icono,
.tarjeta-tabla h3 {
    text-align: center;
}

.formulario-exito {
    background: #E3F5E9;
    color: #1E8F4E;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.formulario-error {
    background: #FBEAEA;
    color: #B33A36;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.formulario-seccion {
    color: #10428C;
    font-size: 15px;
    margin: 24px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(16, 66, 140, 0.15);
}

.formulario-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.formulario-ancho {
    grid-column: 1 / -1;
}

.formulario-campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #10428C;
    margin-bottom: 6px;
}

.formulario-campo input,
.formulario-campo select,
.formulario-campo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #C9D6EA;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #10428C;
}

.formulario button[type="submit"] {
    margin-top: 24px;
}

@media (max-width: 600px) {
    .formulario-grid {
        grid-template-columns: 1fr;
    }
}

.actividades-lista {
    list-style: none;
    text-align: left;
}

.actividad-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(16, 66, 140, 0.08);
}

.actividad-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10428C;
    cursor: pointer;
}

.actividad-item.completada span {
    text-decoration: line-through;
    color: #9AAAC4;
}

.actividades-agregar {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.actividades-agregar input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #C9D6EA;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.actividades-agregar button {
    padding: 8px 12px;
    background: #10428C;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.actividades-agregar button:hover {
    background: #0D3670;
}

.reporte-filtro {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.reporte-filtro input {
    padding: 8px 10px;
    border: 1px solid #C9D6EA;
    border-radius: 6px;
    font-family: inherit;
}

.reporte-filtro button {
    padding: 8px 16px;
    background: #10428C;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.reporte-filtro button:hover {
    background: #0D3670;
}

.reporte-usuario {
    background: #FFFFFF;
    border: 1px solid rgba(16, 66, 140, 0.15);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.reporte-usuario h3 {
    color: #10428C;
    font-size: 16px;
    margin-bottom: 12px;
}

.reporte-lista {
    list-style: none;
}

.reporte-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(16, 66, 140, 0.08);
    font-size: 14px;
}

.reporte-estado {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.reporte-item.realizada .reporte-estado {
    background: #E3F5E9;
    color: #1E8F4E;
}

.reporte-item.pendiente .reporte-estado {
    background: #FBEAEA;
    color: #B33A36;
}

@media (max-width: 600px) {
    .panel-logo {
        height: 56px;
    }

    .panel-content {
        padding-top: 130px;
    }

    .barra-navegacion {
        top: 88px;
    }

    .panel-usuario {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .panel-hero {
        padding: 28px 20px;
    }

    .panel-hero h2 {
        font-size: 22px;
    }

    .panel-reloj {
        font-size: 12px;
        padding: 8px 16px;
    }
}

.tabla-lista {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.tabla-lista th, .tabla-lista td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(16, 66, 140, 0.12);
}

.tabla-lista th {
    color: #10428C;
    font-weight: 600;
    background: rgba(16, 66, 140, 0.05);
}

.tabla-lista tbody tr:hover {
    background: rgba(16, 66, 140, 0.04);
}

.boton-pequeno {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
}

.asistencia-check {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

.asistencia-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.formulario-campo p {
    margin: 0;
    padding: 8px 0 4px 0;
    color: #333;
    font-size: 14px;
}

.tarjeta-tabla {
    max-width: 900px;
    margin: 24px auto 0 auto;
    text-align: left;
    cursor: default;
}

.tarjeta-tabla:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(16, 66, 140, 0.08);
}

.tabla-scroll {
    overflow-x: auto;
}

.grafica-barras {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.grafica-fila {
    display: grid;
    grid-template-columns: 180px 1fr 70px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.grafica-etiqueta {
    color: #10428C;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grafica-pista {
    display: block;
    background: rgba(16, 66, 140, 0.08);
    border-radius: 6px;
    overflow: hidden;
    height: 20px;
}

.grafica-barra {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1B5FC2 0%, #10428C 100%);
    border-radius: 6px 0 0 6px;
    min-width: 2px;
}

.grafica-valor {
    text-align: right;
    color: #4A5F82;
    font-weight: 600;
}

.resumen-tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0 8px 0;
}

.resumen-dato {
    background: #EAF1FB;
    border-radius: 10px;
    padding: 16px 18px;
    text-align: center;
}

.resumen-dato .resumen-etiqueta {
    display: block;
    font-size: 13px;
    color: #4A5F82;
    margin-bottom: 6px;
}

.resumen-dato .resumen-monto {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #10428C;
}

.resumen-dato.resumen-positivo .resumen-monto {
    color: #1E8F4E;
}

.resumen-dato.resumen-negativo .resumen-monto {
    color: #B33A36;
}

.etiqueta-solo-lectura {
    display: inline-block;
    background: rgba(16, 66, 140, 0.08);
    color: #4A5F82;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

@media (max-width: 700px) {
    .tabla-lista {
        white-space: nowrap;
    }
}

/* Punto 12: menú desplegable de acciones de Bitácora (includes/barra_personal.php).
   Usa un botón + menú absoluto en vez de botones sueltos para que .panel-topbar
   no crezca de alto y no tape el contenido de abajo. */
.menu-acciones-contenedor {
    position: relative;
}

.menu-acciones-boton {
    color: #FFFFFF;
    background: #10428C;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.menu-acciones-boton:hover {
    background: #0D3670;
}

.menu-acciones {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid rgba(16, 66, 140, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 66, 140, 0.15);
    padding: 8px;
    min-width: 190px;
    z-index: 1000;
}

.menu-acciones.abierto {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-acciones a {
    color: #10428C;
    background: #EAF1FB;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: left;
}

.menu-acciones a:hover {
    background: #DCE8FA;
}

/* Honorarios (honorarios.php): tarjeta por persona en vez de tabla única,
   siguiendo el formato de "La Fuente" (otro sistema del mismo desarrollador):
   nombre + rol, horas con aviso de turno sin cerrar, esquema de pago, monto
   a pagar, y el bloque de ajuste/pago o de "ya pagado" + recibo. */
.honorario-fila {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(16, 66, 140, 0.1);
    margin-top: 12px;
    text-align: left;
}

.honorario-nombre {
    flex: 1 1 200px;
    min-width: 180px;
}

.honorario-nombre strong {
    display: block;
    color: #10428C;
    font-size: 15px;
}

.honorario-rol {
    display: inline-block;
    background: rgba(16, 66, 140, 0.08);
    color: #4A5F82;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

.honorario-dato {
    flex: 1 1 130px;
    min-width: 120px;
}

.honorario-dato .honorario-etiqueta {
    display: block;
    font-size: 12px;
    color: #4A5F82;
    margin-bottom: 4px;
}

.honorario-dato .honorario-valor {
    font-weight: 700;
    color: #10428C;
}

.chip-alerta {
    display: inline-block;
    background: #FBEAE9;
    color: #B33A36;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

a.chip-alerta {
    text-decoration: none;
    cursor: pointer;
}

a.chip-alerta:hover {
    text-decoration: underline;
}

/* Los campos de Bono/Descuento usan type="number": sin esto se ven las
   flechitas feas de subir/bajar del navegador, fuera de lugar junto a los
   demás inputs de texto limpio. */
.honorario-ajuste-campo input[type="number"] {
    -moz-appearance: textfield;
}

.honorario-ajuste-campo input[type="number"]::-webkit-outer-spin-button,
.honorario-ajuste-campo input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.chip-pagado {
    display: inline-block;
    background: #E3F5E9;
    color: #1E8F4E;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.honorario-ajuste {
    flex: 2 1 320px;
    min-width: 280px;
}

.honorario-ajuste-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.honorario-ajuste-campo label {
    display: block;
    font-size: 12px;
    color: #4A5F82;
    margin-bottom: 2px;
}

.honorario-ajuste-campo input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(16, 66, 140, 0.2);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
}

.honorario-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.honorario-detalle-dia {
    display: none;
    margin-top: 10px;
    font-size: 13px;
}

.honorario-detalle-dia.abierto {
    display: block;
}

.honorario-detalle-dia table {
    width: 100%;
    border-collapse: collapse;
}

.honorario-detalle-dia td, .honorario-detalle-dia th {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(16, 66, 140, 0.08);
    text-align: center;
}

.enlace-detalle {
    color: #10428C;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    margin-top: 4px;
}

.boton-alerta {
    background: #B33A36;
}

.boton-alerta:hover {
    background: #8C2B28;
}

.boton-exito {
    background: #1E8F4E;
}

.boton-exito:hover {
    background: #166B3B;
}

/* Gestión de Personal (gestion_personal.php): tarjeta por persona con avatar
   y estado "hoy" en vivo, mismo lenguaje visual que Honorarios (arriba) pero
   con un indicador de turno abierto que se actualiza solo (ver <script> al
   final de gestion_personal.php). */
.avatar-circulo {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #10428C;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.personal-nombre-fila {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 220px;
    min-width: 200px;
}

.contador-turno {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E3F5E9;
    color: #1E8F4E;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: 10px;
}

.contador-turno-vivo {
    font-weight: 700;
    color: #10428C;
}

.estado-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.estado-chip--turno {
    background: #E3F5E9;
    color: #1E8F4E;
}

.estado-chip--comida {
    background: #FDF0DD;
    color: #B5790B;
}

.estado-chip--listo {
    background: rgba(16, 66, 140, 0.08);
    color: #10428C;
}

.estado-chip--ausente {
    background: rgba(74, 95, 130, 0.1);
    color: #4A5F82;
}

.estado-punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.estado-chip--turno .estado-punto,
.estado-chip--comida .estado-punto {
    animation: parpadeoEstado 1.4s ease-in-out infinite;
}

@keyframes parpadeoEstado {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
