:root {
  --rf-paper: #ffffff;
  --rf-paper-warm: #fafaf8;
  --rf-mist: #f5f7fa;
  --rf-carbon: #0d0d0d;
  --rf-carbon-900: #111827;
  --rf-graphite: #4b5563;
  --rf-stone: #e5e5e7;
  --rf-stone-100: #eef0f3;
  --rf-stone-300: #d6dae0;
  --rf-green: #22c55e;
  --rf-green-50: #ecfdf3;
  --rf-green-600: #16a34a;
  --rf-blue: #2563eb;
  --rf-blue-50: #eff6ff;
  --rf-blue-700: #1d4ed8;
  --rf-amber: #f59e0b;
  --rf-red: #dc2626;
  --rf-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --rf-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --rf-shadow-soft: 0 1px 2px rgba(13, 13, 13, 0.08);
  --rf-shadow-panel: 0 18px 48px rgba(13, 13, 13, 0.08);
  --rf-ring: 0 0 0 2px #ffffff, 0 0 0 4px var(--rf-blue);
  --rf-ease: cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--rf-paper-warm) !important;
  color: var(--rf-carbon) !important;
  font-family: var(--rf-font) !important;
  line-height: 1.5;
  letter-spacing: 0 !important;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--rf-blue-50);
  color: var(--rf-carbon);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button,
a {
  transition:
    background-color 120ms var(--rf-ease),
    border-color 120ms var(--rf-ease),
    color 120ms var(--rf-ease),
    box-shadow 120ms var(--rf-ease),
    transform 120ms var(--rf-ease);
}

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

button:active,
a:active {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 0 !important;
  box-shadow: var(--rf-ring) !important;
}

.rf-page,
.rf-shell,
.rf-login-shell,
.rf-dashboard-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 197, 94, 0.08), transparent 26rem),
    linear-gradient(180deg, var(--rf-paper), var(--rf-paper-warm)) !important;
  color: var(--rf-carbon) !important;
}

.rf-wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.rf-topbar,
nav {
  background: rgba(255, 255, 255, 0.84) !important;
  border-bottom: 1px solid var(--rf-stone) !important;
  backdrop-filter: blur(14px);
}

.rf-topbar-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.rf-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--rf-carbon);
  font-weight: 760;
  font-size: 19px;
  text-decoration: none;
}

.rf-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(4, 6px);
  grid-template-rows: repeat(3, 6px);
  align-content: center;
  justify-content: center;
  gap: 5px;
}

.rf-mark span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rf-stone-300);
}

.rf-mark span:nth-child(1) { grid-column: 1; grid-row: 1; }
.rf-mark span:nth-child(2) { grid-column: 2; grid-row: 1; }
.rf-mark span:nth-child(3) { grid-column: 3; grid-row: 1; }
.rf-mark span:nth-child(4) { grid-column: 1; grid-row: 2; }
.rf-mark span:nth-child(5) { grid-column: 2; grid-row: 2; }
.rf-mark span:nth-child(6) { grid-column: 3; grid-row: 2; }
.rf-mark span:nth-child(7) { grid-column: 1; grid-row: 3; }
.rf-mark span:nth-child(8) { grid-column: 2; grid-row: 3; }
.rf-mark span:nth-child(9) { grid-column: 3; grid-row: 3; }

.rf-mark span:nth-child(6) {
  background: var(--rf-green);
}

.rf-mark span:last-child {
  grid-column: 4;
  grid-row: 2;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--rf-carbon);
  border-right: 2px solid var(--rf-carbon);
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg) translateY(-1px);
}

.rf-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--rf-graphite);
  font-size: 14px;
  font-weight: 600;
}

.rf-nav a {
  text-decoration: none;
}

.rf-muted,
.rf-small,
p,
label {
  color: var(--rf-graphite) !important;
}

.rf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rf-graphite);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rf-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rf-green);
}

.rf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 64px;
  align-items: center;
  padding: 78px 0 56px;
}

.rf-hero h1 {
  margin: 0;
  color: var(--rf-carbon);
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 680;
  letter-spacing: 0;
  max-width: 10ch;
}

.rf-hero p {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 1.58;
}

.rf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.rf-button,
.rf-button-primary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--rf-blue) !important;
  color: var(--rf-paper) !important;
  font: 600 15px/20px var(--rf-font) !important;
  padding: 0 18px !important;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--rf-shadow-soft) !important;
}

.rf-button:hover,
.rf-button-primary:hover {
  background: var(--rf-blue-700) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18) !important;
}

