/* =============================================
   LOGO
   ============================================= */

.cth-navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}

.cth-logo__icon {
  width: 40px;
  height: 40px;
  /* Logo institucional oficial (reemplaza el ícono anterior en navbar, footer y login) */
  background: var(--cth-white) url('/imagenes/logo.jpg') center/cover no-repeat;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0 !important; /* oculta el glifo/emoji previo (incluye overrides inline); muestra el logo */
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}

.cth-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.cth-logo__club {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cth-green-300);
  text-transform: uppercase;
}

.cth-logo__name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--cth-white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =============================================
   NAVBAR PÚBLICA
   ============================================= */

.cth-navbar-public {
  background: var(--cth-green-900);
  height: var(--cth-navbar-height);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 1030;
}

.cth-navbar-public .navbar-nav {
  gap: 0.25rem;
}

.cth-navbar-public .nav-link {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: var(--cth-text-sm);
  padding: 0.5rem 0.75rem;
  border-radius: var(--cth-radius-md);
  transition: all var(--cth-transition-fast);
  position: relative;
}

.cth-navbar-public .nav-link:hover,
.cth-navbar-public .nav-link.active {
  color: var(--cth-white);
  background: rgba(255,255,255,0.1);
}

.cth-navbar-public .navbar-toggler {
  border-color: rgba(255,255,255,0.25);
  padding: 0.375rem 0.625rem;
}

.cth-navbar-public .navbar-toggler-icon {
  filter: brightness(0) invert(1);
  width: 1.25em;
  height: 1.25em;
}

.cth-navbar-public .navbar-collapse {
  padding-top: 0;
}

@media (max-width: 991.98px) {
  .cth-navbar-public .navbar-collapse {
    background: var(--cth-green-950);
    padding: 1rem;
    border-radius: 0 0 var(--cth-radius-lg) var(--cth-radius-lg);
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 0 -12px;
  }

  .cth-navbar-public .d-flex {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 0.5rem;
  }
}

/* =============================================
   NAVBAR PRIVADA
   ============================================= */

.cth-navbar-private {
  background: var(--cth-surface);                 /* navbar blanco, elegante */
  height: var(--cth-navbar-height);
  border-bottom: 1px solid var(--cth-border);     /* línea inferior muy sutil */
  z-index: 1030;
}

/* Logo sobre navbar blanco: texto oscuro (la clase base es blanca para el navbar público oscuro) */
.cth-navbar-private .cth-logo__name { color: var(--cth-text); }
.cth-navbar-private .cth-logo__club { color: var(--cth-secondary); }
.cth-navbar-private .cth-logo__icon { background: var(--cth-green-700); }

.cth-navbar-private .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

.cth-sidebar-toggle {
  background: none;
  border: none;
  color: var(--cth-text-muted);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: var(--cth-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--cth-transition-fast);
  flex-shrink: 0;
}

.cth-sidebar-toggle:hover {
  color: var(--cth-primary);
  background: var(--cth-gray-100);
}

.cth-nav-icon-btn {
  background: none;
  border: none;
  color: var(--cth-text-muted);
  cursor: pointer;
  padding: 0.375rem 0.5rem;
  border-radius: var(--cth-radius-md);
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  position: relative;
  transition: all var(--cth-transition-fast);
}

.cth-nav-icon-btn:hover {
  color: var(--cth-primary);
  background: var(--cth-gray-100);
}

.cth-nav-icon-btn .cth-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--cth-warning);
  border-radius: 50%;
  border: 2px solid var(--cth-surface);
}

.cth-user-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--cth-radius-md);
  transition: background var(--cth-transition-fast);
}

.cth-user-dropdown-btn:hover {
  background: var(--cth-gray-100);
}

.cth-nav-username {
  font-size: var(--cth-text-sm);
  font-weight: 600;
  color: var(--cth-text);
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.cth-nav-role {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cth-secondary);
  text-align: left;
}

.cth-user-dropdown-btn .bi-chevron-down {
  font-size: 0.7rem;
  color: var(--cth-text-muted);
}

/* =============================================
   SIDEBAR
   ============================================= */

.cth-sidebar__profile {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cth-sidebar__profile-info {
  min-width: 0;
}

.cth-sidebar__username {
  font-size: var(--cth-text-sm);
  font-weight: 600;
  color: var(--cth-white);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cth-sidebar__role-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cth-green-300);
  margin-top: 0.2rem;
}

.cth-sidebar__nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.cth-sidebar__group-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 0.875rem 1rem 0.375rem;
}

.cth-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  color: rgba(255,255,255,0.7);
  font-size: var(--cth-text-sm);
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--cth-transition-fast);
}

.cth-sidebar__link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.8;
}

.cth-sidebar__link:hover {
  color: var(--cth-white);
  background: rgba(255,255,255,0.07);
}

.cth-sidebar__link.is-active {
  color: var(--cth-white);
  background: rgba(255,255,255,0.12);
  border-left-color: var(--cth-green-300);
}

