/* =============================================
   RESOURCE EXCHANGE MINI APP - STYLES
   ============================================= */

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  color-scheme: light;
  --rex-ink: #17201f;
  --rex-muted: #6b7674;
  --rex-line: #dce5e0;
  --rex-paper: #f6f7f4;
  --rex-panel: #ffffff;
  --rex-green: #0d5b4d;
  --rex-green-2: #17433c;
  --rex-gold: #c58d35;
  --rex-coral: #c95d3e;
  --rex-blue: #315c85;
}

/* =============================================
   BASE RESET
   ============================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #dfe6e1;
  color: var(--rex-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

/* =============================================
   LAYOUT - PHONE SHELL
   ============================================= */
.rex-phone-shell {
  position: relative;
  width: min(100vw, 430px);
  height: min(100vh, 900px);
  min-height: 720px;
  overflow: hidden;
  background: var(--rex-paper);
  box-shadow: 0 24px 80px rgb(23 32 31 / 0.25);
}

/* =============================================
   HEADER
   ============================================= */
.rex-topbar {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--rex-line);
  position: relative;
  z-index: 5;
}

.rex-icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef3ef;
  color: var(--rex-green-2);
  font-size: 20px;
}

/* =============================================
   SCREENS
   ============================================= */
.rex-screen {
  display: none;
  height: calc(100% - 120px);
  overflow-y: auto;
  padding: 0 16px 28px;
}

.rex-screen.rex-active {
  display: block;
}

/* =============================================
   HERO SECTION
   ============================================= */
.rex-hero {
  position: relative;
  min-height: 260px;
  margin: 0 -16px 18px;
  overflow: hidden;
  background: var(--rex-green-2);
}

.rex-hero img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

.rex-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(13 35 31 / 0.28), rgb(13 35 31 / 0.78));
}

.rex-hero-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 24px;
  color: #fff;
}

.rex-hero-copy p,
.rex-page-title p,
.rex-shop-hero p,
.rex-profile-card p,
.rex-member-card p,
.rex-section-head p,
.rex-dialog-body p {
  margin: 0 0 7px;
  font-size: 12px;
  color: var(--rex-gold);
  font-weight: 800;
  letter-spacing: 0;
}

.rex-hero-copy h1,
.rex-page-title h1,
.rex-shop-hero h1,
.rex-profile-card h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.08;
}

.rex-hero-copy span,
.rex-shop-hero span,
.rex-profile-card span,
.rex-member-card span {
  color: rgb(255 255 255 / 0.82);
  font-size: 14px;
}

/* =============================================
   QUICK ACTIONS
   ============================================= */
.rex-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rex-primary-card {
  min-height: 128px;
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: var(--rex-panel);
  padding: 16px;
  text-align: left;
  display: grid;
  align-content: space-between;
  box-shadow: 0 10px 24px rgb(23 32 31 / 0.08);
}

.rex-primary-card strong {
  display: block;
  margin-top: 12px;
  font-size: 19px;
}

.rex-primary-card small {
  color: var(--rex-muted);
}

.rex-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--rex-green);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.rex-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.rex-section-head.compact {
  margin-top: 18px;
}

.rex-section-head h2,
.rex-member-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.rex-text-btn {
  border: 0;
  background: transparent;
  color: var(--rex-green);
  font-weight: 800;
  white-space: nowrap;
}

/* =============================================
   LISTS & CARDS
   ============================================= */
.rex-project-list,
.rex-resource-list,
.rex-match-list,
.rex-deal-list {
  display: grid;
  gap: 12px;
}

.rex-project-card,
.rex-resource-card,
.rex-match-card,
.rex-deal-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: var(--rex-panel);
  padding: 14px;
}

.rex-project-card h3,
.rex-resource-card h3,
.rex-match-card h3,
.rex-deal-card h3 {
  margin: 10px 0 8px;
  font-size: 17px;
}

.rex-card-top,
.rex-resource-meta,
.rex-match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--rex-muted);
  font-size: 13px;
}

