/* ============================================================
   Software4.net — Premium Design System
   Enterprise-grade UI with modern gradients and animations
   ============================================================ */

/* Self-host Inter so the local copy does not fall back when Google Fonts is
   blocked or its optional-loading window expires. */
@font-face { font-family: 'Inter'; src: url('/fonts/inter-400.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-500.ttf') format('truetype'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-600.ttf') format('truetype'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-700.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-800.ttf') format('truetype'); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-900.ttf') format('truetype'); font-style: normal; font-weight: 900; font-display: swap; }

:root {
  --s4-navy:        #0D1B2A;
  --s4-blue:        #1565C0;
  --s4-blue-mid:    #1976D2;
  --s4-blue-light:  #42A5F5;
  --s4-accent:      #00B4D8;
  --s4-gold:        #F59E0B;
  --s4-white:       #FFFFFF;
  --s4-off-white:   #F8FAFC;
  --s4-gray-100:    #F1F5F9;
  --s4-gray-200:    #E2E8F0;
  --s4-gray-500:    #64748B;
  --s4-gray-700:    #334155;
  --s4-text:        #0F172A;

  --gradient-hero:  linear-gradient(135deg, #0D1B2A 0%, #1565C0 60%, #0088A9 100%);
  --gradient-card:  linear-gradient(135deg, #1565C0 0%, #42A5F5 100%);
  --gradient-cta:   linear-gradient(135deg, #0D1B2A 0%, #1976D2 100%);
  --gradient-gold:  linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);

  --shadow-sm:  0 2px 8px rgba(13,27,42,.08);
  --shadow-md:  0 8px 32px rgba(13,27,42,.12);
  --shadow-lg:  0 20px 60px rgba(13,27,42,.16);
  --shadow-card:0 4px 24px rgba(21,101,192,.15);

  --radius-sm:  .5rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;
  --radius-xl:  2rem;

  --transition: all .3s cubic-bezier(.4,0,.2,1);
  --font-main:  'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--s4-text);
  background: var(--s4-white);
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }
.display-1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.display-2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 800;
  margin-bottom: .75rem;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--s4-gray-500);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar-s4 {
  background: transparent;
  padding: .5rem 0;
  transition: var(--transition);
  position: fixed;
  width: 100%;
  z-index: 1000;
}
.navbar-s4.scrolled {
  background: rgba(13,27,42,.96);
  backdrop-filter: blur(20px);
  padding: .25rem 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.navbar-s4 .navbar-brand img,
.navbar-s4 .brand-logo {
  height: 150px;
  width: auto;
  max-width: min(65vw, 460px);
  display: block;
  object-fit: contain;
  object-position: left center;
  /* Render the logo large without inflating the fixed navbar height */
  margin: -20px 0;
}
/* The hamburger must always be visible and tappable on mobile */
.navbar-s4 .navbar-toggler {
  color: #fff !important;
  font-size: 1.6rem;
  padding: .45rem .7rem;
  margin-left: auto;
  position: relative;
  z-index: 1002;
  background: rgba(255,255,255,.08);
  border-radius: 10px;
}
.navbar-s4 .navbar-toggler:focus { box-shadow: none; }
@media (max-width: 991.98px) {
  .navbar-s4 .navbar-brand { flex: 0 1 auto; min-width: 0; }
  .navbar-s4 .navbar-brand img,
  .navbar-s4 .brand-logo { height: 100px; margin: -12px 0; max-width: 48vw; }
}
@media (max-width: 480px) {
  .navbar-s4 .navbar-brand img,
  .navbar-s4 .brand-logo { height: 84px; margin: -8px 0; }
}
.navbar-s4 .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  color: var(--s4-white) !important;
  letter-spacing: -.02em;
}
.navbar-s4 .navbar-brand span { color: var(--s4-accent); }
.navbar-s4 .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  font-size: .9375rem;
  padding: .5rem 1rem !important;
  transition: var(--transition);
  position: relative;
}
.navbar-s4 .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--s4-accent);
  transform: scaleX(0);
  transition: var(--transition);
  border-radius: 99px;
}
.navbar-s4 .nav-link:hover { color: var(--s4-white) !important; }
.navbar-s4 .nav-link:hover::after,
.navbar-s4 .nav-link.active::after { transform: scaleX(1); }
.navbar-s4 .nav-link.active { color: var(--s4-white) !important; }

