/* ============================================== 
   MOBILE-SPECIFIC STYLES
   ============================================== */

/* Mejoras adicionales para dispositivos móviles */

/* Touch targets más grandes */
@media (max-width: 768px) {
  
  /* Asegurar que todos los elementos interactivos sean táctiles */
  



  /* Inputs de búsqueda con icono */
  input[type="search"],
  .search-input,
  .productos-search-input,
  .filtro-input[type="date"] {
    padding-left: 44px;
  }

  /* Selects mejorados */
  select,
  .filtro-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
  }

  /* Textareas */
  textarea {
    min-height: 120px;
    resize: vertical;
    font-size: 16px !important;
  }

  /* Contenedores de búsqueda - ocupar todo el ancho */
  .search-container,
  .productos-search-container,
  .filtros-bar-content .filtro-grupo {
    width: 100%;
    position: relative;
  }

  /* Iconos dentro de inputs de búsqueda */
  .search-icon,
  .productos-search-icon,
  .filtro-label svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 1;
  }


  .btn-sm {
    padding: 12px 16px;
    font-size: 15px;
    min-height: 44px;
  }

  /* Botones en grupos horizontales - ocupar espacio disponible */
  .filter-group,
  .btn-group,
  [style*="display: flex"] .btn,
  .productos-main-header > div[style*="display: flex"] .btn {
    flex: 1;
    min-width: 0;
  }

  /* Cuando hay búsqueda y botón juntos, hacerlos apilados */
  .productos-main-header > div[style*="display: flex"] {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .productos-main-header > div[style*="display: flex"] .productos-search-container,
  .productos-main-header > div[style*="display: flex"] .btn {
    width: 100%;
    flex: none;
  }

  /* Botones primarios más visibles */
  .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  }

  .btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
  }

  /* Focus mejorado para accesibilidad */
  input:focus,
  textarea:focus,
  select:focus,
  .btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }

  /* Mejorar la legibilidad del texto */
  body {
    font-size: 16px;
    line-height: 1.5;
  }

  /* Ajustar espaciado para mejor usabilidad */
  .sidebar-menu a {
    margin-bottom: 8px;
    padding: 16px 12px;
  }

  /* Mejorar la navegación por tabs */
  .tabs-nav {
    background-color: var(--main-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
  }

  .tabs-nav button {
    border-bottom: 2px solid transparent;
    background: none;
    border-radius: 0;
    margin: 0;
  }

  .tabs-nav button.active {
    border-bottom-color: var(--accent-color);
    background: none;
  }

  /* Mejorar modales en mobile */
  .modal-overlay,
  .ticket-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    border-radius: 16px 16px 0 0;
    margin: 0;

    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  /* Mejorar formularios */
  .form-group {
    margin-bottom: 24px;
  }

  .form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
  }

  /* Mejorar botones de acción */
  .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 500;
  }

  .btn-secondary {
    background-color: var(--main-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
  }

  /* Mejorar cards */
  .card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
  }

  .card-header {
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
  }

  /* Mejorar listas */
  .list-item {
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
  }

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

  /* Mejorar badges y estados */
  .badge {
    border-radius: 12px;
    font-weight: 500;
    padding: 6px 12px;
  }

  /* Mejorar progress bars */
  .progress-bar {
    border-radius: 4px;
    background-color: var(--accent-color);
  }

  /* Mejorar alerts */
  .alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar dropdowns */
  .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
  }

  .dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Mejorar tooltips (convertir a modales en mobile) */
  .tooltip {
    display: none;
  }

  /* Mejorar scrollbars */
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  ::-webkit-scrollbar-track {
    background: var(--bg-color);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 3px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
  }

  /* Mejorar focus states para accesibilidad */
  .btn:focus,
  .input-field:focus,
  .select:focus,
  .sidebar-menu a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }

  /* Mejorar estados de hover para touch */
  .btn:active,
  .sidebar-menu a:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Mejorar animaciones para mobile */
  .btn,
  .sidebar-menu a,
  .modal-content,
  .card {
    transition: all 0.2s ease;
  }

  /* Mejorar la experiencia de carga */
  .loading-spinner {
    border: 3px solid var(--bg-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

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

  /* Mejorar notificaciones */
  .notification {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
  }

  /* Mejorar paginación */
  .pagination {
    background-color: var(--main-bg);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .pagination button {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--main-bg);
  }

  .pagination button.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
  }

  /* Mejorar search bars */
  .search-bar {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .search-bar input {
    border: none;
    background: none;
    padding: 12px 16px;
  }

  /* Mejorar filtros */
  .filter-group {
    background-color: var(--main-bg);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
        flex-direction: row;
  }

  /* Mejorar estadísticas */
  .stat-card {
    background-color: var(--main-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
  }

  .stat-value {
    font-weight: 600;
    color: var(--accent-color);
  }

  /* Mejorar gráficos */
  .chart-container {
    background-color: var(--main-bg);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar calendarios */
  .calendar-container {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .calendar-day {
    border-radius: 6px;
    transition: background-color 0.2s ease;
  }

  .calendar-day:hover {
    background-color: var(--active-item-bg);
  }

  /* Mejorar drag & drop */
  .dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    transition: all 0.2s ease;
  }

  .dropzone.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(109, 40, 217, 0.1);
  }

  /* Mejorar listas de archivos */
  .file-list {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .file-item {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
  }

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

  /* Mejorar breadcrumbs */
  .breadcrumb {
    background-color: var(--main-bg);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .breadcrumb-item {
    color: var(--text-secondary);
  }

  .breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
  }

  /* Mejorar tabs de contenido */
  .tab-content {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar accordions */
  .accordion-item {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
  }

  .accordion-header {
    border-radius: 8px;
    font-weight: 500;
  }

  .accordion-content {
    border-radius: 0 0 8px 8px;
  }

  /* Mejorar sliders */
  .slider {
    background-color: var(--border-color);
    border-radius: 3px;
  }

  .slider-thumb {
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }


  /* Mejorar segmented controls */
  .segmented-control {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 4px;
  }

  .segmented-control button {
    border-radius: 6px;
    background: none;
    border: none;
    transition: all 0.2s ease;
  }

  .segmented-control button.active {
    background-color: var(--main-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar date pickers */
  .date-picker {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar time pickers */
  .time-picker {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar file inputs */
  .file-input {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar selects */
  .select-wrapper {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar textareas */
  .textarea {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
  }

  /* Mejorar checkboxes y radios */
  .checkbox,
  .radio {
    accent-color: var(--accent-color);
  }

  /* Mejorar toolbars */
  .toolbar {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar overlays */
  .overlay {
    background-color: rgba(0, 0, 0, 0.5);
  }

  .overlay-content {
    background-color: var(--main-bg);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }

  /* Mejorar popovers */
  .popover {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
  }

  /* Mejorar context menus */
  .context-menu {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
  }

  .context-menu-item {
    border-radius: 6px;
    margin: 2px;
  }

  .context-menu-item:hover {
    background-color: var(--active-item-bg);
  }

  /* Mejorar drag handles */
  .drag-handle {
    background-color: var(--text-tertiary);
    border-radius: 2px;
  }

  .drag-handle:hover {
    background-color: var(--text-secondary);
  }

  /* Mejorar resize handles */
  .resize-handle {
    background-color: var(--accent-color);
    border-radius: 2px;
  }

  /* Mejorar estados de carga */
  .loading-state {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar estados vacíos */
  .empty-state {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Mejorar estados de error */
  .error-state {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #ef4444;
  }

  /* Mejorar estados de éxito */
  .success-state {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #10b981;
  }

  /* Mejorar estados de advertencia */
  .warning-state {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #f59e0b;
  }

  /* Mejorar estados de información */
  .info-state {
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
  }
}

/* Mejoras específicas para pantallas muy pequeñas */
@media (max-width: 480px) {
  
  .modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
    margin: 0;
  }

  .modal-header {
    padding: 12px;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-footer {
    padding: 12px;
  }

  /* Ajustar botones para pantallas muy pequeñas */
  .btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Ajustar inputs para pantallas muy pequeñas */
  .input-field {
    padding: 10px 12px;
    font-size: 14px;
  }

  /* Ajustar sidebar para pantallas muy pequeñas */
  .sidebar {
    width: 100%;
    left: -100%;
  }

  /* Ajustar tabs para pantallas muy pequeñas */
  .tabs-nav {
    padding: 0 8px;
  }

  .tabs-nav button {
    padding: 10px 6px;
    font-size: 12px;
  }

  /* Ajustar cards para pantallas muy pequeñas */
  .card {
    margin-bottom: 12px;
  }

  .card-header {
    padding: 12px;
  }

  .card-body {
    padding: 12px;
  }

  /* Ajustar formularios para pantallas muy pequeñas */
  .form-group {
    margin-bottom: 16px;
  }

  /* Ajustar estadísticas para pantallas muy pequeñas */
  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 12px;
  }

  /* Ajustar gráficos para pantallas muy pequeñas */
  .chart-container {
    height: 250px;
    padding: 12px;
  }

  /* Ajustar calendarios para pantallas muy pequeñas */
  .calendar-container {
    padding: 12px;
  }

  .calendar-day {
    min-height: 36px;
    font-size: 12px;
  }

  /* Ajustar drag & drop para pantallas muy pequeñas */
  .dropzone {
    padding: 16px;
    min-height: 100px;
  }

  /* Ajustar listas para pantallas muy pequeñas */
  .list-item {
    padding: 12px;
  }

  /* Ajustar badges para pantallas muy pequeñas */
  .badge {
    font-size: 10px;
    padding: 4px 8px;
  }

  /* Ajustar progress bars para pantallas muy pequeñas */
  .progress-bar {
    height: 6px;
  }

  /* Ajustar alerts para pantallas muy pequeñas */
  .alert {
    padding: 12px;
    font-size: 13px;
  }

  /* Ajustar tabs de contenido para pantallas muy pequeñas */
  .tab-content {
    padding: 12px 0;
  }

  /* Ajustar accordions para pantallas muy pequeñas */
  .accordion-header {
    padding: 12px;
    font-size: 13px;
  }

  .accordion-content {
    padding: 12px;
    font-size: 13px;
  }

  /* Ajustar sliders para pantallas muy pequeñas */
  .slider {
    height: 4px;
  }

  .slider-thumb {
    width: 16px;
    height: 16px;
  }

  /* Ajustar switches para pantallas muy pequeñas */
  .toggle-switch {
    transform: scale(1.1);
  }

  /* Ajustar segmented controls para pantallas muy pequeñas */
  .segmented-control {
    min-height: 40px;
  }

  .segmented-control button {
    padding: 10px 12px;
    font-size: 12px;
  }

  /* Ajustar date pickers para pantallas muy pequeñas */
  .date-picker input {
    font-size: 14px;
  }

  /* Ajustar time pickers para pantallas muy pequeñas */
  .time-picker input {
    font-size: 14px;
  }

  /* Ajustar file inputs para pantallas muy pequeñas */
  .file-input {
    padding: 10px;
  }

  .file-input-label {
    font-size: 12px;
  }

  /* Ajustar selects para pantallas muy pequeñas */
  .select-wrapper select {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* Ajustar textareas para pantallas muy pequeñas */
  .textarea {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 100px;
  }

  /* Ajustar checkboxes y radios para pantallas muy pequeñas */
  .checkbox,
  .radio {
    transform: scale(1.1);
  }

  .checkbox-label,
  .radio-label {
    font-size: 12px;
  }

  /* Ajustar toolbars para pantallas muy pequeñas */
  .toolbar {
    padding: 12px;
  }

  .toolbar-group {
    gap: 6px;
  }

  /* Ajustar overlays para pantallas muy pequeñas */
  .overlay {
    padding: 12px;
  }

  .overlay-content {
    width: 100%;
    max-width: none;
  }

  /* Ajustar popovers para pantallas muy pequeñas */
  .popover {
    width: 100%;
    left: 0;
    right: 0;
  }

  /* Ajustar context menus para pantallas muy pequeñas */
  .context-menu {
    width: 180px;
  }

  .context-menu-item {
    padding: 10px 12px;
    font-size: 12px;
  }

  /* Ajustar drag handles para pantallas muy pequeñas */
  .drag-handle {
    width: 20px;
    height: 20px;
  }

  /* Ajustar resize handles para pantallas muy pequeñas */
  .resize-handle {
    width: 6px;
    height: 6px;
  }
}

/* Estilos modernos estilo OpenAI para timeline de fichajes */
.fichaje-detalle-modal.modern {
  padding: 0;
}

.fichaje-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.fichaje-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fichaje-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #000;
  letter-spacing: -0.02em;
}

.fichaje-subtitle {
  margin: 0;
  font-size: 0.9375rem;
  color: #666;
  font-weight: 400;
}

.fichaje-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
}

.stat-card.highlight .stat-label,
.stat-card.highlight .stat-value {
  color: white;
}

.stat-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.8125rem;
  color: #666;
  font-weight: 500;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
  line-height: 1.2;
}

.stat-value.primary {
  font-size: 1.25rem;
}

.fichajes-timeline-modern {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.timeline-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.timeline-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.timeline-card.active {
  border-color: #10b981;
  background: linear-gradient(to bottom, #f0fdf4 0%, white 100%);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.timeline-type-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
}

.type-icon {
  font-size: 1rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: #10b981;
  color: white;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* Timeline vertical con línea central */
.timeline-vertical-container {
  position: relative;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
}

.timeline-vertical-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #e5e7eb 0%, #d1d5db 50%, #e5e7eb 100%);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-events {
  position: relative;
  z-index: 2;
}

.timeline-event-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  min-height: 60px;
}

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

.timeline-event-item.left {
  padding-right: calc(50% + 2rem);
}

.timeline-event-item.right {
  padding-left: calc(50% + 2rem);
  flex-direction: row-reverse;
}

.event-content {
  flex: 1;
  max-width: calc(50% - 3rem);
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.event-content:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.event-content.left-content {
  text-align: right;
}

.event-content.right-content {
  text-align: left;
}

.event-time-main {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
}

.event-label-main {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.event-duration {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  margin-top: 0.25rem;
}

.event-pause-duration {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 0.375rem;
  padding-top: 0.375rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.event-point {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 4px white;
  z-index: 10;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.event-point:hover {
  transform: translateX(-50%) scale(1.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 0 4px white;
}

.event-point.pulsing {
  animation: pulse-point 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-point {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 4px white, 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 4px white, 0 0 0 12px rgba(16, 185, 129, 0);
  }
}

.event-icon {
  font-size: 1.125rem;
  color: white;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  animation: pulse-ring-animation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring-animation {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

.timeline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.summary-label {
  color: #666;
  font-weight: 500;
}

.summary-value {
  color: #000;
  font-weight: 600;
}

.summary-value.highlight {
  color: #10b981;
  font-size: 1rem;
}

.timeline-pauses-list {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pauses-list-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.pauses-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pause-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.pause-item:hover {
  background: #f5f5f5;
  border-color: rgba(0, 0, 0, 0.08);
}

.pause-item-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pause-item-content {
  flex: 1;
  min-width: 0;
}

.pause-item-motive {
  font-weight: 600;
  color: #000;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.pause-item-time {
  font-size: 0.75rem;
  color: #666;
  font-variant-numeric: tabular-nums;
}

.pause-item-duration {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f59e0b;
  flex-shrink: 0;
}

.btn-toggle-fichaje-detalle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.btn-toggle-fichaje-detalle:hover {
  color: #000;
  background: rgba(0, 0, 0, 0.04);
}

.fichaje-row:hover {
  background-color: #fafafa;
}

/* Scrollbar personalizado */
.fichajes-timeline-modern::-webkit-scrollbar {
  width: 8px;
}

.fichajes-timeline-modern::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.fichajes-timeline-modern::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.fichajes-timeline-modern::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .fichaje-header {
    padding: 1.5rem 1rem 1rem;
  }

  .fichaje-stats-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.75rem;
  }

  .fichajes-timeline-modern {
    padding: 1rem;
  }

  .timeline-card {
    padding: 1rem;
  }

  .timeline-vertical-container {
    padding: 1.5rem 0;
  }

  .timeline-event-item {
    margin-bottom: 1.5rem;
    min-height: 50px;
  }

  .timeline-event-item.left {
    padding-right: calc(50% + 1.5rem);
  }

  .timeline-event-item.right {
    padding-left: calc(50% + 1.5rem);
  }

  .event-content {
    max-width: calc(50% - 2rem);
    padding: 0.75rem 1rem;
  }

  .event-time-main {
    font-size: 0.875rem;
  }

  .event-label-main {
    font-size: 0.8125rem;
  }

  .event-point {
    width: 32px;
    height: 32px;
  }

  .event-icon {
    font-size: 0.875rem;
  }

  .event-duration,
  .event-pause-duration {
    font-size: 0.6875rem;
  }
}

/* Estilos para tabla de ventas por IVA */
.table-total-row {
  background-color: #f0f9ff;
  font-weight: 600;
  border-top: 2px solid #0ea5e9;
}

.table-total-row td {
  padding: 0.75rem 0.5rem;
  border-top: 2px solid #0ea5e9;
}

.table-total-row:hover {
  background-color: #e0f2fe;
}