.rex-tag {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1e6d4;
  color: #8c5c1e;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.rex-needs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.rex-needs span,
.rex-timeline span {
  border-radius: 999px;
  padding: 6px 9px;
  background: #edf2ef;
  color: var(--rex-green-2);
  font-size: 12px;
}

/* =============================================
   PAGE TITLE & FILTER
   ============================================= */
.rex-page-title {
  padding: 22px 0 14px;
}

.rex-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.rex-chip {
  border: 1px solid var(--rex-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--rex-muted);
  white-space: nowrap;
}

.rex-chip.rex-active {
  background: var(--rex-green);
  color: #fff;
  border-color: var(--rex-green);
}

/* =============================================
   SHOP SECTION
   ============================================= */
.rex-shop-hero,
.rex-profile-card {
  margin: 16px 0;
  border-radius: 8px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--rex-green-2), #2e6f62 62%, #6b704a);
}

.rex-shop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.rex-shop-stats b {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.12);
}

.rex-shop-stats span {
  font-size: 22px;
  color: #fff;
}

.rex-shop-stats small {
  color: rgb(255 255 255 / 0.74);
}

.rex-shop-actions,
.rex-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.rex-shop-actions button,
.rex-card-actions button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  font-weight: 800;
  background: #fff;
  color: var(--rex-green);
}

.rex-shop-actions button + button,
.rex-card-actions button + button {
  background: #edf2ef;
  color: var(--rex-green-2);
}

/* =============================================
   FLOW CARD & PROFILE BLOCKS
   ============================================= */
.rex-flow-card,
.rex-profile-block,
.rex-free-summary,
.rex-deal-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin: 12px 0;
}

.rex-flow-card p,
.rex-profile-block p {
  margin: 0 0 10px;
  color: var(--rex-gold);
  font-size: 12px;
  font-weight: 800;
}

.rex-status-flow {
  display: flex;
  gap: 7px;
  overflow-x: auto;
}

.rex-status-flow span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #edf2ef;
  color: var(--rex-green-2);
  font-size: 12px;
}

.rex-status-flow span.rex-active {
  background: var(--rex-green);
  color: #fff;
}

.rex-empty {
  padding: 24px;
  border: 1px dashed #becac5;
  border-radius: 8px;
  color: var(--rex-muted);
  text-align: center;
  background: #fff;
}

/* =============================================
   MEMBER CARD
   ============================================= */
.rex-member-card {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 16px;
  background: #fff7e7;
  border: 1px solid #edd1a7;
}

.rex-member-card span {
  display: block;
  margin-top: 5px;
  color: #7b674d;
  font-size: 13px;
}

.rex-member-card button,
.rex-submit-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  background: var(--rex-gold);
  font-weight: 800;
  white-space: nowrap;
}

/* =============================================
   TIMELINE & PROGRESS
   ============================================= */
.rex-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rex-timeline .done {
  background: #dbeee8;
  color: var(--rex-green);
}

.rex-progress-list {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.rex-progress-list b {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
}

.rex-progress-list b span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rex-gold);
}

.rex-progress-list small {
  color: rgb(255 255 255 / 0.78);
}

/* =============================================
   SERVICE PROGRESS BAR
   ============================================= */
.rex-service-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  background: #f8f9f7;
  border-radius: 8px;
}

.rex-service-progress-step {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  color: var(--rex-muted);
  background: #edf2ef;
  border-radius: 6px;
  position: relative;
}

.rex-service-progress-step.rex-active {
  background: var(--rex-green);
  color: #fff;
  font-weight: 800;
}

.rex-service-progress-step.done {
  background: #dbeee8;
  color: var(--rex-green);
}

/* =============================================
   GRIDS
   ============================================= */
.rex-info-grid,
.rex-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rex-info-grid span,
.rex-settings-grid span {
  border-radius: 8px;
  padding: 9px;
  background: #edf2ef;
  color: var(--rex-green-2);
  font-size: 13px;
}

/* =============================================
   FREE SUMMARY
   ============================================= */
.rex-free-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rex-free-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #edf2ef;
}

.rex-free-summary b {
  font-size: 20px;
  color: var(--rex-green);
}

.rex-free-summary span,
.rex-free-summary p {
  color: var(--rex-muted);
  font-size: 12px;
  line-height: 1.45;
}

.rex-free-summary p {
  grid-column: 1 / -1;
  margin: 0;
}

/* =============================================
   DEAL CARD
   ============================================= */
.rex-deal-card p {
  color: var(--rex-muted);
  line-height: 1.5;
}

/* =============================================
   EARNINGS
   ============================================= */
.rex-earning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.rex-earning-grid b,
.rex-earning-grid span {
  padding: 9px 6px;
  border-radius: 8px;
  background: #edf2ef;
}