.rf-button:disabled,
.rf-button-primary:disabled {
  background: var(--rf-stone-300) !important;
  color: var(--rf-graphite) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.rf-button-muted,
.rf-button-secondary,
.rf-outline {
  background: var(--rf-paper) !important;
  color: var(--rf-carbon) !important;
  border: 1px solid var(--rf-stone) !important;
  box-shadow: none !important;
}

.rf-button-muted:hover,
.rf-button-secondary:hover,
.rf-outline:hover {
  background: var(--rf-mist) !important;
  border-color: var(--rf-stone-300) !important;
}

.rf-button-danger {
  background: var(--rf-paper) !important;
  color: var(--rf-red) !important;
  border: 1px solid var(--rf-stone) !important;
}

.rf-panel,
.rf-card {
  background: var(--rf-paper) !important;
  color: var(--rf-carbon) !important;
  border: 1px solid var(--rf-stone) !important;
  border-radius: 16px !important;
  box-shadow: var(--rf-shadow-panel) !important;
}

.rf-quiet-panel {
  background: var(--rf-mist);
  border: 1px solid var(--rf-stone);
  border-radius: 16px;
}

.rf-input,
input,
textarea {
  color: var(--rf-carbon) !important;
  background: var(--rf-paper) !important;
  border: 1px solid var(--rf-stone) !important;
  border-radius: 10px !important;
  outline: none !important;
}

.rf-input:focus,
input:focus,
textarea:focus {
  border-color: var(--rf-blue) !important;
  box-shadow: var(--rf-ring) !important;
}

.rf-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #8d98a8 !important;
}

.rf-step-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.rf-step {
  min-height: 108px;
  border: 1px solid var(--rf-stone);
  border-radius: 12px;
  padding: 18px;
  background: var(--rf-paper);
}

.rf-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rf-green-50);
  color: var(--rf-green-600);
  font-size: 13px;
  font-weight: 780;
}

.rf-setup-card {
  padding: 24px;
}

.rf-flow-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--rf-graphite);
  font-size: 14px;
  font-weight: 650;
}

.rf-flow-line strong {
  color: var(--rf-carbon);
}

.rf-flow-arrow {
  color: var(--rf-stone-300);
}

.rf-rfqr {
  width: 180px !important;
  height: 180px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid var(--rf-stone) !important;
  box-shadow: 0 12px 32px rgba(13, 13, 13, 0.08) !important;
}

.rf-prompt {
  background: var(--rf-mist);
  border: 1px solid var(--rf-stone);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--rf-mono);
  color: var(--rf-carbon);
  white-space: pre-wrap;
  word-break: break-word;
}

.rf-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rf-green-600);
  font-size: 13px;
  font-weight: 700;
}

.rf-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rf-green);
}

.rf-sidebar {
  background: var(--rf-paper) !important;
  color: var(--rf-carbon) !important;
  border-right: 1px solid var(--rf-stone) !important;
}

.rf-dashboard-main {
  background: var(--rf-paper-warm) !important;
}

/* Compatibility layer for the older static pages that still carry inline dark styles. */
div[style*="background:#080C16"],
div[style*="background:#0B1220"],
div[style*="background:#0E1626"],
div[style*="background:#101827"],
div[style*="background:#0A1120"],
div[style*="background:#13243f"],
div[style*="background: rgb(8, 12, 22)"],
div[style*="background: rgb(11, 18, 32)"],
div[style*="background: rgb(14, 22, 38)"],
div[style*="background: rgb(16, 24, 39)"],
div[style*="background: rgb(10, 17, 32)"],
div[style*="background: linear-gradient(120deg, rgb(14, 22, 38)"],
section[style*="background:#0E1626"],
aside[style*="background:#0B1220"],
main[style*="background:#0B1220"] {
  background: var(--rf-paper) !important;
  color: var(--rf-carbon) !important;
  border-color: var(--rf-stone) !important;
  box-shadow: var(--rf-shadow-panel) !important;
}

div[style*="background:rgba(255,255,255,.05)"],
div[style*="background: rgba(255, 255, 255, 0.05)"],
div[style*="background:rgba(255,255,255,.06)"],
div[style*="background: rgba(255, 255, 255, 0.06)"] {
  background: var(--rf-mist) !important;
  color: var(--rf-carbon) !important;
  border-color: var(--rf-stone) !important;
}

div[style*="background:rgba(84,190,152,.14)"],
div[style*="background: rgba(84, 190, 152, 0.14)"],
div[style*="background:rgba(111,191,163,.18)"],
div[style*="background: rgba(111, 191, 163, 0.18)"] {
  background: var(--rf-green-50) !important;
}

div[style*="background:radial-gradient"],
div[style*="background: radial-gradient"] {
  display: none !important;
}