.btn-nav-cta {
  background: var(--gradient-card);
  color: var(--s4-white) !important;
  border-radius: 50px !important;
  padding: .5rem 1.5rem !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
  box-shadow: 0 4px 15px rgba(21,101,192,.4);
}
.btn-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(21,101,192,.5) !important;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary-s4 {
  background: var(--gradient-card);
  color: var(--s4-white);
  border: none;
  padding: .875rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(21,101,192,.4);
}
.btn-primary-s4:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(21,101,192,.6);
  color: var(--s4-white);
}
.btn-outline-s4 {
  background: transparent;
  color: var(--s4-white);
  border: 2px solid rgba(255,255,255,.6);
  padding: .875rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn-outline-s4:hover {
  background: var(--s4-white);
  color: var(--s4-blue);
  border-color: var(--s4-white);
  transform: translateY(-3px);
}
.btn-gold {
  background: var(--gradient-gold);
  color: var(--s4-white);
  border: none;
  padding: .875rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(245,158,11,.4);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(245,158,11,.6);
  color: var(--s4-white);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
  background: var(--gradient-hero);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 130px 0 80px;
}
@media (max-width: 991.98px) {
  .hero-section { padding: 115px 0 60px; min-height: auto; }
  /* Expanded mobile menu needs its own background over the transparent navbar */
  .navbar-s4 .navbar-collapse {
    background: rgba(13,27,42,.98);
    border-radius: 12px;
    padding: .75rem 1rem;
    margin-top: .5rem;
  }
}
@media (max-width: 480px) {
  .hero-section { padding: 100px 0 48px; }
  .hero-section h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(0,180,216,.15) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--s4-white);
  padding: .5rem 1.25rem;
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--s4-accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}
.hero-title {
  color: var(--s4-white);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -.03em;
}
.hero-title .highlight {
  background: linear-gradient(90deg, var(--s4-accent), #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  color: rgba(255,255,255,.8);
  font-size: 1.25rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 520px;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.hero-stat-item { color: var(--s4-white); }
.hero-stat-item .stat-number {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  color: var(--s4-accent);
  display: block;
}
.hero-stat-item .stat-label {
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  margin-top: .25rem;
}

/* Hero graphic */
.hero-graphic {
  position: relative;
  z-index: 2;
}
.hero-graphic-inner {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
.dashboard-preview {
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.db-metric {
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.db-metric-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.db-metric-icon.blue { background: rgba(21,101,192,.4); }
.db-metric-icon.teal { background: rgba(0,180,216,.4); }
.db-metric-icon.gold { background: rgba(245,158,11,.4); }
.db-metric-label { color: rgba(255,255,255,.7); font-size: .8rem; }
.db-metric-value { color: var(--s4-white); font-weight: 700; font-size: 1.125rem; }
.db-bar-group { margin-top: 1.5rem; }
.db-bar-label { color: rgba(255,255,255,.7); font-size: .75rem; margin-bottom: .5rem; display: flex; justify-content: space-between; }
.db-bar-track { background: rgba(255,255,255,.1); border-radius: 99px; height: 6px; overflow: hidden; margin-bottom: .75rem; }
.db-bar-fill { height: 100%; border-radius: 99px; }
.db-bar-fill.blue { background: linear-gradient(90deg, var(--s4-blue-light), var(--s4-accent)); }
.db-bar-fill.green { background: linear-gradient(90deg, #10B981, #34D399); }
.db-bar-fill.purple { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }

/* ── Section Styles ──────────────────────────────────────── */
section { padding: 100px 0; }
.section-label {
  display: inline-block;
  color: var(--s4-blue);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .75rem;
  background: rgba(21,101,192,.08);
  padding: .375rem 1rem;
  border-radius: 50px;
}
.text-center .section-label { display: block; }

/* ── Service Cards ───────────────────────────────────────── */
.services-section { background: var(--s4-off-white); }
.service-card {
  background: var(--s4-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--s4-gray-200);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-card);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: rgba(21,101,192,.08);
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: var(--gradient-card);
  color: white;
}
.service-card h4 { font-size: 1.375rem; margin-bottom: .75rem; }
.service-card p { color: var(--s4-gray-500); line-height: 1.7; margin-bottom: 1.5rem; }
.service-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.service-features li {
  padding: .4rem 0;
  color: var(--s4-gray-700);
  font-size: .9375rem;
  display: flex;
  align-items: center;
  gap: .625rem;
}
.service-features li::before {
  content: '✓';
  width: 20px; height: 20px;
  background: rgba(21,101,192,.1);
  color: var(--s4-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Stats Section ───────────────────────────────────────── */
.stats-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.stat-box {
  text-align: center;
  color: var(--s4-white);
  position: relative;
  z-index: 1;
}
.stat-box .number {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(90deg, #FFFFFF, var(--s4-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}
.stat-box .label {
  font-size: 1rem;
  color: rgba(255,255,255,.75);
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  background: rgba(255,255,255,.15);
  margin: 0 2rem;
}

/* ── Pricing Cards ───────────────────────────────────────── */
.pricing-section { background: var(--s4-off-white); }
.pricing-card {
  background: var(--s4-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--s4-gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.pricing-card.popular {
  border-color: var(--s4-blue);
  box-shadow: var(--shadow-card);
  transform: translateY(-8px);
}
.pricing-card:hover {
  transform: translateY(-8px);
  border-color: var(--s4-blue);
  box-shadow: var(--shadow-card);
}
.pricing-card.popular:hover { transform: translateY(-12px); }
.popular-badge {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  background: var(--gradient-card);
  color: var(--s4-white);
  padding: .375rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pricing-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--s4-blue);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.25rem;
}
.pricing-price {
  font-size: 3rem;
  font-weight: 900;
  color: var(--s4-text);
  line-height: 1;
  margin-bottom: .25rem;
}
.pricing-price span { font-size: 1.25rem; vertical-align: super; margin-right: .125rem; }
.pricing-period { color: var(--s4-gray-500); font-size: .9rem; margin-bottom: 1.75rem; }
.pricing-divider { height: 1px; background: var(--s4-gray-200); margin-bottom: 1.75rem; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 2rem; flex: 1; }
.pricing-features li {
  padding: .5rem 0;
  color: var(--s4-gray-700);
  font-size: .9375rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.pricing-features li .check {
  color: var(--s4-blue);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Partner Logos ───────────────────────────────────────── */
.partners-section { background: var(--s4-white); padding: 60px 0; }
.partner-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  filter: grayscale(100%);
  opacity: .5;
  transition: var(--transition);
}
.partner-logo-wrap:hover { filter: grayscale(0%); opacity: 1; }
.partner-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--s4-gray-700);
  letter-spacing: -.02em;
}

/* ── Reviews Carousel ────────────────────────────────────── */
.reviews-section { background: var(--s4-off-white); }
.review-card {
  background: var(--s4-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--s4-gray-200);
  position: relative;
  /* ── equal-height fix: flex column so author pins to bottom ── */
  display: flex;
  flex-direction: column;
  height: 100%;
}
.review-card::before {
  content: '"';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-size: 5rem;
  line-height: 1;
  color: var(--s4-gray-200);
  font-family: Georgia, serif;
}
.review-stars { color: var(--s4-gold); font-size: 1rem; margin-bottom: 1rem; }
.review-text { color: var(--s4-gray-700); line-height: 1.7; font-size: .9375rem; margin-bottom: 1.5rem; flex-grow: 1; }
.review-author { display: flex; align-items: center; gap: 1rem; margin-top: auto; }
.review-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.review-platform { font-size: .75rem; color: var(--s4-gray-500); }
.review-author-name { font-weight: 700; color: var(--s4-text); font-size: .9375rem; }

/* ── CTA Section ─────────────────────────────────────────── */
.cta-section {
  background: var(--gradient-cta);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,180,216,.2) 0%, transparent 70%);
  bottom: -200px; right: -100px;
  border-radius: 50%;
}
.cta-form {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-xl);
  padding: 3rem;
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
}
.form-s4 .form-control,
.form-s4 .form-select {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--s4-white);
  border-radius: var(--radius-sm);
  padding: .875rem 1.25rem;
  font-size: .9375rem;
  transition: var(--transition);
}
.form-s4 .form-control::placeholder { color: rgba(255,255,255,.5); }
.form-s4 .form-control:focus,
.form-s4 .form-select:focus {
  background: rgba(255,255,255,.15);
  border-color: var(--s4-accent);
  color: var(--s4-white);
  box-shadow: 0 0 0 .25rem rgba(0,180,216,.25);
}
.form-s4 .form-select option { background: var(--s4-navy); color: var(--s4-white); }
.form-s4 .form-label { color: rgba(255,255,255,.8); font-weight: 500; margin-bottom: .5rem; }

/* Light form (white background) */
.form-light .form-control,
.form-light .form-select {
  background: var(--s4-white);
  border: 2px solid var(--s4-gray-200);
  color: var(--s4-text);
  border-radius: var(--radius-sm);
  padding: .875rem 1.25rem;
  transition: var(--transition);
}
.form-light .form-control:focus,
.form-light .form-select:focus {
  border-color: var(--s4-blue);
  box-shadow: 0 0 0 .25rem rgba(21,101,192,.15);
}
.form-light .form-label { color: var(--s4-gray-700); font-weight: 600; }

/* ── Product Cards ───────────────────────────────────────── */
.product-card {
  background: var(--s4-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--s4-gray-200);
  height: 100%;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.product-card-header {
  background: var(--gradient-hero);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.product-icon {
  width: 96px; height: 96px;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 1.25rem;
  backdrop-filter: blur(10px);
}
.product-card-body { padding: 2rem; }
.product-card-body h4 { font-size: 1.5rem; margin-bottom: .75rem; }
.product-card-body p { color: var(--s4-gray-500); line-height: 1.7; margin-bottom: 1.5rem; }
.product-feature-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.product-feature-list li {
  padding: .45rem 0;
  color: var(--s4-gray-700);
  display: flex; align-items: center; gap: .75rem;
}
.product-feature-list li::before {
  content: '→';
  color: var(--s4-blue);
  font-weight: 700;
}
.product-card-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--s4-gray-200);
  display: flex;
  gap: 1rem;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--s4-navy);
  color: rgba(255,255,255,.75);
}
.footer-top { padding: 80px 0 40px; }
.footer-brand { font-size: 1.75rem; font-weight: 900; color: var(--s4-white); margin-bottom: .75rem; }
.footer-brand span { color: var(--s4-accent); }
.footer-desc { color: rgba(255,255,255,.6); line-height: 1.7; max-width: 320px; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: var(--transition);
  font-size: .9rem;
}
.footer-social a:hover {
  background: var(--s4-blue);
  border-color: var(--s4-blue);
  color: var(--s4-white);
  transform: translateY(-3px);
}
.footer-heading {
  color: var(--s4-white);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.25rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .625rem; }
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .9375rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--s4-accent); padding-left: .375rem; }
.footer-contact-item { display: flex; gap: .875rem; align-items: flex-start; margin-bottom: 1rem; }
.footer-contact-item .icon { color: var(--s4-accent); flex-shrink: 0; margin-top: .125rem; }
.footer-contact-item a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-contact-item a:hover { color: var(--s4-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { margin: 0; font-size: .875rem; color: rgba(255,255,255,.5); }

/* ── Portal / Admin Layouts ──────────────────────────────── */
.portal-layout { display: flex; min-height: 100vh; background: var(--s4-off-white); }
.sidebar {
  width: 280px;
  background: var(--s4-navy);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}
.sidebar-brand {
  padding: 1.75rem 1.5rem 1.25rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--s4-white);
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: .5rem;
}
.sidebar-brand span { color: var(--s4-accent); }
.sidebar-nav { flex: 1; padding: .5rem 0; overflow-y: auto; }
.sidebar-section { padding: .75rem 1.5rem .375rem; }
.sidebar-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem 1.5rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: var(--transition);
  border-radius: 0;
  position: relative;
  font-size: .9375rem;
}
.sidebar-item:hover,
.sidebar-item.active {
  background: rgba(255,255,255,.08);
  color: var(--s4-white);
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--s4-accent);
  border-radius: 0 2px 2px 0;
}
.sidebar-item .icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: var(--s4-blue);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: .125rem .5rem;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.main-content {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: var(--s4-white);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--s4-gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: .625rem 1rem .625rem 2.75rem;
  border: 2px solid var(--s4-gray-200);
  border-radius: 50px;
  font-size: .9rem;
  background: var(--s4-gray-100);
  transition: var(--transition);
}
.topbar-search input:focus {
  border-color: var(--s4-blue);
  background: var(--s4-white);
  outline: none;
  box-shadow: 0 0 0 4px rgba(21,101,192,.1);
}
.topbar-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--s4-gray-500);
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 2px solid var(--s4-gray-200);
  background: var(--s4-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  color: var(--s4-gray-500);
  text-decoration: none;
}
.topbar-btn:hover { border-color: var(--s4-blue); color: var(--s4-blue); }
.topbar-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--s4-blue);
  color: white;
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}
.user-menu { display: flex; align-items: center; gap: .75rem; cursor: pointer; }
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}
.user-info { line-height: 1.2; }
.user-info .name { font-weight: 700; font-size: .9rem; color: var(--s4-text); }
.user-info .role { font-size: .75rem; color: var(--s4-gray-500); }

