@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  --rr-primary:     #1b2259;
  --rr-accent:      #f96363;
  --rr-primary-light: #e8eaf6;
  --rr-accent-light:  #fff0f0;
  --rr-cream:       #f9f8ff;
  --rr-text:        #1b2259;
  --rr-text-light:  #6b7498;
  --rr-white:       #ffffff;
  --rr-radius:      16px;
  --rr-shadow:      0 6px 30px rgba(27,34,89,0.10);
  /* обратная совместимость */
  --rr-sage:        #1b2259;
  --rr-sage-dark:   #f96363;
  --rr-sage-light:  #e8eaf6;
  --rr-gold:        #f96363;
  --rr-gold-light:  #fff0f0;
}

.radamed-ref-wrap {
  font-family: 'Nunito', sans-serif;
  color: var(--rr-text);
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

/* HEADER */
.rr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1b2259 0%, #f96363 100%);
  border-radius: var(--rr-radius);
  padding: 32px 36px;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(27,34,89,0.30);
}
.rr-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.rr-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 6px;
  color: white;
  border: none;
}
.rr-subtitle { opacity: 0.9; font-size: 14px; margin: 0; }

/* LOGOUT BUTTON */
.rr-logout-btn {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.rr-logout-btn:hover { background: rgba(255,255,255,0.28); color: white; text-decoration: none; }

/* STATS */
.rr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.rr-stat-card {
  background: var(--rr-white);
  border-radius: var(--rr-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--rr-shadow);
  transition: transform 0.2s;
}
.rr-stat-card:hover { transform: translateY(-2px); }
.rr-stat-card.rr-ready {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 2px solid #81c784;
}
.rr-stat-icon { font-size: 28px; }
.rr-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--rr-sage-dark);
  line-height: 1;
}
.rr-stat-label { font-size: 11px; color: var(--rr-text-light); margin-top: 3px; }

/* PROGRESS */
.rr-progress-wrap {
  background: var(--rr-white);
  border-radius: var(--rr-radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--rr-shadow);
}
.rr-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--rr-text-light);
  margin-bottom: 10px;
  font-weight: 600;
}
.rr-progress-bar {
  background: var(--rr-sage-light);
  border-radius: 20px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}
.rr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b2259, #f96363);
  border-radius: 20px;
  transition: width 1s ease;
}
.rr-progress-ready { color: #2e7d32; font-size: 13px; font-weight: 600; margin: 0; }
.rr-progress-hint { color: var(--rr-text-light); font-size: 12px; margin: 0; }

/* TWO COLS */
.rr-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* CARDS */
.rr-card {
  background: var(--rr-white);
  border-radius: var(--rr-radius);
  padding: 28px;
  box-shadow: var(--rr-shadow);
  margin-bottom: 20px;
}
.rr-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  margin: 0 0 18px;
  color: var(--rr-text);
  border: none;
  padding: 0;
}

