:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #6d28d9;
  --primary-2: #2563eb;
  --accent-warm: #f28c38;
  --accent-warm-2: #ef5da8;
  --danger: #dc2626;
  --border: rgba(109, 40, 217, 0.12);
  --shadow: 0 18px 44px rgba(37, 99, 235, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
code {
  background: #eef2ff;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 8px;
  padding: 0.15rem 0.45rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 2rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.site-logo span {
  font-weight: 600;
  font-size: 0.7rem;
  opacity: 0.95;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  color: #4b5563;
  font-size: 0.92rem;
}

.site-nav a:hover {
  color: var(--primary);
}

.marketing-login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0, #f3f4f6 72%, #eef2ff 100%);
}

.marketing-hero {
  position: relative;
  padding: 3.4rem 1.5rem 4.8rem;
  background: linear-gradient(135deg, #ef5da8 0%, #f28c38 50%, #f5c542 100%);
  overflow: hidden;
}

.marketing-hero::before,
.marketing-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.24;
}

.marketing-hero::before {
  width: 420px;
  height: 420px;
  background: rgba(255, 255, 255, 0.2);
  top: -180px;
  left: -120px;
}

.marketing-hero::after {
  width: 360px;
  height: 360px;
  background: rgba(109, 40, 217, 0.16);
  right: -100px;
  top: -60px;
}

.marketing-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5b21b6;
}

.marketing-hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.25rem);
  line-height: 1.05;
  font-weight: 800;
  color: #ffffff;
}

.marketing-hero h1 span {
  color: #4c1d95;
}

.marketing-subtitle {
  max-width: 760px;
  margin: 1rem auto 0;
  color: #4c1d95;
  font-weight: 600;
  line-height: 1.6;
}

.hero-actions,
.centered-actions,
.topbar-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.centered-actions {
  justify-content: center;
}

.wave-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 92px;
  background:
    radial-gradient(65% 90px at 10% 0, rgba(255,255,255,0.75) 60%, transparent 61%),
    radial-gradient(65% 90px at 35% 0, rgba(255,255,255,0.9) 60%, transparent 61%),
    radial-gradient(65% 90px at 60% 0, rgba(255,255,255,0.75) 60%, transparent 61%),
    radial-gradient(65% 90px at 85% 0, rgba(255,255,255,0.92) 60%, transparent 61%);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  cursor: pointer;
}

.button:hover { transform: translateY(-1px); }

.public-primary-button,
.button-primary,
.public-demo-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(109, 40, 217, 0.22);
}

.public-secondary-button,
.button-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  border-color: rgba(109, 40, 217, 0.35);
}

.button-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.full-width-button { width: 100%; }

.portfolio-marketing-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.portfolio-heading {
  text-align: center;
  margin-bottom: 1.25rem;
}

.portfolio-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #4f46e5;
}

.portfolio-heading h3 {
  margin: 0.6rem 0 0.35rem;
  font-size: 1.2rem;
}

.portfolio-heading p {
  margin: 0;
  color: var(--muted);
}

.portfolio-banner {
  max-width: 760px;
  margin: 1.3rem auto 1.8rem;
  padding: 1rem 1.4rem;
  text-align: center;
  color: white;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #9333ea, #2563eb);
  box-shadow: var(--shadow);
}

.marketing-pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.marketing-pillar-card {
  background: white;
  border-radius: 18px;
  padding: 1.15rem 1rem;
  min-height: 170px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
  border: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
  text-align: center;
}

.marketing-pillar-card strong {
  color: #4338ca;
  font-size: 0.88rem;
}

.marketing-pillar-card small {
  color: var(--muted);
  line-height: 1.5;
}

