/* --- ESTILOS DE TIPOGRAFÍA RESPONSIVE (Añadir al final) --- */
h1 {
  font-size: 2rem; /* 32px */
}
h2 {
  font-size: 1.5rem; /* 24px */
}

@media screen and (max-width: 768px) {
  h1 {
    font-size: 1.75rem; /* 28px */
  }
  h2 {
    font-size: 1.25rem; /* 20px */
  }
  .content-container {
    padding: 0 0.75rem; /* Menos padding lateral en móvil */
  }
  main {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}



/* --- Paleta de Colores y Estilos Base (TEMA OSCURO) --- */
:root {
  --primary-color: #facc15;      /* Amarillo Principal (yellow-400) */
  --primary-dark: #eab308;       /* Amarillo más oscuro para hover (yellow-500) */
  --secondary-color: #374151;    /* Gris oscuro para botones secundarios (gray-700) */
  --text-primary: #f3f4f6;       /* Texto principal casi blanco (gray-100) */
  --text-secondary: #9ca3af;     /* Texto secundario gris (gray-400) */
  --border-color: #4b5563;       /* Bordes de color gris medio (gray-600) */
  --background-color: #000000;   /* Fondo principal negro */
  --container-bg: #222222;      /* Fondo de contenedores y tarjetas */
}


body {
  font-family: 'Calibri Bold', Calibri, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
}

/* Fuente para todas las tablas */
table, th, td {
  font-family: 'Calibri Bold', Calibri, Arial, sans-serif !important;
}

.content-container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* --- ESTILOS DE BOTONES --- */
.btn {
  font-weight: 600;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  color: #000000;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: #4b5563; /* gray-600 */
}

/* --- ESTILOS DE FORMULARIO --- */
.input-file-wrapper {
  display: flex;
  align-items: center;
  height: 2.75rem;
}

input[type="file"].input-field {
  padding: 0 1rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  background-color: #374151 !important;
  color: #fff !important;
  border-radius: 0.5rem;
  border: 1.5px solid #475569 !important;
}
.input-field {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background-color: #374151 !important; /* gris oscuro */
  color: #fff !important;
  height: 2.75rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  transition: all 150ms ease-in-out;
}
.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3);
    outline: none;
}
.input-field::placeholder {
  color: #cbd5e1;
}

select.input-field {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

/* --- ESTILO PARA FILA CLICKEABLE --- */
.clickable-row {
    cursor: pointer;
}

/* --- SPINNER PARA CARGAS --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 50%;
  border-top-color: var(--text-primary);
  animation: spin 0.8s ease-in-out infinite;
}

/* --- ESTILOS PARA LA TABLA DE CARGA MASIVA --- */
td[draggable="true"] {
  cursor: grab;
}
td[draggable="true"]:active {
  cursor: grabbing;
}
.cell-selected {
  outline: 2px solid #60a5fa; /* blue-400 */
  outline-offset: -2px;
  background-color: #374151; /* gray-700 */
}
.editing-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0.5rem; 
  box-sizing: border-box;
  font-size: inherit;
  font-family: inherit;
  background-color: #4b5563; /* gray-600 */
  color: var(--text-primary);
}
.editing-input:focus {
  outline: 2px solid #60a5fa;
  outline-offset: -1px;
}
td.is-editing {
    color: transparent;
}

/* --- ESTILOS DE FORMULARIO (añadir al final del archivo) --- */

/* ... (tus estilos existentes .input-field, etc.) ... */

/* ▼▼▼ ESTILOS NUEVOS PARA EL INPUT DE ARCHIVO PERSONALIZADO ▼▼▼ */
.custom-file-input {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 2.75rem; /* Misma altura que otros inputs */
  background-color: #374151; /* gray-700 */
  color: #d1d5db; /* gray-300 */
  border: 1px solid #4b5563; /* gray-600 */
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 150ms ease-in-out;
  font-size: 0.875rem;
}

.custom-file-input:hover {
  border-color: #facc15; /* yellow-400 */
}

/* --- ESTILOS PARA TABLAS RESPONSIVE (Añadir al final) --- */
@media screen and (max-width: 768px) {
  .responsive-table {
    border: none;
    display: block;
    width: 100%;
  }
  .responsive-table thead {
    display: none; /* Ocultamos los encabezados de la tabla */
  }
  .responsive-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
  }
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 2px solid #374151; /* gray-700 */
  }
  .responsive-table td:last-child {
    border-bottom: none;
  }
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    text-align: left;
    margin-right: 1rem;
    color: var(--text-secondary);
  }
}

/* --- INICIO NUEVOS ESTILOS: Toast y Modal de Confirmación --- */

/* Contenedor de Toasts */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Estilo base del Toast */
.toast {
    min-width: 250px;
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-success {
    background-color: #15803d; /* green-700 */
}

.toast-error {
    background-color: #b91c1c; /* red-700 */
}

/* Animaciones del Toast */
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.toast-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}
.toast-fade-out {
    animation: fadeOut 0.4s ease-in forwards;
}


/* Modal de Confirmación */
.confirmation-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.confirmation-modal-content {
    background-color: var(--container-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    margin: 1rem;
    text-align: center;
}

.confirmation-modal-message {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.confirmation-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
/* --- FIN NUEVOS ESTILOS --- */


/* --- ** INICIO: ESTILOS PARA SKELETON LOADER ** --- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.skeleton-loader {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background-color: #374151; /* gray-700 */
  border-radius: 0.375rem; /* rounded-md */
  width: 100%;
}

.skeleton-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space-y-2 */
}

.skeleton-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem; /* p-3 */
  background-color: #1f2937; /* Un poco más oscuro que el fondo de la tarjeta */
  border-radius: 0.5rem; /* rounded-lg */
}

.skeleton-item-content {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* gap-3 */
  width: 70%;
}

.skeleton-avatar {
  height: 2.5rem; /* h-10 */
  width: 2.5rem; /* w-10 */
  border-radius: 9999px; /* rounded-full */
  flex-shrink: 0;
}

.skeleton-text-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.skeleton-text {
  height: 0.75rem; /* h-3 */
}

.skeleton-text-long {
  width: 80%;
}

.skeleton-text-short {
  width: 40%;
}

.skeleton-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
}

.skeleton-icon {
  height: 1.25rem; /* h-5 */
  width: 1.25rem; /* w-5 */
}
/* --- ** FIN: ESTILOS PARA SKELETON LOADER ** --- */