.rex-earning-grid span {
  color: var(--rex-muted);
  font-size: 12px;
}

/* =============================================
   TAB BAR
   ============================================= */
.rex-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 66px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--rex-line);
  z-index: 4;
}

.rex-tab {
  border: 0;
  background: transparent;
  color: var(--rex-muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  font-size: 12px;
}

.rex-tab span {
  font-size: 21px;
  line-height: 1;
}

.rex-tab.rex-active {
  color: var(--rex-green);
  font-weight: 800;
}

/* =============================================
   DIALOGS
   ============================================= */
dialog {
  width: min(94vw, 398px);
  border: 0;
  border-radius: 10px;
  padding: 0;
  color: var(--rex-ink);
  box-shadow: 0 26px 80px rgb(23 32 31 / 0.35);
}

dialog::backdrop {
  background: rgb(18 27 25 / 0.52);
}

.rex-dialog-body {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px;
}

.rex-dialog-body.large {
  max-height: min(84vh, 760px);
  overflow-y: auto;
}

.rex-dialog-body.small {
  gap: 14px;
}

.rex-dialog-body h2 {
  margin: 0 0 6px;
}

.rex-dialog-body label {
  display: grid;
  gap: 6px;
  color: var(--rex-muted);
  font-size: 13px;
  font-weight: 700;
}

.rex-dialog-body input,
.rex-dialog-body select,
.rex-dialog-body textarea {
  width: 100%;
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  padding: 11px;
  color: var(--rex-ink);
  background: #fff;
}

.rex-dialog-body textarea {
  min-height: 96px;
  resize: vertical;
}

.rex-close-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #edf2ef;
  color: var(--rex-muted);
  font-size: 20px;
}

/* =============================================
   STEP WIZARD
   ============================================= */
.rex-step-wizard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 8px;
}

.rex-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.rex-step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 12px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--rex-line);
  z-index: 0;
}

.rex-step-item.rex-active:not(:last-child)::after,
.rex-step-item.done:not(:last-child)::after {
  background: var(--rex-green);
}

.rex-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf2ef;
  color: var(--rex-muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  z-index: 1;
}

.rex-step-item.rex-active .rex-step-number {
  background: var(--rex-green);
  color: #fff;
}

.rex-step-item.done .rex-step-number {
  background: var(--rex-gold);
  color: #fff;
}

.rex-step-label {
  font-size: 11px;
  color: var(--rex-muted);
  font-weight: 600;
}

.rex-step-item.rex-active .rex-step-label {
  color: var(--rex-green);
}

/* =============================================
   STEP CONTENT ANIMATION
   ============================================= */
.rex-step-content {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.rex-step-content.rex-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: rex-fadeSlideIn 0.3s ease forwards;
}

@keyframes rex-fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =============================================
   FORM BLOCKS
   ============================================= */
.rex-form-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: #fbfcfa;
}

.rex-form-block > strong {
  font-size: 14px;
}

.rex-form-note {
  border-radius: 8px;
  padding: 9px 10px;
  background: #edf7f2;
  color: var(--rex-green-2);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.rex-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rex-field-grid label:has(textarea),
.rex-ai-block label,
.rex-match-panel .rex-field-grid label:last-child {
  grid-column: 1 / -1;
}

/* =============================================
   PACKAGE PREVIEW & RECOMMENDATIONS
   ============================================= */
.rex-package-preview,
.rex-recommend-title,
.rex-match-gate {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7e7;
  border: 1px solid #edd1a7;
}

.rex-package-preview span,
.rex-recommend-title span,
.rex-match-gate span {
  color: #7b674d;
  font-size: 13px;
  line-height: 1.45;
}

.rex-gate-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.rex-gate-metrics em {
  display: grid;
  gap: 2px;
  font-style: normal;
  text-align: center;
  color: var(--rex-green);
  font-weight: 900;
}

.rex-gate-metrics small {
  color: #7b674d;
  font-size: 11px;
  font-weight: 700;
}

/* =============================================
   SEGMENT CONTROL
   ============================================= */
.rex-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 8px;
  background: #edf2ef;
}

.rex-segment button {
  border: 0;
  border-radius: 7px;
  padding: 10px 8px;
  background: transparent;
  color: var(--rex-muted);
  font-weight: 800;
}

.rex-segment button.rex-active {
  background: #fff;
  color: var(--rex-green);
  box-shadow: 0 6px 14px rgb(23 32 31 / 0.08);
}

