/* Asteria Design System — change these tokens to rebrand the whole application. */
:root {
  --primary: #635bff;
  --primary-dark: #4f46e5;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --light: #f8fafc;
  --dark: #172033;
  --body-bg: #f6f7fb;
  --sidebar-bg: #fff;
  --card-bg: #fff;
  --border: #e8ebf2;
  --gray: #64748b;
  --text: #25304a;
  --muted: #8490a7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(33, 43, 71, 0.06);
  --shadow-lg: 0 18px 45px rgba(33, 43, 71, 0.12);
  --sidebar-w: 264px;
  --topbar-h: 72px;
}
[data-theme="dark"] {
  --body-bg: #101522;
  --sidebar-bg: #151c2c;
  --card-bg: #192234;
  --border: #2b3549;
  --text: #eef2ff;
  --muted: #98a6bd;
  --gray: #a5b1c4;
  --light: #222c40;
  --dark: #f5f7ff;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.22);
}
* {
  box-sizing: border-box;
}
html {
  font-size: 15px;
}
body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text);
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.5;
  transition:
    background 0.25s,
    color 0.25s;
}
a {
  text-decoration: none;
  color: inherit;
}
.text-muted {
  color: var(--muted) !important;
}
.fw-semibold {
  font-weight: 600 !important;
}
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: #cbd2df transparent;
}
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #cbd2df;
  border-radius: 99px;
}
[data-theme="dark"] .sidebar-nav {
  scrollbar-color: #43506a transparent;
}
[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb {
  background: #43506a;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  z-index: 1040;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  transition:
    width 0.25s,
    transform 0.25s;
  overflow: hidden;
}
.brand {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  font-weight: 750;
  font-size: 1.24rem;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: #fff;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(99, 91, 255, 0.3);
  padding: 4px;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.brand-mark img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  min-width: 0;
  min-height: 0;
}
.sidebar-nav {
  margin-top: 31px;
  overflow-y: auto;
  flex: 1;
  padding-right: 3px;
}
.nav-label {
  display: block;
  padding: 15px 11px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 11px;
  margin: 3px 0;
  color: var(--gray);
  border-radius: 9px;
  font-weight: 550;
  white-space: nowrap;
  transition: 0.2s;
}
.side-link i {
  font-size: 1.16rem;
}
.side-link:hover,
.side-link.active {
  color: var(--primary);
  background: rgba(99, 91, 255, 0.09);
}
.side-link .badge {
  margin-left: auto;
}
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px 5px 0;
}
.upgrade {
  background: linear-gradient(135deg, #eeeaff, #f8f7ff);
  padding: 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #5149c8;
}
.upgrade strong {
  display: block;
  font-size: 0.9rem;
}
.sidebar.compact {
  width: 76px;
}
.sidebar.compact .brand span,
.sidebar.compact .side-link span,
.sidebar.compact .nav-label,
.sidebar.compact .upgrade {
  display: none;
}
.sidebar.compact .side-link {
  justify-content: center;
  padding: 11px;
}
.sidebar.compact + .main {
  margin-left: 76px;
}
.main {
  margin-left: var(--sidebar-w);
  min-width: 0;
  transition: margin 0.25s;
}
.topbar {
  height: var(--topbar-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(12px);
}
.search {
  max-width: 370px;
  position: relative;
  flex: 1;
}
.search i {
  position: absolute;
  left: 13px;
  top: 10px;
  color: var(--muted);
}
.search input {
  padding-left: 37px;
}
.icon-btn {
  display: grid;
  place-items: center;
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--gray);
  transition: 0.2s;
}
.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 91, 255, 0.06);
}
.notification-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  top: 7px;
  right: 8px;
  border: 1px solid var(--card-bg);
}
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.content {
  padding: 32px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  margin-bottom: 28px;
}
.page-heading h1 {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  font-weight: 750;
  margin: 0 0 4px;
}
.breadcrumb {
  margin: 0;
  font-size: 0.83rem;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}
