/* ============================================================
   RigPal Design System v1.0
   B2B OCTG Marketplace — Unified CSS
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Brand Colors */
  --rp-blue: #0072E5;
  --rp-blue-hover: #005bb5;
  --rp-navy: #1E4D8C;
  --rp-navy-hover: #163a6b;
  --rp-red: #EC1C24;
  --rp-red-hover: #c8151c;
  --rp-green: #16A34A;
  --rp-green-hover: #12893d;

  /* Neutrals (Zinc) */
  --rp-black: #09090b;
  --rp-gray-950: #111113;
  --rp-gray-900: #1c1c1f;
  --rp-gray-700: #3f3f46;
  --rp-gray-500: #71717a;
  --rp-gray-400: #a1a1aa;
  --rp-gray-300: #d4d4d8;
  --rp-gray-200: #e4e4e7;
  --rp-gray-100: #f4f4f5;
  --rp-gray-50: #fafafa;
  --rp-white: #ffffff;

  /* Semantic Backgrounds */
  --rp-bg-blue: #eef4ff;
  --rp-glow-blue: rgba(0, 114, 229, 0.10);

  /* Typography */
  --rp-font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --rp-font-display: 'Plus Jakarta Sans', sans-serif;
  --rp-font-size-base: 15px;
  --rp-line-height: 1.5;

  /* Spacing */
  --rp-container-max: 1120px;
  --rp-section-pad-y: 100px;
  --rp-section-pad-y-sm: 64px;
  --rp-space-xs: 4px;
  --rp-space-sm: 8px;
  --rp-space-md: 16px;
  --rp-space-lg: 24px;
  --rp-space-xl: 32px;
  --rp-space-2xl: 48px;
  --rp-space-3xl: 64px;

  /* Radii */
  --rp-radius: 12px;
  --rp-radius-sm: 8px;
  --rp-radius-btn: 10px;
  --rp-radius-card: 14px;
  --rp-radius-card-lg: 16px;

  /* Shadows */
  --rp-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --rp-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --rp-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --rp-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --rp-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --rp-shadow-lift: 0 16px 40px rgba(0,0,0,0.10);

  /* Transitions */
  --rp-transition: 0.2s ease;
  --rp-transition-slow: 0.35s ease;

  /* Extended Palette */
  --rp-blue-light: #3B9AFF;
  --rp-blue-dark: #004FA3;
  --rp-red-light: #FF4D4D;
  --rp-red-dark: #B91C1C;
  --rp-green-light: #22C55E;
  --rp-green-dark: #15803D;
  --rp-amber: #F59E0B;
  --rp-amber-light: #FCD34D;

  /* Semantic Backgrounds */
  --rp-bg-info: #EEF4FF;
  --rp-bg-success: #F0FDF4;
  --rp-bg-warning: #FEFCE8;
  --rp-bg-error: #FEF2F2;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Font - Mono */
  --rp-font-mono: 'Fira Code', 'SF Mono', monospace;
}

/* ---------- Font Smoothing ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--rp-font-body);
  font-size: var(--rp-font-size-base);
  line-height: var(--rp-line-height);
  color: var(--rp-black);
  background: var(--rp-white);
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--rp-font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--rp-black);
  letter-spacing: -0.01em;
}

h1 { font-size: 3rem; letter-spacing: -0.025em; }     /* 48px */
h2 { font-size: 2.25rem; letter-spacing: -0.02em; }   /* 36px */
h3 { font-size: 1.75rem; }                             /* 28px */
h4 { font-size: 1.375rem; }                            /* 22px */
h5 { font-size: 1.125rem; }                            /* 18px */
h6 { font-size: 1rem; font-weight: 500; }              /* 16px */

p { margin-bottom: 1em; }

.text-lg { font-size: 1.125rem; line-height: 1.6; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-muted { color: var(--rp-gray-500); }
.text-blue { color: var(--rp-blue); }
.text-navy { color: var(--rp-navy); }
.text-red { color: var(--rp-red); }
.text-green { color: var(--rp-green); }
.text-white { color: var(--rp-white); }

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-gray-500);
}