/* =============================================
   MATCH PANELS
   ============================================= */
.rex-match-panel {
  display: none;
}

.rex-match-panel.rex-active {
  display: block;
}

.rex-recommendation-list {
  display: grid;
  gap: 10px;
}

/* =============================================
   GENERATING ANIMATION
   ============================================= */
.rex-generating-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
}

.rex-generating-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--rex-line);
  border-top-color: var(--rex-green);
  border-radius: 50%;
  animation: rex-spin 1s linear infinite;
}

@keyframes rex-spin {
  to {
    transform: rotate(360deg);
  }
}

.rex-generating-text {
  color: var(--rex-green);
  font-weight: 700;
  font-size: 14px;
}

/* =============================================
   GLASS MORPHISM OVERLAY
   ============================================= */
.rex-glass-overlay {
  position: relative;
  overflow: hidden;
}

.rex-glass-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(246,247,244,0.9) 60%, rgba(246,247,244,0.98) 100%);
  backdrop-filter: blur(2px);
  z-index: 1;
}

.rex-glass-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  text-align: center;
}

.rex-glass-content p {
  color: var(--rex-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.rex-glass-content button {
  background: var(--rex-gold);
  color: #fff;
  border: 0;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 800;
}

/* =============================================
   EXPANDABLE CONTENT
   ============================================= */
.rex-expandable {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.rex-expandable.expanded {
  max-height: 500px;
  opacity: 1;
}

.rex-expand-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rex-green);
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}

.rex-expand-btn::after {
  content: '▼';
  font-size: 10px;
  transition: transform 0.2s ease;
}

.rex-expand-btn.expanded::after {
  transform: rotate(180deg);
}

/* =============================================
   RESOURCE PACKAGE PREVIEW
   ============================================= */
.rex-package-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  margin-top: 12px;
}

.rex-package-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rex-package-card-header h4 {
  margin: 0;
  font-size: 16px;
}

.rex-package-card-actions {
  display: flex;
  gap: 8px;
}

.rex-package-card-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--rex-line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.rex-package-card-actions button.primary {
  background: var(--rex-green);
  color: #fff;
  border-color: var(--rex-green);
}

/* =============================================
   QR CODE DIALOG
   ============================================= */
.rex-qr-placeholder {
  width: 200px;
  height: 200px;
  background: #f0f0f0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border: 2px dashed var(--rex-line);
}

.rex-qr-placeholder span {
  color: var(--rex-muted);
  font-size: 14px;
}

/* =============================================
   SHOP DATA OVERVIEW
   ============================================= */
.rex-shop-data-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  background: #f8f9f7;
  border-radius: 8px;
  margin-top: 12px;
}

.rex-shop-data-item {
  text-align: center;
  padding: 10px;
}

.rex-shop-data-item b {
  display: block;
  font-size: 20px;
  color: var(--rex-green);
}

.rex-shop-data-item span {
  font-size: 12px;
  color: var(--rex-muted);
}

.rex-shop-data-trend {
  grid-column: 1 / -1;
  padding: 10px;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  color: var(--rex-muted);
}

.rex-shop-data-trend strong {
  color: var(--rex-green);
}

/* =============================================
   MEMBERSHIP BENEFITS
   ============================================= */
.rex-benefits-list {
  display: grid;
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.rex-benefits-list.expanded {
  max-height: 400px;
}

.rex-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9f7;
  border-radius: 8px;
}

.rex-benefit-item::before {
  content: '✓';
  width: 22px;
  height: 22px;
  background: var(--rex-green);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.rex-benefit-item span {
  font-size: 13px;
}

/* =============================================
   IDENTITY PROGRESS
   ============================================= */
.rex-identity-progress {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rex-identity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.rex-identity-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}

.rex-identity-status.done {
  background: var(--rex-gold);
  color: #fff;
}

.rex-identity-status.progress {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.rex-identity-status.pending {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
}

.rex-identity-text {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

/* =============================================
   MATCH REPORT DIALOG
   ============================================= */
.rex-match-report-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.rex-match-report-stat {
  text-align: center;
  padding: 14px 8px;
  background: linear-gradient(135deg, var(--rex-green-2), var(--rex-green));
  border-radius: 8px;
  color: #fff;
}

.rex-match-report-stat b {
  display: block;
  font-size: 24px;
}

.rex-match-report-stat span {
  font-size: 11px;
  opacity: 0.9;
}

.rex-match-result-item {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}

.rex-match-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rex-match-result-detail {
  padding: 12px;
  background: #f8f9f7;
  border-radius: 6px;
  font-size: 13px;
  color: var(--rex-muted);
  line-height: 1.6;
}

/* =============================================
   PROJECT DETAIL DIALOG
   ============================================= */
.rex-project-detail-header {
  margin-bottom: 16px;
}

.rex-project-detail-header h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rex-project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.rex-project-detail-section {
  margin-bottom: 16px;
}

.rex-project-detail-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--rex-muted);
}

.rex-project-detail-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.rex-project-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rex-line);
}

