/* XSite Builder — global design tokens */
:root {
  --in-primary: #5D579E;
  --in-primary-dark: #4a4580;
  --in-primary-light: #7b76b8;
  --in-accent: #01696f;
  --in-success: #437a22;
  --in-warning: #964219;
  --in-danger: #c0392b;
  --in-nav-height: 76px;
  --in-text: #1d2630;
  --in-text-muted: #6b7280;
  --in-surface: #ffffff;
  --in-surface-2: #f8f7fc;
  --in-border: #e8e6f0;
  --in-focus-ring: color-mix(in srgb, var(--in-primary) 18%, transparent);
  --in-font: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
  font-family: var(--in-font);
  color: var(--in-text);
  -webkit-font-smoothing: antialiased;
}

.btn-in-primary {
  background-color: var(--in-primary);
  border-color: var(--in-primary);
  color: #fff;
}
.btn-in-primary:hover {
  background-color: var(--in-primary-dark);
  border-color: var(--in-primary-dark);
  color: #fff;
}
.text-in-primary { color: var(--in-primary) !important; }
.bg-in-primary { background-color: var(--in-primary) !important; }

/* Auth layout — do not use <header> tag (landing.css hijacks generic header {}) */
.auth-body { margin: 0; }
.in-auth-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  min-height: auto;
  padding: 0;
  display: block;
}
header.in-auth-header {
  overflow: visible;
  min-height: auto;
  padding: 0;
  display: block;
  position: sticky;
}
.in-auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--in-nav-height);
  gap: 1rem;
}
.in-auth-brand img { max-height: 52px; width: auto; max-width: 180px; object-fit: contain; }
.in-auth-nav-actions { display: flex; gap: .5rem; flex-shrink: 0; }

