/* 
 * SelloMayor - Custom Styles
 * -------------------------
 * Custom styling for SelloMayor platform
 */

/* Variables de colores según el manual de estilo */
:root {
    --color-header: #ffffff;
    --color-sidebar: #eeeeeeff;  /* Gris claro para la barra lateral */
    --color-background: #f5f5f5;  /* Gris más claro para el fondo general */
    --color-background-2: #546e7a;  /* Gris aún más claro para fondos secundarios */
    --color-text: #333333;
    --color-primary: #6c8997;  /* Color principal de SelloMayor */
    --color-accent: #ffb306;  /* Color del acento (sonrisa) de SelloMayor */
    --color-active: #e04587;  /* Color para elementos activos */
    --badge-size:   90px;
    --font-sans:    'Montserrat', sans-serif;
    --soft-grey: #eeeeeeff;
    --grey: #d9d9d9;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: 'Montserrat', sans-serif;
}

/* Layout Styles */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    background-color: var(--color-sidebar);
    color: var(--color-text);
}

#sidebar.collapsed {
    margin-left: -250px;
}

#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.content-area {
    flex: 1;
    padding: 20px;
    background-color: var(--color-background);
}

/* Navigation Styles */
.navbar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Sidebar Styles */
.sidebar-header {
    padding: 20px;
    background-color: var(--color-header);
    text-align: center;
}

/* Dropdown submenu styles */
#sidebar .dropdown-toggle {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 10px 20px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

#sidebar .dropdown-toggle:hover {
    background-color: rgba(0,0,0,0.08);
}

/* Toggle activo: fondo color-active, texto blanco */
#sidebar .list-unstyled li a.dropdown-toggle.active {
    background-color: var(--color-active);
    color: white !important;
}

#sidebar .collapse ul li {
    margin: 0;
}

#sidebar .collapse ul li a {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 8px 0 8px 4px;
    font-size: 0.9em;
    transition: color 0.2s;
    border-left: 2px solid transparent;
}

#sidebar .collapse ul li a:hover {
    color: var(--color-active);
    border-left-color: var(--color-active);
}

/* Sub-link activo dentro de un submenu */
#sidebar .collapse ul li a.active {
    color: var(--color-active) !important;
    font-weight: 700;
    border-left-color: var(--color-active);
}

#sidebar .list-unstyled {
    padding: 20px 0;
}

#sidebar .list-unstyled li a {
    padding: 10px 20px;
    display: block;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
}

#sidebar .list-unstyled li a:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Item de primer nivel activo (sin submenu) */
#sidebar .list-unstyled li.active > a {
    background: var(--color-active);
    color: white !important;
}

/* Links directos con clase active dentro de submenús */
#sidebar .collapse ul li a.active,
#sidebar .list-unstyled li a.active {
    color: var(--color-active) !important;
    font-weight: 700;
}

.sidebar-footer {
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
}

/* Logo Styles */
.client-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.client-logo-small {
    max-height: 30px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Sidebar Logo */
.sidebar-header img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 80px;
    display: block;
    margin: 0 auto;
}

/* Button Icon Style */
.btn-icon {
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

/* Report Completion Widget - Solo Desktop */
@media (min-width: 769px) {
    .report-completion-widget {
        padding: 1.5rem 1rem;
        background: white;
        border-radius: 12px;
        margin: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
    }

    .completion-title {
        color: var(--color-text);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 1rem;
        text-align: center;
        letter-spacing: 0.5px;
    }

    .dimensions-progress-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .dimension-progress-item {
        background: #f8f9fa;
        padding: 0.75rem;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .dimension-progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .dimension-progress-name {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--color-text);
        flex: 1;
        margin-right: 0.5rem;
    }

    .dimension-progress-percentage {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--color-text);
    }

    .dimension-progress-bar {
        height: 8px;
        border-radius: 4px;
        background-color: #e9ecef;
        margin-bottom: 0.25rem;
    }

    .dimension-progress-bar .progress-bar {
        border-radius: 4px;
        transition: width 0.6s ease;
    }

    .dimension-progress-item small {
        font-size: 0.7rem;
        color: #6c757d;
        display: block;
    }
}

