/* ============================================================================
 * Exclivia — core.css  (estilos base globales, referenciados, sin embebidos)
 * Los COLORES vienen de theme.php (variables --exc-*, controladas por el admin).
 * Mobile-first + responsive + dark/light.
 * ========================================================================== */

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--exc-bg);
  color: var(--exc-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.exc-brand-text {
  font-weight: 900;
  letter-spacing: -.5px;
  font-size: 1.35rem;
  background: linear-gradient(90deg, var(--exc-primary), var(--exc-secondary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.exc-navbar {
  background: color-mix(in srgb, var(--exc-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--exc-border);
  min-height: 60px;
}
.exc-icon-btn {
  border: 1px solid var(--exc-border);
  background: var(--exc-surface);
  color: var(--exc-text);
  border-radius: 10px;
  padding: .38rem .6rem;
  display: inline-flex; align-items: center; gap: .35rem;
}
.exc-icon-btn:hover { border-color: var(--exc-primary); color: var(--exc-primary); }
.exc-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.exc-flag { border-radius: 2px; object-fit: cover; }

/* Toggle de tema: mostrar el icono correcto según el tema */
.exc-theme-light-icon { display: none; }
[data-bs-theme="dark"] .exc-theme-light-icon { display: inline; }
[data-bs-theme="dark"] .exc-theme-dark-icon  { display: none; }

/* ── Shell (sidebar + main) ─────────────────────────────────────────────── */
.exc-shell { display: flex; align-items: stretch; min-height: calc(100vh - 60px); }
.exc-sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--exc-surface);
  border-right: 1px solid var(--exc-border);
  position: sticky; top: 60px; height: calc(100vh - 60px);
  overflow-y: auto;
}
.exc-sidebar-inner { padding: 1rem .75rem; }
.exc-main { flex: 1 1 auto; min-width: 0; }
.exc-nav-link {
  color: var(--exc-text);
  border-radius: 10px;
  padding: .6rem .8rem;
  display: flex; align-items: center; gap: .7rem;
  font-weight: 500;
}
.exc-nav-link i { font-size: 1.1rem; opacity: .85; }
.exc-nav-link:hover { background: var(--exc-surface-2); color: var(--exc-primary); }
.exc-nav-link.active {
  background: linear-gradient(90deg, rgba(var(--exc-primary-rgb), .18), transparent);
  color: var(--exc-primary);
  box-shadow: inset 3px 0 0 var(--exc-primary);
}
.exc-nav-section {
  text-transform: uppercase; font-size: .68rem; letter-spacing: .1em;
  opacity: .5; padding: 1rem .8rem .3rem;
}
.exc-sidebar-backdrop {
  display: none; position: fixed; inset: 60px 0 0 0;
  background: rgba(0,0,0,.5); z-index: 1039;
}

/* Sidebar responsive (off-canvas en móvil) */
@media (max-width: 991.98px) {
  .exc-sidebar {
    position: fixed; top: 60px; left: 0; z-index: 1040;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .exc-sidebar.open { transform: translateX(0); }
  .exc-sidebar-backdrop.show { display: block; }
}

/* ── Cards de dashboard ─────────────────────────────────────────────────── */
.exc-card {
  background: var(--exc-surface);
  border: 1px solid var(--exc-border);
  border-radius: 16px;
  padding: 1.25rem;
}
.exc-stat { display: flex; align-items: center; gap: 1rem; }
.exc-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: rgba(var(--exc-primary-rgb), .14); color: var(--exc-primary);
}
.exc-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.exc-stat-label { opacity: .65; font-size: .85rem; }

/* ── Login / Auth ───────────────────────────────────────────────────────── */
.exc-auth-body { background: var(--exc-auth-bg); }
.exc-auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: var(--exc-auth-bg);
  background-size: cover; background-position: center;
}
.exc-auth-card {
  width: 100%; max-width: 420px;
  background: var(--exc-auth-card);
  border: 1px solid var(--exc-border);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.exc-auth-accent { color: var(--exc-auth-accent); }
.exc-form-control {
  background: var(--exc-surface-2);
  border: 1px solid var(--exc-border);
  color: var(--exc-text);
  border-radius: 12px; padding: .75rem 1rem;
}
.exc-form-control:focus {
  background: var(--exc-surface-2);
  color: var(--exc-text);
  border-color: var(--exc-auth-accent);
  box-shadow: 0 0 0 .2rem rgba(var(--exc-primary-rgb), .2);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.exc-footer {
  border-top: 1px solid var(--exc-border);
  padding: 1rem 0;
  margin-top: 2rem;
}
.exc-footer-link { color: inherit; text-decoration: none; }
.exc-footer-link:hover { color: var(--exc-primary); }

/* ── Utilidades ─────────────────────────────────────────────────────────── */
.exc-badge-soft {
  background: rgba(var(--exc-primary-rgb), .14);
  color: var(--exc-primary);
  border-radius: 999px; padding: .25rem .75rem;
  font-size: .78rem; font-weight: 600;
}
