/* =========================================================
   PLANTILLA.CSS
   Índice:
   1. Layout general
   2. Login
   3. Animaciones
   4. Navbar / marca
   5. Preloader
   6. Calendario
   7. Componentes generales
   8. Select2
   9. Info box
   10. Dropzone global
   11. Alertas Notie
   12. Responsive
========================================================= */


/* =========================================================
   1. LAYOUT GENERAL
========================================================= */

.login-page {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100vh !important;
  overflow: hidden !important;
}

/* =========================================================
   BOTONES DE ACCIONES EN TABLAS
========================================================= */

/* Contenedor vertical */
.acciones-tabla{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

/* Botón circular */
.btn-icono{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:40px;
  height:40px;

  padding:0 !important;        /* quita padding bootstrap */
  border-radius:50% !important;

  line-height:1;
}

/* Icono */
.btn-icono i{
  font-size:14px;
  line-height:1;
  margin:0;
}

/* Hover */
.btn-icono:hover{
  transform:scale(1.08);
  transition:all .15s ease;
}

/* =========================================================
   DATATABLE PARA MOVILES
========================================================= */
table.dataTable td,
table.dataTable th {
  vertical-align: middle;
}

@media (max-width: 767.98px) {
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_paginate,
  .dataTables_wrapper .dataTables_info {
    text-align: center;
  }

  .dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .dataTables_wrapper .dt-buttons .btn {
    margin-right: 0 !important;
  }
}


/* =========================================================
   2. LOGIN
========================================================= */

/* Fondo animado */
.background-animation {
  position: absolute !important;
  top: -10% !important;
  left: -10% !important;
  width: 120% !important;
  height: 120% !important;
  background: url('../../../activos/img/plantilla/back.jpg') no-repeat center center fixed !important;
  background-size: cover !important;
  animation: movimiento-fondo 70s infinite alternate ease-in-out !important;
}

.background-animation::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(255, 193, 11, 0.1) !important;
}

/* Caja login */
.login-box {
  position: relative !important;
  z-index: 2 !important;
  padding: 20px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}

.login-logo img {
  width: 80% !important;
  max-width: 200px !important;
}

.card-body.login-card-body {
  border-radius: 20px !important;
}

/* Botón ingreso */
.btn.bg-black {
  font-size: 12px !important;
  font-weight: bold !important;
  color: #fff !important;
  background-color: #000 !important;
  transition: all 0.3s ease-in-out !important;
}

.btn.bg-black:hover {
  background-color: #333 !important;
}


/* =========================================================
   3. ANIMACIONES
========================================================= */

@keyframes movimiento-fondo {
  0% {
    transform: scale(1.1) translateX(-20px) translateY(-20px);
  }
  50% {
    transform: scale(1.2) translateX(20px) translateY(20px);
  }
  100% {
    transform: scale(1.1) translateX(-20px) translateY(-20px);
  }
}

/* Entrada desde la derecha */
.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  animation: fadeInRightAnimation 0.7s ease-out forwards;
}

@keyframes fadeInRightAnimation {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/*
.fade-in {
  opacity: 0;
  animation: fadeInAnimation 1s ease-in forwards;
}

@keyframes fadeInAnimation {
  from { opacity: 0; }
  to   { opacity: 1; }
}
*/


/* =========================================================
   4. NAVBAR / MARCA
========================================================= */

.brand-image {
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.brand-text {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #333 !important;
  text-transform: uppercase !important;
}


/* =========================================================
   5. PRELOADER
========================================================= */

#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  width: 100%;
  height: 100%;
  background: #fff;
}

#loader-wrapper .loader-section {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 50%;
  height: 100%;
  background: #fff;
  transform: translateX(0);
  will-change: transform;
}

#loader-wrapper .loader-section.section-left {
  left: 0;
}

#loader-wrapper .loader-section.section-right {
  right: 0;
}

#loader {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 99999;
  display: block;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border: 3px solid transparent;
  border-top-color: #ffc10c;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

#loader::before,
#loader::after {
  content: "";
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
}

#loader::before {
  top: 5px;
  right: 5px;
  bottom: 5px;
  left: 5px;
  border-top-color: #cdc9c0;
  animation: spin 3s linear infinite;
}

#loader::after {
  top: 15px;
  right: 15px;
  bottom: 15px;
  left: 15px;
  border-top-color: #3d5158;
  animation: spin 1.5s linear infinite;
}

/* Estado loaded */
.loaded #loader-wrapper {
  visibility: hidden;
  transform: translateY(-100%);
  transition: all 0.3s 1s ease-out;
}

.loaded #loader-wrapper .loader-section.section-left {
  transform: translateX(-100%);
  transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.loaded #loader-wrapper .loader-section.section-right {
  transform: translateX(100%);
  transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.loaded #loader {
  opacity: 0;
  transition: all 0.3s ease-out;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