a {
  color: var(--rp-blue);
  text-decoration: none;
  transition: color var(--rp-transition);
}
a:hover { color: var(--rp-blue-hover); text-decoration: underline; }
a.btn, a.btn:hover, a.btn:focus, a.btn:active { text-decoration: none; }

.display-heading {
  font-family: var(--rp-font-display);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--rp-container-max);
  margin: 0 auto;
  padding: 0 var(--rp-space-lg);
}

.section {
  padding: var(--rp-section-pad-y) 0;
}

.section-sm {
  padding: var(--rp-section-pad-y-sm) 0;
}

.section-blue {
  background: var(--rp-bg-blue);
}

.section-dark {
  background: var(--rp-gray-950);
  color: var(--rp-gray-300);
}
.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark h4, .section-dark h5, .section-dark h6 {
  color: var(--rp-white);
}

/* Grid */
.grid { display: grid; gap: var(--rp-space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--rp-space-sm); }
.gap-md { gap: var(--rp-space-md); }
.gap-lg { gap: var(--rp-space-lg); }
.gap-xl { gap: var(--rp-space-xl); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--rp-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--rp-radius-btn);
  cursor: pointer;
  transition: all var(--rp-transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-red {
  background: var(--rp-red);
  color: var(--rp-white);
  border-color: var(--rp-red);
}
.btn-red:hover {
  background: var(--rp-red-hover);
  border-color: var(--rp-red-hover);
  color: var(--rp-white);
  box-shadow: 0 4px 14px rgba(236, 28, 36, 0.3);
}

.btn-blue {
  background: var(--rp-blue);
  color: var(--rp-white);
  border-color: var(--rp-blue);
}
.btn-blue:hover {
  background: var(--rp-blue-hover);
  border-color: var(--rp-blue-hover);
  color: var(--rp-white);
  box-shadow: 0 4px 14px rgba(0, 114, 229, 0.3);
}

.btn-navy {
  background: var(--rp-navy);
  color: var(--rp-white);
  border-color: var(--rp-navy);
}
.btn-navy:hover {
  background: var(--rp-navy-hover);
  border-color: var(--rp-navy-hover);
  color: var(--rp-white);
  box-shadow: 0 4px 14px rgba(30, 77, 140, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--rp-black);
  border-color: var(--rp-gray-300);
}
.btn-outline:hover {
  border-color: var(--rp-blue);
  color: var(--rp-blue);
  background: var(--rp-glow-blue);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  border-radius: var(--rp-radius-sm);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Legacy .rp-btn-* variants — kept as canonical here so they load sitewide */
.rp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--rp-font-body, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  background: var(--rp-red, #EC1C24);
  color: var(--rp-white, #fff) !important;
  border: none;
  border-radius: var(--rp-radius-btn, 10px);
  cursor: pointer;
  line-height: 1;
  text-decoration: none !important;
  transition: background var(--rp-transition), transform var(--rp-transition), box-shadow var(--rp-transition);
}
.rp-btn-primary:hover {
  background: #D01920;
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
  color: var(--rp-white, #fff) !important;
  text-decoration: none !important;
}
.rp-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--rp-font-body, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  background: transparent;
  color: var(--rp-black, #09090B) !important;
  border: 2px solid var(--rp-gray-300, #D4D4D8);
  border-radius: var(--rp-radius-btn, 10px);
  cursor: pointer;
  line-height: 1;
  text-decoration: none !important;
  transition: border-color var(--rp-transition), background var(--rp-transition), transform var(--rp-transition);
}
.rp-btn-outline:hover {
  border-color: var(--rp-black, #09090B);
  background: var(--rp-gray-50, #FAFAFA);
  transform: translateY(-2px);
  color: var(--rp-black, #09090B) !important;
  text-decoration: none !important;
}
.rp-btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--rp-font-body, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  background: transparent;
  color: var(--rp-white, #fff) !important;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--rp-radius-btn, 10px);
  cursor: pointer;
  line-height: 1;
  text-decoration: none !important;
  transition: border-color var(--rp-transition), background var(--rp-transition), transform var(--rp-transition);
}
.rp-btn-outline-light:hover {
  border-color: var(--rp-white, #fff);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  color: var(--rp-white, #fff) !important;
  text-decoration: none !important;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-200);
  border-radius: var(--rp-radius-card);
  padding: var(--rp-space-lg);
  transition: all var(--rp-transition-slow);
}
.card:hover {
  box-shadow: var(--rp-shadow-lift);
  transform: translateY(-4px);
  border-color: var(--rp-gray-300);
}

.card-lg {
  border-radius: var(--rp-radius-card-lg);
  padding: var(--rp-space-xl);
}

.card-dark {
  background: var(--rp-gray-900);
  border-color: var(--rp-gray-700);
  color: var(--rp-gray-300);
}
.card-dark h1, .card-dark h2, .card-dark h3,
.card-dark h4, .card-dark h5, .card-dark h6 {
  color: var(--rp-white);
}
.card-dark:hover {
  border-color: var(--rp-gray-500);
}

.card-blue {
  background: var(--rp-bg-blue);
  border-color: rgba(0, 114, 229, 0.15);
}
.card-blue:hover {
  border-color: var(--rp-blue);
}

/* ============================================================
   Tables
   ============================================================ */
.rp-table-wrap {
  overflow-x: auto;
  border-radius: var(--rp-radius);
  border: 1px solid var(--rp-gray-200);
}

.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.rp-table thead {
  background: var(--rp-navy);
  color: var(--rp-white);
}

.rp-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rp-gray-200);
  vertical-align: middle;
}

.rp-table tbody tr:nth-child(even) {
  background: var(--rp-gray-50);
}

.rp-table tbody tr:hover {
  background: var(--rp-bg-blue);
}

.rp-table tbody tr:last-child td {
  border-bottom: none;
}

/* Colored value cells */
.rp-table .val-green { color: var(--rp-green); font-weight: 600; }
.rp-table .val-red { color: var(--rp-red); font-weight: 600; }
.rp-table .val-blue { color: var(--rp-blue); font-weight: 600; }

/* ============================================================
   Forms
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--rp-space-md);
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rp-gray-700);
}

.field input,
.field select,
.field textarea {
  font-family: var(--rp-font-body);
  font-size: 0.9375rem;
  padding: 10px 14px;
  border: 1px solid var(--rp-gray-300);
  border-radius: var(--rp-radius-sm);
  background: var(--rp-white);
  color: var(--rp-black);
  transition: border-color var(--rp-transition), box-shadow var(--rp-transition);
  outline: none;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--rp-blue);
  box-shadow: 0 0 0 3px var(--rp-glow-blue);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--rp-gray-400);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Range slider */
.field input[type="range"] {
  padding: 0;
  border: none;
  height: 6px;
  border-radius: 3px;
  background: var(--rp-gray-200);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rp-blue);
  border: 3px solid var(--rp-white);
  box-shadow: var(--rp-shadow-md);
  cursor: pointer;
}

.field input[type="range"]:focus {
  box-shadow: none;
}

.field .field-hint {
  font-size: 0.75rem;
  color: var(--rp-gray-500);
}

/* ============================================================
   Badges & Tags
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  white-space: nowrap;
}

.badge-blue {
  background: var(--rp-bg-blue);
  color: var(--rp-blue);
}

.badge-green {
  background: #dcfce7;
  color: var(--rp-green);
}

.badge-red {
  background: #fee2e2;
  color: var(--rp-red);
}

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

.badge-gray {
  background: var(--rp-gray-100);
  color: var(--rp-gray-700);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--rp-gray-200);
  color: var(--rp-gray-700);
  background: var(--rp-white);
  transition: all var(--rp-transition);
  cursor: default;
}

.tag:hover {
  border-color: var(--rp-blue);
  color: var(--rp-blue);
  background: var(--rp-glow-blue);
}

/* ============================================================
   Stats
   ============================================================ */
.stat-bar {
  display: flex;
  gap: var(--rp-space-lg);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: var(--rp-space-lg);
  flex: 1;
  min-width: 140px;
}

.stat-item .stat-number {
  font-family: var(--rp-font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--rp-blue);
  letter-spacing: -0.02em;
}

.stat-item .stat-label {
  font-size: 0.8125rem;
  color: var(--rp-gray-500);
  margin-top: 8px;
  font-weight: 500;
}

/* ============================================================
   FAQ Accordion
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: var(--rp-radius);
  overflow: hidden;
  border: 1px solid var(--rp-gray-200);
}

.faq-item {
  background: var(--rp-white);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--rp-gray-200);
  transition: background var(--rp-transition);
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--rp-gray-500);
  transition: transform var(--rp-transition);
  flex-shrink: 0;
  margin-left: var(--rp-space-md);
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item summary:hover {
  background: var(--rp-gray-50);
}

.faq-item .faq-answer {
  padding: 16px 20px 20px;
  font-size: 0.9375rem;
  color: var(--rp-gray-700);
  line-height: 1.6;
  border-bottom: 1px solid var(--rp-gray-200);
}

.faq-item:last-child summary,
.faq-item:last-child .faq-answer {
  border-bottom: none;
}

/* ============================================================
   Result / Alert Boxes
   ============================================================ */
.result-box {
  padding: var(--rp-space-lg);
  border-radius: var(--rp-radius);
  border: 1px solid;
  display: flex;
  gap: var(--rp-space-md);
  align-items: flex-start;
}

.result-box .result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.result-box .result-content {
  flex: 1;
}

.result-box .result-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.result-box .result-text {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.result-box.result-success {
  background: var(--rp-bg-success);
  border-color: #bbf7d0;
  color: #166534;
}

.result-box.result-warning {
  background: var(--rp-bg-warning);
  border-color: #fde68a;
  color: #854d0e;
}

.result-box.result-info {
  background: var(--rp-bg-blue);
  border-color: #bfdbfe;
  color: var(--rp-navy);
}

.result-box.result-error {
  background: var(--rp-bg-error);
  border-color: #fecaca;
  color: #991b1b;
}

/* ============================================================
   Utility Classes
   ============================================================ */

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--rp-space-sm); }
.mt-md { margin-top: var(--rp-space-md); }
.mt-lg { margin-top: var(--rp-space-lg); }
.mt-xl { margin-top: var(--rp-space-xl); }
.mt-2xl { margin-top: var(--rp-space-2xl); }
.mt-3xl { margin-top: var(--rp-space-3xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--rp-space-sm); }
.mb-md { margin-bottom: var(--rp-space-md); }
.mb-lg { margin-bottom: var(--rp-space-lg); }
.mb-xl { margin-bottom: var(--rp-space-xl); }
.mb-2xl { margin-bottom: var(--rp-space-2xl); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }
.p-md { padding: var(--rp-space-md); }
.p-lg { padding: var(--rp-space-lg); }
.p-xl { padding: var(--rp-space-xl); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Width */
.w-full { width: 100%; }

/* Border */
.border { border: 1px solid var(--rp-gray-200); }
.border-b { border-bottom: 1px solid var(--rp-gray-200); }
.rounded { border-radius: var(--rp-radius); }
.rounded-sm { border-radius: var(--rp-radius-sm); }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* ============================================================
   Button Loading State
   ============================================================ */
.btn-loading { pointer-events: none; opacity: 0.8; }
.btn-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg, 12px);
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-200);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease-out);
  max-width: 400px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--rp-white);
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.toast-icon.success { background: var(--rp-green); }
.toast-icon.error { background: var(--rp-red); }
.toast-icon.info { background: var(--rp-blue); }
.toast-icon.warning { background: var(--rp-amber); }
.toast-title { font-size: 0.875rem; font-weight: 600; color: var(--rp-gray-900); }
.toast-text { font-size: 0.8125rem; color: var(--rp-gray-500); margin-top: 2px; }
.toast-close {
  margin-left: auto; background: none; border: none;
  color: var(--rp-gray-400); cursor: pointer; font-size: 16px; padding: 0;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--space-16, 64px) var(--space-8, 32px);
  background: var(--rp-gray-50);
  border: 2px dashed var(--rp-gray-200);
  border-radius: 16px;
}
.empty-state-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  background: var(--rp-gray-100);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--rp-gray-400);
}
.empty-state h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; color: var(--rp-gray-500); max-width: 320px; margin: 0 auto 20px; }