.cloud-card { border-color: #93c5fd; }
.resilience-card { border-color: #4ade80; }
.security-card { border-color: #fb923c; }
.soc-card { border-color: #f87171; }
.data-card { border-color: #c084fc; }

.login-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.public-login-shell {
  display: flex;
  justify-content: center;
}

.login-card,
.panel,
.metric-card,
.list-card {
  background: var(--surface);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.06);
}

.public-login-card {
  width: min(100%, 760px);
  padding: 1.6rem;
  background: rgba(255,255,255,0.96);
}

.public-login-card h2,
.panel h2,
.sidebar h1,
.hero-primary h2 {
  margin: 0.2rem 0 0.65rem;
}

.public-login-copy,
.muted,
.pillar-card p,
.partner-tile small,
.api-panel ul,
.demo-credentials {
  color: var(--muted);
}

.login-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: #374151;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 0.82rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  background: #fff;
  color: var(--text);
}

.form-grid textarea { resize: vertical; }
.full-span { grid-column: 1 / -1; }

.public-login-form button {
  grid-column: 1 / -1;
}

.demo-credentials {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(99, 102, 241, 0.12);
  line-height: 1.6;
}

.layout-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff 0, #f8fafc 45%, #eef2ff 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 2rem 1.25rem;
  border-right: 1px solid rgba(17, 24, 39, 0.06);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar h1 {
  font-size: 1.7rem;
  line-height: 1.05;
}

.product-brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nav-links a {
  color: var(--muted);
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  transition: 160ms ease;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
}

.nav-links a i {
  width: 16px;
  color: #64748b;
}

.nav-links a:hover {
  background: #eef2ff;
  color: var(--primary);
}

.content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sticky-topbar,
.brand-strip,
.brand-hero-panel,
.value-panel,
.xsoc-panel,
.partner-strip,
.portfolio-story-card,
.architecture-callout-card,
.dr-panel,
.resilience-cycle-panel,
.cta-banner,
.footer-shell {
  background: var(--surface);
}

.workspace-shell,
.command-center-grid,
.top-brand-bar,
.brand-message-grid,
.xclos-portfolio-grid,
.xclos-solution-grid,
.hero-grid,
.two-col {
  display: grid;
  gap: 1.25rem;
}

.workspace-shell,
.command-center-grid {
  grid-template-columns: minmax(0, 1fr);
}

.top-brand-bar,
.brand-message-grid,
.hero-grid,
.two-col {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr);
}

.xclos-portfolio-grid,
.xclos-solution-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-summary-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.product-summary-panel .eyebrow,
.product-summary-panel .muted,
.product-summary-panel h2 {
  color: var(--text);
}

.brand-strip-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.brand-strip-stats div {
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
}

.modern-stat-stack strong {
  display: block;
  font-size: 1.2rem;
}

.modern-stat-stack span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
}

.metrics-grid,
.legacy-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.metric-card {
  padding: 1.1rem;
  min-height: 120px;
}

.command-hero-card {
  min-height: 100%;
}

.quick-actions-panel,
.ops-insight-panel {
  min-height: 100%;
}

.action-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.action-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(109, 40, 217, 0.12);
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: #312e81;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.06);
}

.action-chip i {
  color: var(--primary);
}

.metric-card strong {
  font-size: 1.35rem;
  color: #312e81;
}

.section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header-spaced {
  margin-top: 1.5rem;
}

.table-wrap { overflow-x: auto; }

.table-link {
  color: var(--primary);
}

.table-link:hover { text-decoration: underline; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.9rem 0.7rem;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-emerald { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.badge-amber, .badge-orange { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.badge-rose { background: rgba(244, 63, 94, 0.12); color: #be123c; }
.badge-sky { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.badge-cyan { background: rgba(6, 182, 212, 0.12); color: #0f766e; }
.badge-violet { background: rgba(109, 40, 217, 0.12); color: #6d28d9; }
.badge-gray, .badge-slate { background: rgba(107, 114, 128, 0.12); color: #4b5563; }

.mini-metrics,
.list-grid,
.detail-grid,
.partner-stat-grid,
.partners-grid,
.pillars-grid,
.login-highlights {
  display: grid;
  gap: 0.9rem;
}

.mini-metrics { grid-template-columns: repeat(3, 1fr); }
.list-grid,
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.partner-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.25rem; }
.partners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pillars-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.login-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.list-card,
.partner-tile,
.pillar-card,
.detail-grid div {
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 16px;
}

.sidebar-user-card,
.product-help-panel,
.product-cta-panel,
.product-footer-shell,
.product-topbar {
  background: #fff;
}

.pillar-card i {
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.partner-tile {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.partner-tile span,
.pillar-card h3,
.list-card h3 {
  color: #312e81;
  margin: 0 0 0.35rem;
}

.compact { padding: 1rem; }
.compact-card { padding: 0.85rem; }
.tiny { font-size: 0.82rem; }

.pnl-chip {
  background: rgba(109, 40, 217, 0.1);
  color: #6d28d9;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.api-panel ul {
  margin: 0;
  padding-left: 1.25rem;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.logout-form { margin-top: 0.8rem; }

.legacy-detail-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #fff 0, #f8fafc 60%, #eef2ff 100%);
}

.json-view {
  margin: 0;
  padding: 1rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: #fff;
  color: #334155;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.runtime-notice-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,247,237,0.96));
}

.runtime-badges {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .layout-shell,
  .top-brand-bar,
  .brand-message-grid,
  .xclos-portfolio-grid,
  .xclos-solution-grid,
  .hero-grid,
  .two-col,
  .form-grid,
  .marketing-pillars-grid,
  .action-chip-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  }

  .metrics-grid,
  .mini-metrics,
  .legacy-summary-grid,
  .pillars-grid,
  .partners-grid,
  .partner-stat-grid,
  .brand-strip-stats,
  .login-highlights {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-topbar,
  .cta-banner,
  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header,
  .content,
  .sidebar,
  .portfolio-marketing-section,
  .login-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .metrics-grid,
  .mini-metrics,
  .list-grid,
  .legacy-summary-grid,
  .detail-grid,
  .pillars-grid,
  .partners-grid,
  .partner-stat-grid,
  .brand-strip-stats,
  .login-highlights,
  .marketing-pillars-grid {
    grid-template-columns: 1fr;
  }

  .marketing-hero {
    padding-top: 2.6rem;
    padding-bottom: 4rem;
  }

  .marketing-hero h1 {
    font-size: 2.2rem;
  }
}
