@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --rm-font-sans: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --rm-font-display: "Space Grotesk", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --rm-ink: #0f172a;
  --rm-muted: #6b7280;
  --rm-accent: #6f3ccf;
  --rm-accent-strong: #4f2aa6;
  --rm-accent-soft: #f0eaff;
  --rm-border: #e6e1f2;
  --rm-surface: #ffffff;
  --rm-surface-soft: #f6f4fb;
  --rm-warn-soft: #fff7e8;
  --rm-warn-border: #f2d39b;
  --rm-danger-soft: #fff1f2;
  --rm-danger-border: #fecdd3;
  --rm-success-soft: #edfdf5;
  --rm-success-border: #bbf7d0;
  --rm-info-soft: #eef6ff;
  --rm-info-border: #bfdbfe;
  --rm-shadow: 0 24px 55px rgba(39, 26, 84, 0.12);
  --rm-lift: 0 22px 44px rgba(31, 22, 74, 0.14);
  --rm-radius-lg: 24px;
  --rm-radius-md: 16px;
  --rm-radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--rm-font-sans);
  color: var(--rm-ink);
  background:
    radial-gradient(1200px circle at 10% -20%, rgba(143, 98, 255, 0.18), transparent 50%),
    radial-gradient(1000px circle at 100% 0%, rgba(231, 78, 176, 0.12), transparent 48%),
    var(--rm-surface-soft);
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  color: var(--rm-accent);
}

code {
  font-family: Consolas, "Courier New", monospace;
}

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

.rm-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rm-border);
  box-shadow: 0 12px 30px rgba(31, 22, 74, 0.08);
}

.rm-header-accent {
  height: 4px;
  background: linear-gradient(90deg, #4f2aa6 0%, #6f3ccf 45%, #b030b3 100%);
}

.rm-navbar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rm-navbar-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.rm-brand {
  font-family: var(--rm-font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #2a1a63;
}

.rm-brand:hover {
  color: var(--rm-accent-strong);
}

.rm-nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.rm-nav-links a,
.rm-auth-link,
.rm-user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}

.rm-nav-links a {
  color: var(--rm-ink);
  font-weight: 600;
}

.rm-nav-links a:hover,
.rm-auth-link:hover {
  background: var(--rm-accent-soft);
  color: var(--rm-accent);
}

.rm-auth {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.rm-auth form {
  margin: 0;
}

.rm-auth-link {
  border: 1px solid var(--rm-border);
  background: #fff;
  color: var(--rm-ink);
  cursor: pointer;
}

.rm-user-chip {
  background: #0d5b95;
  color: #fff;
  font-weight: 600;
}

.rm-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.4rem 1rem 3rem;
  display: grid;
  gap: 1.5rem;
}

.rm-hero,
.rm-card,
.rm-auth-card {
  border: 1px solid var(--rm-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 239, 255, 0.96) 56%, rgba(248, 246, 255, 0.98) 100%);
  border-radius: var(--rm-radius-lg);
  box-shadow: var(--rm-shadow);
}

.rm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  padding: 1.6rem;
}

.rm-hero-compact {
  align-items: center;
}

.rm-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-self: stretch;
}

.rm-hero-stats-single {
  grid-template-columns: 1fr;
}

.rm-eyebrow,
.rm-section-label,
.rm-stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rm-muted);
}

.rm-title {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--rm-font-display);
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.02;
  color: #231451;
}