/* ============================================================
   Quote Card (dark gradient)
   ============================================================ */
.quote-card {
  background: linear-gradient(135deg, var(--rp-gray-900) 0%, #0D1B3E 100%);
  border-radius: 16px;
  padding: 32px;
  color: var(--rp-white);
  position: relative;
  overflow: hidden;
}
.quote-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.875rem;
}
.quote-line .ql-label { color: rgba(255,255,255,0.6); }
.quote-line .ql-value { font-weight: 600; }
.quote-total {
  display: flex; justify-content: space-between;
  padding-top: 16px; margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 1.25rem; font-weight: 700;
}

/* ============================================================
   Card Position Badges
   ============================================================ */
.card-badge {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 10px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
}
.card-badge.in-stock { background: var(--rp-bg-success); color: var(--rp-green-dark); }
.card-badge.hot-deal { background: var(--rp-bg-error); color: var(--rp-red-dark); }
.card-badge.featured { background: var(--rp-bg-info); color: var(--rp-blue-dark); }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease both;
}

.animate-fade-up-delay-1 { animation: fadeUp 0.6s ease 0.1s both; }
.animate-fade-up-delay-2 { animation: fadeUp 0.6s ease 0.2s both; }
.animate-fade-up-delay-3 { animation: fadeUp 0.6s ease 0.3s both; }

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================================
   Ghost Button
   ============================================================ */
