:root {
  /* === TEAM PEDRO BRAND IDENTITY === */
  --corporate-blue: #28355c;
  /* Corporate Blue — Manual de Marca (exacto) */
  --corporate-blue-dark: #1e2845;
  /* Corporate Blue — variante oscura */
  --corporate-blue-light: #334070;
  /* Corporate Blue — variante clara */
  --corporate-gold: #c38c46;
  /* Corporate Gold — Manual de Marca (exacto PDF) */
  --corporate-black: #1a2038;
  /* Fondo base oscuro */

  --bg-deep: var(--corporate-black);
  --bg-card: var(--corporate-blue);
  /* SÓLIDO — sin transparencia */
  --accent-gold: var(--corporate-gold);
  --accent-gold-light: #d4aa7a;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(195, 140, 70, 0.30);
  --glass-shadow: 0 4px 20px 0 rgba(10, 15, 30, 0.6);
  --status-approved: #10b981;
  --status-progress: #3b82f6;
  --status-pending: #f59e0b;
  --status-rejected: #ef4444;
}

/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400 !important;
}

strong,
b {
  font-weight: 600 !important;
}

body {
  background: var(--corporate-black) !important;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sin overlay ni imagen de fondo */
body::before {
  display: none;
}

h1,
h2,
h3,
.logo-name,
.splash-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  color: var(--accent-gold);
}

/* ============================================
   SPLASH INTRO ANIMADO — D' Homes Group
   ============================================ */
.splash {
  position: fixed;
  inset: 0;
  background: var(--corporate-blue);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  z-index: 9999;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Líneas de fondo decorativas */
.splash-bg-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-bg-lines span {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, transparent, rgba(178, 140, 85, 0.15), transparent);
  animation: bgLineGrow 1.5s ease forwards;
}

.splash-bg-lines span:nth-child(1) {
  transform: translateX(-400px);
  animation-delay: 0.0s;
}

.splash-bg-lines span:nth-child(2) {
  transform: translateX(-200px);
  animation-delay: 0.1s;
}

.splash-bg-lines span:nth-child(3) {
  transform: translateX(0px);
  animation-delay: 0.2s;
}

.splash-bg-lines span:nth-child(4) {
  transform: translateX(200px);
  animation-delay: 0.1s;
}

.splash-bg-lines span:nth-child(5) {
  transform: translateX(400px);
  animation-delay: 0.0s;
}

@keyframes bgLineGrow {
  to {
    height: 100%;
  }
}

/* Centro del splash */
.splash-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* Logo reveal */
.splash-logo-wrap {
  opacity: 0;
  transform: scale(0.7);
  animation: logoReveal 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes logoReveal {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.splash-logo-img {
  width: 180px;
  max-width: 60vw;
}

/* ============================================
   COMPONENTES UI
   ============================================ */
.page-title {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--corporate-gold);
  border: none;
  border-left: 5px solid var(--corporate-blue-dark);
  border-radius: 12px;
  color: #fff;
  font-weight: 500 !important;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Texto de marca */
.splash-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
}

.splash-brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500 !important;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #ffffff;
  letter-spacing: 0px;
  opacity: 0;
  animation: nameReveal 1s ease 1.1s forwards;
}

@keyframes nameReveal {
  0% {
    opacity: 0;
    letter-spacing: 0px;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    letter-spacing: 6px;
    transform: translateY(0);
  }
}

.splash-brand-tagline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300 !important;
  font-size: clamp(0.6rem, 1.5vw, 0.8rem);
  color: var(--accent-gold);
  letter-spacing: 4px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.8s forwards;
}

/* Línea dorada decorativa */
.splash-gold-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 2.1s forwards;
}

.splash-line-left,
.splash-line-right {
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-gold));
  width: 0;
  animation: lineExpand 0.8s ease 2.2s forwards;
}

.splash-line-right {
  background: linear-gradient(to left, transparent, var(--accent-gold));
}

@keyframes lineExpand {
  to {
    width: 80px;
  }
}

.splash-diamond {
  color: var(--accent-gold);
  font-size: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.5s ease 2.4s forwards;
}

/* Animaciones genéricas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar logo */
.sidebar-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
}


/* ============================================
   GLASS-CARD → ahora SÓLIDO — #28355c exacto
   ============================================ */
.glass-card {
  background: var(--corporate-blue);
  /* SÓLIDO */
  border: 1px solid rgba(195, 140, 70, 0.30);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(10, 15, 30, 0.5);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(10, 15, 30, 0.7);
  border-color: rgba(195, 140, 70, 0.55);
}

/* Layout */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   HEADER — sólido #1e2845
   ============================================ */
.main-header {
  height: 80px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--corporate-blue-dark);
  /* SÓLIDO */
  border-bottom: 2px solid rgba(195, 140, 70, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(10, 15, 30, 0.5);
}

.main-header.hidden {
  display: none;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.top-nav {
  display: flex;
  gap: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: 1px;
}

.logo-sub {
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(195, 140, 70, 0.18);
  color: var(--accent-gold);
}

.header-user-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-left: 1px solid var(--glass-border);
  padding-left: 1.5rem;
}

.btn-logout-top {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.btn-logout-top:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-rejected);
  border-color: var(--status-rejected);
}

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--corporate-black);
  /* SÓLIDO fondo general */
}

.app-content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   FORMS — inputs sólidos
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--corporate-blue-dark);
  /* SÓLIDO */
  border: 1px solid rgba(195, 140, 70, 0.30);
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-gold);
  background: var(--corporate-blue);
}

.btn-primary {
  background: linear-gradient(135deg, #c38c46, #a0713a);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-primary:hover {
  transform: scale(1.02);
  filter: brightness(1.12);
  box-shadow: 0 6px 20px rgba(195, 140, 70, 0.4);
}

/* Dashboard UI */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tables */
.data-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--glass-border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(195, 140, 70, 0.12);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-approved {
  background: rgba(16, 185, 129, 0.2);
  color: var(--status-approved);
}

.badge-progress {
  background: rgba(59, 130, 246, 0.2);
  color: var(--status-progress);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--status-pending);
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: var(--status-rejected);
}

/* Modal & Utilities */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .nav-item {
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
  }

  .app-content {
    padding: 1rem;
  }
}

/* ============================================
   CAMPAIGN LEADS — Animaciones de carga
   ============================================ */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.7;
  }
}

.campaign-leads-view {
  animation: fadeInUp 0.35s ease;
}

/* Notificaciones */
.notif-btn {
  background: var(--corporate-blue);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.notif-btn:hover {
  background: var(--corporate-blue-light);
  color: var(--accent-gold);
}

.notif-badge {
  background: var(--status-rejected);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}