/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Pantallas */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Contenedor para contraseña con botón */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 50px;
}

/* Botón para mostrar/ocultar contraseña */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
    font-size: 1rem;
}

.toggle-password:hover {
    color: #667eea;
}

.toggle-password:focus {
    outline: none;
}

/* Contenedor para DNI con botón de búsqueda */
.dni-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.dni-search-container input {
    padding-right: 50px;
}

.search-dni-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-dni-btn:hover {
    background: #5a6fd8;
}

.search-dni-btn:focus {
    outline: none;
}

.search-dni-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-btn i {
    margin-right: 8px;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.nav-brand i {
    margin-right: 10px;
    color: #667eea;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Main Content */
.main-content {
    padding: 30px;
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
}

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.dashboard-header h2 i {
    margin-right: 10px;
    color: #667eea;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Botones */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Sections */
.section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

/* Tablas */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: relative;
}

/* Botones de ordenar - solo visibles en hover */
.sort-buttons {
    display: none;
    flex-direction: column;
    margin-left: 8px;
    vertical-align: middle;
}

th:hover .sort-buttons {
    display: inline-flex;
}

th:not(:last-child):hover .sort-buttons {
    display: inline-flex;
}

.sort-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #667eea;
    font-size: 0.7rem;
    transition: all 0.2s;
    line-height: 1;
    margin: 0;
}

.sort-btn:hover {
    color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
}

.sort-btn:active {
    transform: scale(0.95);
}

.sort-btn i {
    font-size: 0.7rem;
}

tr:hover {
    background: #f8f9fa;
}

/* Estados de los registros */
.status-asistio {
    color: #28a745;
    font-weight: 600;
}

.status-cancelo {
    color: #dc3545;
    font-weight: 600;
}

.status-reprogramo {
    color: #ffc107;
    font-weight: 600;
}

.status-falta {
    color: #6c757d;
    font-weight: 600;
}

/* Pasos del flujo */
.paso {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.paso-1 {
    background: #e3f2fd;
    color: #1976d2;
}

.paso-2 {
    background: #fff3e0;
    color: #f57c00;
}

.paso-3 {
    background: #e8f5e8;
    color: #388e3c;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal form {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e1e1e1;
}

.section-title:first-child {
    margin-top: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Utilidades */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-danger {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .table-container {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 8px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard {
    animation: fadeIn 0.5s ease-out;
}

.stat-card {
    animation: fadeIn 0.6s ease-out;
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alertas */
.alert {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
  position: relative;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.alert .close-btn {
  background: none;
  border: none;
  margin-left: auto;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.alert .close-btn:hover {
  opacity: 1;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estados de usuario */
.status-activo {
  color: #28a745;
  font-weight: 600;
}

.status-inactivo {
  color: #dc3545;
  font-weight: 600;
}

/* Estados de profesor asignado */
.professor-assigned {
  color: #28a745;
  font-weight: 600;
}

.professor-not-assigned {
  color: #ffc107;
  font-weight: 600;
}

/* Estilos para filtros */
.filters-container {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

/* Mensaje informativo para asesor */
.asesor-message {
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.asesor-message-info {
  background: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #2196f3;
}

.asesor-message i {
  font-size: 1.1rem;
}

.filter-row {
  display: flex;
  gap: 20px;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.filter-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #495057;
  font-size: 14px;
}

.filter-group input,
.filter-group select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: 0;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-group button {
  align-self: flex-start;
  margin-top: 5px;
}

/* Botones de acción */
.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.action-buttons .btn {
  min-width: auto;
  padding: 6px 10px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.action-buttons .btn i {
  margin-right: 4px;
}

/* Mejoras en botones */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn i {
  margin-right: 5px;
}

/* Contenedor de búsqueda de profesores */
.professor-search-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.professor-search-container .search-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.professor-search-container input[type="text"] {
  flex: 1;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

.search-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background: #5a6fd8;
}

.search-btn i {
  font-size: 0.9rem;
}

.professor-search-container select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.professor-search-container select:focus {
  outline: none;
  border-color: #667eea;
}

/* Lista de profesores encontrados */
.professor-results {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  background: white;
  display: none;
  position: absolute;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.professor-result-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.professor-result-item:hover {
  background-color: #f8f9fa;
}

.professor-result-item:last-child {
  border-bottom: none;
}

.professor-result-item.selected {
  background-color: #667eea;
  color: white;
}

/* Responsive para botones de acción */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    gap: 5px;
  }
  
  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .professor-search-container .search-input-group {
    flex-direction: column;
  }
  
  .search-btn {
    width: 100%;
  }
}

/* Estilos de Paginación */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e1e1e1;
  margin-bottom: 15px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #666;
}

.pagination-info select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

.pagination-info select:focus {
  outline: none;
  border-color: #667eea;
}

.pagination-navigation {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-navigation .btn {
  padding: 6px 12px;
  font-size: 0.85rem;
  min-width: 40px;
  text-align: center;
}

.pagination-navigation .btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination-navigation .btn.active:hover {
  background: #5a6fd8;
}

.pagination-navigation .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info-text {
  margin-left: 15px;
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* Responsive para paginación */
@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .pagination-info {
    justify-content: center;
  }
  
  .pagination-navigation {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .pagination-info-text {
    margin-left: 0;
    text-align: center;
    width: 100%;
  }
}

/* Estilos para campo de evidencia */
.file-upload-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-info {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
}

.evidence-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.evidence-item {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background: #f9f9f9;
  max-width: 200px;
}

.evidence-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid #e0e0e0;
}

.evidence-item img:hover {
  transform: scale(1.05);
  border-color: #667eea;
}

.evidence-item .file-details {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 8px;
}

.evidence-item .file-actions {
  display: flex;
  gap: 5px;
}

.evidence-item .btn {
  padding: 4px 8px;
  font-size: 0.7rem;
}

.evidence-item .btn-danger {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.evidence-item .btn-primary {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.evidence-item .btn:hover {
  opacity: 0.8;
}

.upload-progress {
  margin-top: 10px;
  padding: 10px;
  background: #e3f2fd;
  border-radius: 4px;
  display: none;
}

.upload-progress.show {
  display: block;
}

.upload-progress .progress-bar {
  width: 100%;
  height: 20px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 5px;
}

.upload-progress .progress-fill {
  height: 100%;
  background: #4caf50;
  transition: width 0.3s ease;
  width: 0%;
}

/* Responsive para evidencia */
@media (max-width: 768px) {
  .evidence-preview {
    flex-direction: column;
  }
  
  .evidence-item {
    max-width: 100%;
  }
  
  .file-upload-container {
    align-items: stretch;
  }
}

/* Estilos para Historial/Auditoría */
.historial-timeline {
  max-height: 600px;
  overflow-y: auto;
  padding: 20px;
}

.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #667eea, #764ba2);
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
  padding-left: 40px;
}

.timeline-marker {
  position: absolute;
  left: -5px;
  top: 0;
  width: 32px;
  height: 32px;
  background: white;
  border: 3px solid #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-marker i {
  color: #667eea;
  font-size: 14px;
}

.timeline-content {
  background: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-content:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.timeline-header strong {
  color: #333;
  font-size: 1rem;
}

.timeline-role {
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 600;
}

.timeline-date {
  color: #666;
  font-size: 0.85rem;
  margin-left: auto;
}

.timeline-body {
  color: #555;
}

.timeline-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.accion-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.accion-crear {
  background: #e8f5e9;
  color: #2e7d32;
}

.accion-editar {
  background: #e3f2fd;
  color: #1976d2;
}

.accion-eliminar {
  background: #ffebee;
  color: #c62828;
}

.accion-subir_evidencia {
  background: #fff3e0;
  color: #e65100;
}

.accion-eliminar_evidencia {
  background: #fce4ec;
  color: #c2185b;
}

.registro-info {
  color: #666;
  font-size: 0.9rem;
}

.cambio-detalle {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 0.9rem;
}

.cambio-detalle strong {
  color: #333;
}

.valor-anterior {
  color: #c62828;
  text-decoration: line-through;
  margin: 0 8px;
}

.valor-nuevo {
  color: #2e7d32;
  font-weight: 600;
  margin-left: 8px;
}

.cambio-detalle i {
  color: #667eea;
  margin: 0 8px;
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info i {
  margin-right: 8px;
}

.modal-body {
  padding: 20px;
}

/* Responsive para historial */
@media (max-width: 768px) {
  .timeline {
    padding-left: 20px;
  }
  
  .timeline-item {
    padding-left: 30px;
  }
  
  .timeline-marker {
    width: 24px;
    height: 24px;
    left: -3px;
  }
  
  .timeline-marker i {
    font-size: 12px;
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-date {
    margin-left: 0;
  }
}

/* Estilos para Logs de Sesiones */
.logs-container {
  max-height: 600px;
  overflow-y: auto;
  padding: 20px;
  margin-top: 20px;
}

.logs-container table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.logs-container table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.logs-container table thead th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.logs-container table tbody tr {
  transition: background 0.2s;
}

.logs-container table tbody tr:hover {
  background: #f5f5f5;
}

.logs-container table tbody td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.tipo-cierre {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tipo-logout_manual {
  background: #e3f2fd;
  color: #1976d2;
}

.tipo-cierre_pestana {
  background: #fff3e0;
  color: #e65100;
}

.tipo-sesion_expirada {
  background: #ffebee;
  color: #c62828;
}

.tipo-en-curso {
  background: #e8f5e9;
  color: #2e7d32;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success i {
  margin-right: 8px;
}

/* Responsive para logs */
@media (max-width: 768px) {
  .logs-container {
    overflow-x: auto;
  }
  
  .logs-container table {
    min-width: 800px;
  }
}