/* =====================================================================
   Registro de Horas - Programadores Externos
   Rediseño visual: tipografía, cards, colores, botones, tablas.
   ===================================================================== */

:root {
    --rhp-primario: #4f46e5;
    --rhp-primario-oscuro: #3730a3;
    --rhp-texto: #1f2430;
    --rhp-texto-suave: #667085;
    --rhp-borde: #e5e7eb;
    --rhp-fondo-suave: #f8f9fc;
    --rhp-verde: #16a34a;
    --rhp-amarillo: #d97706;
    --rhp-rojo: #dc2626;
    --rhp-radio: 10px;
    --rhp-sombra: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
}

.rhp-panel {
    max-width: 760px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--rhp-texto);
    line-height: 1.55;
}
.rhp-admin-panel { max-width: 1080px; }

/* El tema del sitio puede forzar mayúsculas globalmente (común en Divi).
   Blindamos todo el contenido del panel contra eso; las mayúsculas que
   SÍ queremos (labels, encabezados de tabla, badges) se reactivan más
   abajo explícitamente con !important para ganarle a esta regla. */
.rhp-panel, .rhp-panel * {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.rhp-panel h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}
.rhp-panel h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--rhp-texto);
}

/* ---- Mensajes ---- */
.rhp-mensaje {
    padding: 12px 16px;
    border-radius: var(--rhp-radio);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}
.rhp-mensaje.rhp-ok {
    background: #ecfdf3;
    border: 1px solid #a6f4c5;
    color: #067647;
}
.rhp-mensaje.rhp-error {
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
}

/* ---- Cards ---- */
.rhp-card {
    background: #fff;
    border: 1px solid var(--rhp-borde);
    border-radius: var(--rhp-radio);
    box-shadow: var(--rhp-sombra);
    padding: 22px 24px;
    margin-bottom: 22px;
}

/* Le da a cada pestaña una apariencia de tarjeta, aunque el método
   de esa pestaña no incluya explícitamente un .rhp-card propio. */
.rhp-tab-contenido {
    background: #fff;
    border: 1px solid var(--rhp-borde);
    border-radius: var(--rhp-radio);
    box-shadow: var(--rhp-sombra);
    padding: 24px 26px;
}
.rhp-tab-contenido .rhp-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 26px;
}
.rhp-tab-contenido .rhp-card + .rhp-card {
    border-top: 1px solid var(--rhp-borde);
    padding-top: 22px;
}

/* ---- Formularios ---- */
.rhp-form p { margin: 0 0 16px; }
.rhp-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--rhp-texto-suave);
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    margin-bottom: 6px;
}
.rhp-form input[type="text"],
.rhp-form input[type="email"],
.rhp-form input[type="date"],
.rhp-form input[type="number"],
.rhp-form select,
.rhp-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--rhp-borde);
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    font-size: 14px;
    color: var(--rhp-texto);
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rhp-form input:focus,
.rhp-form select:focus,
.rhp-form textarea:focus {
    outline: none;
    border-color: var(--rhp-primario);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.rhp-form textarea { max-width: 520px; }
.rhp-check-label {
    display: block !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: var(--rhp-texto) !important;
    padding: 6px 0;
    font-size: 14px;
}
.rhp-check-label input { margin-right: 8px; }

.rhp-link-cancelar {
    margin-left: 14px;
    color: var(--rhp-texto-suave);
    text-decoration: none;
}
.rhp-link-cancelar:hover { color: var(--rhp-rojo); }

/* ---- Botones ---- */
.rhp-boton, .rhp-form button, .rhp-form .button {
    display: inline-block;
    background: var(--rhp-primario);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    box-shadow: var(--rhp-sombra);
    transition: background .15s ease, transform .05s ease;
}
.rhp-boton:hover, .rhp-form button:hover, .rhp-form .button:hover {
    background: var(--rhp-primario-oscuro);
    color: #fff;
}
.rhp-boton:active, .rhp-form button:active { transform: translateY(1px); }

/* ---- Tablas ---- */
.rhp-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    font-size: 13.5px;
}
.rhp-tabla th, .rhp-tabla td {
    padding: 11px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rhp-borde);
}
.rhp-tabla th {
    background: var(--rhp-fondo-suave);
    color: var(--rhp-texto-suave);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}
.rhp-tabla tbody tr:hover { background: var(--rhp-fondo-suave); }
.rhp-tabla td a { color: var(--rhp-primario); text-decoration: none; font-weight: 600; }
.rhp-tabla td a:hover { text-decoration: underline; }

