:root {
  --rf-bg: #f2f6fb;
  --rf-ink: #0f1f14;
  --rf-primary: #0a8f5b;
  --rf-accent: #f59f00;
  --rf-surface: #ffffff;
  --rf-outline: #d6e2ee;
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 12% 14%, rgba(10, 143, 91, 0.12), transparent 35%),
    radial-gradient(circle at 88% 18%, rgba(245, 159, 0, 0.16), transparent 34%),
    var(--rf-bg);
  color: var(--rf-ink);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  margin: 0;
  padding-bottom: 84px;
}

.top-strip {
  background: #112d40;
  color: #e8f2f9;
  font-size: 0.83rem;
  padding: 0.45rem 0;
}

.rapidfix-nav {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rf-outline);
  box-shadow: 0 6px 18px rgba(17, 45, 64, 0.06);
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

.brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rf-primary);
}

.search-shell {
  min-width: 460px;
  border: 1px solid var(--rf-outline);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.search-input {
  border: 0;
  flex: 1;
  padding: 0.55rem 0.7rem;
  outline: 0;
}

.search-btn {
  border: 0;
  background: var(--rf-accent);
  color: #1c1c1c;
  padding: 0.55rem 1rem;
  font-weight: 700;
}

.category-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--rf-outline);
  padding: 0.55rem 0;
}

.category-pill {
  text-decoration: none;
  color: #2a4253;
  font-size: 0.89rem;
  font-weight: 600;
  border: 1px solid var(--rf-outline);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
}

.category-pill:hover {
  background: #eaf7f1;
  color: var(--rf-primary);
}

.page-shell {
  margin-top: 1.2rem;
}

.rapidfix-link {
  color: var(--rf-ink);
  font-weight: 600;
}

.rapidfix-link:hover {
  color: var(--rf-primary);
}

.hero-shell {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(150deg, #ffffff 0%, #edf7f1 100%);
  border: 1px solid var(--rf-outline);
  border-radius: 22px;
  padding: 1.7rem;
  box-shadow: 0 16px 28px rgba(15, 31, 20, 0.08);
}

.hero-kicker {
  margin-bottom: 0.5rem;
  color: var(--rf-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-content h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.45rem);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.hero-subtitle {
  font-size: 1.02rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.hero-chips span {
  border: 1px solid var(--rf-outline);
  background: var(--rf-surface);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.hero-logo-wrap {
  display: grid;
  place-items: center;
}

.hero-logo {
  width: min(100%, 360px);
  border-radius: 18px;
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.17);
}

.workflow-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.workflow-card {
  background: var(--rf-surface);
  border: 1px solid var(--rf-outline);
  border-radius: 16px;
  padding: 1rem;
}

.workflow-card h2 {
  font-size: 1.08rem;
  color: var(--rf-primary);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-card {
  background: var(--rf-surface);
  border: 1px solid var(--rf-outline);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 18px rgba(17, 45, 64, 0.06);
}

.service-card h2 {
  font-size: 1.08rem;
  margin-bottom: 0.6rem;
}

.service-meta {
  font-weight: 700;
  color: #1f704f;
  margin-bottom: 0.7rem;
}

.page-head {
  margin-bottom: 1.2rem;
}

.page-head h1 {
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
}

.search-result-note {
  background: #eaf2ff;
  border: 1px solid #bfd5ff;
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  align-items: center;
}

.auth-visual {
  background: linear-gradient(145deg, #ffffff 0%, #eaf6f0 100%);
  border: 1px solid var(--rf-outline);
  border-radius: 20px;
  padding: 1.4rem;
}

.auth-kicker {
  color: var(--rf-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-logo {
  margin-top: 0.8rem;
  width: min(100%, 220px);
  border-radius: 14px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--rf-outline);
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: 0 14px 24px rgba(17, 45, 64, 0.07);
}

.auth-meta {
  font-size: 0.92rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.dashboard-stats article {
  background: #fff;
  border: 1px solid var(--rf-outline);
  border-radius: 14px;
  padding: 0.9rem;
}

.dashboard-stats h2 {
  margin: 0;
  color: var(--rf-primary);
}

.dashboard-table-shell {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--rf-outline);
  border-radius: 14px;
  padding: 1rem;
}

.invoice-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.invoice-step {
  position: relative;
}

.invoice-step .invoice-card {
  border: 1px solid var(--rf-outline);
  border-radius: 12px;
  padding: 0.75rem 0.75rem 0.75rem 2.4rem;
  background: #f8fafc;
  min-height: 84px;
}

.invoice-dot {
  position: absolute;
  top: 0.62rem;
  left: 0.62rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #c6d4e3;
  color: #0f1f14;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.invoice-icon {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  margin-right: 0.25rem;
  font-weight: 700;
}

.invoice-step.done .invoice-card {
  border-color: #5bb58b;
  background: #edf9f3;
}

.invoice-step.done .invoice-dot {
  background: #22a06b;
  color: #fff;
}

.invoice-step.active .invoice-card {
  border-color: #e2a11a;
  background: #fff9ec;
}

.invoice-step.active .invoice-dot {
  background: #f0b429;
}

.invoice-step.blocked .invoice-card {
  border-color: #c16a6a;
  background: #fff1f1;
}

.invoice-step.blocked .invoice-dot {
  background: #d14545;
  color: #fff;
}

.rule-banner {
  margin-top: 1rem;
  background: #10241d;
  color: #eff6f2;
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.rapidfix-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-top: 1px solid var(--rf-outline);
  background: #ffffff;
  min-height: 62px;
  padding: 0.65rem 0;
  display: flex;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

@media (max-width: 576px) {
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    padding: 1.1rem;
  }

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

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .invoice-timeline {
    grid-template-columns: 1fr;
  }

  .top-strip {
    display: none;
  }
}