/* =========================================================
   6. CALENDARIO
========================================================= */

#calendar {
  max-width: 1000px;
  margin: 40px auto;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Toolbar */
.fc-toolbar {
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  border-radius: 10px 10px 0 0;
}

.fc-toolbar-title {
  font-family: 'Italic', sans-serif !important;
  font-size: 1.5rem !important;
  color: #343a40;
}

/* Botones */
.fc-button {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 5px;
}

/* Eventos */
.fc-event {
  padding: 5px;
  font-family: 'Italic', sans-serif !important;
  font-size: 10px;
  color: #fff;
  background-color: #343a40;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.fc-event:hover {
  background-color: #ffc10b;
}

/* Días */
.fc-day:hover {
  cursor: pointer;
  background-color: #fefae3;
}

.fc-daygrid-day {
  border: 1px solid #eee;
}


/* =========================================================
   7. COMPONENTES GENERALES
========================================================= */

.activo-fijo-alerta {
  color: #fff !important;
  background-color: red !important;
}


/* =========================================================
   8. SELECT2
========================================================= */

.select2-selection {
  display: flex !important;
  align-items: center !important;
  min-height: 38px !important;
}

.select2-selection__rendered {
  line-height: 38px !important;
}


/* =========================================================
   9. INFO BOX
========================================================= */

.info-box {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 15px;
  color: #000;
  cursor: pointer;
  background-color: #ffc107;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.info-box:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.info-box .info-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 65px;
  height: 65px;
  font-size: 2rem;
  color: #ffc107;
  background-color: #000;
  border-radius: 50%;
}

.info-box-content {
  flex-grow: 1;
  padding-left: 15px;
}

.info-box-number {
  font-size: 1.5rem;
  font-weight: bold;
}



/* =========================================================
   2. ARCHIVOS ADJUNTOS / DROPZONE
========================================================= */

.dropzone {
  min-height: 150px;
  padding: 15px;
  text-align: center;
  background: #f8f9fa;
  border: 2px solid #cdc9c0;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
}

.dropzone:hover {
  background: #ffc106;
  border-color: #ffc106;
}

/* Lista de archivos */
.archivo-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 15px;
}

.archivo-info {
  flex: 1 1 300px;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.archivo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Botones de acciones de archivo */
.archivo-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  line-height: 1;
  border-radius: 8px;
}

.archivo-actions .btn i {
  margin: 0;
  font-size: 16px;
}

.archivo-actions .btn:hover {
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* =========================================================
   DROPZONE - AJUSTES DE PREVIEW Y MENSAJES DE ERROR
========================================================= */

.dropzone .dz-preview {
  position: relative;
  margin: 12px;
  vertical-align: top;
}

.dropzone .dz-preview .dz-details {
  z-index: 5;
}

.dropzone .dz-preview .dz-image {
  border-radius: 16px;
  overflow: hidden;
}

/* Dejar espacio para acciones y mensajes */
.dropzone .dz-preview .dz-details,
.dropzone .dz-preview .dz-image {
  margin-bottom: 8px;
}

/* Enlace quitar */
.dropzone .dz-preview .dz-remove {
  position: relative;
  z-index: 20;
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0d6efd;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.dropzone .dz-preview .dz-remove:hover {
  background: #ffffff;
  color: #0a58ca;
}

/* Mensaje de error */
.dropzone .dz-preview.dz-error .dz-error-message {
  top: auto;
  bottom: -62px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 180px;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  white-space: normal;
  word-break: break-word;
}

/* Flecha del tooltip de error */
.dropzone .dz-preview.dz-error .dz-error-message::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #be2626 transparent;
}

/* Que el contenedor permita ver el mensaje abajo */
.dropzone .dz-preview.dz-error {
  margin-bottom: 80px;
}

/* Evitar que otros overlays tapen los enlaces */
.dropzone .dz-preview .dz-error-mark,
.dropzone .dz-preview .dz-success-mark {
  z-index: 6;
}

.dropzone .dz-preview .dz-progress {
  z-index: 7;
}


/* =========================================================
   11. ALERTAS NOTIE
========================================================= */

.notie-alert {
  opacity: 1 !important;
}

.notie-alert-success {
  background-color: #28a745 !important;
}

.notie-alert-warning {
  background-color: #f39c12 !important;
}

.notie-alert-error {
  background-color: #e74c3c !important;
}

.notie-alert-info {
  background-color: #3498db !important;
}


/* =========================================================
   12. RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .tituloCaja {
    display: none;
  }

  .dropzone {
    min-height: 100px;
    padding: 5px;
  }
}