.page-content { padding: 2rem; flex: 1; }
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .25rem; }
.page-subtitle { color: var(--s4-gray-500); }

/* ── Dashboard Cards ──────────────────────────────────────── */
.metric-card {
  background: var(--s4-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--s4-gray-200);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.metric-card:hover { box-shadow: var(--shadow-md); border-color: var(--s4-blue-light); transform: translateY(-2px); }
.metric-icon-wrap {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.metric-icon-wrap.blue { background: rgba(21,101,192,.1); color: var(--s4-blue); }
.metric-icon-wrap.teal { background: rgba(0,180,216,.1); color: var(--s4-accent); }
.metric-icon-wrap.green { background: rgba(16,185,129,.1); color: #10B981; }
.metric-icon-wrap.orange { background: rgba(245,158,11,.1); color: var(--s4-gold); }
.metric-icon-wrap.red { background: rgba(239,68,68,.1); color: #EF4444; }
.metric-icon-wrap.purple { background: rgba(139,92,246,.1); color: #8B5CF6; }
.metric-icon-wrap.gray   { background: rgba(100,116,139,.1); color: #64748B; }
.metric-value { font-size: 1.875rem; font-weight: 900; color: var(--s4-text); line-height: 1; }
.metric-label { font-size: .8rem; color: var(--s4-gray-500); margin-top: .25rem; }
.metric-change { font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: .25rem; margin-top: .375rem; }
.metric-change.up { color: #10B981; }
.metric-change.down { color: #EF4444; }

.data-card {
  background: var(--s4-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--s4-gray-200);
  overflow: hidden;
}
.data-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--s4-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.data-card-title { font-size: 1rem; font-weight: 700; }
.data-card-body { padding: 1.5rem; }

/* ── Tables ──────────────────────────────────────────────── */
.table-s4 { width: 100%; border-collapse: collapse; }
.table-s4 thead tr {
  background: var(--s4-gray-100);
  border-bottom: 2px solid var(--s4-gray-200);
}
.table-s4 thead th {
  padding: .875rem 1rem;
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--s4-gray-500);
  white-space: nowrap;
}
.table-s4 tbody tr {
  border-bottom: 1px solid var(--s4-gray-200);
  transition: var(--transition);
}
.table-s4 tbody tr:hover { background: rgba(21,101,192,.03); }
.table-s4 tbody td { padding: 1rem; font-size: .9375rem; color: var(--s4-gray-700); }

/* ── Badges ──────────────────────────────────────────────── */
.badge-s4 {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-open     { background: rgba(59,130,246,.1); color: #3B82F6; }
.badge-progress { background: rgba(245,158,11,.1); color: var(--s4-gold); }
.badge-resolved { background: rgba(16,185,129,.1); color: #10B981; }
.badge-closed   { background: rgba(100,116,139,.1); color: var(--s4-gray-500); }
.badge-active   { background: rgba(16,185,129,.1); color: #10B981; }
.badge-pastdue  { background: rgba(239,68,68,.1); color: #EF4444; }
.badge-pending  { background: rgba(245,158,11,.1); color: var(--s4-gold); }
.badge-paid     { background: rgba(16,185,129,.1); color: #10B981; }
.badge-high     { background: rgba(239,68,68,.1); color: #EF4444; }
.badge-medium   { background: rgba(245,158,11,.1); color: var(--s4-gold); }
.badge-low      { background: rgba(16,185,129,.1); color: #10B981; }
.badge-critical { background: rgba(239,68,68,.2); color: #DC2626; }

/* ── Pipeline (CRM) ──────────────────────────────────────── */
.pipeline-board { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; }
.pipeline-column {
  min-width: 280px;
  background: var(--s4-gray-100);
  border-radius: var(--radius-md);
  padding: 1rem;
  flex-shrink: 0;
}
.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--s4-gray-200);
}
.pipeline-column-title { font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.pipeline-count { font-size: .8rem; color: var(--s4-gray-500); background: var(--s4-white); padding: .125rem .5rem; border-radius: 99px; }
.deal-card {
  background: var(--s4-white);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: .75rem;
  cursor: grab;
  transition: var(--transition);
  border: 1px solid var(--s4-gray-200);
}
.deal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.deal-title { font-weight: 700; font-size: .9rem; margin-bottom: .375rem; }
.deal-meta { font-size: .8rem; color: var(--s4-gray-500); display: flex; gap: .75rem; }
.deal-value { font-weight: 800; color: var(--s4-blue); margin-top: .5rem; font-size: .9375rem; }

/* ── Messaging Panel ─────────────────────────────────────── */
.messaging-layout { display: flex; height: calc(100vh - 72px); }
.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--s4-gray-200);
  overflow-y: auto;
  flex-shrink: 0;
  background: var(--s4-white);
}
.chat-sidebar-header { padding: 1.25rem; border-bottom: 1px solid var(--s4-gray-200); }
.chat-search { position: relative; }
.chat-search input {
  width: 100%;
  padding: .625rem 1rem .625rem 2.5rem;
  border: 2px solid var(--s4-gray-200);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  background: var(--s4-gray-100);
}
.chat-search input:focus { outline: none; border-color: var(--s4-blue); background: var(--s4-white); }
.chat-item {
  display: flex;
  gap: .875rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--s4-gray-200);
}
.chat-item:hover,
.chat-item.active { background: rgba(21,101,192,.05); }
.chat-item.active { border-left: 3px solid var(--s4-blue); }
.chat-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}
.online-dot {
  width: 10px; height: 10px;
  background: #10B981;
  border: 2px solid white;
  border-radius: 50%;
  position: absolute;
  bottom: 0; right: 0;
}
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 700; font-size: .9rem; margin-bottom: .125rem; }
.chat-preview { font-size: .8rem; color: var(--s4-gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { flex-shrink: 0; text-align: right; }
.chat-time { font-size: .75rem; color: var(--s4-gray-500); margin-bottom: .375rem; }
.unread-badge {
  background: var(--s4-blue);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  margin-left: auto;
}

.chat-panel { flex: 1; display: flex; flex-direction: column; background: var(--s4-off-white); }
.chat-panel-header {
  background: var(--s4-white);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--s4-gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.message-bubble {
  max-width: 65%;
  display: flex;
  flex-direction: column;
}
.message-bubble.own { align-self: flex-end; align-items: flex-end; }
.message-bubble.other { align-self: flex-start; }
.bubble-content {
  padding: .75rem 1.125rem;
  border-radius: 1.25rem;
  font-size: .9375rem;
  line-height: 1.5;
  word-break: break-word;
}
.message-bubble.own .bubble-content {
  background: var(--gradient-card);
  color: white;
  border-radius: 1.25rem 1.25rem .25rem 1.25rem;
}
.message-bubble.other .bubble-content {
  background: var(--s4-white);
  color: var(--s4-text);
  border-radius: 1.25rem 1.25rem 1.25rem .25rem;
  box-shadow: var(--shadow-sm);
}
.bubble-meta { font-size: .75rem; color: var(--s4-gray-500); margin-top: .375rem; display: flex; align-items: center; gap: .375rem; }

.chat-input-area {
  background: var(--s4-white);
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--s4-gray-200);
  display: flex;
  gap: .875rem;
  align-items: flex-end;
}
.chat-input-field {
  flex: 1;
  padding: .75rem 1.25rem;
  border: 2px solid var(--s4-gray-200);
  border-radius: 1.5rem;
  resize: none;
  font-size: .9375rem;
  line-height: 1.5;
  max-height: 120px;
  transition: var(--transition);
  font-family: var(--font-main);
}
.chat-input-field:focus { outline: none; border-color: var(--s4-blue); box-shadow: 0 0 0 4px rgba(21,101,192,.1); }
.chat-send-btn {
  width: 44px; height: 44px;
  background: var(--gradient-card);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.chat-send-btn:hover { transform: scale(1.1); box-shadow: 0 4px 15px rgba(21,101,192,.4); }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.auth-left {
  flex: 1;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,180,216,.2) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
}
.auth-right {
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--s4-white);
}
.auth-form-wrap { width: 100%; max-width: 420px; }
.auth-logo { font-size: 1.5rem; font-weight: 900; color: var(--s4-navy); margin-bottom: 2rem; }
.auth-logo span { color: var(--s4-blue); }
.auth-title { font-size: 2rem; font-weight: 900; margin-bottom: .5rem; }
.auth-subtitle { color: var(--s4-gray-500); margin-bottom: 2.5rem; }
.auth-divider { text-align: center; position: relative; margin: 1.5rem 0; }
.auth-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--s4-gray-200);
}
.auth-divider span {
  background: var(--s4-white);
  padding: 0 1rem;
  color: var(--s4-gray-500);
  font-size: .875rem;
  position: relative;
}

/* Public authentication — homepage visual language */
.auth-page {
  color: #eaf4ff;
  background:
    linear-gradient(rgba(34, 93, 152, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 93, 152, .11) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(30, 117, 255, .18), transparent 34%),
    linear-gradient(135deg, #041426 0%, #071c35 56%, #0a315f 100%);
  background-size: 56px 56px, 56px 56px, auto, auto;
}
.auth-left {
  flex: 1.08;
  background:
    radial-gradient(circle at 24% 28%, rgba(35, 197, 255, .16), transparent 32%),
    linear-gradient(145deg, rgba(4, 20, 38, .64), rgba(8, 51, 96, .72));
  border-right: 1px solid rgba(116, 190, 255, .18);
  padding: clamp(2.5rem, 6vw, 6rem);
}
.auth-left::before {
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(0, 189, 255, .17), transparent 67%);
  top: -260px;
  right: -220px;
}
.auth-left::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(76, 155, 235, .07) 1px, transparent 1px),
              linear-gradient(90deg, rgba(76, 155, 235, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.auth-right {
  width: min(560px, 42vw);
  padding: clamp(1.5rem, 4vw, 4rem);
  background: rgba(2, 13, 27, .48);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.auth-form-wrap {
  max-width: 450px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid rgba(126, 195, 255, .2);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(17, 46, 79, .84), rgba(7, 27, 50, .9));
  box-shadow: 0 28px 70px rgba(0, 7, 18, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.auth-logo-img {
  display: block;
  width: min(280px, 72%);
  height: auto;
  object-fit: contain;
}
.auth-logo-img--sm { width: min(220px, 72%); }
.auth-title {
  color: #f7fbff;
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  letter-spacing: -.045em;
}
.auth-subtitle { color: #a9bdd2; margin-bottom: 2rem; }
.auth-page .form-label,
.auth-page .form-check-label { color: #dceaff; font-weight: 600; }
.auth-page .form-control {
  color: #eef8ff;
  background: rgba(2, 17, 34, .72);
  border: 1px solid rgba(126, 195, 255, .22);
  border-radius: 12px;
  min-height: 52px;
  box-shadow: none;
}
.auth-page .form-control::placeholder { color: #6f879f; }
.auth-page .form-control:focus {
  color: #fff;
  background: rgba(4, 24, 46, .9);
  border-color: #22c7ff;
  box-shadow: 0 0 0 4px rgba(34, 199, 255, .12);
}
.auth-page .form-check-input {
  background-color: rgba(2, 17, 34, .72);
  border-color: rgba(126, 195, 255, .34);
}
.auth-page .form-check-input:checked { background-color: #1584ff; border-color: #1584ff; }
.auth-page .btn-primary-s4 {
  border-radius: 12px;
  background: linear-gradient(115deg, #087dff, #18c5ef);
  box-shadow: 0 14px 34px rgba(0, 127, 255, .25);
}
.auth-page .btn-primary-s4:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(0, 154, 255, .33); }
.auth-divider::before { background: rgba(126, 195, 255, .18); }
.auth-divider span { color: #7f96ad; background: #0c294a; }
.auth-page .text-center p { color: #90a6bc !important; }
.auth-page a { text-underline-offset: 3px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); z-index: 1050; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hero-graphic { display: none; }
  .auth-left { display: none; }
  .auth-right { width: 100%; min-height: 100vh; }

  /* Admin mobile nav toggle — the hamburger + backdrop needed to actually
     reach the sidebar CSS above, which previously had no trigger at all. */
  .mobile-sidebar-toggle { display: inline-flex !important; }
  .sidebar-backdrop.show { display: block; }
}

@media (max-width: 575.98px) {
  .auth-right { padding: 1rem; }
  .auth-form-wrap { padding: 1.5rem; border-radius: 18px; }
}

/* Final cascade for auth views after the real shared navigation/footer has
   been injected. This intentionally follows the compact no-JS fallback. */
body.auth-global-chrome:has(.auth-page) { padding: 0; }
body.auth-global-chrome:has(.auth-page)::before,
body.auth-global-chrome:has(.auth-page)::after { content: none; display: none; }
body.auth-global-chrome:has(.auth-page) .auth-page { min-height: calc(100vh - 72px); }
body.auth-global-chrome:has(.auth-page) .auth-left > div:first-child {
    display: none !important;
}
body.auth-global-chrome:has(.auth-page) .auth-left > div:first-child a { width: auto; height: auto; }
body.auth-global-chrome:has(.auth-page) .auth-left > div:first-child .auth-logo-img {
    width: 220px; height: 220px; margin: -74px 0;
}
body.auth-global-chrome:has(.auth-page) .auth-right .text-center p:first-child {
    position: static; margin-bottom: 1rem !important; font-size: .875rem !important;
}
body.auth-global-chrome:has(.auth-page) .auth-right .text-center p:first-child a {
    display: inline; min-height: 0; padding: 0; color: var(--s4-blue) !important;
    font-size: inherit; background: none; box-shadow: none;
}
@media (max-width:991.98px) {
    body.auth-global-chrome:has(.auth-page) .auth-logo.d-lg-none {
        position: static; width:180px; height:64px; margin:0 auto 1.5rem; overflow:hidden;
    }
    body.auth-global-chrome:has(.auth-page) .auth-logo.d-lg-none .auth-logo-img {
        width:180px; height:180px; margin:-60px auto;
    }
}

/* When the response-layer bridge installs the actual public header/footer,
   disable the compact fallback chrome and restore the auth content flow. */
body.auth-global-chrome {
    padding: 0;
    background: #061426;
}
body.auth-global-chrome::before,
body.auth-global-chrome::after { content: none; display: none; }
body.auth-global-chrome .auth-page {
    min-height: calc(100vh - 72px);
}
body.auth-global-chrome .auth-left > div:first-child {
    position: relative !important;
    inset: auto;
    z-index: 2 !important;
    width: auto;
    height: auto;
    overflow: visible;
}
body.auth-global-chrome .auth-left > div:first-child a {
    width: auto;
    height: auto;
}
body.auth-global-chrome .auth-left > div:first-child .auth-logo-img {
    width: 220px;
    height: 220px;
    margin: -74px 0;
}
body.auth-global-chrome .auth-right .text-center p:first-child {
    position: static;
    margin-bottom: 1rem !important;
    font-size: .875rem !important;
}
body.auth-global-chrome .auth-right .text-center p:first-child a {
    display: inline;
    min-height: 0;
    padding: 0;
    color: var(--s4-blue) !important;
    font-size: inherit;
    background: none;
    box-shadow: none;
}
body.auth-global-chrome > footer { position: relative; z-index: 2; }

@media (max-width: 991.98px) {
    body.auth-global-chrome .auth-logo.d-lg-none {
        position: static;
        width: 180px;
        height: 64px;
        margin: 0 auto 1.5rem;
    }
    body.auth-global-chrome .auth-logo.d-lg-none .auth-logo-img {
        width: 180px;
        height: 180px;
        margin: -60px auto;
    }
}

/* Hidden on desktop — the sidebar is always visible there, no toggle needed. */
.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--s4-text);
  font-size: 1.25rem;
  border-radius: 8px;
  margin-right: .5rem;
  flex-shrink: 0;
}
.mobile-sidebar-toggle:hover { background: var(--s4-gray-100); }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 1040;
}

@media (max-width: 767.98px) {
  section { padding: 60px 0; }
  .pricing-card.popular { transform: none; }
  .cta-form { padding: 2rem 1.5rem; }
  .chat-sidebar { display: none; }
  .chat-sidebar.open { display: block; position: absolute; z-index: 50; width: 100%; height: 100%; }
  .mobile-chat-back { display: inline-flex !important; }
}
.mobile-chat-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--s4-text);
  font-size: 1.1rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.mobile-chat-back:hover { background: var(--s4-gray-100); }

/* ── Utilities ───────────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-card);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-gradient-hero { background: var(--gradient-hero); }
.bg-off-white { background: var(--s4-off-white); }
.text-muted-s4 { color: var(--s4-gray-500); }
.border-radius-lg { border-radius: var(--radius-lg); }
.border-radius-xl { border-radius: var(--radius-xl); }
.shadow-card { box-shadow: var(--shadow-card); }

/* AOS-like fade */
[data-animate] { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
[data-animate].animated { opacity: 1; transform: none; }
[data-animate="left"] { transform: translateX(-30px); }
[data-animate="right"] { transform: translateX(30px); }
[data-animate="left"].animated,
[data-animate="right"].animated { transform: none; }

/* ============================================================================
   Auth page logos (Login, Register, ForgotPassword, ResetPassword)
   ----------------------------------------------------------------------------
   These pages set Layout = null and load site.css directly, so the shared
   sizing lives here rather than in a premium sheet.

   Previously each page hardcoded height="48" (44 on the mobile variant) as an
   inline attribute, which rendered the mark very small against a full-height
   brand panel. Sizing is now driven by one class so all five pages stay in
   step, and scales down on short or narrow viewports so it can't crowd the
   form on a phone.
   ========================================================================== */
.auth-logo-img {
    content: url('/images/branding-logo-dark.png');
    width: 260px;
    height: 260px;
    max-width: none;
    object-fit: contain;
    display: block;
    margin: -88px 0;
}
.auth-logo-img--sm { width: 200px; height: 200px; margin: -68px auto; }

@media (max-width: 991.98px) {
    .auth-logo-img { width: 220px; height: 220px; margin: -74px 0; }
    .auth-logo-img--sm { margin-left: auto; margin-right: auto; }
}
@media (max-width: 575.98px) {
    .auth-logo-img,
    .auth-logo-img--sm { width: 180px; height: 180px; margin: -60px auto; }
}
/* Landscape phones give very little vertical room; a large mark there pushes
   the sign-in fields below the fold. */
@media (max-height: 640px) {
    .auth-logo-img { width: 180px; height: 180px; margin: -60px 0; }
    .auth-logo-img--sm { margin-left: auto; margin-right: auto; }
}

/* Auth pages use a deliberately compact version of the public chrome. The
   recovered auth views have no shared Razor layout, so their existing brand,
   consultation and copyright elements are promoted into a real page header
   and footer without duplicating content or covering the sign-in form. */
body:has(.auth-page) {
    padding-top: 76px;
    padding-bottom: 46px;
    background: #061426;
}
body:has(.auth-page)::before {
    content: "SECURE CLIENT PORTAL";
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 90;
    height: 76px;
    display: grid;
    place-items: center;
    color: rgba(187, 215, 239, .68);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    background: rgba(4, 17, 32, .96);
    border-bottom: 1px solid rgba(105, 182, 240, .18);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
    backdrop-filter: blur(14px);
}
body:has(.auth-page)::after {
    content: "© 2026 Software4.net  ·  Privacy  ·  Terms  ·  Contact";
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    height: 46px;
    display: grid;
    place-items: center;
    color: rgba(170, 198, 222, .62);
    font-size: .72rem;
    letter-spacing: .015em;
    background: rgba(4, 17, 32, .98);
    border-top: 1px solid rgba(105, 182, 240, .16);
}
body:has(.auth-page) .auth-page {
    min-height: calc(100vh - 122px);
}
body:has(.auth-page) .auth-left > div:first-child {
    position: fixed !important;
    z-index: 100 !important;
    top: 0;
    left: clamp(1.25rem, 5vw, 5.5rem);
    width: 190px;
    height: 76px;
    overflow: hidden;
}
body:has(.auth-page) .auth-left > div:first-child a {
    display: block;
    width: 190px;
    height: 76px;
}
body:has(.auth-page) .auth-left > div:first-child .auth-logo-img {
    width: 190px;
    height: 190px;
    margin: -64px 0;
}
body:has(.auth-page) .auth-left > div:last-child { display: none; }
body:has(.auth-page) .auth-right .text-center p:first-child {
    position: fixed;
    z-index: 100;
    top: -58px;
    right: clamp(1.25rem, 5vw, 5.5rem);
    margin: 0 !important;
    font-size: 0 !important;
}
body:has(.auth-page) .auth-right .text-center p:first-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .65rem 1rem;
    border-radius: 9px;
    color: #fff !important;
    font-size: .78rem;
    font-weight: 750 !important;
    text-decoration: none;
    background: linear-gradient(120deg, #087eff, #1bc5e8);
    box-shadow: 0 12px 24px -14px #087eff;
}

@media (max-width: 991.98px) {
    body:has(.auth-page)::before {
        content: "";
        place-items: initial;
    }
    body:has(.auth-page) .auth-logo.d-lg-none {
        position: fixed;
        z-index: 100;
        display: block !important;
        top: 0;
        left: 1rem;
        width: 165px;
        height: 76px;
        margin: 0;
        overflow: hidden;
    }
    body:has(.auth-page) .auth-logo.d-lg-none .auth-logo-img {
        width: 165px;
        height: 165px;
        margin: -55px 0;
    }
    body:has(.auth-page) .auth-right .text-center p:first-child { right: 1rem; }
}

@media (max-width: 575.98px) {
    body:has(.auth-page) { padding-top: 64px; padding-bottom: 38px; }
    body:has(.auth-page)::before { height: 64px; }
    body:has(.auth-page)::after { height: 38px; font-size: .62rem; }
    body:has(.auth-page) .auth-page { min-height: calc(100vh - 102px); }
    body:has(.auth-page) .auth-logo.d-lg-none { width: 132px; height: 64px; }
    body:has(.auth-page) .auth-logo.d-lg-none .auth-logo-img { width: 132px; height: 132px; margin: -44px 0; }
    body:has(.auth-page) .auth-right .text-center p:first-child { top: -50px; right: .75rem; }
    body:has(.auth-page) .auth-right .text-center p:first-child a { min-height: 36px; padding: .55rem .72rem; font-size: .68rem; }
}

/* Real global chrome wins over the compact fallback above. */
body.auth-global-chrome:has(.auth-page) { padding: 0; }
body.auth-global-chrome:has(.auth-page) > .navbar-s4 { top: 0; }
body.auth-global-chrome:has(.auth-page)::before,
body.auth-global-chrome:has(.auth-page)::after { content: none; display: none; }
body.auth-global-chrome:has(.auth-page) .auth-page { min-height: calc(100vh - 72px); }
body.auth-global-chrome:has(.auth-page) .auth-left > div:first-child {
    display: none !important;
}
body.auth-global-chrome:has(.auth-page) .auth-left > div:first-child a { width: auto; height: auto; }
body.auth-global-chrome:has(.auth-page) .auth-left > div:first-child .auth-logo-img { width:220px; height:220px; margin:-74px 0; }
body.auth-global-chrome:has(.auth-page) .auth-right .text-center p:first-child {
    position: static; margin-bottom:1rem !important; font-size:.875rem !important;
}
body.auth-global-chrome:has(.auth-page) .auth-right .text-center p:first-child a {
    display:inline; min-height:0; padding:0; color:var(--s4-blue) !important;
    font-size:inherit; background:none; box-shadow:none;
}
@media (max-width:991.98px) {
    body.auth-global-chrome:has(.auth-page) .auth-logo.d-lg-none {
        display:none !important;
    }
    body.auth-global-chrome:has(.auth-page) .auth-logo.d-lg-none .auth-logo-img { width:180px; height:180px; margin:-60px auto; }
}