.card-header {
  background: transparent;
  border-color: var(--border);
  padding: 19px 21px;
}
.card-body {
  padding: 21px;
}
.stat-card {
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.25rem;
  background: rgba(99, 91, 255, 0.1);
  color: var(--primary);
}
.stat-value {
  font-weight: 750;
  font-size: 1.65rem;
  letter-spacing: -0.06em;
  margin-top: 18px;
}
.trend {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 650;
}
.chart {
  height: 270px;
  display: flex;
  gap: 12px;
  align-items: end;
  padding: 20px 5px 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 53px,
    var(--border) 54px
  );
}
.bar {
  flex: 1;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #9f9aff, var(--primary));
  min-width: 10px;
  opacity: 0.9;
  transition: height 0.3s;
}
.bar:hover {
  opacity: 1;
  filter: brightness(1.08);
}
.quick-action {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 17px;
  text-align: center;
  color: var(--gray);
  display: block;
  transition: 0.2s;
}
.quick-action:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 91, 255, 0.04);
}
.btn {
  border-radius: 9px;
  padding: 0.58rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
/* Estas 3 no venían definidas en el tema del cliente (solo existían en el del
   super-admin) — se usan en varias pantallas del panel cliente y aparecían
   como texto casi invisible al no tener fondo ni color propio. */
.btn.verde { background: #10b981; color: #fff; border-color: #10b981; }
.btn.verde:hover { background: #059669; color: #fff; }
.btn.rojo { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn.rojo:hover { background: #dc2626; color: #fff; }
.btn.gris { background: #475569; color: #fff; border-color: #475569; }
.btn.gris:hover { background: #334155; color: #fff; }
.btn-soft-primary {
  background: rgba(99, 91, 255, 0.1);
  color: var(--primary);
  border: 0;
}
.btn-soft-primary:hover {
  background: var(--primary);
  color: #fff;
}
.form-control,
.form-select {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 0.66rem 0.8rem;
}
.form-control:focus,
.form-select:focus {
  color: var(--text);
  background: var(--card-bg);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.22rem rgba(99, 91, 255, 0.12);
}
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  margin: 0;
}
.table > :not(caption) > * > * {
  padding: 14px 18px;
}
.table thead th {
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.status {
  border-radius: 99px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 650;
}
.status.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.status.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #c77b00;
}
.timeline {
  border-left: 2px solid var(--border);
  margin-left: 7px;
  padding-left: 19px;
}
.timeline-item {
  position: relative;
  padding-bottom: 19px;
  font-size: 0.85rem;
}
.timeline-item:before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  left: -25px;
  top: 5px;
  box-shadow: 0 0 0 4px var(--card-bg);
}
.notification-menu {
  width: min(380px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.notification-menu .dropdown-header {
  padding: 17px 18px 12px;
  color: var(--text);
}
.notification-item {
  display: flex;
  gap: 11px;
  padding: 13px 18px;
  white-space: normal;
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.notification-item:hover {
  background: rgba(99, 91, 255, 0.055);
}
.notification-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(99, 91, 255, 0.11);
  color: var(--primary);
}
.notification-item p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
.notification-item small {
  color: var(--muted);
  font-size: 0.72rem;
}
.modal-content {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.modal-header,
.modal-footer {
  border-color: var(--border);
}
.btn-close {
  filter: var(--close-filter, none);
}
[data-theme="dark"] {
  --close-filter: invert(1);
}
.auth-page {
  min-height: 100vh;
  background: var(--body-bg);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.auth-art {
  background: linear-gradient(150deg, #4036b8, #665cf6 60%, #9d81ff);
  color: #fff;
  padding: 7vw;
  position: relative;
  overflow: hidden;
}
.auth-art:after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  height: 620px;
  width: 620px;
  border-radius: 50%;
  right: -290px;
  top: -240px;
}
.auth-copy {
  max-width: 490px;
  position: relative;
  z-index: 1;
}
.auth-copy h1 {
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
  margin: 45px 0 16px;
}
.illustration {
  max-width: 650px;
  width: 100%;
  position: absolute;
  bottom: 3%;
  left: 8%;
  z-index: 1;
  filter: drop-shadow(0 24px 18px rgba(23, 15, 98, 0.2));
}
.floating {
  animation: float 4s ease-in-out infinite;
}
.floating.delay {
  animation-delay: -2s;
}
.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}
.auth-box {
  max-width: 405px;
  width: 100%;
}
.auth-box h2 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  font-weight: 750;
}
.auth-footer {
  position: fixed;
  bottom: 15px;
  color: var(--muted);
  font-size: 0.78rem;
}
.plan-card {
  height: 100%;
  padding: 28px;
  transition: 0.25s;
}
.plan-card:hover,
.plan-card.featured {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.plan-card.featured {
  position: relative;
}
.plan-label {
  position: absolute;
  top: -13px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
}
.price {
  font-size: 2.6rem;
  font-weight: 750;
  letter-spacing: -0.07em;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 22px 0;
}
.feature-list li {
  padding: 7px 0;
  color: var(--gray);
  font-size: 0.88rem;
}
.feature-list i {
  color: var(--success);
  margin-right: 7px;
}
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
}
.error-code {
  font-size: clamp(7rem, 21vw, 15rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.12em;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  color: transparent;
}
.empty-state {
  text-align: center;
  padding: 70px 20px;
}
.empty-icon {
  font-size: 3rem;
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  background: rgba(99, 91, 255, 0.1);
  border-radius: 50%;
}
@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.55;
    transform: scale(0.96);
  }
}
.skeleton {
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(
    90deg,
    var(--border),
    var(--light),
    var(--border)
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media print {
    .no-print { display: none !important; }
    .sidebar { display: none !important; }
    .main { padding: 0; }
}


.campana-item:last-child { border-bottom: none; }
.modal-notif-fondo { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 600; align-items: center; justify-content: center; }
.modal-notif-fondo.abierto { display: flex; }
.modal-notif-caja { background: #fff; border-radius: 12px; max-width: 480px; width: 92%; max-height: 80vh; overflow-y: auto; padding: 24px; }