:root {
  --navy: #071d2f;
  --navy-2: #0c2c45;
  --green: #14a46c;
  --green-dark: #0f7e55;
  --mint: #e7f7ef;
  --grey: #f3f6f8;
  --line: #dfe7ec;
  --text: #1f2933;
  --muted: #64748b;
  --white: #ffffff;
  --warning: #d98b10;
  --danger: #c2413b;
  --shadow: 0 18px 45px rgba(7, 29, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--grey);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--navy);
}

.brand small {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.site-menu-toggle {
  display: none;
}

.nav-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  background: var(--navy);
  color: var(--white);
}

.btn-light {
  background: var(--mint);
  color: var(--green-dark);
}

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
}

.hero {
  min-height: calc(100vh - 72px);
  background:
    linear-gradient(90deg, rgba(7, 29, 47, 0.95), rgba(7, 29, 47, 0.72)),
    url("../images/platform-hero.svg") center/cover no-repeat;
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 76px 0 118px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
}

.eyebrow {
  color: #9ce7c0;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 900;
  font-size: 0.78rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: 1.02;
  margin: 10px 0 18px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero p {
  font-size: 1.13rem;
  max-width: 760px;
  color: #dbe8ef;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 22px;
  backdrop-filter: blur(10px);
}

.hero-panel h2,
.section h2 {
  margin: 0 0 12px;
  color: inherit;
}

.metric-list {
  display: grid;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 0;
}

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-head {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-head h2 {
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.section-head p,
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(7, 29, 47, 0.05);
}

.feature-card h3,
.card h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-weight: 900;
  margin-bottom: 14px;
}

.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer {
  background: var(--navy);
  color: #dbe8ef;
  padding: 30px 0;
}

.disclaimer {
  font-size: 0.88rem;
  color: #bfd0da;
  margin-top: 10px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    linear-gradient(120deg, rgba(7, 29, 47, 0.95), rgba(12, 44, 69, 0.86)),
    url("../images/platform-hero.svg") center/cover no-repeat;
}

.login-card {
  width: min(680px, 100%);
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}

.login-actions .btn {
  min-height: 74px;
  font-size: 1rem;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  color: var(--white);
  margin-bottom: 24px;
}

.sidebar .brand small {
  color: #b8cbd6;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a {
  padding: 11px 12px;
  border-radius: 8px;
  color: #dbe8ef;
  font-weight: 700;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(20, 164, 108, 0.18);
  color: var(--white);
}

.main {
  min-width: 0;
}

.app-header {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.menu-toggle {
  display: none;
}

.content {
  padding: 28px;
}

.page-title {
  margin-bottom: 22px;
}

.page-title h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.stat-value {
  color: var(--navy);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 900;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--mint);
  color: var(--green-dark);
  white-space: nowrap;
}

.badge-warning {
  background: #fff4dc;
  color: var(--warning);
}

.badge-danger {
  background: #fde7e5;
  color: var(--danger);
}

.badge-navy {
  background: #e6eef4;
  color: var(--navy);
}

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--navy);
  background: #f8fafc;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

tr:last-child td {
  border-bottom: 0;
}

.product-media {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: linear-gradient(135deg, #dff4e9, #eef3f6);
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font-weight: 900;
  margin-bottom: 14px;
}

.progress {
  width: 100%;
  height: 10px;
  background: #e6edf2;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.genealogy {
  overflow-x: auto;
  padding: 8px;
}

.tree {
  min-width: 760px;
  text-align: center;
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 18px 0;
}

.node {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 8px;
  padding: 12px;
  min-width: 150px;
  box-shadow: 0 8px 20px rgba(7, 29, 47, 0.06);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}

.replicated-hero {
  background:
    linear-gradient(90deg, rgba(7, 29, 47, 0.92), rgba(20, 164, 108, 0.75)),
    url("../images/product-showcase.svg") center/cover no-repeat;
  color: var(--white);
  border-radius: 8px;
  padding: 48px;
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    padding: 54px 0 86px;
  }

  .hero-grid,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    transition: 0.2s ease;
    z-index: 40;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .app-header {
    padding: 0 16px;
  }

  .content {
    padding: 20px 16px;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .topbar .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .nav-inline {
    display: none;
    flex: 1 0 100%;
    width: 100%;
    justify-content: stretch;
    gap: 8px;
    padding-top: 4px;
  }

  .nav-inline.open {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-inline .btn {
    width: 100%;
    padding-inline: 10px;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    height: auto;
    padding: 14px 0;
    align-items: center;
  }

  .topbar .brand {
    align-items: center;
  }

  .brand {
    min-width: 0;
  }

  .brand > span:last-child {
    min-width: 0;
  }

  .nav-inline.open {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 38px 0 58px;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.08;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions,
  .cta-band {
    flex-direction: column;
    align-items: stretch;
  }

  .login-actions,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .login-card,
  .replicated-hero,
  .cta-band {
    padding: 24px;
  }
}
/* Header menu visibility fix */
.menu-toggle,
.nav-toggle,
.mobile-menu-toggle,
#menuToggle {
  display: none !important;
}

@media (max-width: 768px) {
  .menu-toggle,
  .nav-toggle,
  .mobile-menu-toggle,
  #menuToggle {
    display: inline-flex !important;
  }
}
/* Force Menu button to show only on mobile */
.site-menu-toggle {
  display: none !important;
}

@media (max-width: 768px) {
  .site-menu-toggle {
    display: inline-flex !important;
  }
}