/* COUPON */
.rr-coupon-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--rr-sage-light);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.rr-coupon-code {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--rr-sage-dark);
  letter-spacing: 0.08em;
  flex: 1;
}
.rr-copy-btn {
  padding: 10px 18px;
  background: var(--rr-sage);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
}
.rr-copy-btn:hover { background: var(--rr-sage-dark); }
.rr-copy-btn.copied { background: #4caf50; }
.rr-coupon-hint { font-size: 13px; color: var(--rr-text-light); line-height: 1.6; margin-bottom: 16px; }

.rr-share-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rr-text-light); margin-bottom: 8px; }
.rr-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rr-share-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: white;
  transition: all 0.2s;
}
.rr-share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); color: white; }
.rr-tg { background: #229ed9; }
.rr-wa { background: #25d366; }
.rr-email { background: var(--rr-gold); }
.rr-fb { background: #1877f2; }
.rr-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.rr-tt { background: #010101; }
.rr-th { background: #101010; }

/* MESSAGE BOX */
.rr-message-wrap { margin-bottom: 18px; }
.rr-message-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rr-text-light); margin-bottom: 8px; }
.rr-message-box {
  background: var(--rr-sage-light);
  border: 1px solid rgba(122,158,142,0.3);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--rr-text);
  margin-bottom: 8px;
  user-select: all;
  cursor: pointer;
}
.rr-copy-msg-btn {
  width: 100%;
  padding: 10px;
  background: var(--rr-sage-light);
  color: var(--rr-sage-dark);
  border: 2px solid var(--rr-sage);
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.rr-copy-msg-btn:hover { background: var(--rr-sage); color: white; }
.rr-copy-msg-btn.copied { background: #4caf50; color: white; border-color: #4caf50; }
.rr-ig-note { font-size: 11px; color: var(--rr-text-light); margin-top: 10px; line-height: 1.4; }

/* PAYOUT */
.rr-payout-amount { font-size: 18px; margin-bottom: 14px; }
#radamed-payout-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--rr-text-light); }
#radamed-payout-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--rr-sage-light);
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
  margin-bottom: 12px;
  box-sizing: border-box;
}
#radamed-payout-form input:focus { border-color: var(--rr-sage); }
.rr-payout-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1b2259, #f96363);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.rr-payout-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.rr-payout-note { font-size: 11px; color: var(--rr-text-light); margin-top: 8px; text-align: center; }

/* ALERTS */
.rr-alert { padding: 14px 18px; border-radius: 10px; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.rr-alert-info { background: #e3f2fd; color: #1565c0; }
.rr-alert-warn { background: var(--rr-gold-light); color: #7d5a1e; }
.rr-alert-success { background: #e8f5e9; color: #2e7d32; }

/* PAYOUT HISTORY */
.rr-payout-history { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rr-sage-light); }
.rr-payout-history h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--rr-text-light); }

/* TABLE */
.rr-table-wrap { overflow-x: auto; }
.rr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rr-table th { text-align: left; padding: 10px 12px; background: var(--rr-sage-light); color: var(--rr-sage-dark); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.rr-table td { padding: 12px; border-bottom: 1px solid var(--rr-sage-light); }
.rr-table tbody tr:hover { background: #f9f9f9; }
.rr-commission { font-weight: 700; color: var(--rr-sage-dark); }
.rr-total-row { background: var(--rr-sage-light) !important; }
.rr-total-row td { font-size: 14px; padding: 14px 12px; }
.rr-table-hint { font-size: 12px; color: var(--rr-text-light); margin-bottom: 14px; }

/* BADGES */
.rr-badge-paid { background: #e8f5e9; color: #2e7d32; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.rr-badge-pending { background: #fff3e0; color: #e65100; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.rr-badge-rejected { background: #ffebee; color: #c62828; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.rr-badge-other { background: #f5f5f5; color: #666; padding: 3px 8px; border-radius: 6px; font-size: 11px; }

/* EMPTY STATE */
.rr-empty-state { text-align: center; padding: 50px 30px; }
.rr-empty-icon { font-size: 50px; margin-bottom: 14px; }
.rr-empty-state h3 { font-family: 'Playfair Display', serif; margin-bottom: 8px; }
.rr-empty-state p { color: var(--rr-text-light); }

/* HOW IT WORKS */
.rr-how-works {
  background: var(--rr-cream);
  border-radius: var(--rr-radius);
  padding: 28px;
  margin-bottom: 20px;
}
.rr-how-works h3 { font-family: 'Playfair Display', serif; font-size: 18px; margin-bottom: 20px; }
.rr-steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rr-step {
  flex: 1;
  min-width: 140px;
  text-align: center;
  background: white;
  border-radius: 12px;
  padding: 18px 14px;
  box-shadow: var(--rr-shadow);
}
.rr-step-num {
  width: 36px; height: 36px;
  background: var(--rr-sage-light);
  color: var(--rr-sage-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 auto 10px;
}
.rr-step p { font-size: 12px; color: var(--rr-text-light); line-height: 1.5; margin: 0; }
.rr-step-arrow { color: var(--rr-sage); font-size: 20px; flex-shrink: 0; }

/* Login notice (legacy) */
.radamed-login-notice {
  background: var(--rr-primary-light);
  padding: 20px 24px;
  border-radius: var(--rr-radius);
  text-align: center;
}

/* AUTH FORMS */
.rr-auth-wrap {
  max-width: 440px;
  margin: 40px auto;
  font-family: 'Nunito', sans-serif;
}
.rr-auth-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(27,34,89,0.13);
  overflow: hidden;
}
.rr-auth-logo {
  background: linear-gradient(135deg, #1b2259 0%, #f96363 100%);
  color: white;
  padding: 32px 36px 24px;
  text-align: center;
}
.rr-auth-logo .rr-auth-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.rr-auth-logo h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: white;
}
.rr-auth-logo p { opacity: 0.85; font-size: 13px; margin: 0; }

.rr-auth-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
}
.rr-auth-tab {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--rr-text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.rr-auth-tab.active { color: #1b2259; border-bottom-color: #f96363; }
.rr-auth-tab:hover  { color: #1b2259; }

.rr-auth-form { padding: 28px 36px 32px; }
.rr-field { margin-bottom: 16px; }
.rr-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--rr-text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rr-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eef0f8;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: #1b2259;
  outline: none;
  transition: border 0.2s;
  box-sizing: border-box;
}
.rr-field input:focus { border-color: #1b2259; }
.rr-auth-error {
  background: #fff0f0;
  color: #f96363;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.rr-auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1b2259 0%, #f96363 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  margin-top: 4px;
}
.rr-auth-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.rr-auth-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.rr-auth-note {
  font-size: 12px;
  color: var(--rr-text-light);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 700px) {
  .rr-stats { grid-template-columns: 1fr 1fr; }
  .rr-two-cols { grid-template-columns: 1fr; }
  .rr-header { flex-direction: column; gap: 16px; text-align: center; }
  .rr-steps { flex-direction: column; }
  .rr-step-arrow { transform: rotate(90deg); }
  .rr-auth-form { padding: 24px 20px; }
  .rr-auth-logo { padding: 24px 20px 20px; }
}