.rex-project-detail-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 0;
  font-weight: 800;
}

.rex-project-detail-actions button.primary {
  background: var(--rex-green);
  color: #fff;
}

.rex-project-detail-actions button.secondary {
  background: var(--rex-gold);
  color: #fff;
}

/* =============================================
   MASKED CONTENT
   ============================================= */
.rex-masked-content {
  position: relative;
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.rex-masked-content::after {
  content: '🔒 会员可见';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(246, 247, 244, 0.7);
  font-size: 12px;
  color: var(--rex-muted);
  border-radius: 6px;
}

/* =============================================
   WIZARD NAVIGATION
   ============================================= */
.rex-wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rex-line);
}

.rex-wizard-nav button {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--rex-line);
  background: #fff;
  font-weight: 700;
}

.rex-wizard-nav button.primary {
  background: var(--rex-green);
  color: #fff;
  border-color: var(--rex-green);
}

.rex-wizard-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =============================================
   RESOURCE STATUS SELECTOR
   ============================================= */
.rex-status-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.rex-status-option {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--rex-line);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rex-status-option:hover {
  border-color: var(--rex-green);
}

.rex-status-option.rex-active {
  background: var(--rex-green);
  color: #fff;
  border-color: var(--rex-green);
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.rex-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--rex-green-2);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.rex-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 430px) {
  body {
    display: block;
    background: var(--rex-paper);
  }

  .rex-phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    box-shadow: none;
  }

  .rex-field-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   THIRD ROUND: RESPONSIVE ADAPTATION (375px / 390px / 430px)
   ========================================================================== */

/* ---- 375px: iPhone SE / smaller Android ---- */
@media (max-width: 385px) {
  .rex-phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    box-shadow: none;
  }

  .rex-field-grid {
    grid-template-columns: 1fr !important;
  }

  .rex-shop-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .rex-dialog-body {
    padding: 16px !important;
  }

  .rex-dialog-body.large {
    max-height: min(90vh, 760px);
  }

  dialog {
    width: min(96vw, 398px);
  }

  .rex-tabbar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .rex-earnings-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .rex-free-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .rex-gate-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .rex-status-meanings {
    grid-template-columns: 1fr;
  }

  .rex-shop-data-overview {
    grid-template-columns: 1fr 1fr;
  }

  .rex-report-summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- 390px: iPhone 14 / Pro ---- */
@media (min-width: 386px) and (max-width: 395px) {
  .rex-phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    box-shadow: none;
  }

  .rex-field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rex-shop-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .rex-dialog-body {
    padding: 18px;
  }

  .rex-tabbar {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---- Global safe-area for iPhone with home indicator ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .rex-tabbar {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---- 资源示例库 ---- */
.rex-example-library {
  margin-top: 10px;
  border: 1px solid #edd1a7;
  border-radius: 8px;
  background: #fffbf2;
  overflow: hidden;
}

.rex-example-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #7b674d;
  cursor: pointer;
}

.rex-example-toggle span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rex-example-arrow {
  font-size: 10px;
  transition: transform 0.25s ease;
}

.rex-example-toggle.expanded .rex-example-arrow {
  transform: rotate(180deg);
}

.rex-example-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.rex-example-content.expanded {
  max-height: 600px;
}

.rex-example-group {
  padding: 10px 14px 6px;
  border-top: 1px solid #edd1a7;
}

.rex-example-group:first-child {
  border-top: none;
}

.rex-example-group strong {
  display: block;
  font-size: 12px;
  color: #0d5b4d;
  margin-bottom: 6px;
  font-weight: 800;
}

.rex-example-group ul {
  margin: 0 0 8px;
  padding-left: 16px;
}

.rex-example-group li {
  font-size: 12px;
  color: #5a5a5a;
  line-height: 1.7;
  margin-bottom: 2px;
}

/* ---- Step3 AI 辅助提示 ---- */
.rex-field-hint {
  font-size: 11px;
  color: #0d5b4d;
  font-weight: 600;
  background: #edf2ef;
  border-radius: 4px;
  padding: 3px 7px;
  display: inline-block;
  margin-bottom: 3px;
  line-height: 1.4;
}

.rex-ai-block label {
  display: grid;
  gap: 3px;
}

/* ---- 免费匹配报告：渐变遮罩 + 露出摘要 ---- */
.rex-report-gradient-mask {
  position: relative;
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rex-line);
  min-height: 80px;
}

