:root {
  --bg: #f4f7fb;
  --ink: #182230;
  --muted: #5c6b7a;
  --card: #ffffff;
  --line: #d8e1ea;
  --accent: #0b66d0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* Wider and left-biased layout for data-heavy screens like review */
.wrap {
  max-width: 1600px;
  width: calc(100vw - 2rem);
  margin: 0 auto 0 0.5rem;
  padding: 1rem 1rem 1rem 0.75rem;
}

.topbar {
  background: #0f1720;
  color: #fff;
}

.topbar a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand a {
  font-weight: bold;
  font-size: 1.2rem;
  margin-left: 0;
}

.hero {
  margin: 1rem 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: bold;
  margin: 0.5rem 0 0.25rem;
}

input,
select,
button {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #bcc8d6;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  margin-top: 0.75rem;
}

button:hover {
  opacity: 0.95;
}

.muted {
  color: var(--muted);
}

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

th,
td {
  padding: 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #e4eef9;
}

.badge.queued {
  background: #eef4ff;
}

.badge.processing {
  background: #fff2d9;
}

.badge.review {
  background: #ffe6a8;
}

.badge.complete {
  background: #d8f2dd;
}

.badge.failed {
  background: #ffd4d4;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.actions button {
  width: auto;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-card {
  background: white;
  border: 1px solid var(--line);
  padding: 2rem;
  width: min(420px, 92vw);
  border-radius: 16px;
}

.alert {
  background: #fee2e2;
  color: #9f1239;
  padding: 0.7rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ── Brand logo mark ─────────────────────────────────────────────── */
.login-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

/* ── Alert variants ──────────────────────────────────────────────── */
.alert-success {
  background: #d8f2dd;
  color: #166534;
  padding: 0.7rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ── Top nav module switcher ─────────────────────────────────────── */
.topbar-nav-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-module {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: background 0.15s;
}

.nav-module:hover,
.nav-module.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.nav-divider {
  width: 1px;
  height: 1.25rem;
  background: rgba(255,255,255,0.2);
  margin: 0 0.5rem;
}

.nav-user {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* ── Landing page ────────────────────────────────────────────────── */
.landing-body {
  background: #fff;
}

.landing-nav {
  background: #0f1720;
  padding: 0 1.5rem;
}

.landing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.landing-nav-links a {
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.landing-nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.btn-primary {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  line-height: 1.4;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--accent);
  color: var(--accent) !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff !important;
}

.landing-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.landing-hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
}

.landing-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #0f1720;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.landing-hero p {
  font-size: 1.2rem;
  color: #4a5568;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.trial-note {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.75rem;
}

.landing-section h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #0f1720;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: #4a5568;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: #4a5568;
  font-size: 0.95rem;
  margin: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: #4a5568;
  font-size: 0.9rem;
  margin: 0;
}

/* ── Pricing ─────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pricing-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem;
  background: #fff;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11,102,208,0.15);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-plan {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f1720;
  margin-bottom: 0.25rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f1720;
  line-height: 1;
  margin: 0.5rem 0 0.25rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: #6b7280;
}

.pricing-pages {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.pricing-features li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: #374151;
  display: flex;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-cta {
  display: block;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}

.pricing-cta:hover {
  opacity: 0.9;
}

.pricing-cta.outline {
  background: none;
  border: 2px solid var(--line);
  color: #374151;
}

.pricing-cta.outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Dashboard module cards ──────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.module-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(11,102,208,0.12);
}

.module-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.module-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.module-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.module-card.coming-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ── Usage bar ───────────────────────────────────────────────────── */
.usage-bar-wrap {
  margin: 0.5rem 0 0.25rem;
}

.usage-bar-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}

.usage-bar-fill.warn {
  background: #f59e0b;
}

.usage-bar-fill.danger {
  background: #ef4444;
}

/* ── LIMS teaser ─────────────────────────────────────────────────── */
.lims-teaser {
  background: #0f1720;
  color: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
}

.lims-teaser h2 {
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.lims-teaser p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.lims-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}

.lims-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  border-radius: 8px;
  border: none;
  padding: 0.7rem 1rem;
  font-size: 1rem;
}

.lims-form button {
  width: auto;
  margin-top: 0;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
}

/* ── Landing footer ──────────────────────────────────────────────── */
.landing-footer {
  background: #0f1720;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.landing-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.landing-footer a:hover {
  color: #fff;
}

/* ── Billing status banner ───────────────────────────────────────── */
.billing-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.billing-banner.danger {
  background: #fee2e2;
  border-color: #ef4444;
  color: #9f1239;
}

@media (max-width: 800px) {
  .wrap {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0.75rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .landing-hero h1 {
    font-size: 1.9rem;
  }

  .lims-form {
    flex-direction: column;
  }

  .lims-form input[type="email"] {
    min-width: unset;
  }
}