.btn-ghost {
  background: transparent;
  color: var(--rp-gray-700);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--rp-gray-900);
  background: var(--rp-gray-100);
}

/* ============================================================
   Icon Button
   ============================================================ */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  border-radius: var(--rp-radius-sm);
}
.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
  font-size: 0.9375rem;
}

/* ============================================================
   Dashboard Sidebar
   ============================================================ */
.sidebar-demo {
  display: grid;
  grid-template-columns: 240px 1fr;
  border: 1px solid var(--rp-gray-200);
  border-radius: 12px;
  min-height: 420px;
  overflow: hidden;
}
.sidebar {
  background: var(--rp-gray-900);
  padding: 20px;
  color: var(--rp-white);
}
.sidebar-logo {
  font-family: var(--rp-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--rp-gray-400);
  text-decoration: none;
  transition: all 150ms;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--rp-white);
  text-decoration: none;
}
.sidebar-link.active {
  background: rgba(0,114,229,0.15);
  color: var(--rp-blue-light, #3B9AFF);
}
.sidebar-content {
  padding: 32px;
  background: var(--rp-gray-50);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rp-space-md);
}
.kpi-card {
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-200);
  border-radius: var(--rp-radius);
  padding: var(--rp-space-lg);
}
.kpi-card .kpi-value {
  font-family: var(--rp-font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--rp-blue);
  line-height: 1;
}
.kpi-card .kpi-label {
  font-size: 0.8125rem;
  color: var(--rp-gray-500);
  margin-top: 6px;
}