.rex-report-peek {
  position: relative;
  z-index: 2;
  padding: 14px 16px 10px;
}

.rex-peek-tag {
  margin: 0 0 6px;
  font-size: 13px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rex-peek-tag strong {
  color: #0d5b4d;
  font-size: 15px;
}

.rex-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,1) 100%);
  z-index: 2;
  pointer-events: none;
}

.rex-gradient-content {
  position: relative;
  z-index: 3;
  padding: 0 16px 16px;
  text-align: center;
}

.rex-gradient-content .rex-lock-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.rex-gradient-content h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--rex-ink);
}

.rex-value-props {
  font-size: 12px;
  color: #7b674d;
  margin: 0 0 6px;
  font-weight: 700;
}

.rex-value-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  text-align: left;
  display: inline-block;
}

.rex-value-list li {
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
  line-height: 1.4;
}

.rex-gold-btn {
  background: linear-gradient(135deg, #c58d35, #e0a84a) !important;
  box-shadow: 0 4px 14px rgba(197, 141, 53, 0.35);
  transform: scale(1.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rex-gold-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(197, 141, 53, 0.45);
}

/* ---- 项目详情：信息分级 ---- */
.rex-free-section {
  border: 1px solid #c8e6dc;
  border-radius: 8px;
  padding: 14px;
  background: #f8fcfb;
  margin-bottom: 12px;
}

.rex-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.rex-free-badge {
  background: #dbeee8;
  color: #0d5b4d;
}

.rex-vip-badge {
  background: #fff3dc;
  color: #8c5c1e;
}

.rex-vip-section {
  border: 1px dashed #d4b87a;
  border-radius: 8px;
  padding: 14px;
  background: #fffbf2;
  margin-top: 12px;
}

.rex-locked-row {
  opacity: 0.75;
}

.rex-locked-value {
  display: flex;
  justify-content: flex-end;
}

.rex-locked-pill {
  display: inline-block;
  background: #f5efe2;
  color: #8c5c1e;
  border: 1px solid #d4b87a;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.rex-vip-upgrade-card {
  margin-top: 10px;
  padding: 10px;
  background: #fff8ec;
  border-radius: 6px;
  text-align: center;
}

.rex-vip-upgrade-card p {
  margin: 0;
  font-size: 12px;
  color: #7b674d;
}

/* ---- 小店：状态业务含义 ---- */
.rex-status-meanings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.rex-status-meanings.expanded {
  max-height: 400px;
}

.rex-status-meaning-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px;
  background: #f8f9f7;
  border-radius: 6px;
}

.rex-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.rex-status-meaning-item div {
  flex: 1;
}

.rex-status-meaning-item strong {
  display: block;
  font-size: 12px;
  color: #17201f;
  margin-bottom: 2px;
}

.rex-status-meaning-item small {
  font-size: 11px;
  color: #6b7674;
  line-height: 1.4;
}

/* ---- 小店：漏斗数据 ---- */
.rex-funnel-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin: 12px 0;
}

.rex-funnel-card > p {
  margin: 0 0 12px;
  color: var(--rex-gold);
  font-size: 12px;
  font-weight: 800;
}

.rex-funnel-data {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rex-funnel-stage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rex-funnel-label {
  width: 36px;
  font-size: 12px;
  color: var(--rex-muted);
  font-weight: 700;
  flex-shrink: 0;
}

.rex-funnel-bar-container {
  flex: 1;
  height: 18px;
  background: #edf2ef;
  border-radius: 999px;
  overflow: hidden;
}

.rex-funnel-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rex-green), var(--rex-green-2));
  border-radius: inherit;
  min-width: 6px;
  transition: width 0.6s ease;
}

