:root {
  --brand: #0b3d5c;
  --brand-dark: #072a40;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --soft: #f0f9f8;
  --ink: #1e293b;
  --muted: #64748b;
  --card-shadow: 0 4px 24px rgba(11, 61, 92, 0.08);
  --card-shadow-hover: 0 16px 40px rgba(11, 61, 92, 0.14);
  --radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .navbar-brand, .price-tag, .stat-num {
  font-family: "Instrument Sans", "DM Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

main { flex: 1 0 auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #042f2e;
  padding: .5rem 1rem;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.bg-brand {
  background: linear-gradient(135deg, var(--brand) 0%, #0a556e 55%, var(--teal-dark) 100%) !important;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: .4rem;
  background: var(--accent);
  color: #042f2e;
  font-size: .75rem;
  margin-right: .35rem;
  vertical-align: middle;
}

.navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  font-size: .92rem;
  padding: .45rem .65rem !important;
}
.navbar .nav-link.active, .navbar .nav-link:hover { color: #fff !important; }
.navbar .nav-link.active {
  position: relative;
}
.navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: .65rem;
  right: .65rem;
  bottom: .15rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #042f2e;
  font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus {
  background: #2dd4bf;
  border-color: #2dd4bf;
  color: #042f2e;
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.btn-brand:hover, .btn-brand:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-outline-brand {
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
  background: transparent;
}
.btn-outline-brand:hover {
  background: var(--brand);
  color: #fff;
}

.btn-outline-teal {
  border: 2px solid var(--teal);
  color: var(--teal);
  font-weight: 600;
}
.btn-outline-teal:hover {
  background: var(--teal);
  color: #fff;
}

.hero-section, .page-hero {
  background: linear-gradient(135deg, var(--brand) 0%, #0a556e 50%, var(--teal-dark) 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::after, .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(20,184,166,.28), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(255,255,255,.06), transparent 35%);
  pointer-events: none;
}
.hero-section .container, .page-hero .container { position: relative; z-index: 1; }

.badge-soft {
  background: rgba(255,255,255,.14);
  color: #ecfeff;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
}

.badge-effort {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem .65rem;
  border-radius: 999px;
}
.badge-effort-low { background: #ecfdf5; color: #065f46; }
.badge-effort-med { background: #fff7ed; color: #9a3412; }
.badge-effort-high { background: #fef2f2; color: #991b1b; }
.badge-effort-max { background: #eef2ff; color: #3730a3; }

.hero-card {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
}
.stack-list li {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-bottom: .65rem;
  font-size: .95rem;
}
.text-teal { color: var(--teal) !important; }
.bg-light-soft { background: var(--soft); }
.section-title { color: var(--brand); }
.section-kicker {
  color: var(--teal);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.icon-wrap {
  width: 3rem;
  height: 3rem;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,148,136,.12);
  color: var(--teal);
  font-size: 1.35rem;
}
.icon-wrap-lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
}

.service-card, .audience-card, .pricing-card, .challenge-card, .module-card, .pain-card {
  transition: transform .22s ease, box-shadow .22s ease;
  border-radius: var(--radius) !important;
  box-shadow: var(--card-shadow);
}
.service-card:hover, .audience-card:hover, .pricing-card:hover,
.challenge-card:hover, .module-card:hover, .pain-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover) !important;
}

.challenge-card .pain {
  background: #fff7ed;
  border-left: 3px solid #f97316;
  padding: .75rem 1rem;
  border-radius: 0 .5rem .5rem 0;
  font-size: .9rem;
  margin-bottom: .85rem;
}
.challenge-card .solve {
  background: #ecfdf5;
  border-left: 3px solid var(--teal);
  padding: .75rem 1rem;
  border-radius: 0 .5rem .5rem 0;
  font-size: .9rem;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(13,148,136,.1);
  color: var(--teal-dark);
  font-weight: 600;
  font-size: .8rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.process-steps li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}
.process-steps span {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cta-banner {
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 1rem 2rem rgba(11,61,92,.2);
}

.site-footer { background: #061e2e; }
.footer-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  display: inline-block;
  padding: .2rem 0;
}
.footer-links a:hover { color: #fff; }
.disclaimer { line-height: 1.5; }

.timeline { position: relative; padding-left: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.timeline-marker {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.timeline-body { border-radius: var(--radius) !important; }

.pricing-card { position: relative; overflow: hidden; }
.pricing-card.popular { border: 2px solid var(--teal) !important; }
.popular-badge {
  position: absolute;
  top: .85rem;
  right: -.75rem;
  background: var(--teal);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem 1.5rem;
  transform: rotate(15deg);
  letter-spacing: .03em;
}
.price-tag { font-size: 2rem; font-weight: 800; color: var(--brand); }
.price-effort {
  font-size: .85rem;
  color: var(--muted);
  margin-top: -.5rem;
  margin-bottom: 1rem;
}

/* Comparison table */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(11,61,92,.1);
  background: #fff;
  box-shadow: var(--card-shadow);
}
.compare-table {
  margin: 0;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}
.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 1rem .85rem;
  border: none;
  white-space: nowrap;
}
.compare-table thead th:first-child {
  background: var(--brand-dark);
  text-align: left;
}
.compare-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  background: var(--soft);
  padding: .85rem;
  border-bottom: 1px solid rgba(11,61,92,.08);
  min-width: 200px;
}
.compare-table tbody td {
  text-align: center;
  padding: .85rem;
  border-bottom: 1px solid rgba(11,61,92,.06);
  vertical-align: middle;
  font-size: .92rem;
}
.compare-table tbody tr:hover td,
.compare-table tbody tr:hover th {
  background: rgba(20,184,166,.06);
}
.compare-check { color: var(--teal); font-size: 1.15rem; }
.compare-x { color: #cbd5e1; }
.compare-limit { color: var(--muted); font-size: .85rem; }

.stat-card {
  background: var(--soft);
  border: 1px solid rgba(13,148,136,.15);
  border-radius: var(--radius);
}
.stat-num { font-weight: 800; color: var(--brand); font-size: 1.25rem; margin-bottom: .35rem; }

.alert-info-soft {
  background: #ecfeff;
  border: 1px solid #99f6e4;
  color: #134e4a;
  border-radius: .75rem;
  padding: 1rem 1.25rem;
}
.alert-warning-soft {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: .75rem;
  padding: 1rem 1.25rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 .2rem rgba(13,148,136,.2);
}

.problem-solution-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .problem-solution-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }
}
.ps-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(11,61,92,.06);
}
.ps-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 1.5rem;
}
.middleware-flow {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  align-items: center;
}
.flow-box {
  background: #fff;
  border: 1px solid rgba(11,61,92,.1);
  border-radius: .75rem;
  padding: .85rem 1.1rem;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}
.flow-box.mid {
  background: linear-gradient(135deg, var(--brand), var(--teal));
  color: #fff;
  border: none;
  flex: 1 1 280px;
  max-width: 420px;
}
.flow-box.mid ul {
  text-align: left;
  font-weight: 400;
  font-size: .8rem;
  margin: .75rem 0 0;
  padding-left: 1.1rem;
  opacity: .95;
  columns: 2;
  column-gap: 1rem;
}
.flow-arrow { color: var(--teal); font-size: 1.4rem; }

.faq-item {
  border: 1px solid rgba(11,61,92,.1);
  border-radius: .75rem;
  margin-bottom: .75rem;
  overflow: hidden;
  background: #fff;
}
.faq-item .accordion-button {
  font-weight: 600;
  color: var(--brand);
  box-shadow: none !important;
}
.faq-item .accordion-button:not(.collapsed) {
  background: var(--soft);
  color: var(--teal-dark);
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #ecfeff;
  border-radius: 999px;
  padding: .35rem .75rem;
  font-size: .8rem;
  margin: .2rem;
}

@media (max-width: 991.98px) {
  .navbar .nav-link.active::after { display: none; }
}

@media (max-width: 575.98px) {
  .hero-section .display-5 { font-size: 1.85rem; }
  .price-tag { font-size: 1.65rem; }
  .flow-box.mid ul { columns: 1; }
}

/* Challenge detail & hub enhancements */
.breadcrumb-hero {
  --bs-breadcrumb-divider-color: rgba(255,255,255,.45);
}
.breadcrumb-hero .breadcrumb-item,
.breadcrumb-hero .breadcrumb-item a {
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  text-decoration: none;
}
.breadcrumb-hero .breadcrumb-item a:hover { color: #fff; }
.breadcrumb-hero .breadcrumb-item.active { color: #99f6e4; }
.breadcrumb-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.45); }

.diff-badge {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #ecfeff;
}
.badge-diff-low { background: #ecfdf5; color: #047857; }
.badge-diff-med { background: #fff7ed; color: #c2410c; }
.badge-diff-high { background: #fef2f2; color: #b91c1c; }
.badge-diff-critical { background: #4c0519; color: #fecdd3; }
.page-hero .diff-badge.badge-diff-low,
.page-hero .diff-badge.badge-diff-med,
.page-hero .diff-badge.badge-diff-high,
.page-hero .diff-badge.badge-diff-critical {
  background: rgba(255,255,255,.14);
  color: #ecfeff;
}

.challenge-detail-card {
  border-radius: var(--radius) !important;
  box-shadow: var(--card-shadow);
}
.solve-panel {
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 48%);
}
.pain-list li,
.solve-list li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .65rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  font-size: .95rem;
}
.pain-list li:last-child,
.solve-list li:last-child { border-bottom: 0; }
.pain-list i,
.solve-list i { margin-top: .15rem; }

.related-challenge-card,
.prevnext-card {
  border-radius: var(--radius) !important;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.related-challenge-card:hover,
.prevnext-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover) !important;
}
.callout-card {
  background: #ecfeff;
  border-left: 4px solid var(--teal) !important;
  border-radius: var(--radius) !important;
}
.top10-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.top10-table td { font-size: .92rem; }


/* service/pricing detail extras */
.service-card .stretched-link::after { z-index: 1; }
.group-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}
.breadcrumb-hero .breadcrumb-item a { color: #99f6e4; text-decoration: none; }
.breadcrumb-hero .breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-hero .breadcrumb-item.active { color: rgba(255,255,255,.75); }
.breadcrumb-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.45); }
.compare-table thead a { color: inherit; }
.compare-table thead a:hover { color: var(--teal, #0d9488); }

/* —— Auth / dashboard / admin —— */
.auth-section { background: linear-gradient(180deg, var(--soft) 0%, #fff 50%); min-height: 70vh; }
.auth-card { border-radius: var(--radius); box-shadow: var(--card-shadow) !important; }
.auth-card .form-control-lg { border-radius: .65rem; }
.dash-stat { border-radius: var(--radius); box-shadow: var(--card-shadow); background: #fff; }
.dash-stat .stat-num { font-size: 1.75rem; font-weight: 700; color: var(--brand); }
.progress-timeline .progress { background: #e2e8f0; border-radius: 999px; }
.bg-teal { background-color: var(--teal) !important; }
.text-teal { color: var(--teal) !important; }

.admin-login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #072a40 0%, #0b3d5c 45%, #0f766e 100%);
}
.admin-login-card { border-radius: 1rem; }
.admin-body { background: #f1f5f9; min-height: 100vh; }
.admin-shell { min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #072a40, #0b3d5c);
  color: #fff;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.8);
  border-radius: .5rem;
  margin-bottom: .15rem;
  padding: .55rem .75rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(20,184,166,.2);
  color: #fff;
}
.admin-brand .brand-mark {
  background: var(--accent);
  color: #042f2e;
}
.admin-main { min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 10; }
@media (max-width: 991px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-sidebar .nav { flex-direction: row; flex-wrap: wrap; }
}

/* —— Customer portal (admin-like sidebar) —— */
.customer-body { background: #f1f5f9; min-height: 100vh; }
.customer-shell { min-height: 100vh; }
.customer-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f766e 0%, #0b3d5c 55%, #072a40 100%);
  color: #fff;
}
.customer-sidebar .nav-link {
  color: rgba(255,255,255,.82);
  border-radius: .5rem;
  margin-bottom: .15rem;
  padding: .55rem .75rem;
}
.customer-sidebar .nav-link:hover,
.customer-sidebar .nav-link.active {
  background: rgba(45,212,191,.22);
  color: #fff;
}
.customer-sidebar .brand-mark,
.customer-sidebar .admin-brand .brand-mark {
  background: #5eead4;
  color: #042f2e;
}
.customer-main { min-width: 0; }
.customer-topbar { position: sticky; top: 0; z-index: 10; }
.badge-status-open { background: #3b82f6; }
.badge-status-in_progress { background: #0ea5e9; }
.badge-status-waiting_customer { background: #f59e0b; color: #111; }
.badge-status-resolved { background: #10b981; }
.badge-status-closed { background: #64748b; }
.progress-timeline li:last-child { border-bottom: 0 !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.pricing-card.popular { border: 2px solid #14b8a6 !important; }
.popular-badge {
  position: absolute; top: .75rem; right: .75rem;
  background: #14b8a6; color: #042f2e; font-size: .7rem; font-weight: 700;
  padding: .2rem .5rem; border-radius: .35rem;
}
.pricing-card { position: relative; }
@media (max-width: 991px) {
  .customer-shell { flex-direction: column; }
  .customer-sidebar { width: 100%; }
  .customer-sidebar .nav { flex-direction: row; flex-wrap: wrap; }
}