/* ============================================================
   Dark Mode Preview
   ============================================================ */
.dark-preview {
  background: var(--rp-gray-950);
  border-radius: var(--rp-radius-card-lg);
  padding: var(--rp-space-xl);
  color: var(--rp-gray-300);
}
.dark-preview h4,
.dark-preview h5 {
  color: var(--rp-white);
}
.dark-preview .field label {
  color: var(--rp-gray-300);
}
.dark-preview .field input,
.dark-preview .field select {
  background: var(--rp-gray-900);
  border-color: var(--rp-gray-700);
  color: var(--rp-white);
}
.dark-preview .field input::placeholder {
  color: var(--rp-gray-500);
}

/* ============================================================
   Iconography Grid
   ============================================================ */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--rp-space-md);
}
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: var(--rp-space-lg) var(--rp-space-md);
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-200);
  border-radius: var(--rp-radius);
  text-align: center;
  transition: all var(--rp-transition);
}
.icon-item:hover {
  border-color: var(--rp-blue);
  box-shadow: var(--rp-shadow-md);
}
.icon-item .icon-symbol {
  font-size: 1.75rem;
  line-height: 1;
}
.icon-item .icon-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rp-gray-900);
}
.icon-item .icon-use {
  font-size: 0.6875rem;
  color: var(--rp-gray-500);
  line-height: 1.3;
}