.rex-inquiry-bar {
  background: linear-gradient(90deg, #e8a94a, #c58d35);
}

.rex-connect-bar {
  background: linear-gradient(90deg, #7aab5a, #5a8b3a);
}

.rex-funnel-value {
  width: 28px;
  text-align: right;
  font-size: 14px;
  font-weight: 900;
  color: var(--rex-green);
  flex-shrink: 0;
}

.rex-funnel-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rex-line);
  font-size: 12px;
  color: var(--rex-muted);
}

.rex-funnel-rate strong {
  color: #0d5b4d;
}

/* ---- 我的页面：晋级条件 ---- */
.rex-promotion-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin: 12px 0;
}

.rex-promotion-card > p {
  margin: 0 0 10px;
  color: var(--rex-gold);
  font-size: 12px;
  font-weight: 800;
}

.rex-promotion-conditions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rex-promotion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--rex-line);
  background: #fafbf9;
  transition: all 0.2s ease;
  cursor: pointer;
}

.rex-promotion-item:hover {
  background: #f0f7f4;
}

.rex-promotion-item.done {
  background: #f0f9f5;
  border-color: #b8d9ce;
}

.rex-promotion-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.rex-promotion-icon.done {
  background: #0d5b4d;
  color: #fff;
}

.rex-promotion-icon.progress {
  background: #c58d35;
  color: #fff;
}

.rex-promotion-icon.pending {
  background: #edf2ef;
  color: #6b7674;
}

.rex-promotion-info {
  flex: 1;
}

.rex-promotion-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--rex-ink);
}

.rex-promotion-desc {
  font-size: 11px;
  color: var(--rex-muted);
  margin-top: 1px;
}

.rex-promotion-progress {
  font-size: 12px;
  font-weight: 800;
  color: var(--rex-green);
}

.rex-promotion-item.pending .rex-promotion-progress {
  color: var(--rex-muted);
}

/* ---- 我的页面：撮合时间轴 ---- */
.rex-deal-timeline-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin: 12px 0;
}

.rex-deal-timeline {
  margin-top: 14px;
}

.rex-timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}

.rex-timeline-step:last-child {
  padding-bottom: 0;
}

.rex-timeline-step::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--rex-line);
}

.rex-timeline-step:last-child::before {
  display: none;
}

.rex-timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: #fff;
  border: 2px solid var(--rex-line);
  color: var(--rex-muted);
}

.rex-timeline-dot.done {
  background: #0d5b4d;
  border-color: #0d5b4d;
  color: #fff;
}

.rex-timeline-dot.rex-active {
  background: #c58d35;
  border-color: #c58d35;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(197,141,53,0.2);
}

.rex-timeline-content {
  flex: 1;
  padding-top: 2px;
}

.rex-timeline-content h4 {
  margin: 0 0 2px;
  font-size: 13px;
  color: var(--rex-muted);
}

.rex-timeline-content h4.rex-active {
  color: #c58d35;
  font-weight: 800;
}

.rex-timeline-content h4.done {
  color: #0d5b4d;
}

.rex-timeline-content p {
  margin: 0;
  font-size: 12px;
  color: var(--rex-muted);
}

.rex-timeline-content small {
  font-size: 11px;
  color: #aaa;
}

/* ---- 我的页面：收益记录 ---- */
.rex-earnings-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin: 12px 0;
}

.rex-earnings-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.rex-earnings-header-row p,
.rex-earnings-header-row h2 {
  margin: 0;
}

.rex-earnings-header-row h2 {
  font-size: 17px;
}

.rex-earnings-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.rex-earnings-summary-item {
  text-align: center;
  padding: 12px 6px;
  border-radius: 8px;
  background: #f8f9f7;
}

.rex-earnings-summary-item.b b {
  font-size: 20px;
  color: var(--rex-green);
}

.rex-earnings-summary-item.b span {
  display: block;
  font-size: 11px;
  color: var(--rex-muted);
  margin-top: 3px;
}

.rex-earnings-summary-item.gold {
  background: #fff8ec;
}

.rex-earnings-summary-item.gold b {
  font-size: 20px;
  color: #c58d35;
}

.rex-earnings-summary-item.gold span {
  display: block;
  font-size: 11px;
  color: #7b674d;
  margin-top: 3px;
}

.rex-earnings-records {
  border-top: 1px solid var(--rex-line);
  padding-top: 12px;
}