/* Ocultar widget en mobile */
@media (max-width: 768px) {
    .report-completion-widget {
        display: none;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
        position: fixed;
        z-index: 1000;
        height: 100%;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
    }

    #sidebarCollapse {
        display: block;
    }
}

/* ---------------------------------- */
/* General overrides              */
/* ---------------------------------- */

.text-primary {
    color: var(--color-active) !important;
}

.text-secondary {
    color: var(--color-active) !important;
}



/* ---------------------------------- */
/* Login page overrides              */
/* ---------------------------------- */
.login-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .login-card .card-header {
    background-color: var(--color-primary);
    color: #fff;
    border-bottom: none;
    padding: 2rem 1.5rem;
  }

  .login-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
  }

  .login-card .card-title {
    margin-bottom: 0.25rem;
  }

  .login-card .card-subtitle {
    color: rgba(255, 255, 255, 0.8);
  }

  .login-card .btn-primary {
    background-color: var(--color-active);
    border-color: var(--color-active);
    font-weight: 500;
    padding: 0.75rem;
  }

  .login-card .btn-primary:hover {
    background-color: #ba2765; /* un tono ligeramente más oscuro */
    border-color: #ba2765;
  }


/* Content area background */
.container-fluid .content-area {
  background: white !important;
}

#content .container-fluid {
  background: white !important;
}

/* ---------------------------------- */
/* Empresa/Client Dashboard Styles    */
/* ---------------------------------- */
  .btn-primary {
    background-color: var(--color-active);
    border-color: var(--color-active);
    font-weight: 500;
  }

  .btn-primary:hover {
    background-color: #ba2765; /* un tono ligeramente más oscuro */
    border-color: #ba2765;
  }