.cth-sidebar__link.is-active i {
  opacity: 1;
  color: var(--cth-green-300);
}

.cth-sidebar__footer {
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* =============================================
   AVATAR
   ============================================= */

.cth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--cth-radius-full);
  background: var(--cth-green-700);
  color: var(--cth-white);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
  line-height: 1;
}

.cth-avatar--xs  { width: 28px; height: 28px; font-size: 0.65rem; }
.cth-avatar--sm  { width: 36px; height: 36px; font-size: 0.75rem; }
.cth-avatar--md  { width: 44px; height: 44px; font-size: 0.875rem; }
.cth-avatar--lg  { width: 56px; height: 56px; font-size: 1rem; }
.cth-avatar--xl  { width: 72px; height: 72px; font-size: 1.25rem; }

.cth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============================================
   BOTONES CUSTOM
   ============================================= */

.cth-btn-white {
  background: var(--cth-white);
  color: var(--cth-green-900);
  border: 2px solid var(--cth-white);
  font-weight: 600;
  border-radius: var(--cth-radius-md);
  transition: all var(--cth-transition-fast);
}

.cth-btn-white:hover {
  background: var(--cth-green-100);
  border-color: var(--cth-green-100);
  color: var(--cth-green-900);
}

.cth-btn-outline-white {
  background: transparent;
  color: rgba(255,255,255,0.9);
  border: 2px solid rgba(255,255,255,0.5);
  font-weight: 600;
  border-radius: var(--cth-radius-md);
  transition: all var(--cth-transition-fast);
}

.cth-btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--cth-white);
  color: var(--cth-white);
}

.cth-btn-primary {
  background: var(--cth-green-700);            /* burdeo institucional */
  color: var(--cth-white);
  border: 2px solid var(--cth-green-700);
  font-weight: 600;
  border-radius: var(--cth-radius-md);
  transition: all var(--cth-transition-fast);
}

.cth-btn-primary:hover {
  background: var(--cth-primary-hover);
  border-color: var(--cth-primary-hover);
  color: var(--cth-white);
}

/* Secundario: blanco con borde cobre (identidad sobria) */
.cth-btn-secondary {
  background: var(--cth-surface);
  color: var(--cth-secondary);
  border: 1.5px solid var(--cth-secondary);
  font-weight: 600;
  border-radius: var(--cth-radius-md);
  transition: all var(--cth-transition-fast);
}

.cth-btn-secondary:hover {
  background: var(--cth-secondary);
  border-color: var(--cth-secondary);
  color: var(--cth-white);
}

/* =============================================
   HERO (Home)
   ============================================= */

