/* ==============================================================================
   AmDi Pantallas — Sistema de Diseño y Estilos Base
   Ecosistema goAmdi.com | By AmazonasDigital
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

:root {
  /* Paleta Oficial goAmdi */
  --amdi-magenta: #ff007a;
  --amdi-magenta-glow: rgba(255, 0, 122, 0.45);
  --amdi-orange: #ff6a00;
  --amdi-orange-glow: rgba(255, 106, 0, 0.4);
  --amdi-yellow: #ffd000;
  --amdi-green: #00ff66;
  --amdi-cyan: #00e5ff;
  --amdi-cyan-glow: rgba(0, 229, 255, 0.35);
  --amdi-blue: #0066ff;

  /* Fondos Tema Oscuro */
  --bg-deep: #050608;
  --bg-dark-1: #090b10;
  --bg-dark-2: #0f121a;
  --bg-card: rgba(14, 18, 28, 0.78);
  --bg-card-hover: rgba(20, 26, 42, 0.92);
  --bg-glass: rgba(10, 14, 22, 0.72);
  --bg-chip: rgba(255, 255, 255, 0.05);

  /* Bordes */
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(255, 0, 122, 0.35);

  /* Textos */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Tipografía */
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radios y Espaciados */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;
  --max-width: 1240px;

  /* Sombras */
  --shadow-dock: 0 20px 50px rgba(0, 0, 0, 0.85);
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 35px var(--amdi-magenta-glow);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, #15102a 0%, #08090f 50%, #050608 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ==============================================================================
   Efectos Ambientales de Fondo (Orbs & Glow)
   ============================================================================== */
.ap-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ap-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: ap-orb-float 18s ease-in-out infinite alternate;
}

.ap-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--amdi-magenta);
  top: -150px;
  left: -100px;
}

.ap-orb-2 {
  width: 500px;
  height: 500px;
  background: var(--amdi-cyan);
  top: 30%;
  right: -120px;
  animation-duration: 22s;
}

.ap-orb-3 {
  width: 450px;
  height: 450px;
  background: var(--amdi-orange);
  bottom: 5%;
  left: 20%;
  animation-duration: 26s;
}

@keyframes ap-orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* ==============================================================================
   Contenedores y Tipografía Utilitaria
   ============================================================================== */
.ap-container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 2;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gradient-amdi {
  background: linear-gradient(135deg, var(--amdi-magenta) 0%, var(--amdi-orange) 50%, var(--amdi-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, var(--amdi-cyan) 0%, var(--amdi-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Espaciados */
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

/* ==============================================================================
   Componentes de Vidrio (Glass Cards) & Badges
   ============================================================================== */
.ap-glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.ap-glass-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.9);
}

.ap-badge-neon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amdi-magenta);
  background: rgba(255, 0, 122, 0.12);
  border: 1px solid rgba(255, 0, 122, 0.3);
  border-radius: var(--radius-pill);
}

.ap-badge-cyan {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amdi-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-pill);
}

/* ==============================================================================
   Botones
   ============================================================================== */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  user-select: none;
}

.ap-btn-primary {
  background: linear-gradient(135deg, var(--amdi-magenta) 0%, var(--amdi-orange) 100%);
  color: #ffffff;
  box-shadow: 0 8px 25px -4px var(--amdi-magenta-glow);
}

.ap-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px -2px var(--amdi-magenta-glow);
  filter: brightness(1.1);
}

.ap-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}

.ap-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.ap-btn-cyan {
  background: linear-gradient(135deg, var(--amdi-cyan) 0%, var(--amdi-blue) 100%);
  color: #050608;
  font-weight: 700;
  box-shadow: 0 8px 25px -4px var(--amdi-cyan-glow);
}

.ap-btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px -2px var(--amdi-cyan-glow);
  filter: brightness(1.1);
}

.ap-btn-google {
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.ap-btn-google:hover {
  background: #f8f9fa;
  color: #111111;
  border-color: #c5c7cb;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ap-auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ap-auth-divider::before,
.ap-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-glass-subtle);
}

.ap-auth-divider span {
  padding: 0 0.85rem;
}

/* ==============================================================================
   Header y Navegación Flotante
   ============================================================================== */
.ap-header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  width: 100%;
  padding: 0 1rem;
  margin-bottom: 2rem;
}

.ap-header-dock {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-dock);
}

.ap-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ap-brand-logo {
  height: 34px;
  width: auto;
}

.ap-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ap-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.ap-nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.ap-nav-link:hover {
  color: var(--text-primary);
}

.ap-nav-link.active {
  color: var(--amdi-magenta);
  font-weight: 600;
}

.ap-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ap-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.4rem;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.ap-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass-subtle);
  background: rgba(6, 8, 12, 0.95);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 2;
}

.ap-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.ap-footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 360px;
}

.ap-footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.ap-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ap-footer-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ap-footer-link:hover {
  color: var(--amdi-cyan);
  padding-left: 4px;
}

.ap-footer-bottom {
  border-top: 1px solid var(--border-glass-subtle);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Responsivo */
@media (max-width: 900px) {
  .ap-nav {
    display: none;
  }
  .ap-mobile-toggle {
    display: block;
  }
  .ap-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .ap-header {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
    top: 0.5rem;
  }
  .ap-header-dock {
    padding: 0.45rem 0.75rem;
  }
  .ap-brand-logo {
    height: 26px;
  }
  .ap-header-actions {
    gap: 0.35rem;
  }
  .ap-header-actions .ap-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.74rem;
  }
  .ap-footer-grid {
    grid-template-columns: 1fr;
  }
  .ap-footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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

/* ==============================================================================
   VENTANAS MODALES MODERNAS & ANIMADAS (ANIMATED GLASS DIALOGS)
   ============================================================================== */
.ap-modal-backdrop {
  display: flex !important;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

.ap-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ap-modal-card {
  background: rgba(13, 17, 28, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.2rem 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 229, 255, 0.15);
  position: relative;
  transform: scale(0.9) translateY(22px);
  transition: transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.ap-modal-backdrop.show .ap-modal-card {
  transform: scale(1) translateY(0);
}

/* Modal de Confirmación de Acciones Universal */
.ap-confirm-dialog {
  max-width: 460px !important;
  text-align: center;
  padding: 2.5rem 2rem !important;
}

.ap-confirm-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: ap-icon-pulse 2s infinite ease-in-out;
}

.ap-confirm-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.75);
  color: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.35);
}

.ap-confirm-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid rgba(245, 158, 11, 0.75);
  color: #f59e0b;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
}

.ap-confirm-icon-wrap.info {
  background: rgba(0, 229, 255, 0.15);
  border: 2px solid rgba(0, 229, 255, 0.75);
  color: #00e5ff;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.35);
}

.ap-confirm-icon-wrap svg {
  width: 36px;
  height: 36px;
}

@keyframes ap-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.ap-confirm-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.ap-confirm-message {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.ap-confirm-item-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 1.75rem;
}

.ap-confirm-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
}

.ap-confirm-actions .ap-btn {
  flex: 1;
  padding: 0.75rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 12px;
}

.ap-btn-danger-neon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}

.ap-btn-danger-neon:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.7);
}
