/* Import Inter font from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* Variables globales */
:root {
  --transition-speed: 0.3s;
  --bs-primary: #337ab7;
  --bs-success: #5cb85c;
  --bs-info: #5bc0de;
  --bs-warning: #f0ad4e;
  --bs-danger: #d9534f;
  --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --box-shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

/* Base styles */
html {
  font-family: "Inter", sans-serif;
  font-size: 10px !important;
  -webkit-tap-highlight-color: transparent !important;
}

body {
  /* font-family: 'Inter', sans-serif;
    color: rgb(51, 54, 57);
    font-size: 12px !important;
    background-color: #fff; */
  font-family: "Inter", sans-serif;
  color: var(--bs-body-color);
  font-size: 13px !important;
  background-color: #f9fafb;
  line-height: 1.5;
}

/* Animación para cargar páginas suavemente */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Estilos para la animación de títulos */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-title {
  animation: fadeInDown 0.6s ease-out;
}

/* Encabezados y texto */
h1,
h2,
h3,
h4,
h5,
h6 {
  /* color: #f26430; */
  font-weight: 300;
}

h1 {
  color: #f26430 !important;
}

p {
  text-align: justify !important;
  text-justify: inter-word !important;
}

label {
  font-weight: 300;
}

/* Links */
a {
  color: var(--bs-primary);
  text-decoration: none;
}

a:hover {
  color: #23527c;
}

/* Botones */
.btn {
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 8px !important;
  border: none !important;
  transition: all 0.2s ease-in-out !important;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  transition: transform 0.2s ease;
}

.btn:hover i {
  transform: translateY(-1px);
}

/* Formularios */
.form-control,
.form-select {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: inherit;
  background-color: #fff;
  transition: all var(--transition-speed) ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(51, 122, 183, 0.08);
  transform: translateY(-1px);
}

.disabled,
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: #f8f9fa !important;
  opacity: 1;
}

/* Checkbox y radio buttons */
.form-check-input {
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: scale(1.05);
}

.form-check-label {
  cursor: pointer;
  user-select: none;
  padding-left: 5px;
}

/* Input groups */
.input-group {
  transition: all var(--transition-speed) ease;
}

.input-group:focus-within {
  transform: translateY(-1px);
}

/* Cards y Layout */
.card {
  border: none !important;
  transition: all var(--transition-speed) ease-out;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), 0 4px 8px rgba(0, 0, 0, 0.02) !important;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-2px);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Contenedor más ancho */
.container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  max-width: 95% !important;
  width: 95% !important;
}

/* Container con ancho fijo para pantallas grandes */
@media (min-width: 1400px) {
  .container {
    max-width: 1800px !important;
  }
}

/* Dashboard */
.dashboard-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  padding: 20px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* Tablas */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background-color: rgba(248, 249, 250, 0.6);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 1rem;
  /* 0.8rem; */
  letter-spacing: 0.5px;
  color: #495057;
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.table tbody tr td {
  border: 1px solid #f8f9fa !important;
  vertical-align: middle !important;
  padding: 0.65rem 1rem;
  transition: all var(--transition-speed) ease;
}

.table tbody tr:nth-child(odd) td {
  background-color: rgba(0, 0, 0, 0.01);
}

.table > :not(caption) > * > * {
  box-shadow: none !important;
}

.table-hover tbody tr {
  transition: all var(--transition-speed) ease;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
  background-color: #f8f9ff;
  transform: translateY(-1px);
}

/* DataTables */
.dataTables_wrapper {
  padding: 0.75rem;
  position: relative;
  border-radius: 6px;
}

.dataTables_filter input,
.dataTables_length select {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.375rem 1rem;
  transition: all var(--transition-speed) ease;
}

.dataTables_filter input:focus,
.dataTables_length select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(51, 122, 183, 0.1);
  outline: none;
}

/* Estilos mejorados para la paginación */
.dataTables_paginate {
  margin-top: 1rem !important;
}

.dataTables_paginate .paginate_button {
  /* border-radius: 50rem !important; */
  margin: 0 0.2rem !important;
  padding: 0.375rem 0.75rem !important;
  border: 1px solid #dee2e6 !important;
  background: white !important;
  color: #6c757d !important;
  transition: all 0.2s ease-in-out !important;
}

.dataTables_paginate .paginate_button.current {
  background: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
  font-weight: 500 !important;
}

.dataTables_paginate .paginate_button:hover:not(.current) {
  background: var(--bs-primary-subtle) !important;
  border-color: var(--bs-primary) !important;
  color: var(--bs-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.dataTables_paginate .paginate_button.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.dataTables_paginate .paginate_button.disabled:hover {
  background: white !important;
  border-color: #dee2e6 !important;
  color: #6c757d !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Indicador de procesamiento */
div.dataTables_processing {
  display: none !important; /* Ocultar completamente */
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Solo mostrar cuando DataTables lo activa */
div.dataTables_processing[style*="display: block"] {
  display: flex !important;
}

/* Indicador de procesamiento global */
.processing-spinner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#global-processing-indicator {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 auto;
  max-width: 250px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary);
  font-weight: 500;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
  padding: 0.5rem 2rem;
  z-index: 1050;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
}

#global-processing-indicator.show {
  opacity: 1;
  visibility: visible;
}

.processing-text {
  margin: 0;
  line-height: 1;
}
.dropzone {
  border: 2px dashed var(--bs-primary) !important;
}

.h5,
h5 {
  font-size: 1.5rem;
}

.dropdown-menu {
  font-size: inherit !important;
}

/* Asegurar que los toasts de notie queden por encima del navbar */
.notie-container {
  z-index: 1060 !important; /* mayor que navbar y modales base */
}

/* Modal de éxito para emisión de ticket (estilo inspirado en sesión expirada) */
#ticketSuccessModal .modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

#ticketSuccessModal .modal-header {
  border-bottom: none;
  padding: 1.25rem 1.75rem 1rem;
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

#ticketSuccessModal .modal-header .modal-title {
  font-weight: 600;
  font-size: 1.2rem;
  color: #fff;
}

#ticketSuccessModal .modal-body {
  padding: 1.75rem;
  background: #fff;
}

#ticketSuccessModal .modal-body .bi-check-circle {
  color: #28a745 !important;
  animation: pulse-success 1.6s ease-in-out infinite;
}

#ticketSuccessModal .modal-footer {
  border-top: none;
  padding: 1rem 1.75rem 1.5rem;
  background: #fff;
}

#ticketSuccessModal .btn-primary {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

#ticketSuccessModal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

@keyframes pulse-success {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