/* ============================================================
   Spacing Scale
   ============================================================ */
.spacing-scale {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spacing-row {
  display: flex;
  align-items: center;
  gap: var(--rp-space-md);
}
.spacing-bar {
  height: 24px;
  background: var(--rp-blue);
  border-radius: 4px;
  min-width: 4px;
}
.spacing-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rp-gray-700);
  white-space: nowrap;
  min-width: 100px;
}
.spacing-value {
  font-size: 0.75rem;
  color: var(--rp-gray-500);
  font-family: var(--rp-font-mono);
  white-space: nowrap;
}

/* ============================================================
   Motion Tokens
   ============================================================ */
.motion-card {
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-200);
  border-radius: var(--rp-radius-card);
  padding: var(--rp-space-lg);
  text-align: center;
}
.motion-card h5 { margin-bottom: 4px; }
.motion-card .motion-desc {
  font-size: 0.8125rem;
  color: var(--rp-gray-500);
  margin-bottom: var(--rp-space-md);
}
.motion-demo-area {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 var(--rp-space-md);
  background: var(--rp-gray-50);
  border-radius: var(--rp-radius-sm);
  overflow: hidden;
}
.motion-box {
  width: 40px;
  height: 40px;
  background: var(--rp-blue);
  border-radius: 8px;
  flex-shrink: 0;
  transition-property: transform;
}
.motion-card:hover .motion-box {
  transform: translateX(160px);
}
.motion-box.ease-out { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.motion-box.dur-fast { transition: transform 150ms ease-out; }
.motion-box.dur-normal { transition: transform 250ms ease-out; }
.motion-box.dur-slow { transition: transform 400ms ease-out; }

/* ============================================================
   Guidelines (Do / Don't)
   ============================================================ */
.guidelines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--rp-space-lg);
}
.guideline-card {
  padding: var(--rp-space-lg);
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-200);
  border-radius: var(--rp-radius-card);
  border-left: 4px solid;
}
.guideline-card.do {
  border-left-color: var(--rp-green);
}
.guideline-card.dont {
  border-left-color: var(--rp-red);
}
.guideline-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.guideline-card.do .guideline-label { color: var(--rp-green); }
.guideline-card.dont .guideline-label { color: var(--rp-red); }
.guideline-card h5 { margin-bottom: 6px; }
.guideline-card p {
  font-size: 0.875rem;
  color: var(--rp-gray-600, var(--rp-gray-500));
  margin-bottom: 0;
}
.guideline-card code {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  font-family: var(--rp-font-mono);
  color: var(--rp-gray-700);
  background: var(--rp-gray-50);
  padding: 6px 10px;
  border-radius: 6px;
}

/* ============================================================
   Toast Progress Bar
   ============================================================ */
.toast {
  position: relative;
  overflow: hidden;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 70%;
  border-radius: 0 2px 0 0;
}
.toast-progress.success { background: var(--rp-green); }
.toast-progress.error { background: var(--rp-red); }
.toast-progress.info { background: var(--rp-blue); }
.toast-progress.warning { background: var(--rp-amber); }

/* ============================================================
   Divider
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--rp-gray-200);
  margin: var(--rp-space-2xl) 0;
}

/* ============================================================
   Responsive: 900px
   ============================================================ */