.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem 4rem;
  min-height: calc(100vh - var(--in-nav-height));
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(93, 87, 158, 0.14);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 480px;
  width: 100%;
}
.auth-card.auth-card-wide { max-width: 600px; }
.inv-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e8ebf0;
  display: block;
}
.inv-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f8;
  color: #8a94a6;
  font-size: 1.1rem;
}
.inv-thumb-link { text-decoration: none; }
.inv-thumb-link:hover .inv-thumb { border-color: var(--in-primary, #5D579E); }

.auth-oauth-stack { display: flex; flex-direction: column; gap: .65rem; }
.auth-oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  font-weight: 600;
  border-radius: 12px;
  padding: .75rem 1rem;
  border: 1px solid #dde1ea;
  background: #fff;
  color: #1d2630;
  text-decoration: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.auth-oauth-btn:hover { border-color: #b8bfd0; box-shadow: 0 4px 14px rgba(29,38,48,.08); color: #1d2630; }
.auth-oauth-google svg { flex-shrink: 0; }
.auth-oauth-facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.auth-oauth-facebook:hover { background: #166fe5; border-color: #166fe5; color: #fff; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: #8a94a6;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8ebf0;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--in-primary), var(--in-accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
/* Avatar picker — see in-ui.css (.avatar-pick-item) */

/* Fixed public navbar */
.has-fixed-nav { padding-top: var(--in-nav-height); }
.in-navbar {
  background: #fff !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  z-index: 1050;
  min-height: var(--in-nav-height);
}
.in-navbar .container { max-width: 1280px; }
.in-logo { max-height: 52px; max-width: 180px; width: auto; object-fit: contain; }

/* Hero carousel — 2x height with image backgrounds */
.in-carousel-section { margin-top: calc(var(--in-nav-height) * -1); }
.has-fixed-nav .in-carousel-section .carousel { padding-top: var(--in-nav-height); }
.in-hero-carousel .in-carousel-slide,
.in-hero-carousel .in-carousel-slide-wrap {
  min-height: 840px;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.in-carousel-content { min-height: 760px; }
.in-carousel-badge {
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: #1d2630;
  padding: .5rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.in-carousel-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.in-carousel-text {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.6;
  opacity: .95;
  max-width: 640px;
  text-shadow: 0 1px 8px rgba(0,0,0,.2);
}
.in-carousel-btn {
  margin-top: 1.5rem;
  padding: .85rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.in-hero-carousel .carousel-control-prev,
.in-hero-carousel .carousel-control-next { width: 8%; opacity: .9; }
.in-hero-carousel .carousel-control-prev-icon,
.in-hero-carousel .carousel-control-next-icon { filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); width: 2.5rem; height: 2.5rem; }
.in-hero-carousel .carousel-indicators [data-bs-target] {
  width: 12px; height: 12px; border-radius: 50%; margin: 0 6px;
}

.in-nav-link {
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem .85rem !important;
  color: #3e4853 !important;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.in-nav-link:hover, .in-nav-link.active {
  color: var(--in-primary) !important;
  background: rgba(93,87,158,.06);
}
.in-nav-actions { border-left: 1px solid #e9ecef; padding-left: .75rem; margin-left: .5rem; }
.in-main-content { min-height: 60vh; }

@media (max-width: 991px) {
  .in-nav-actions { border-left: none; margin-left: 0; padding-left: 0; margin-top: .5rem; }
  .in-navbar .navbar-collapse {
    padding: 1rem 0;
    max-height: 80vh;
    overflow-y: auto;
  }
  .in-hero-carousel .in-carousel-slide { min-height: 600px; }
  .in-carousel-content { min-height: 520px; }
}
@media (max-width: 575px) {
  .in-hero-carousel .in-carousel-slide { min-height: 480px; }
  .in-carousel-content { min-height: 400px; }
  .in-logo { max-height: 44px; }
}

/* Supporters grid */
.in-supporter-card {
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  height: 100%;
  transition: transform .25s, box-shadow .25s;
  background: #fff;
}
.in-supporter-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(93,87,158,.12);
}
.in-supporter-logo {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.in-supporter-logo img {
  max-height: 80px;
  max-width: 160px;
  object-fit: contain;
}
.in-supporter-tier {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .35rem .85rem;
  border-radius: 50px;
}
.tier-platinum { background: #e8e8f0; color: #4a4580; }
.tier-gold { background: #fff3cd; color: #856404; }
.tier-silver { background: #f1f3f5; color: #495057; }
.tier-bronze { background: #fde8d8; color: #964219; }
.tier-partner { background: rgba(93,87,158,.1); color: var(--in-primary); }

.portal-sidebar-accent {
  border-left: 3px solid var(--portal-accent, var(--in-primary));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--portal-accent, var(--in-primary)) 35%, transparent);
}
.portal-context-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--portal-accent, var(--in-primary));
  background: color-mix(in srgb, var(--portal-accent, var(--in-primary)) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--portal-accent, var(--in-primary)) 22%, transparent);
  border-radius: 999px;
  padding: .28rem .65rem .28rem .45rem;
  line-height: 1.2;
  max-width: 11rem;
}
.portal-context-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--portal-accent, var(--in-primary));
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-accent, var(--in-primary)) 20%, transparent);
}
.portal-context-chip i { font-size: .85rem; flex-shrink: 0; opacity: .85; }
.portal-context-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-search-wrap {
  position: relative;
  min-width: min(220px, 42vw);
  max-width: 280px;
}
.portal-search-icon {
  position: absolute;
  left: .65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9a96a8;
  font-size: .95rem;
  pointer-events: none;
}
.portal-search-input {
  width: 100%;
  border: 1px solid #e8e6f0;
  border-radius: 999px;
  padding: .42rem .85rem .42rem 2rem;
  font-size: .82rem;
  background: #f8f7fc;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.portal-search-input:focus {
  outline: none;
  border-color: var(--portal-accent, var(--in-primary));
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-accent, var(--in-primary)) 14%, transparent);
}
.portal-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1090;
  background: #fff;
  border: 1px solid #e8e6f0;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(20, 20, 50, .14);
  max-height: 320px;
  overflow-y: auto;
  padding: .35rem;
}
.portal-search-hit {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .6rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.portal-search-hit:hover,
.portal-search-hit.is-active { background: #f4f3fa; }
.portal-search-hit.is-active { outline: 2px solid color-mix(in srgb, var(--portal-accent, var(--in-primary)) 25%, transparent); outline-offset: -2px; }
.portal-search-hit i { color: var(--portal-accent, var(--in-primary)); font-size: 1rem; flex-shrink: 0; }
.portal-search-hit span { display: flex; flex-direction: column; min-width: 0; }
.portal-search-hit strong { font-size: .82rem; font-weight: 600; }
.portal-search-hit small { font-size: .68rem; color: #888; }
.portal-search-empty {
  padding: .65rem .75rem;
  font-size: .78rem;
  color: #888;
}
@media (max-width: 768px) {
  .portal-search-wrap { min-width: 140px; max-width: 180px; }
  .portal-context-chip { display: none; }
}
.portal-sales_rep { --portal-accent: #2563eb; }
.portal-coordinator { --portal-accent: #0d9488; }
.portal-manager { --portal-accent: #b45309; }

.in-hero {
  background: linear-gradient(135deg, rgba(93,87,158,0.08) 0%, rgba(1,105,111,0.06) 100%);
  padding: clamp(3rem, 8vw, 5rem) 0;
  margin-top: 0;
}
.in-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #1d2630;
}
.in-hero .lead { color: #5b6b79; font-size: clamp(1rem, 2vw, 1.15rem); }

.in-card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.in-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.in-card .card-img-top {
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--in-primary-light), var(--in-accent));
}

.stat-widget { border-left: 4px solid var(--in-primary); padding-left: 1rem; }
.stat-widget .stat-value { font-size: 2rem; font-weight: 700; color: var(--in-primary); line-height: 1; }

.progress-in { height: 8px; border-radius: 4px; background: #e9ecef; }
.progress-in .bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--in-primary), var(--in-accent)); }

.in-footer {
  background: #1d2630;
  color: #adb5bd;
  padding: 3rem 0 1.5rem;
}
.in-footer a { color: #dee2e6; text-decoration: none; }
.in-footer a:hover { color: #fff; }
.in-footer .footer-brand { color: #fff; font-weight: 700; font-size: 1.25rem; }

.pc-sidebar .pc-link.active, .pc-sidebar .pc-link:hover { color: var(--in-primary) !important; }

.forum-post-card { border-left: 3px solid var(--in-primary); padding-left: 1rem; }
.forum-reply { border-left: 2px solid #e9ecef; margin-left: 1.5rem; padding-left: 1rem; }

.badge-in { background: var(--in-primary); color: #fff; }
.in-section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.in-section-alt { background: #f8f9fa; }

.community-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--in-primary), var(--in-accent));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem;
}

/* SuperBuilder slide editor */
.sb-slide-card {
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: #fafbfc;
}
.sb-slide-preview {
  height: 80px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: .75rem;
}

/* Portal entity manage — action buttons */
.entity-list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  padding: .55rem .25rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.entity-list-row.active { background: rgba(93,87,158,.08); border-radius: 8px; padding-left: .5rem; padding-right: .5rem; }
.entity-list-label { flex: 1; min-width: 0; font-size: .9rem; font-weight: 500; }
.entity-actions { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
.entity-actions .btn { padding: .2rem .45rem; line-height: 1.2; }
.entity-detail-panel .detail-block h6 { color: var(--in-primary); margin-bottom: .5rem; }
.public-entity-sections h4 { margin-top: 1.5rem; color: var(--in-primary); }
.gallery-premium-card { transition: transform .25s ease, box-shadow .25s ease; }
.gallery-premium-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(93,87,158,.12) !important; }
.group-member-grid label { cursor: pointer; border-radius: 4px; padding-left: .25rem; }
.group-member-grid label:hover { background: rgba(93,87,158,.06); }
.dashboard-widget .stat-value { font-size: 1.75rem; font-weight: 600; color: var(--in-primary); }

.in-hero-carousel .carousel-item {
  min-height: 520px;
  background-size: cover;
  background-position: center;
}
.in-hero-carousel-overlay {
  min-height: 520px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(15,23,42,.72) 0%, rgba(15,23,42,.35) 55%, rgba(15,23,42,.15) 100%);
  padding: 3rem 0;
}
.in-hero-video { overflow: hidden; }
.in-hero-video-bg iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.in-hero-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.75) 100%);
  z-index: 2;
}
/* Smart search — grouped dropdown */
.portal-search-group-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  padding: .45rem .75rem .2rem;
}
.portal-search-kind { display: block; font-size: .65rem; color: #999; }
.portal-search-excerpt {
  display: block;
  font-size: .68rem;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.portal-search-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .55rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--portal-accent, var(--in-primary));
  text-decoration: none;
  border-top: 1px solid #eee;
}
.portal-search-more:hover { background: #f8f7fc; }
.portal-search-results { max-height: min(70vh, 420px); overflow-y: auto; }


/* v13.2.4 public site mobile */
@media (max-width: 767.98px) {
  .in-hero {
    padding: 4.5rem 0 2rem !important;
  }
  .in-hero h1 {
    font-size: 1.65rem;
  }
  .in-section .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .in-card .card-body {
    padding: 1rem;
  }
  .in-navbar .navbar-brand img {
    max-height: 36px;
  }
}
