/* Estilos propios de dashboard.php (antes en un <style> inline de la página).
   Los componentes compartidos viven en assets/css/componentes.css. */

.search-input {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); font-size: 14px; margin-bottom: 16px;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.evaluations-table { width: 100%; border-collapse: collapse; }
.evaluations-table th, .evaluations-table td {
    padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-color);
}
.evaluations-table th {
    font-size: 12.5px; font-weight: 600; color: var(--text-light);
    background: var(--bg-light);
}
.evaluations-table tbody tr:hover { background: var(--bg-light); }
.company-name { font-weight: 600; color: var(--text-dark); margin: 0; }
.questionnaire-title { font-size: 13px; color: var(--text-light); margin: 4px 0; }
.meta-info { font-size: 12px; color: var(--text-muted); display: flex; gap: 16px; }
.status-badge {
    gap: 6px;
    text-transform: none;   /* los nombres se escriben como en el detalle de la evaluación («En revisión») */
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
/* El estado se distingue por el punto de color; la etiqueta es neutra. El rojo queda para lo atrasado. */
.status-badge.no_iniciado, .status-badge.en_progreso, .status-badge.en_aclaracion, .status-badge.en_revision,
.status-badge.completado, .status-badge.archivado { background: var(--bg-light); color: var(--text-dark); }
.status-badge.atrasado { background: var(--bg-light); color: #b91c1c; }
.estado-filtro-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--bg-light); color: var(--text-dark); font-size: 13px; font-weight: 500; }
.estado-filtro-chip[hidden] { display: none; }
.estado-filtro-chip button { background: none; border: none; cursor: pointer; color: inherit; line-height: 0; padding: 2px; border-radius: 50%; }
.estado-filtro-chip button:hover, .estado-filtro-chip button:focus-visible { background: rgba(0,0,0,0.08); }
.estado-filtro-chip .material-icons { font-size: 16px; }
.progress-bar-container { display: flex; align-items: center; gap: 12px; }
.progress-bar-bg { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.progress-bar-fg { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.3s; }
.progress-percent { font-size: 13px; font-weight: 600; color: var(--text-dark); min-width: 40px; }
.kebab-menu { position: relative; }

/* Fix para z-index de modales */
#app-modal { z-index: 1001; }
#recordatorios-modal { z-index: 999; }
.icon-button {
    background: none; border: none; padding: 8px; cursor: pointer;
    border-radius: var(--radius-sm); color: var(--text-light);
}
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--bg-gray); }
.icon-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Menú de acciones: se abre con clic/tap/teclado (no con :hover). Con JS se posiciona "fixed"
   respecto de la ventana, así el scroll horizontal de la tabla no lo recorta. */
.kebab-dropdown {
    display: none; position: absolute; right: 0; top: 100%;
    background: var(--white); border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); min-width: 180px; z-index: 900;
    max-height: calc(100vh - 16px); overflow-y: auto; text-align: left;
}
.kebab-menu.abierto .kebab-dropdown { display: block; position: fixed; right: auto; }
/* Respaldo si el script del menú no llegó a inicializarse: abrir con el foco del teclado */
#evals-table-body:not(.kebab-js) .kebab-menu:focus-within .kebab-dropdown { display: block; }
.kebab-dropdown a, .kebab-dropdown button {
    display: block; width: 100%; padding: 10px 16px; text-align: left;
    font-size: 13px; color: var(--text-dark); background: none; border: none;
    cursor: pointer; text-decoration: none; font-family: inherit;
}
.kebab-dropdown a:hover, .kebab-dropdown button:hover,
.kebab-dropdown a:focus, .kebab-dropdown button:focus { background: var(--bg-light); outline: none; }
.kebab-dropdown a:focus-visible, .kebab-dropdown button:focus-visible { box-shadow: inset 3px 0 0 var(--primary); }
.kebab-dropdown .text-red { color: var(--danger); }
/* En el menú solo se destaca lo que borra o archiva; el resto usa el color del texto */
.kebab-dropdown .text-green, .kebab-dropdown .text-blue, .kebab-dropdown .text-purple { color: inherit; }
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.visible { display: flex; }
.modal-overlay .modal-content {
    background: var(--white); padding: 24px; border-radius: var(--radius-xl);
    max-width: 400px; width: 90%; text-align: center;
}
.modal-overlay h3 { margin-bottom: 12px; }
.modal-overlay p { color: var(--text-light); margin-bottom: 20px; }
.modal-button {
    margin: 0 4px;
}
.btn-new-evaluation {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: var(--primary); color: white;
    border-radius: var(--radius-md); font-weight: 600; text-decoration: none;
}
.btn-new-evaluation:hover { background: var(--primary-dark); text-decoration: none; }
.table-wrapper { padding: 20px; padding-bottom: 20px; overflow: visible; position: relative; }
/* La tabla hace scroll horizontal dentro de su contenedor en pantallas chicas
   (.main-content { min-width: 0 } ya está en app.css) */
.evals-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.evals-table-scroll .evaluations-table { min-width: 640px; }
.table-wrapper .tabla-paginacion { padding: 12px 0 0; }
@media (max-width: 768px) {
    .table-wrapper { padding: 14px; }
    .evaluations-table th, .evaluations-table td { padding: 10px 12px; }
}

/* Badge de notificaciones pendientes */
.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc2626;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 8px;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.company-name-wrapper {
    display: flex;
    align-items: center;
}