div[style*="height:1px;background:rgba(255,255,255,.08)"],
div[style*="height: 1px; background: rgba(255, 255, 255, 0.08)"] {
  background: var(--rf-stone) !important;
  box-shadow: none !important;
}

div[style*="color:#fff"],
div[style*="color:#F4F7FB"],
div[style*="color: rgb(255, 255, 255)"],
div[style*="color: rgb(244, 247, 251)"],
div[style*="color: rgb(220, 229, 240)"],
div[style*="color: rgb(195, 202, 214)"],
code[style*="color:#DCE5F0"],
code[style*="color: rgb(220, 229, 240)"],
span[style*="color:#F4F7FB"],
span[style*="color: rgb(255, 255, 255)"],
span[style*="color: rgb(244, 247, 251)"],
span[style*="color: rgb(220, 229, 240)"],
span[style*="color: rgb(195, 202, 214)"],
p[style*="color:#F4F7FB"],
p[style*="color: rgb(255, 255, 255)"],
p[style*="color: rgb(244, 247, 251)"],
p[style*="color: rgb(220, 229, 240)"],
p[style*="color: rgb(195, 202, 214)"],
h1[style*="color:#F4F7FB"],
h1[style*="color: rgb(244, 247, 251)"],
h2[style*="color:#F4F7FB"],
h2[style*="color: rgb(244, 247, 251)"],
h3[style*="color:#F4F7FB"],
h3[style*="color: rgb(244, 247, 251)"],
button[style*="color:#F4F7FB"],
button[style*="color: rgb(244, 247, 251)"],
a[style*="color:#F4F7FB"] {
  color: var(--rf-carbon) !important;
}

div[style*="color:#A7B2C4"],
div[style*="color:#8A94A6"],
div[style*="color:#6C788C"],
div[style*="color:#9FB0C9"],
div[style*="color: rgb(167, 178, 196)"],
div[style*="color: rgb(138, 148, 166)"],
div[style*="color: rgb(108, 120, 140)"],
div[style*="color: rgb(159, 176, 201)"],
span[style*="color:#A7B2C4"],
span[style*="color:#8A94A6"],
span[style*="color:#6C788C"],
span[style*="color:#9FB0C9"],
span[style*="color: rgb(167, 178, 196)"],
span[style*="color: rgb(138, 148, 166)"],
span[style*="color: rgb(108, 120, 140)"],
span[style*="color: rgb(159, 176, 201)"],
p[style*="color:#A7B2C4"],
p[style*="color:#8A94A6"],
p[style*="color:#6C788C"],
p[style*="color:#9FB0C9"],
p[style*="color: rgb(167, 178, 196)"],
p[style*="color: rgb(138, 148, 166)"],
p[style*="color: rgb(108, 120, 140)"],
p[style*="color: rgb(159, 176, 201)"],
label[style*="color:#A7B2C4"],
label[style*="color:#8A94A6"],
label[style*="color:#6C788C"],
label[style*="color:#9FB0C9"],
label[style*="color: rgb(167, 178, 196)"],
label[style*="color: rgb(138, 148, 166)"],
label[style*="color: rgb(108, 120, 140)"],
label[style*="color: rgb(159, 176, 201)"] {
  color: var(--rf-graphite) !important;
}

button[style*="background:#54BE98"],
a[style*="background:#54BE98"],
button[style*="background:#6FBFA3"],
a[style*="background:#6FBFA3"] {
  background: var(--rf-blue) !important;
  color: var(--rf-paper) !important;
}

.rf-dashboard-main h1,
.rf-dashboard-main h2,
.rf-dashboard-main h3,
.rf-form-panel h1,
.rf-form-panel h2,
.rf-brand-panel h1 {
  color: var(--rf-carbon) !important;
  letter-spacing: 0 !important;
}

.rf-brand-panel {
  background: var(--rf-paper) !important;
  border-right: 1px solid var(--rf-stone) !important;
}

.otp {
  color: var(--rf-carbon) !important;
  background: var(--rf-paper) !important;
  border: 1px solid var(--rf-stone) !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  button:hover,
  a:hover {
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .rf-wrap {
    width: min(100% - 40px, 1120px);
  }

  .rf-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0;
  }

  .rf-step-row {
    grid-template-columns: 1fr;
  }

  .rf-nav {
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .rf-wrap {
    width: min(100% - 32px, 1120px);
  }

  .rf-topbar-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .rf-nav {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .rf-hero h1 {
    font-size: clamp(40px, 14vw, 56px);
  }

  .rf-actions,
  .rf-actions a,
  .rf-actions button {
    width: 100%;
  }
}
