/* assets/tickets_page.css */

/* =========================================================
   TICKETS PAGE
   Estilo unificado con "Mes Actual"
   ========================================================= */

/* =========================================================
   BASE
   ========================================================= */

.tickets-page{
  padding-top: 14px;
  min-height: 0;
}

.tickets-grid{
  margin-top: 12px;
  row-gap: 12px;
}

.tickets-col{
  min-height: 520px;
  min-width: 0;
}

/* =========================================================
   CONTENEDOR GENERAL / PANEL
   ========================================================= */

.tickets-panel{
  position: sticky;
  top: 86px;
  z-index: 2;

  border-radius: 16px;
  border: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.008) 100%),
    #0d1318;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
  overflow: hidden;
  min-height: 0;

  display: flex;
  flex-direction: column;
}

.tickets-panel--upload{
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

/* =========================================================
   HEADER
   ========================================================= */

.panel-head{
  padding: 12px 12px 10px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.00) 100%);
  border-bottom: 1px solid rgba(130, 155, 178, 0.18);
}

.panel-title{
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 13px;
}

.panel-icon{
  height: 18px;
  width: 18px;
  object-fit: contain;
  opacity: 0.95;
  filter: none;
}

.panel-subtitle{
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.58);
}

/* =========================================================
   BODY / FOOTER
   ========================================================= */

.panel-body{
  padding: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.panel-foot{
  padding: 10px 12px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-top: 1px solid rgba(130, 155, 178, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.012) 0%, rgba(255,255,255,0.00) 100%);
}

.panel-foot #confirmar-tickets-wrapper{
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   DROPZONE
   ========================================================= */

.upload-dropzone{
  width: 100%;
  border-radius: 14px;
  border: 1px dashed rgba(130, 155, 178, 0.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.015) 0%, rgba(255,255,255,0.008) 100%),
    #101820;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.upload-dropzone:hover{
  transform: translateY(-1px);
  border-color: rgba(130, 155, 178, 0.42);
  box-shadow:
    0 12px 24px rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.010) 100%),
    #101820;
}

.upload-inner{
  height: 160px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.upload-hero{
  height: 58px;
  opacity: 0.9;
  filter: none;
}

.upload-title{
  margin: 0;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
}

.upload-hint{
  color: rgba(255,255,255,0.60);
  font-size: 12px;
}

/* =========================================================
   BLOQUES INTERNOS
   ========================================================= */

.upload-tabs-block{
  margin-top: 10px;
}

.upload-empty{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.015) 0%, rgba(255,255,255,0.008) 100%),
    #101820;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

#mensaje-sin-tickets.upload-empty{
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

#mensaje-sin-tickets .upload-empty-icon{
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

#mensaje-sin-tickets .upload-empty-text{
  display: block;
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.upload-output{
  margin-top: 12px;
}

.upload-validation{
  color: rgba(255, 200, 87, 0.95);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: visible !important;
  text-overflow: ellipsis;
}

/* =========================================================
   BOTÓN CONFIRMAR
   Diseño tipo btn-save-pill
   ========================================================= */

.upload-confirm-btn{
  border-radius: 9999px !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  padding: 0 16px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;

  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.2px !important;

  background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.08) !important;

  box-shadow:
    0 8px 22px rgba(0,0,0,0.28),
    0 6px 16px rgba(25,135,84,0.35) !important;

  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease !important;
}

.upload-confirm-btn:hover:not(:disabled){
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.32),
    0 8px 20px rgba(25,135,84,0.40) !important;
}

.upload-confirm-btn:active:not(:disabled){
  transform: translateY(0);
  filter: brightness(0.98);
}

.upload-confirm-btn:focus,
.upload-confirm-btn:focus-visible{
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(95,255,146,0.16),
    0 10px 26px rgba(0,0,0,0.32),
    0 8px 20px rgba(25,135,84,0.40) !important;
}

.upload-confirm-btn:disabled{
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.25) !important;

  background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.08) !important;

  box-shadow:
    0 8px 18px rgba(0,0,0,0.22),
    0 4px 10px rgba(25,135,84,0.22) !important;
}