@media (max-width: 900px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  .display-heading { font-size: 2.5rem; }

  .section { padding: var(--rp-section-pad-y-sm) 0; }

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

}

/* ============================================================
   Responsive: 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --rp-font-size-base: 15px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.375rem; }
  .display-heading { font-size: 2rem; }

  .container { padding: 0 var(--rp-space-md); }

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

  .stat-bar { flex-direction: column; align-items: center; }

  .rp-table { font-size: 0.8125rem; }
  .rp-table th, .rp-table td { padding: 10px 12px; }
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
  .rp-nav, .rp-ft { display: none; }

  .section { padding: 24px 0; }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .card { box-shadow: none; border: 1px solid #ccc; }
  .card:hover { transform: none; box-shadow: none; }

  .btn { border: 1px solid #333; }

  a { color: #000; text-decoration: underline; }

  .rp-table thead { background: #eee; color: #000; }

  .result-box { border: 1px solid #ccc; }
}

/* ============================================================
   Post CTA box — reusable inline CTA pattern for blog posts
   Usage:
     <div class="rp-post-cta">
       <h3>Heading</h3>
       <p>Description.</p>
       <div class="rp-post-cta-actions">
         <a class="rp-btn-primary" href="...">Primary</a>
         <a class="rp-btn-outline" href="...">Secondary</a>
       </div>
     </div>
   ============================================================ */
.rp-post-cta {
  max-width: 820px;
  margin: 36px auto;
  padding: 32px 28px;
  background: var(--rp-gray-50, #FAFAFA);
  border: 1px solid var(--rp-gray-200, #E4E4E7);
  border-radius: var(--rp-radius-card, 14px);
  text-align: center;
}
.rp-post-cta h3 {
  font-family: var(--rp-font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--rp-black, #09090B);
}
.rp-post-cta p {
  color: var(--rp-gray-500, #71717A);
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.5;
}
.rp-post-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .rp-post-cta {
    padding: 24px 20px;
    margin: 28px auto;
  }
  .rp-post-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .rp-post-cta-actions .rp-btn-primary,
  .rp-post-cta-actions .rp-btn-outline,
  .rp-post-cta-actions .rp-btn-outline-light {
    justify-content: center;
  }
}

/* PDF gate variant — icon + embedded form inside rp-post-cta */
.rp-pdf-gate .rp-pdf-gate-icon {
  font-size: 36px;
  color: var(--rp-red, #EC1C24);
  margin-bottom: 12px;
}
.rp-pdf-gate .gform_wrapper {
  max-width: 420px;
  margin: 0 auto;
}
.rp-pdf-gate .gform_wrapper .gfield {
  margin-bottom: 10px;
}
.rp-pdf-gate .gform_wrapper input[type="email"],
.rp-pdf-gate .gform_wrapper input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--rp-gray-200, #E4E4E7);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
.rp-pdf-gate .gform_wrapper .gform_footer,
.rp-pdf-gate .gform_wrapper .gform_page_footer {
  padding: 0;
  margin: 0;
  justify-content: center;
}
.rp-pdf-gate .gform_wrapper .gform_button {
  display: inline-block !important;
  width: auto !important;
  min-width: 200px;
  padding: 14px 32px !important;
  background: var(--rp-red, #EC1C24) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: var(--rp-font-display, 'Plus Jakarta Sans', sans-serif) !important;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s !important;
  letter-spacing: 0.02em !important;
}
.rp-pdf-gate .gform_wrapper .gform_button:hover {
  background: #D01920 !important;
  transform: translateY(-1px);
}
.rp-pdf-gate .rp-pdf-gate-disclaimer {
  font-size: 11px !important;
  color: var(--rp-gray-400, #A1A1AA) !important;
  margin: 12px 0 0 !important;
  line-height: 1.4;
}
.rp-pdf-gate--success {
  background: #F0FDF4;
  border-color: #86EFAC;
}
.rp-pdf-gate--success h3 { color: #166534; }
