/* Estilos personalizados para LogVisor con Bootstrap 5 */

/* Variables de color personalizadas */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --info-color: #0dcaf0;
  --dark-color: #212529;
  --light-color: #f8f9fa;
}

/* Estilos globales */
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background-color: #f8f9fa;
  font-family: 'Roboto', sans-serif;
}

/* Personalización de componentes Bootstrap */
.container-fluid {
  max-width: 100% !important;
}

/* Estilos para cards personalizados */
.custom-card {
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

.custom-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Estilos para métricas del dashboard */
.metric-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.metric-card.success {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.metric-card.warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.metric-card.info {
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}

/* Estilos para accesos rápidos */
.quick-access-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.quick-access-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Estilos para tablas */
.custom-table {
  border-radius: 8px;
  overflow: hidden;
}

.custom-table .table thead {
  background-color: #f8f9fa;
}

/* Estilos para formularios */
.custom-form {
  max-width: 600px;
  margin: 0 auto;
}

/* Estilos para botones personalizados */
.custom-button {
  border-radius: 8px;
  font-weight: 500;
  text-transform: none;
  transition: all 0.2s ease;
}

.custom-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Estilos para badges personalizados */
.custom-badge {
  border-radius: 16px;
  font-weight: 500;
}

/* Estilos para alertas personalizadas */
.custom-alert {
  border-radius: 8px;
  border-left: 4px solid;
}

.custom-alert.success {
  border-left-color: var(--success-color);
  background-color: rgba(25, 135, 84, 0.1);
}

.custom-alert.warning {
  border-left-color: var(--warning-color);
  background-color: rgba(255, 193, 7, 0.1);
}

.custom-alert.danger {
  border-left-color: var(--error-color);
  background-color: rgba(220, 53, 69, 0.1);
}

.custom-alert.info {
  border-left-color: var(--info-color);
  background-color: rgba(13, 202, 240, 0.1);
}

/* Estilos para modales personalizados */
.custom-modal .modal-content {
  border-radius: 12px;
}

.custom-modal .modal-header {
  font-weight: 600;
}

/* Estilos para navegación */
.custom-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.custom-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.custom-nav .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.custom-nav .nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Estilos para progress bars personalizados */
.custom-progress {
  border-radius: 8px;
  height: 8px;
}

/* Estilos para tooltips personalizados */
.custom-tooltip {
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Estilos para responsive */
@media (max-width: 768px) {
  .metric-card {
    margin-bottom: 1rem;
  }
  
  .quick-access-card {
    margin-bottom: 1rem;
  }
  
  .custom-form {
    padding: 0 1rem;
  }
}

/* Estilos para animaciones */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Estilos para scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Estilos para estados de carga */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Estilos para iconos personalizados */
.custom-icon {
  font-size: 1.5rem;
}

.custom-icon:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Estilos para texto personalizado */
.custom-text {
  font-weight: 500;
}

.custom-text.bold {
  font-weight: 700;
}

.custom-text.light {
  font-weight: 300;
}

/* Estilos para espaciado personalizado */
.custom-spacing {
  margin: 1rem 0;
}

.custom-spacing.small {
  margin: 0.5rem 0;
}

.custom-spacing.large {
  margin: 2rem 0;
}

/* Estilos para tarjetas de documentos */
.document-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
}

.document-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.document-card .card-body {
  padding: 1.25rem;
}

.document-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: 100%;
  display: block;
  width: 100%;
  line-height: 1.3;
  max-height: 2.6em;
  word-wrap: break-word;
}

.document-card .card-text {
  font-size: 0.8rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: 100%;
  display: block;
  width: 100%;
  max-height: 2.8em;
  word-wrap: break-word;
}

.document-card .flex-grow-1 {
  min-width: 0;
  overflow: hidden;
}

.document-card .dropdown-toggle::after {
  display: none;
}

.document-card .dropdown-menu {
  min-width: 150px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.document-card .dropdown-item {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.document-card .dropdown-item:hover {
  background-color: #f8f9fa;
}

.document-card .dropdown-item.text-danger:hover {
  background-color: #f8d7da;
}

/* Estilos para el menú personalizado de documentos */
.document-card .position-relative {
  position: relative;
}

.document-card .position-absolute {
  position: absolute;
}

.document-card .btn-link:hover {
  background-color: #f8f9fa;
}

.document-card .btn-link.text-danger:hover {
  background-color: #f8d7da;
}

/* Estilos para estadísticas de documentos */
.stats-card {
  border-radius: 8px;
  border: none;
  transition: transform 0.2s ease;
}

.stats-card:hover {
  transform: translateY(-1px);
}

.stats-card .card-body {
  padding: 1.5rem;
}

.stats-card .card-title {
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stats-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* Estilos para modales de documentos */
.document-modal .modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.document-modal .modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem;
}

.document-modal .modal-body {
  padding: 1.5rem;
}

.document-modal .modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1.5rem;
}

/* Estilos para vista previa de documentos */
.document-preview {
  border-radius: 8px;
  overflow: hidden;
}

.document-preview iframe {
  border: none;
  width: 100%;
  height: 600px;
}

.document-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
