/* Styles.css - Seguimiento Escrituración Inmobiliaria Miramar (Electric Deed Ops System) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --color-primary: #0070f3;
  --color-primary-container: #0f284e;
  --color-secondary: #00e3fd;
  --color-secondary-container: #00616d;
  --color-tertiary: #4edea3;
  --color-tertiary-fixed-dim: #4edea3;
  --color-background: #091122;
  --color-surface-container-lowest: #0e172e;
  --color-surface-container-low: #12203d;
  --color-border: rgba(0, 112, 243, 0.35);
  --color-text-main: #dce2f8;
  --color-text-muted: #90a2c2;
  --tree-stroke: #0070f3;
}

html.dark {
  --color-primary: #0070f3;
  --color-primary-container: #0f284e;
  --color-secondary: #00e3fd;
  --color-secondary-container: #00616d;
  --color-background: #091122;
  --color-surface-container-lowest: #0e172e;
  --color-surface-container-low: #12203d;
  --color-border: rgba(0, 112, 243, 0.45);
  --color-text-main: #eaf1ff;
  --color-text-muted: #8fa3c7;
  --tree-stroke: #00e3fd;
}

/* Modo Claro (Light Mode Canvas con destellos leves y degradados coloridos) */
body {
  background-color: #f8fafc !important;
  background-image: 
    radial-gradient(ellipse at 50% -10%, rgba(0, 112, 243, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 15%, rgba(0, 227, 253, 0.16) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 65%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 85%, rgba(9, 113, 206, 0.12) 0%, transparent 60%);
  background-attachment: fixed;
  color: #0f172a;
}

/* Modo Oscuro (Dark Mode Canvas Luminoso Navy con Destellos Resplandecientes Balanceados) */
html.dark body {
  background-color: #0c1930 !important;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(0, 112, 243, 0.40) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 18%, rgba(0, 227, 253, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 18%, rgba(0, 227, 253, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse at 8% 55%, rgba(0, 112, 243, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse at 92% 55%, rgba(9, 113, 206, 0.30) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 88%, rgba(16, 185, 129, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse at 88% 88%, rgba(168, 85, 247, 0.26) 0%, transparent 55%);
  background-attachment: fixed;
  color: #eaf1ff;
}

/* Custom Base resets & Scrollbars */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .font-heading, .font-display-title {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 112, 243, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 227, 253, 0.7);
}

/* Glassmorphism utility */
.glass-panel {
  background: rgba(14, 23, 46, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 112, 243, 0.35);
}

/* Smooth view switching & transitions */
.view-section {
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.view-section.hidden {
  display: none !important;
}

/* Header Title clean styling without text drop shadows */
.header-title-main, .header-title-sub {
  filter: none !important;
}

/* Placeholder text low opacity & italics (evita confusión con texto escrito) */
::placeholder,
input::placeholder,
textarea::placeholder {
  opacity: 0.35 !important;
  font-style: italic !important;
}

/* Card Hover animation with Electric Aura Glow */
.business-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.business-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px -2px rgba(0, 112, 243, 0.45), 0 0 12px -1px rgba(0, 229, 255, 0.3) !important;
  border-color: #00e3fd !important;
}

/* Accordion animation */
.accordion-content {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.accordion-icon {
  transition: transform 0.2s ease-in-out;
}

/* Modal & Toast Transitions */
#modal-backdrop, #profile-drawer-backdrop {
  transition: opacity 0.3s ease-in-out;
}

#business-detail-modal, #profile-drawer {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#save-toast, #toast-message {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Tree Connector SVG Strokes & Neon Effects */
.tree-connector-line {
  stroke: var(--tree-stroke);
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

/* Neon SVG Glow Filter & Stroke Effects */
.neon-path-blue {
  stroke: #00c6ff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(0, 198, 255, 0.85));
}
.neon-path-emerald {
  stroke: #34d399;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.85));
}
.neon-path-red {
  stroke: #f87171;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.85));
}
.neon-path-purple {
  stroke: #c084fc;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(192, 132, 252, 0.85));
}

/* Prevent Flash of Unstyled Text (FOUT) for Material Symbols Icons */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Hide raw ligature text before Google Font finishes loading */
html:not(.fonts-loaded) .material-symbols-outlined {
  visibility: hidden !important;
  color: transparent !important;
  text-shadow: none !important;
}

/* Dynamic Colorful Loader Animations */
@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes shimmerLoader {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(50%);
  }
  100% {
    transform: translateX(180%);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.75;
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(0, 112, 243, 0.6));
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
    filter: drop-shadow(0 0 25px rgba(0, 227, 253, 0.9));
  }
}