.empresa-header {
    background-color: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empresa-title {
    color: var(--color-active);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
}

.empresa-description {
    color: #666;
    max-width: 80ch;
    font-size: 1rem;
    line-height: 1.6;
}

.empresa-badge {
    flex-shrink: 0;
    margin-left: 30px;
}

.default-badge {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #E04587;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.badge-year {
    font-size: 2rem;
    font-weight: bold;
}

.badge-text {
    font-size: 1.2rem;
    font-weight: 500;
}

.year-selector {
    margin-bottom: 20px;
}

.year-dropdown {
    max-width: 500px;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 25px;
    border: 2px solid #ddd;
    background-color: white;
}

.evaluation-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.evaluation-image {
    margin-top: 20px;
}

.evaluation-image img {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-buttons .btn {
    font-weight: 500;
}

/* Asegurar botones dentro de forms en grupos verticales */
.btn-group-vertical form {
    width: 100%;
}

.btn-group-vertical form .btn {
    width: 100%;
}

@media (max-width: 768px) {
    .empresa-header {
        flex-direction: column;
        text-align: center;
    }
    
    .empresa-badge {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .empresa-title {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* DIMENSIONS COMPARISON MI EMPRESA */


.dimension-comparison-block-dimension {
    padding: 5px;
}

.dimension-comparison-block {
    padding: 20px;
}

.dimension-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.comparison-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comparison-label {
    min-width: 180px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: end;
}

.progress-container {
    flex-grow: 1;
}

.comparison-progress {
    height: 25px;
    background-color: #e9ecef;
    border-radius: 4px;
}

.comparison-score {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-progress .progress-bar {
    transition: width 1s ease-in-out;
}

/* DIMENSIONS CHART MI EMPRESA */

.dimensions-chart {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dimension-row {
    margin-bottom: 24px;
}

.dimension-row:last-child {
    margin-bottom: 0;
}

.dimension-name {
    font-weight: 600;
    color: #666;
    font-size: 16px;
}

.dimension-score {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

.progress-container {
    position: relative;
}

.dimension-progress {
    height: 24px;
    background-color: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.dimension-progress-bar {
    border-radius: 12px;
    transition: width 1.5s ease-in-out;
    position: relative;
}

/* Animación de entrada */
@keyframes progressAnimation {
    from {
        width: 0%;
    }
    to {
        width: var(--target-width);
    }
}

.dimension-progress-bar.animate {
    animation: progressAnimation 1.5s ease-in-out;
}

/* Colores por defecto basados en score */
.progress-bar.score-excellent {
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%) !important;
}

.progress-bar.score-good {
    background: linear-gradient(90deg, #8BC34A 0%, #CDDC39 100%) !important;
}

.progress-bar.score-average {
    background: linear-gradient(90deg, #FFC107 0%, #FF9800 100%) !important;
}

.progress-bar.score-poor {
    background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%) !important;
}

.no-chart-data {
    padding: 40px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .dimension-info {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .dimension-score {
        align-self: flex-end;
        margin-top: 4px;
    }
    
    .dimension-name {
        font-size: 14px;
    }
    
    .dimension-score {
        font-size: 16px;
    }
}

/* DIMENSIONS CARD STYLES */

/* 2. Component: Dimension Card */
.container .dimension-card {
    align-items:       center;
    background:        #f5f5f5;
    border:            none;
    border-radius:     8px;
    box-shadow:        none;
    display:           flex;
    font-family:       var(--font-sans);
    justify-content:   space-between;
    margin-bottom:     20px;
    padding:           16px;
}

.dimension-card-2 {
    background:        #f5f5f5;
    border:            none;
}


/* 3. Dimension Card Content */
.container .dimension-card .dimension-card-content {
    max-width: 70%;
    text-align: left;
}

/* 4. Text Elements */
.container .dimension-card .dimension-card-dimension {
    color:       #E04587;
    font-size:   14px;
    font-weight: normal;
    margin:      0 0 4px;
}

.container .dimension-card .dimension-card-text {
    color:     #666666;
    font-size: 14px;
    line-height: 1.4;
    margin:    0;
    max-width: 80ch;
}

.container .dimension-card .dimension-card-title {
    color:       #E04587;
    font-size:   24px;
    font-weight: 600;
    margin:      0 0 8px;
}

/* 5. Badge */
.container .dimension-card .dimension-badge {
    align-items:    center;
    background:     #FBBC04FF;
    border:         none;
    border-radius:  50%;
    box-shadow:     0 2px 6px rgba(0, 0, 0, 0.1);
    color:          #FFFFFF;
    display:        flex;
    flex-direction: column;
    height:         var(--badge-size);
    justify-content: center;
    width:          var(--badge-size);
}

.container .dimension-card .dimension-badge-label {
    font-size: 12px;
    margin:    2px 0 0;
}

.container .dimension-card .dimension-badge-percentage {
    font-size:   24px;
    font-weight: bold;
    line-height: 1;
    margin:      0;
}

/* 6. Badge Color Variants */
.container .dimension-card .dimension-badge-gray {
    background: #9E9E9E;
}

.container .dimension-card .dimension-badge-green {
    background: #6AA84FFF;
}

.container .dimension-card .dimension-badge-red {
    background: #CC0000FF;
}

.container .dimension-card .dimension-badge-yellow {
    background: #FBBC04FF;
}

/* Indicator Card Styles */
.indicator-card {
  display: flex;
  flex-wrap: wrap; 
  width: 100%;
  align-items: stretch; /* Asegura igual altura */
  gap: 12px; /* espacio entre los bloques */
  margin-bottom: 12px;
}

.indicator-card-2 {
  margin: 0px 8px;
  background-color: var(--color-background);
  border-color: var(--color-background);
}

.indicator-card-left {
  background-color: #E04587;
  color: white;
  flex: 1;
  min-width: 0;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  border-radius: 12px;
}

.indicator-card-title {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}

.indicator-card-right {
  background-color: #f0f0f0;
  padding: 6px 20px;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
}

.indicator-eval-label {
  color: #E04587;
  font-weight: 500;
  font-size: 14px;
}

.indicator-badge {
  background-color: #fbbc04;
  color: white;
  font-weight: 700;
  font-size: 16px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.indicator-badge-yellow {
  background: #FBBC04FF;
}
.indicator-badge-green {
  background: #6aa84fff;
}
.indicator-badge-red {
  background: #cc0000ff;
}
.indicator-badge-gray {
  background: #9e9e9e;
}

@media (max-width: 600px) {
  .indicator-card {
    flex-direction: column;  /* apila verticalmente */
    gap: 8px;                /* ajusta el espacio entre ellos si quieres */
  }

  .indicator-card-left,
  .indicator-card-right {
    width: 100%;             /* que ocupen todo el ancho */
    min-width: 0;            /* para que no queden forzados a un ancho mínimo */
  }
}

/* Theme Card Styles (turquesa format) */
.theme-card {
  display: flex;
  background: #7fa4ae;
  border-radius: 8px;
  overflow: hidden;
  font-family: Montserrat, sans-serif;
  color: white;
  margin-bottom: 12px;
}

.theme-card-left {
  flex: 1;
  padding: 16px;
  box-sizing: border-box;
  border-right: 1px solid rgba(255, 255, 255, 0.6);
}

.theme-card-left p {
  max-width: 80ch;
  word-wrap: break-word;
}

.theme-card-dimension {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.theme-card-title {
  margin: 4px 0 12px;
  font-size: 16px;
  line-height: 1.4;
}

.ver-mas {
  margin: 0 0 12px;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  color: white;
  text-align: right;
  display: block;
}

.subtems {
  color: black;
  background-color: white;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.hidden {
  display: none !important;
}

.collab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.collab-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  max-width: 80ch;
}

.collab-table td {
  padding: 8px 0;
  padding-right: 30px;
  vertical-align: middle;
}

.badge-cell {
  width: 60px;
  text-align: center;
}

.theme-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: bold;
  color: white;
}

.theme-badge-yellow {
  background: #FBBC04FF;
}

.theme-badge-green {
  background: #6aa84fff;
}

.theme-badge-red {
  background: #cc0000ff;
}
.theme-badge-gray {
  background: #9e9e9e;
}

/* Estilos para formularios de reporte */
.theme-report-form {
    background-color: #f8f9fa;
    color: #333;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.upload-zone:hover {
    border-color: #007bff;
}

.upload-zone.dragover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.upload-zone-content {
    pointer-events: none;
}

.form-status {
    font-size: 0.9rem;
}

.form-status.success {
    color: #28a745;
}

.form-status.error {
    color: #dc3545;
}

.form-status.loading {
    color: #6c757d;
}

.form-fields-container {
    transition: all 0.3s ease;
}

.loaded-files-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.loaded-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.loaded-file-item:last-child {
    border-bottom: none;
}

.loaded-file-name {
    font-size: 0.9rem;
    color: #333;
    flex-grow: 1;
}

.loaded-file-actions {
    display: flex;
    gap: 0.5rem;
}

.loaded-file-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.modification-info {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 3px solid #007bff;
}

/* ========================================
   ESTILOS PARA COMPROMISOS 
   ======================================== */

.btn-compromisos {
    margin-left: 80ch;
}

/* Diseño responsive - 70% desktop, 100% mobile */
@media (min-width: 992px) {
    .col-lg-8 {
        max-width: 70%;
    }
}

.dimension-banner-wrapper {
    width: 100%;
    overflow-x: auto;
}

.dimension-banner {
    display: block;
    background: #56869e;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 6px;
    box-sizing: border-box;
    text-align: left;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.dimension-banner:hover {
    background-color: #476e83;
    cursor: pointer;
}

.commitment-banner-wrapper {
    width: 100%;
    overflow-x: auto;
}

.commitment-banner {
    display: block;
    background: #56869e;
    color: white;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 6px;
    box-sizing: border-box;
    text-align: left;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease;
    /* Permitir que el texto se ajuste y salte línea */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.commitment-banner:hover {
    background-color: #476e83;
    cursor: pointer;
}

/* Opcional: ajustar tamaño de fuente en pantallas muy pequeñas */
@media (max-width: 480px) {
    .commitment-banner {
        font-size: 14px;
        padding: 10px 16px;
    }
}

.dimension-section {
    margin-bottom: 2rem;
}

.dimension-title-wrapper {
    margin-bottom: 1rem;
}

.dimension-title {
    background: #56869e;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dimension-title h5 {
    font-weight: 600;
    font-size: 18px;
    margin: 0;
}

.dimension-title .small {
    font-size: 13px;
    margin-top: 5px;
}

/* Estilos para los detalles del compromiso */
.commitment-details {
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
}


.details-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed;
}

.details-table tr {
    border-bottom: 1px solid #dee2e6;
}

.details-table tr:last-child {
    border-bottom: none;
}

.detail-key {
    width: 40%;
    background-color: #e9ecef;
    padding: 12px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    vertical-align: top;
    border-right: 1px solid #dee2e6;
}

.detail-value {
    background-color: white;
    padding: 12px;
    color: #495057;
    font-size: 14px;
    vertical-align: top;
}

.commitment-card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.commitment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.commitment-header {
    background: #E04587;
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
}

.commitment-code {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
    font-weight: 500;
}

.commitment-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.detail-item {
    margin-bottom: 8px;
}

.detail-item strong {
    font-size: 13px;
    color: #666;
}

.detail-value {
    font-size: 14px;
    color: #333;
    margin-top: 2px;
}

.progress-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.upload-area {
    transition: border-color 0.3s ease, background-color 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-area:hover {
    border-color: #0d6efd !important;
    background-color: #f8f9ff;
}

.upload-area input[type="file"] {
    border: none;
    background: none;
    padding: 0;
}

.commitment-form .form-control,
.commitment-form .form-select {
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
}

.commitment-form .form-control:focus,
.commitment-form .form-select:focus {
    border-color: #E04587;
    box-shadow: 0 0 0 0.2rem rgba(224, 69, 135, 0.25);
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

@media (max-width: 768px) {
    .commitment-header {
        padding: 12px 15px;
    }
    
    .commitment-code {
        font-size: 11px;
    }
    
    .commitment-title {
        font-size: 14px;
    }
    
    .dimension-banner,
    .commitment-banner {
        font-size: 14px;
        padding: 10px 15px;
    }
}


/* Agregar al final del <style> */
.subtheme-score-input.modified {
    border-left: 3px solid #28a745;
    background-color: #f8fff8;
}

.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/*-- Evalucion Subtheme */
/*-- CSS para selección de imágenes */
.image-selection-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
}

.image-selection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    background: #f8f9fa;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: pointer;
}

.thumbnail-image:hover {
    transform: scale(1.05);
}

.image-preview {
    transition: all 0.3s ease;
}

.image-preview:hover {
    filter: brightness(1.1);
}

.image-checkbox {
    display: none;
}

.image-checkbox-label {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.image-checkbox-label .check-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-checkbox:checked + .image-checkbox-label {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.image-checkbox:checked + .image-checkbox-label .check-icon {
    opacity: 1;
}

.image-checkbox-label:hover {
    background: #e9ecef;
    border-color: #28a745;
}

.image-checkbox-label:hover .check-icon {
    opacity: 0.5;
}

.image-checkbox:checked + .image-checkbox-label:hover {
    background: #218838;
}

.image-checkbox:checked + .image-checkbox-label:hover .check-icon {
    opacity: 1;
}

.preview-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    border: none;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #495057;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.image-selection-card:hover .preview-btn {
    opacity: 1;
}

.preview-btn:hover {
    background: #f8f9fa !important;
    color: #007bff;
    transform: scale(1.1);
}

.image-selection-card img {
    transition: filter 0.2s ease;
}

.image-checkbox:checked ~ .image-preview {
    filter: brightness(0.9);
}

.selected-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 167, 69, 0.2);
    border: 3px solid #28a745;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.image-checkbox:checked ~ .thumbnail-container .selected-overlay,
.image-checkbox:checked ~ .selected-overlay {
    opacity: 1;
}

.image-checkbox:checked ~ .thumbnail-container .thumbnail-image,
.image-checkbox:checked ~ .thumbnail-container .image-preview {
    filter: brightness(0.9) contrast(1.1);
}

.image-selection-card.selected {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.image-error-placeholder {
    color: #6c757d;
}

/* Modal para vista previa */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.image-modal img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-close:hover {
    color: #ccc;
}

/*-- Evalucion Subtheme */
/*-- CSS para selección de imágenes */

/* Header de evaluación */

/* Lista de indicadores */
.indicators-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.indicator-item {
    border-radius: 10px;
    overflow: hidden;
}

.indicator-main {
    background: var(--color-active);
    border-radius: 10px;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.indicator-content-2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.indicator-arrow {
    font-size: 1.2rem;
}

.indicator-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.indicator-scores {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.score-year {
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Score circles - Consolidated sizes */
.score-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Large circles - Dimensions (120px) */
.score-circle-large {
    width: 120px;
    height: 120px;
    font-size: 1.5rem;
    border: 5px solid;
}

/* Medium circles - Indicators (60px) */
.score-circle-medium {
    width: 60px;
    height: 60px;
    font-size: 0.9rem;
    border: 3px solid;
}

/* Small circles - Status badges (30px) */
.score-circle-small {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    border: 2px solid;
}

.detail-button-full {
    background-color: var(--color-background-2);
    color: white;
}

.detail-button-full:hover {
    background-color: #e9ecef;
}

.detail-button-full:active {
    transform: translateY(0);
}



/* Detalle del indicador */
.indicator-detail {
    background: var(--color-background-2);
    color: white;
    width: 100%;
    margin-top: 1rem;
    padding: 5px 2rem 2rem 2rem;
}

.indicator-detail.hidden {
    display: none;
}

.detail-content {
    max-width: 100%;
}

.detail-header {
    margin-bottom: 2rem;
    max-width: 80ch; /* limita ancho de texto para usabilidad */
}

.detail-number {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.detail-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.evidence-text {
    font-style: italic;
    opacity: 0.8;
}

/* Tabla de subtemas */
.subtemas-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

.subtemas-table .table {
    margin: 0;
    color: #333;
}

.subtemas-table .table th {
    background: #f8f9fa;
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.subtemas-table .table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 14px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.image-link {
    color: #e91e63;
    text-decoration: none;
    font-size: 0.9rem;
}

.image-link:hover {
    text-decoration: underline;
}

.last-year-col-table {
    background-color: var(--color-background-2);
}

.arrow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .evaluation-header {
        flex-direction: column;
        text-align: center;
    }
    
    .dimension-info {
        margin-right: 0;
        margin-bottom: 2rem;
    }
    
    .evaluation-badges {
        justify-content: center;
    }
    
    .indicator-main {
        border-radius: 10px;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .indicator-scores {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Estilos para las evidencias */
.evidence-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.evidence-item {
    position: relative;
}

.evidence-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.evidence-thumbnail:hover {
    transform: scale(1.1);
}

.evidence-file-icon {
    transition: transform 0.2s ease;
}

.evidence-file-icon:hover {
    transform: scale(1.1);
    background-color: #e9ecef !important;
}

.evidence-count {
    font-size: 0.75rem;
}

.no-evidence {
    font-size: 0.875rem;
    font-style: italic;
}

/* Modal para evidencias */
.evidence-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.evidence-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.evidence-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.evidence-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1051;
}

.evidence-modal-close:hover,
.evidence-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .evidence-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .evidence-file-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    .evidence-gallery {
        gap: 4px;
    }
}

/* ❌ ANTES: */
.col-subtema { 
  width: 30%;
}

.col-evidencia { 
  width: 25%; 
  text-align: center;
}

.col-comentario { 
  width: 34%; 
}

/* ✅ DESPUÉS: Redistribuir el espacio eliminando .col-evidencia */
.col-subtema { 
  width: 35%;  /* ✅ Aumentado de 30% a 35% */
}

/* ❌ ELIMINAR completamente .col-evidencia */

.col-comentario { 
  width: 56%;  /* ✅ Aumentado de 34% a 56% (gana el espacio de evidencia) */
}


/* ========================================
   COMENTARIOS EN COMPROMISOS
======================================== */

.comments-section {
    margin-top: 2rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-header h6 {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.comments-count {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comment-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #6c757d;
}

.comment-content {
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.comment-actions .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.comment-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.comment-form textarea {
    resize: vertical;
    min-height: 80px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.comment-form textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.empty-comments {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.empty-comments i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .comments-section {
        margin-top: 1.5rem;
    }
    
    .comment-item {
        padding: 0.5rem 0.75rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ========================================
   BATCH EVALUATIONS TABLE
======================================== */

/* En styles.css - Solo para tabla de evaluaciones */
.batch-evaluations-table td:nth-child(3),
.batch-evaluations-table th:nth-child(3) {
    max-width: 500px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   DETAIL CONTENT BACKGROUND & BADGES
======================================== */

.detail-description {
    color: white;
}

.action-buttons {
    color: white;
}

/* Status badges con colores */
.status-badge-green {
    background-color: #28a745 !important;
    color: white !important;
}

.status-badge-yellow {
    background-color: #ffc107 !important;
    color: white !important;
}

.status-badge-red {
    background-color: #dc3545 !important;
    color: white !important;
}

.status-badge-neutral {
    background-color: #6c757d !important;
    color: white !important;
}

/* Arrow circles */
.arrow-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.arrow-neutral {
    background-color: #6c757d;
}

.arrow-up {
    background-color: #28a745;
}

.arrow-down {
    background-color: #dc3545;
}

/* ========================================
   CERTIFICATION PROGRESS STYLES
   ======================================== */

.progress-general-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.progress-general-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.progress-legend {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.progress-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.progress-legend-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.progress-legend-circle.completed {
    background-color: var(--color-active);
}

.progress-legend-circle.in-progress {
    background-color: var(--color-accent);
}

.progress-legend-circle.pending {
    background-color: var(--soft-grey);
}

.progress-counter {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-active);
}

.certification-progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}

.certification-progress-fill {
    height: 100%;
    background-color: var(--color-active);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.milestones-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    position: relative;
}

.milestones-container::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    height: 3px;
    background-color: var(--grey);
    z-index: 0;
}

.milestone-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.milestone-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s ease;
}

.milestone-circle.completed {
    background-color: var(--color-active);
    border: 3px solid #ffa9ce;
}

.milestone-circle.in_progress {
    background-color: var(--color-accent);
    border: 3px solid #ffe699;
}

.milestone-circle.pending {
    background-color: var(--soft-grey);
    border: 3px solid #d9d9d9;
}

.milestone-circle.skipped {
    background-color: #ced4da;
    opacity: 0.5;
    border: 3px solid #d9d9d9;
}

.milestone-name {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 100%;
}

.milestone-item.completed .milestone-name {
    font-weight: 600;
    color: var(--color-active);
}

.milestone-item.in_progress .milestone-name {
    font-weight: 600;
    color: var(--color-accent);
}

/* Responsive para mobile */
@media (max-width: 768px) {
    .milestones-container {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .milestone-item {
        min-width: 80px;
        flex: 0 0 auto;
    }
    
    .milestone-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .milestone-name {
        font-size: 0.7rem;
    }
    
    .progress-legend {
        gap: 16px;
    }
    
    .progress-legend-item {
        font-size: 0.85rem;
    }
}