.rm-title-small {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.rm-subtitle,
.rm-card-subtitle,
.rm-stat-copy,
.rm-empty-state p,
.rm-callout p {
  color: #5d6180;
  line-height: 1.65;
}

.rm-inline-notes {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.rm-pill,
.rm-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e5dcfb;
  background: #fff;
  color: #4f2aa6;
  font-weight: 700;
}

.rm-code-pill {
  font-family: Consolas, "Courier New", monospace;
}

.rm-stat-card {
  border: 1px solid rgba(111, 60, 207, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.18rem;
  min-height: 112px;
}

.rm-stat-value {
  font-family: var(--rm-font-display);
  font-size: 1.7rem;
  line-height: 1.05;
  color: #1f1847;
}

.rm-banner {
  padding: 0.95rem 1.1rem;
  border-radius: 18px;
  border: 1px solid transparent;
}

.rm-banner-info {
  background: var(--rm-info-soft);
  border-color: var(--rm-info-border);
  color: #1d4ed8;
}

.rm-banner-warn {
  background: var(--rm-warn-soft);
  border-color: var(--rm-warn-border);
  color: #9a6700;
}

.rm-grid {
  display: grid;
  gap: 1.5rem;
}

.rm-grid-two {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
}

.rm-card {
  overflow: hidden;
}

.rm-card-header {
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid #ece6fb;
}

.rm-card-header-tight {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

.rm-card-header-spread {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.rm-card-title {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--rm-font-display);
  font-size: 1.2rem;
  color: #231451;
}

.rm-card-title-small {
  font-size: 1.05rem;
}

.rm-card-body {
  padding: 1.25rem 1.35rem 1.35rem;
}

.rm-stack,
.rm-form-stack,
.rm-subsection {
  display: grid;
  gap: 1rem;
}

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

.rm-field {
  display: grid;
  gap: 0.45rem;
}

.rm-field-span-2 {
  grid-column: 1 / -1;
}

.rm-field span {
  font-weight: 700;
  color: #2d3250;
}

.rm-field input,
.rm-field select,
.rm-field textarea {
  width: 100%;
  border-radius: var(--rm-radius-md);
  border: 1px solid var(--rm-border);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.85rem 0.95rem;
  color: var(--rm-ink);
  transition: border-color 160ms ease, box-shadow 240ms ease;
}

.rm-field input:focus,
.rm-field select:focus,
.rm-field textarea:focus {
  outline: none;
  border-color: var(--rm-accent);
  box-shadow: 0 0 0 0.18rem rgba(111, 60, 207, 0.18);
}

.rm-field small {
  color: var(--rm-muted);
  line-height: 1.4;
}

.rm-field-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.rm-field-checkbox input {
  width: 1rem;
  height: 1rem;
}

.rm-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.68rem 1.05rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.rm-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(31, 22, 74, 0.12);
}

.rm-button-primary {
  color: #fff;
  background: linear-gradient(135deg, #6f3ccf 0%, #4f2aa6 100%);
}

.rm-button-secondary {
  color: #433c6a;
  background: #fff;
  border-color: #dcd6ef;
}

.rm-button-danger {
  color: #b42318;
  background: #fff7f7;
  border-color: #fecaca;
}

.rm-button-block {
  width: 100%;
}

.rm-callout {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid #e8e0fb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.rm-callout h3,
.rm-empty-state h3 {
  margin: 0;
  font-family: var(--rm-font-display);
  color: #231451;
}

.rm-callout code {
  display: inline-block;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #111827;
  color: #eef2ff;
  word-break: break-all;
}

.rm-table-shell {
  overflow: auto;
  border: 1px solid #e7defb;
  border-radius: 20px;
  background: #fff;
}

.rm-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
}

.rm-table-wide {
  min-width: 1280px;
}

.rm-table th,
.rm-table td {
  padding: 1rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid #eee8fb;
  vertical-align: top;
}

.rm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f5ff;
  color: #676f8d;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rm-table tbody tr:hover {
  background: rgba(111, 60, 207, 0.04);
}

.rm-cell-title {
  font-weight: 700;
  color: #231451;
}

.rm-cell-sub {
  margin-top: 0.2rem;
  color: #68708b;
  font-size: 0.88rem;
}

.rm-status-stack {
  display: grid;
  gap: 0.45rem;
}

.rm-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
}

.rm-badge-success {
  background: var(--rm-success-soft);
  border-color: var(--rm-success-border);
  color: #166534;
}

.rm-badge-info {
  background: var(--rm-info-soft);
  border-color: var(--rm-info-border);
  color: #1d4ed8;
}

.rm-badge-muted {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

.rm-badge-warn {
  background: var(--rm-warn-soft);
  border-color: var(--rm-warn-border);
  color: #9a6700;
}

.rm-empty-state {
  padding: 1.5rem;
  border: 1px dashed #d8c9fb;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.rm-database-grid {
  display: grid;
  gap: 1rem;
}

.rm-compare-list {
  display: grid;
  gap: 0.75rem;
}

.rm-compare-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e8e0fb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.rm-compare-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.rm-database-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #e8e0fb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.rm-auth-page {
  min-height: calc(100vh - 10rem);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.rm-auth-card {
  width: min(100%, 460px);
  padding: 1.6rem;
}

.rm-auth-form {
  display: grid;
  gap: 0.85rem;
}

@media (max-width: 1024px) {
  .rm-hero,
  .rm-grid-two {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .rm-navbar,
  .rm-navbar-main,
  .rm-card-header-spread,
  .rm-actions {
    align-items: stretch;
  }

  .rm-navbar,
  .rm-navbar-main,
  .rm-auth {
    flex-direction: column;
  }

  .rm-nav-links {
    width: 100%;
  }

  .rm-nav-links a,
  .rm-auth-link,
  .rm-user-chip {
    width: 100%;
    justify-content: center;
  }

  .rm-shell {
    padding-inline: 0.85rem;
  }

  .rm-hero-stats,
  .rm-form-grid,
  .rm-database-card {
    grid-template-columns: 1fr;
  }
}