/* ---- Badges de estado ---- */
.rhp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    color: #fff;
}
.rhp-badge.rhp-pendiente  { background: var(--rhp-amarillo); }
.rhp-badge.rhp-aprobado   { background: var(--rhp-verde); }
.rhp-badge.rhp-rechazado  { background: var(--rhp-rojo); }
.rhp-badge.rhp-activo     { background: var(--rhp-verde); }
.rhp-badge.rhp-pausado    { background: var(--rhp-amarillo); }
.rhp-badge.rhp-finalizado { background: #6b7280; }

/* ---- Resumen de cuenta (estado de cuenta) ---- */
.rhp-resumen-cuenta {
    background: var(--rhp-fondo-suave);
    border: 1px solid var(--rhp-borde);
    border-radius: var(--rhp-radio);
    padding: 18px 22px;
    max-width: 420px;
    margin: 16px 0 26px;
}
.rhp-resumen-cuenta p {
    margin: 6px 0;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.rhp-resumen-cuenta p strong { color: var(--rhp-texto-suave); font-weight: 500; }

/* ---- Pestañas del panel de administración ---- */
.rhp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid var(--rhp-borde);
    margin-bottom: 22px;
}
.rhp-tab {
    display: inline-block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--rhp-texto-suave);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s ease;
}
.rhp-tab:hover { color: var(--rhp-primario); }
.rhp-tab-activo {
    color: var(--rhp-primario);
    border-bottom-color: var(--rhp-primario);
}

/* ---- Filtros ---- */
.rhp-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.rhp-filtros select {
    padding: 9px 12px;
    border: 1px solid var(--rhp-borde);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

/* ---- Login ---- */
.rhp-login {
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}
.rhp-login-ventana {
    background: #fff;
    border: 1px solid var(--rhp-borde);
    border-radius: var(--rhp-radio);
    box-shadow: var(--rhp-sombra);
    padding: 32px 36px;
    max-width: 380px;
    width: 100%;
    text-align: left;
}
.rhp-login-ventana h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    text-align: center;
}
.rhp-login-subtitulo {
    color: var(--rhp-texto-suave);
    font-size: 14px;
    text-align: center;
    margin: 0 0 22px;
}
.rhp-login-ventana form p { margin-bottom: 14px; }
.rhp-login-ventana label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--rhp-texto-suave);
    margin-bottom: 6px;
}
.rhp-login-ventana input[type="text"],
.rhp-login-ventana input[type="password"] {
    padding: 10px 12px;
    border: 1px solid var(--rhp-borde);
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}
.rhp-login-ventana input[type="text"]:focus,
.rhp-login-ventana input[type="password"]:focus {
    outline: none;
    border-color: var(--rhp-primario);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.rhp-login-ventana input[type="submit"] {
    display: block;
    width: 100%;
    background: var(--rhp-primario);
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 6px;
}
.rhp-login-ventana input[type="submit"]:hover { background: var(--rhp-primario-oscuro); }
.rhp-login-ventana .login-remember { font-size: 13px; color: var(--rhp-texto-suave); }

/* ---- Encabezado con usuario / cerrar sesión ---- */
.rhp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--rhp-texto-suave);
}
.rhp-logout {
    color: var(--rhp-rojo);
    text-decoration: none;
    font-weight: 600;
}
.rhp-logout:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .rhp-tab-contenido, .rhp-card { padding: 16px; }
    .rhp-tabla { font-size: 12.5px; }
    .rhp-tabla th, .rhp-tabla td { padding: 8px; }
    .rhp-form input, .rhp-form select, .rhp-form textarea { max-width: 100%; }
}

/* ---- Dashboard del programador ---- */
.rhp-dashboard { max-width: 980px; }
.rhp-titulo-pagina {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 18px;
}
.rhp-texto-suave { color: var(--rhp-texto-suave); font-size: 14px; }

.rhp-grid-dos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 18px;
    margin-bottom: 18px;
}
.rhp-grid-dos .rhp-card { margin-bottom: 0; }
@media (max-width: 800px) {
    .rhp-grid-dos { grid-template-columns: 1fr; }
}

.rhp-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}
.rhp-stat-icono {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    color: var(--rhp-primario);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rhp-stat-numero {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}
.rhp-stat-etiqueta {
    font-size: 13px;
    color: var(--rhp-texto-suave);
    margin-top: 4px;
}

.rhp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rhp-dona-contenedor {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.rhp-dona-svg {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}
.rhp-dona-leyenda {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13.5px;
}
.rhp-dona-leyenda li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.rhp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ---- Fila de hora inicio / hora fin / total ---- */
.rhp-fila-horas {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}
.rhp-fila-horas p { margin-bottom: 16px; }
@media (max-width: 600px) {
    .rhp-fila-horas { grid-template-columns: 1fr; }
}

/* ---- Lista simple (resumen semanal/mensual por proyecto) ---- */
.rhp-lista-simple {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}
.rhp-lista-simple li {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--rhp-borde);
}
.rhp-lista-simple li:last-child { border-bottom: none; }
.rhp-lista-simple .rhp-dot { margin-right: 2px; }

/* ---- Bandera de bloqueo ---- */
.rhp-flag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--rhp-rojo);
    cursor: help;
}