.cth-hero {
  background: linear-gradient(135deg, var(--cth-green-950) 0%, var(--cth-green-900) 55%, var(--cth-green-700) 100%);
  min-height: calc(100vh - var(--cth-navbar-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.cth-hero__content { position: relative; z-index: 1; }

.cth-hero__label {
  display: inline-block;
  font-size: var(--cth-text-xs);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cth-green-300);
  margin-bottom: 1rem;
}

.cth-hero__title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 800;
  color: var(--cth-white);
  line-height: 1.0;
  margin-bottom: 1.25rem;
}

.cth-hero__text {
  font-size: var(--cth-text-lg);
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.cth-hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cth-hero__stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.cth-hero__stat-number {
  display: block;
  font-size: var(--cth-text-2xl);
  font-weight: 800;
  color: var(--cth-white);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.cth-hero__stat-label {
  font-size: var(--cth-text-xs);
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cth-hero__visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.06;
  font-size: 28rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* =============================================
   KPI CARDS (Dashboard)
   ============================================= */

.cth-kpi-card {
  background: var(--cth-white);
  border-radius: var(--cth-radius-lg);
  padding: 1.375rem 1.5rem;
  box-shadow: var(--cth-shadow-xs);
  border: 1px solid var(--cth-gray-200);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow var(--cth-transition-fast), transform var(--cth-transition-fast);
}

.cth-kpi-card:hover {
  box-shadow: var(--cth-shadow-md);
  transform: translateY(-1px);
}

.cth-kpi-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--cth-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}

.cth-kpi-card__icon--green  { background: var(--cth-primary-soft); color: var(--cth-primary); }
.cth-kpi-card__icon--blue   { background: var(--cth-info-soft);    color: var(--cth-info); }
.cth-kpi-card__icon--orange { background: var(--cth-warning-soft); color: var(--cth-warning); }
.cth-kpi-card__icon--red    { background: var(--cth-danger-soft);  color: var(--cth-danger); }

.cth-kpi-card__value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--cth-gray-900);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.cth-kpi-card__label {
  font-size: var(--cth-text-sm);
  color: var(--cth-gray-500);
  font-weight: 500;
}

/* =============================================
   PLACEHOLDER CARDS
   ============================================= */

.cth-placeholder-card {
  background: var(--cth-white);
  border-radius: var(--cth-radius-lg);
  overflow: hidden;
  box-shadow: var(--cth-shadow-xs);
  border: 1px solid var(--cth-gray-200);
  transition: box-shadow var(--cth-transition-fast), transform var(--cth-transition-fast);
}

.cth-placeholder-card:hover {
  box-shadow: var(--cth-shadow-md);
  transform: translateY(-2px);
}

.cth-placeholder-card__img {
  height: 180px;
  background: linear-gradient(135deg, var(--cth-green-900), var(--cth-green-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 4rem;
}

.cth-placeholder-card__body {
  padding: 1.25rem;
}

.cth-placeholder-card__category {
  font-size: var(--cth-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cth-green-700);
  margin-bottom: 0.375rem;
}

.cth-placeholder-card__title {
  font-size: var(--cth-text-base);
  font-weight: 700;
  color: var(--cth-gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.cth-placeholder-card__text {
  font-size: var(--cth-text-sm);
  color: var(--cth-gray-500);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.cth-placeholder-card__footer {
  font-size: var(--cth-text-xs);
  color: var(--cth-gray-400);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* =============================================
   BADGE ESTADO
   ============================================= */

.cth-badge-estado {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--cth-radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.cth-badge-estado::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.cth-badge-estado--activo     { background: var(--cth-success-soft); color: var(--cth-success); }
.cth-badge-estado--pendiente  { background: var(--cth-warning-soft); color: var(--cth-yellow-dark); }
.cth-badge-estado--cancelado  { background: var(--cth-danger-soft);  color: var(--cth-danger); }
.cth-badge-estado--suspendido { background: var(--cth-gray-200);     color: var(--cth-gray-600); }
.cth-badge-estado--moroso     { background: var(--cth-danger-soft);  color: var(--cth-danger); }
.cth-badge-estado--reservada  { background: var(--cth-primary-soft); color: var(--cth-primary); }

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */

.cth-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  width: calc(100vw - 2rem);
  pointer-events: none;
}

.cth-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--cth-radius-lg);
  box-shadow: var(--cth-shadow-lg);
  background: var(--cth-white);
  border-left: 4px solid;
  opacity: 0;
  transform: translateX(20px);
  transition: all var(--cth-transition-normal);
  font-size: var(--cth-text-sm);
  pointer-events: all;
}

.cth-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.cth-toast__icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.cth-toast__msg  { flex: 1; color: var(--cth-gray-800); line-height: 1.4; }

.cth-toast__close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cth-gray-400);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color var(--cth-transition-fast);
}
.cth-toast__close:hover { color: var(--cth-gray-700); }

.cth-toast--success { border-left-color: var(--cth-success); }
.cth-toast--success .cth-toast__icon { color: var(--cth-success); }
.cth-toast--error   { border-left-color: var(--cth-danger); }
.cth-toast--error   .cth-toast__icon { color: var(--cth-danger); }
.cth-toast--warning { border-left-color: var(--cth-warning); }
.cth-toast--warning .cth-toast__icon { color: var(--cth-warning); }
.cth-toast--info    { border-left-color: var(--cth-info); }
.cth-toast--info    .cth-toast__icon { color: var(--cth-info); }

/* =============================================
   FOOTER
   ============================================= */

.cth-footer {
  background: var(--cth-green-950);
}

.cth-footer__main {
  padding: 3.5rem 0 2.5rem;
}

.cth-footer__brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--cth-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

.cth-footer__tagline {
  font-size: var(--cth-text-sm);
  color: rgba(255,255,255,0.4);
  margin-top: 0.25rem;
}

.cth-footer__heading {
  font-size: var(--cth-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cth-white);
  margin-bottom: 1rem;
}

.cth-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cth-footer__links li { margin-bottom: 0.5rem; }

.cth-footer__links a {
  color: rgba(255,255,255,0.5);
  font-size: var(--cth-text-sm);
  text-decoration: none;
  transition: color var(--cth-transition-fast);
}

.cth-footer__links a:hover { color: var(--cth-white); }

.cth-footer__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cth-footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--cth-radius-md);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--cth-transition-fast);
}

.cth-footer__social-link:hover {
  background: var(--cth-green-700);
  color: var(--cth-white);
}

.cth-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: rgba(255,255,255,0.5);
  font-size: var(--cth-text-sm);
  margin-bottom: 0.5rem;
}

.cth-footer__contact-item i {
  color: var(--cth-green-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.cth-footer__bar {
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1rem 0;
  font-size: var(--cth-text-xs);
  color: rgba(255,255,255,0.3);
  text-align: center;
}

/* =============================================
   DEV TOOLBAR
   ============================================= */

.cth-dev-bar {
  display: none !important;
}

.cth-dev-bar__label {
  color: rgba(255,255,255,0.3);
  margin-right: 0.25rem;
}

.cth-dev-bar .btn {
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--cth-radius-sm);
}

.cth-dev-bar .btn.active {
  background: var(--cth-warning);
  border-color: var(--cth-warning);
  color: #000;
}
