/* ========== PANELES DESLIZANTES ========== */

.panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(7, 11, 24, 0.98);
  backdrop-filter: blur(12px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  opacity: 0;
}

.panel.is-open {
  transform: translateY(0);
  pointer-events: auto;
  opacity: 1;
}

.panel-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
}

.panel-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

/* Header del panel */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 222, 222, 0.16);
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f3f2ff;
}

.panel-close {
  background: transparent;
  border: 0;
  color: #f3f2ff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Contenido del panel */
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-content::-webkit-scrollbar {
  width: 6px;
}

.panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
  background: rgba(0, 222, 222, 0.3);
  border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 222, 222, 0.6);
}

/* Footer del panel */
.panel-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 222, 222, 0.16);
  background: rgba(10, 10, 10, 0.6);
  flex-shrink: 0;
}

/* ========== BOTONES DE ACTIVACIÓN ========== */

.panel-trigger {
  position: fixed;
  bottom: 80px;
  right: 12px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(0, 222, 222, 0.4);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  color: #f3f2ff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 20px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.panel-trigger:hover {
  border-color: rgba(0, 222, 222, 0.8);
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 12px 32px rgba(0, 222, 222, 0.2);
}

.panel-trigger.is-active {
  background: rgba(0, 222, 222, 0.15);
  border-color: rgba(0, 222, 222, 0.6);
}

/* Stack de botones */
.panel-triggers {
  position: fixed;
  bottom: 80px;
  right: 12px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========== MENSAJES VACÍOS ========== */

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 16px;
  flex: 1;
  color: rgba(243, 242, 255, 0.6);
}

.panel-empty-icon {
  font-size: 48px;
  opacity: 0.4;
}

.panel-empty h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.panel-empty p {
  margin: 0;
  font-size: 13px;
  opacity: 0.8;
}

/* ========== LOADING ========== */

.panel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 12px;
  color: rgba(243, 242, 255, 0.7);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 222, 222, 0.2);
  border-top-color: rgba(0, 222, 222, 0.8);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== FORMULARIOS EN PANELES ========== */

.panel-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(243, 242, 255, 0.7);
}

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 222, 222, 0.2);
  border-radius: 8px;
  color: #f3f2ff;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 0;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 222, 222, 0.6);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(243, 242, 255, 0.4);
}

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

@media (max-width: 680px) {
  .panel {
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    bottom: 0;
    top: auto;
    transform: translateY(100%);
  }

  .panel.is-open {
    transform: translateY(0);
  }

  .panel-trigger {
    bottom: 76px;
  }

  .panel-triggers {
    bottom: 76px;
  }

  .panel-head {
    padding: 12px 16px;
  }

  .panel-content {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .panel-head h2 {
    font-size: 16px;
  }

  .panel-content {
    padding: 10px 12px;
  }

  .panel-trigger {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}