.loader-orbital-ring {
  background: conic-gradient(from 0deg, #0070f3, #00e3fd, #10b981, #a855f7, #0070f3);
  animation: spinSlow 2s linear infinite;
}

.loader-orbital-reverse {
  animation: spinReverse 3.5s linear infinite;
}

.loader-shimmer-bar {
  animation: shimmerLoader 1.6s ease-in-out infinite;
}

.loader-logo-pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Print styles */
@media print {
  header, footer, #theme-toggle, #btn-export-xlsx {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
}



/* Custom Miramar Blue Scrollbar for Pagos Matrix Table (Top & Main) */
#pagos-table-scroll-container,
#pagos-table-top-scroll {
  scrollbar-color: #0070f3 rgba(0, 112, 243, 0.12);
  scrollbar-width: thin;
}
#pagos-table-scroll-container::-webkit-scrollbar,
#pagos-table-top-scroll::-webkit-scrollbar {
  width: 8px;
  height: 9px;
}
#pagos-table-scroll-container::-webkit-scrollbar-track,
#pagos-table-top-scroll::-webkit-scrollbar-track {
  background: rgba(0, 112, 243, 0.08);
  border-radius: 9999px;
}
#pagos-table-scroll-container::-webkit-scrollbar-thumb,
#pagos-table-top-scroll::-webkit-scrollbar-thumb {
  background: #0070f3;
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(0, 112, 243, 0.6);
}
#pagos-table-scroll-container::-webkit-scrollbar-thumb:hover,
#pagos-table-top-scroll::-webkit-scrollbar-thumb:hover {
  background: #00e3fd;
  box-shadow: 0 0 14px rgba(0, 227, 253, 0.8);
}

/* ==========================================================================
   AURAS DE URGENCIA LUMINOSAS (Efecto Semáforo Reactivo)
   ========================================================================== */
.aura-red {
  border-width: 2.5px !important;
  border-color: rgba(244, 63, 94, 0.70) !important;
  box-shadow: 0 0 14px 2.5px rgba(244, 63, 94, 0.22), inset 0 0 15px rgba(244, 63, 94, 0.10) !important;
}
.aura-red:hover {
  box-shadow: 0 0 24px 5px rgba(244, 63, 94, 0.38), inset 0 0 20px rgba(244, 63, 94, 0.25) !important;
}

.aura-orange {
  border-width: 2.5px !important;
  border-color: rgba(249, 115, 22, 0.75) !important;
  box-shadow: 0 0 14px 2.5px rgba(249, 115, 22, 0.25), inset 0 0 15px rgba(249, 115, 22, 0.12) !important;
}
.aura-orange:hover {
  box-shadow: 0 0 24px 5px rgba(249, 115, 22, 0.42), inset 0 0 20px rgba(249, 115, 22, 0.25) !important;
}

.aura-yellow {
  border-width: 2.5px !important;
  border-color: rgba(245, 158, 11, 0.70) !important;
  box-shadow: 0 0 14px 2.5px rgba(245, 158, 11, 0.22), inset 0 0 15px rgba(245, 158, 11, 0.10) !important;
}
.aura-yellow:hover {
  box-shadow: 0 0 24px 5px rgba(245, 158, 11, 0.38), inset 0 0 20px rgba(245, 158, 11, 0.22) !important;
}

.aura-green {
  border-width: 2.5px !important;
  border-color: rgba(16, 185, 129, 0.70) !important;
  box-shadow: 0 0 14px 2.5px rgba(16, 185, 129, 0.22), inset 0 0 15px rgba(16, 185, 129, 0.08) !important;
}
.aura-green:hover {
  box-shadow: 0 0 24px 5px rgba(16, 185, 129, 0.38), inset 0 0 20px rgba(16, 185, 129, 0.20) !important;
}

.aura-blue {
  border-width: 2.5px !important;
  border-color: rgba(14, 165, 233, 0.70) !important;
  box-shadow: 0 0 14px 2.5px rgba(14, 165, 233, 0.22), inset 0 0 15px rgba(14, 165, 233, 0.08) !important;
}
.aura-blue:hover {
  box-shadow: 0 0 24px 5px rgba(14, 165, 233, 0.38), inset 0 0 20px rgba(14, 165, 233, 0.20) !important;
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVA MÓVIL Y ESCRITORIO (Touch & Scrollbar Utilities)
   ========================================================================== */
html {
  overflow-x: clip;
  overflow-y: scroll;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: clip;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Sidebar de comentarios fijo/sticky al hacer scroll en vista detalle negocio */
@media (min-width: 1024px) {
  .comments-sidebar-sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;
    z-index: 30 !important;
    align-self: flex-start !important;
  }
}

@media (max-width: 1023px) {
  body {
    width: 100% !important;
  }
  #header-logo-home-link {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: fit-content !important;
  }
}

@media (max-width: 639px) {
  #tree-mode-buttons-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
  #tree-mode-buttons-container > button {
    width: 100% !important;
    justify-content: center !important;
  }
}

.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .business-card:hover {
    transform: none;
  }
}