.btn-icon{
  height: 18px;
  width: 18px;
  object-fit: contain;
  opacity: 0.92;
  flex: 0 0 auto;
}

.saved-block{
  margin-top: 10px;
}

/* =========================================================
   ESTADOS / CONTENEDORES LATERALES
   ========================================================= */

.tickets-state{
  min-height: 500px;
  border-radius: 16px;
  border: 1px solid rgba(130, 155, 178, 0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.008) 100%),
    #0d1318;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  overflow: hidden;
}

.tickets-state--empty{
  flex-direction: column;
  gap: 10px;
}

.state-hero{
  height: 200px;
  opacity: 0.95;
  filter: none;
}

.state-text{
  color: rgba(255,255,255,0.65);
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

/* =========================================================
   HALO BOTÓN CONFIRMAR
   ========================================================= */

.confirmar-wrap{
  display: inline-block;
  position: relative;
  border-radius: 9999px;
}

.confirmar-wrap > *{
  position: relative;
  z-index: 1;
}

.confirmar-wrap::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 9999px;
  pointer-events:none;
  opacity: 0;
  transform: scale(1);
  outline: 2px solid rgba(255,255,255,0);
  box-shadow: none;
  z-index: 0;
}

.confirmar-wrap--warning::after{
  opacity: 1;
  animation: confirmHaloWarn 1.55s ease-in-out infinite;
}

.confirmar-wrap--danger::after{
  opacity: 1;
  animation: confirmHaloDanger 1.15s ease-in-out infinite;
}

@keyframes confirmHaloWarn{
  0%{
    opacity: 0.00;
    box-shadow:
      0 0 0 0 rgba(255,193,7,0.00),
      0 0 0 0 rgba(255,193,7,0.00);
  }
  45%{
    opacity: 0.80;
    box-shadow:
      0 0 0 2px rgba(255,193,7,0.16),
      0 0 18px 4px rgba(255,193,7,0.18);
  }
  70%{
    opacity: 1.00;
    box-shadow:
      0 0 0 3px rgba(255,193,7,0.20),
      0 0 24px 7px rgba(255,193,7,0.22);
  }
  100%{
    opacity: 0.00;
    box-shadow:
      0 0 0 0 rgba(255,193,7,0.00),
      0 0 0 0 rgba(255,193,7,0.00);
  }
}

@keyframes confirmHaloDanger{
  0%{
    opacity: 0.00;
    box-shadow:
      0 0 0 0 rgba(255,59,59,0.00),
      0 0 0 0 rgba(255,59,59,0.00);
  }
  45%{
    opacity: 0.85;
    box-shadow:
      0 0 0 2px rgba(255,59,59,0.18),
      0 0 20px 5px rgba(255,59,59,0.20);
  }
  70%{
    opacity: 1.00;
    box-shadow:
      0 0 0 3px rgba(255,59,59,0.22),
      0 0 28px 9px rgba(255,59,59,0.24);
  }
  100%{
    opacity: 0.00;
    box-shadow:
      0 0 0 0 rgba(255,59,59,0.00),
      0 0 0 0 rgba(255,59,59,0.00);
  }
}

.confirmar-wrap--warning:hover::after,
.confirmar-wrap--danger:hover::after{
  filter: brightness(1.06);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 992px){
  .tickets-panel{
    position: relative;
    top: auto;
  }

  .tickets-col{
    min-height: auto;
  }

  .tickets-state{
    min-height: 420px;
  }
}

@media (prefers-reduced-motion: reduce){
  .confirmar-wrap--warning::after,
  .confirmar-wrap--danger::after{
    animation: none !important;
    opacity: 0.85;
    box-shadow:
      0 0 0 2px rgba(255,255,255,0.10),
      0 0 18px 6px rgba(255,255,255,0.10);
  }

  .upload-dropzone,
  .upload-confirm-btn{
    transition: none !important;
  }
}