.rex-earnings-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed #e8ede9;
  font-size: 13px;
}

.rex-earnings-record-item:last-child {
  border-bottom: none;
}

.rex-earnings-record-item .rex-record-name {
  color: var(--rex-ink);
  font-weight: 700;
}

.rex-earnings-record-item .rex-record-date {
  font-size: 11px;
  color: var(--rex-muted);
  margin-top: 1px;
}

.rex-earnings-record-item .rex-record-amount {
  font-weight: 900;
  color: var(--rex-green);
  font-size: 15px;
}

.rex-earnings-record-item .rex-record-amount.pending {
  color: #c58d35;
}

.rex-earnings-empty {
  text-align: center;
  padding: 20px;
  color: var(--rex-muted);
  font-size: 13px;
}


/* ---- 适合度解读按钮 ---- */
.rex-fit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rex-green);
  border-radius: 999px;
  background: transparent;
  color: var(--rex-green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rex-fit-btn:hover {
  background: #edf2ef;
}

/* ---- 会员按钮金色渐变 ---- */
.rex-vip-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  background: linear-gradient(135deg, #c58d35, #e0a84a);
  font-weight: 800;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(197, 141, 53, 0.25);
}

.rex-vip-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(197, 141, 53, 0.35);
}

/* ---- 申请对接按钮 ---- */
.rex-apply-btn {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--rex-green);
  color: #fff;
  font-weight: 800;
  transition: all 0.2s ease;
}

.rex-apply-btn:hover {
  background: var(--rex-green-2);
  transform: scale(1.02);
}

/* ---- 匹配卡片合作亮点 ---- */
.rex-match-card .rex-needs span:first-child {
  color: #0d5b4d;
  font-weight: 700;
  font-size: 12px;
}

/* ---- 免费报告遮罩 ---- */
.rex-report-gradient-mask {
  display: none;
}

.rex-report-gradient-mask.visible {
  display: block;
}

/* ---- fix8: 今日交互补丁，覆盖 API 包旧样式 ---- */
#rex-auditDialog .rex-dialog-body {
  max-height: min(92vh, 760px);
  overflow-y: auto;
}

#rex-auditDialog .rex-stepper {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr;
  align-items: start;
  gap: 8px;
  margin: 14px 0 18px;
}

#rex-auditDialog .rex-step {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--rex-muted);
  text-align: center;
}

#rex-auditDialog .rex-step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf2ef;
  color: var(--rex-muted);
  font-weight: 900;
}

#rex-auditDialog .rex-step-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

#rex-auditDialog .rex-step-line {
  height: 2px;
  margin-top: 14px;
  background: var(--rex-line);
}

#rex-auditDialog .rex-step.rex-step-active .rex-step-number {
  background: var(--rex-green);
  color: #fff;
}

#rex-auditDialog .rex-step.rex-step-active .rex-step-label {
  color: var(--rex-green);
}

#rex-auditDialog .rex-step.rex-step-done .rex-step-number {
  background: var(--rex-gold);
  color: #fff;
}

#rex-auditDialog .rex-form-step {
  display: none;
}

#rex-auditDialog .rex-form-step.rex-step-active {
  display: block;
  animation: rex-fadeSlideIn 0.22s ease forwards;
}

#rex-auditDialog .rex-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

#rex-auditDialog .rex-step-actions .rex-submit-btn,
#rex-auditDialog .rex-step-actions .rex-step-next {
  margin-left: auto;
}

.rex-profile-info-head,
.rex-saved-rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rex-profile-info-head p,
.rex-saved-rec-head p {
  margin: 0 0 4px;
}

.rex-saved-rec-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.rex-saved-rec-list {
  display: grid;
  gap: 10px;
}

.rex-saved-rec-card {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.rex-saved-rec-card h3 {
  margin: 8px 0 6px;
  font-size: 16px;
}

.rex-saved-rec-card p {
  margin: 0 0 10px;
  color: var(--rex-muted);
  line-height: 1.6;
}

.rex-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.rex-edit-btn {
  border: 1px solid var(--rex-line);
  border-radius: 8px;
  padding: 11px 14px;
  background: #fff;
  color: var(--rex-green-2);
  font-weight: 800;
  white-space: nowrap;
}

.rex-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 9999;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgb(23 32 31 / 0.92);
  color: #fff;
  font-size: 13px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rex-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
