/* booking_flow.css — UI مشترک ثبت‌نام و صورتحساب سهمیه */
:root {
  --rf-bg: #eef1f5;
  --rf-surface: #ffffff;
  --rf-surface-2: #f8f9fb;
  --rf-border: #e2e6ec;
  --rf-text: #1c2330;
  --rf-text-2: #5c6573;
  --rf-text-3: #8b95a3;
  --rf-primary: #1565a8;
  --rf-primary-light: #e8f2fb;
  --rf-accent: #4d8c1f;
  --rf-accent-light: #edf5e6;
  --rf-danger: #c73e3e;
  --rf-danger-light: #fdeeee;
  --rf-warn: #b45309;
  --rf-warn-light: #fef6e8;
  --rf-radius: 14px;
  --rf-radius-sm: 10px;
  --rf-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
  --rf-shadow-lg: 0 8px 30px rgba(16,24,40,.08);
  --rf-font: inherit;
  --rf-container-max: 1320px;
  --rf-sidebar-w: 360px;
  --rf-gap: 28px;
}

.rf-page {
  background: var(--rf-bg);
  min-height: 70vh;
  padding: 24px 0 48px;
  font-family: var(--rf-font);
  position: relative;
  z-index: 1;
}
.rf-container { max-width: var(--rf-container-max); margin: 0 auto; padding: 0 24px; }

/* ── هدر و استپر ── */
.rf-header { margin-bottom: 24px; position: relative; z-index: 0; }
.rf-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--rf-text-2);
  text-decoration: none; margin-bottom: 16px; transition: color .15s;
}
.rf-back:hover { color: var(--rf-primary); }
.rf-stepper {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--rf-surface); border-radius: var(--rf-radius);
  padding: 16px 20px; box-shadow: var(--rf-shadow); border: 1px solid var(--rf-border);
  position: relative; z-index: 0;
}
.rf-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--rf-text-3); white-space: nowrap;
}
.rf-step-label { white-space: nowrap; }
.rf-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--rf-surface-2);
  border: 2px solid var(--rf-border); color: var(--rf-text-3); flex-shrink: 0;
}
.rf-step--done { color: var(--rf-accent); }
.rf-step--done .rf-step-num { background: var(--rf-accent-light); border-color: var(--rf-accent); color: var(--rf-accent); }
.rf-step--active { color: var(--rf-primary); font-weight: 700; }
.rf-step--active .rf-step-num { background: var(--rf-primary); border-color: var(--rf-primary); color: #fff; }
.rf-step-connector { flex: 1; height: 2px; background: var(--rf-border); margin: 0 12px; min-width: 24px; max-width: 80px; }
.rf-step--done + .rf-step-connector { background: var(--rf-accent); opacity: .4; }

/* ── گرید ── */
.rf-grid { display: grid; grid-template-columns: var(--rf-sidebar-w) 1fr; gap: var(--rf-gap); align-items: start; }
.rf-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rf-sidebar { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 20px; z-index: 2; }

/* ── پنل ── */
.rf-panel {
  background: var(--rf-surface); border-radius: var(--rf-radius);
  border: 1px solid var(--rf-border); box-shadow: var(--rf-shadow); overflow: hidden;
}
.rf-panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--rf-border);
  background: var(--rf-surface-2);
}
.rf-panel-head--brand {
  background: linear-gradient(135deg, #1565a8 0%, #1a7bc4 100%);
  color: #fff; border-bottom: none;
}
.rf-panel-head--brand .rf-panel-label { color: rgba(255,255,255,.75); }
.rf-panel-head--brand .rf-panel-title { color: #fff; }
.rf-panel-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--rf-text-3); margin-bottom: 4px; }
.rf-panel-title { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.4; color: var(--rf-text); }
.rf-panel-sub { font-size: 12px; color: var(--rf-text-2); margin: 4px 0 0; }
.rf-panel-head--brand .rf-panel-sub { color: rgba(255,255,255,.8); }
.rf-panel-body { padding: 20px; }

/* ── بازه اقامت ── */
.rf-dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.rf-date-box {
  text-align: center; padding: 12px 8px; border-radius: var(--rf-radius-sm);
  background: var(--rf-surface-2); border: 1px solid var(--rf-border);
}
.rf-date-box--in { border-bottom: 3px solid var(--rf-accent); }
.rf-date-box--out { border-bottom: 3px solid var(--rf-danger); }
.rf-date-label { font-size: 10px; font-weight: 700; color: var(--rf-text-3); display: block; margin-bottom: 4px; }
.rf-date-box--in .rf-date-label { color: var(--rf-accent); }
.rf-date-box--out .rf-date-label { color: var(--rf-danger); }
.rf-date-val { font-size: 15px; font-weight: 800; color: var(--rf-text); display: block; }
.rf-date-day { font-size: 10px; color: var(--rf-text-3); }
.rf-date-mid {
  font-size: 11px; font-weight: 700; color: var(--rf-primary);
  background: var(--rf-primary-light); padding: 6px 12px; border-radius: 20px; white-space: nowrap;
}

/* ── قیمت ── */
.rf-price-box {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 16px; border-radius: var(--rf-radius-sm);
  background: var(--rf-accent-light); border: 1px solid #c5ddb0; margin-top: 16px;
}
.rf-price-label { font-size: 12px; font-weight: 600; color: var(--rf-accent); }
.rf-price-val { font-size: 18px; font-weight: 800; color: #2d5016; }
.rf-price-val small { font-size: 11px; font-weight: 500; }

.rf-hints { list-style: none; margin: 16px 0 0; padding: 0; }
.rf-hints li {
  font-size: 11px; color: var(--rf-text-3); padding: 8px 0;
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.5;
  border-top: 1px solid var(--rf-border);
}
.rf-hints li i { color: var(--rf-primary); margin-top: 2px; width: 14px; text-align: center; }

/* ── اعلان ── */
.rf-alert {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--rf-radius-sm);
  font-size: 13px; line-height: 1.6; margin-bottom: 16px; border: 1px solid;
}
.rf-alert i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.rf-alert--info { background: var(--rf-primary-light); border-color: #b8d4f0; color: var(--rf-primary); }
.rf-alert--warn, .rf-alert--warning { background: var(--rf-warn-light); border-color: #f0d9a8; color: var(--rf-warn); }
.rf-alert--danger { background: var(--rf-danger-light); border-color: #f0b8b8; color: var(--rf-danger); }
.rf-alert--success { background: var(--rf-accent-light); border-color: #c5ddb0; color: var(--rf-accent); }

/* ── بخش فرم ── */
.rf-section { padding: 28px 32px; border-bottom: 1px solid var(--rf-border); }
.rf-section:last-child { border-bottom: none; }
.rf-section-head { margin-bottom: 18px; }
.rf-section-title { font-size: 15px; font-weight: 700; color: var(--rf-text); margin: 0 0 4px; }
.rf-section-desc { font-size: 12px; color: var(--rf-text-3); margin: 0; }

.rf-field { margin-bottom: 0; }
.rf-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--rf-text-2);
  margin-bottom: 6px;
}
.rf-label-opt { font-weight: 400; color: var(--rf-text-3); }
.rf-input {
  width: 100%; padding: 11px 14px; font-size: 14px; color: var(--rf-text);
  background: var(--rf-surface); border: 1.5px solid var(--rf-border);
  border-radius: var(--rf-radius-sm); transition: border-color .15s, box-shadow .15s;
}
.rf-input:focus {
  outline: none; border-color: var(--rf-primary);
  box-shadow: 0 0 0 3px rgba(21,101,168,.12);
}
.rf-input-hint { font-size: 11px; margin-top: 5px; min-height: 16px; font-weight: 500; }
.rf-input-hint--ok { color: var(--rf-accent); }
.rf-input-hint--err { color: var(--rf-danger); }

/* امکانات — کنترل تعداد */
.rf-amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.rf-amenity {
  border: 1.5px solid var(--rf-border); border-radius: var(--rf-radius-sm);
  padding: 14px 10px; text-align: center; background: var(--rf-surface-2);
  transition: border-color .15s;
}
.rf-amenity:focus-within { border-color: var(--rf-primary); }
.rf-amenity-icon { font-size: 20px; color: var(--rf-primary); margin-bottom: 6px; display: block; }
.rf-amenity-name { font-size: 11px; font-weight: 600; color: var(--rf-text-2); display: block; margin-bottom: 8px; line-height: 1.35; }
.rf-amenity .rf-input { text-align: center; font-weight: 700; font-size: 16px; padding: 8px; }

.rf-section--admin { background: var(--rf-surface-2); }

/* ── کپچا ── */
.rf-section--captcha {
  background: linear-gradient(180deg, var(--rf-primary-light) 0%, var(--rf-surface) 100%);
}
.rf-section--captcha .rf-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rf-captcha-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--rf-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.rf-captcha-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--rf-radius-sm);
  border: 1.5px solid #c9daf0;
  background: rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.rf-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
}
.rf-captcha-frame {
  flex: 0 0 auto;
  width: 240px;
  max-width: 42%;
  height: 48px;
  border-radius: var(--rf-radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--rf-border);
  background: #fff;
  box-shadow: var(--rf-shadow);
  line-height: 0;
}
.rf-captcha-frame img {
  display: block;
  width: 100%;
  height: 48px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity .15s;
}
.rf-captcha-frame img:hover { opacity: .92; }
.rf-captcha-input {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  height: 48px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .22em;
  text-align: center;
  padding: 0 12px;
  font-variant-numeric: tabular-nums;
}
.rf-captcha-input::placeholder {
  letter-spacing: .12em;
  font-weight: 500;
  color: #c5cdd8;
}
.rf-captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 48px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--rf-primary);
  background: var(--rf-surface);
  border: 1.5px solid #b8d4f0;
  border-radius: var(--rf-radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.rf-captcha-refresh:hover {
  background: var(--rf-primary-light);
  border-color: var(--rf-primary);
}
.rf-captcha-refresh:active { transform: scale(.98); }
.rf-captcha-refresh.is-loading i { animation: rf-captcha-spin .65s linear; }
@keyframes rf-captcha-spin { to { transform: rotate(360deg); } }
.rf-captcha-hint {
  color: var(--rf-text-3);
  margin: 0;
  text-align: center;
  line-height: 1.55;
  font-size: 11px;
}

/* فوتر فرم */
.rf-form-foot {
  padding: 24px 32px; background: var(--rf-surface-2);
  border-top: 1px solid var(--rf-border);
}
.rf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 16px;
  width: 100%;
  font-size: 13px;
  line-height: 1.6;
  color: var(--rf-text);
  font-weight: 400;
  text-align: right;
}
.rf-check-input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 1px 0 0 0;
  flex-shrink: 0;
  accent-color: var(--rf-accent);
  cursor: pointer;
}
.rf-check-text {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  font-size: 13px;
  color: var(--rf-text);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.rf-check-link {
  color: var(--rf-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.rf-check-link:hover { text-decoration: underline; }

/* دکمه‌ها */
.rf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; border: none; border-radius: var(--rf-radius-sm);
  padding: 12px 24px; cursor: pointer; text-decoration: none; transition: all .15s;
  font-family: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.rf-btn--primary { background: var(--rf-primary); color: #fff; }
.rf-btn--primary:hover { background: #125691; color: #fff; }
.rf-btn--accent {
  background: var(--rf-accent); color: #fff; width: 100%;
  min-height: 50px; font-size: 15px; font-weight: 700; border-radius: var(--rf-radius-sm);
  box-shadow: 0 4px 14px rgba(77,140,31,.25);
}
.rf-btn--accent:hover { background: #3d7219; color: #fff; transform: translateY(-1px); }
.rf-btn--accent:disabled, .rf-btn--accent.rf-btn--busy { opacity: .7; pointer-events: none; transform: none; }
.rf-btn--pay { width: auto; min-width: 240px; }
.rf-btn--outline { background: var(--rf-surface); color: var(--rf-primary); border: 1.5px solid var(--rf-primary); }
.rf-btn--outline:hover { background: var(--rf-primary-light); color: var(--rf-primary); }
.rf-btn--lg { padding: 14px 32px; font-size: 15px; }
.rf-btn--sm { padding: 8px 16px; font-size: 13px; }

/* موبایل — نوار ثابت پایین (مستقیم روی viewport، بالاتر از فوتر سایت) */
.rf-sticky-bar {
  display: none;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  z-index: 2147483000;
  background: #fff;
  border-top: 1px solid var(--rf-border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 28px rgba(0, 0, 0, .14);
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  isolation: isolate;
}
.rf-sticky-bar .rf-check {
  margin-bottom: 0;
  display: flex !important;
  width: 100% !important;
  font-size: 13px !important;
  color: #1c2330 !important;
}
.rf-sticky-bar .rf-check-input {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
}
.rf-sticky-bar .rf-check-text {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 13px !important;
  color: #1c2330 !important;
  line-height: 1.6 !important;
}
.rf-sticky-bar .rf-check-link {
  color: #1565a8 !important;
  font-size: 13px !important;
}
.rf-sticky-bar .rf-btn--accent { margin: 0; min-height: 50px; font-size: 15px; flex-shrink: 0; }

/* فضای رزرو نوار ثابت — فقط موبایل (روی دسکتاپ نوار مخفی است و پدینگ سفید می‌سازد) */
body.rf-has-sticky-action,
body.rf-has-sticky-pay {
  padding-bottom: 0 !important;
}
@media (max-width: 860px) {
  body.rf-has-sticky-action {
    padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.rf-has-sticky-pay {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* فوتر سایت نباید روی نوار ثابت بیفتد */
@media (max-width: 860px) {
  body.rf-has-sticky-action footer,
  body.rf-has-sticky-action .footer,
  body.rf-has-sticky-action #footer,
  body.rf-has-sticky-action .footer-area,
  body.rf-has-sticky-action .footer-bottom,
  body.rf-has-sticky-action .site-footer,
  body.rf-has-sticky-pay footer,
  body.rf-has-sticky-pay .footer,
  body.rf-has-sticky-pay #footer,
  body.rf-has-sticky-pay .footer-area,
  body.rf-has-sticky-pay .footer-bottom,
  body.rf-has-sticky-pay .site-footer {
    position: static !important;
    z-index: auto !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

/* جلوگیری از تداخل CSS سراسری سایت با لیبل چک‌باکس */
.rf-page label.rf-check,
.rf-sticky-bar label.rf-check {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #1c2330 !important;
  overflow: visible !important;
}
.rf-page label.rf-check .rf-check-text,
.rf-sticky-bar label.rf-check .rf-check-text {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  width: auto !important;
  max-width: none !important;
  text-indent: 0 !important;
  clip: auto !important;
  position: static !important;
}

/* مودال — جلوگیری از نمایش ناخواسته در جریان صفحه */
.rf-modal.modal:not(.show) { display: none !important; }

/* فرم — گرید فیلدها */
.rf-form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.rf-form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rf-form-grid .rf-field--full { grid-column: 1 / -1; }

/* ── صفحات وضعیت ── */
.rf-state-card {
  text-align: center; padding: 56px 32px; max-width: 420px; margin: 48px auto;
  background: var(--rf-surface); border-radius: var(--rf-radius); box-shadow: var(--rf-shadow);
}
.rf-state-icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.rf-state-icon--ok { color: var(--rf-accent); }
.rf-state-icon--err { color: var(--rf-danger); }
.rf-state-icon--warn { color: var(--rf-warn); }
.rf-state-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--rf-text); }
.rf-state-desc { font-size: 14px; color: var(--rf-text-2); margin: 0 0 24px; line-height: 1.6; }

.rf-state-card--pending {
  max-width: 520px;
  text-align: center;
  padding: 36px 28px 28px;
}
.rf-state-card--pending .rf-state-desc {
  margin-bottom: 18px;
}
.rf-pending-card {
  text-align: right;
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-sm);
  padding: 16px 16px 14px;
  margin: 0 0 18px;
}
.rf-pending-card__kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rf-warn);
}
.rf-pending-meta { display: flex; flex-direction: column; gap: 8px; }
.rf-pending-meta__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.rf-pending-meta__row span {
  color: var(--rf-text-3);
  flex: 0 0 auto;
  min-width: 88px;
}
.rf-pending-meta__row strong {
  color: var(--rf-text);
  font-weight: 600;
  text-align: left;
  flex: 1 1 auto;
}
.rf-pending-meta__row--deadline strong { color: var(--rf-warn); font-variant-numeric: tabular-nums; }
.rf-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.rf-pending-actions .rf-btn {
  flex: 1 1 180px;
  justify-content: center;
  min-height: 42px;
}
.rf-pending-cancel { margin: 0; flex: 1 1 180px; display: flex; }
.rf-pending-cancel .rf-btn { width: 100%; }
.rf-state-card--pending .rf-btn--ghost,
.rf-pending-back {
  display: inline-flex;
  margin-top: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--rf-text-2);
  font-size: 13px;
}
.rf-lookup-box {
  text-align: right;
  margin: 0 0 18px;
  padding: 16px;
  background: var(--rf-surface-2);
  border-radius: var(--rf-radius-sm);
  border: 1px solid var(--rf-border);
}
.rf-lookup-box .rf-label { display: block; margin-bottom: 8px; }
.rf-lookup-box .rf-input { margin-bottom: 12px; }

@media (max-width: 480px) {
  .rf-state-card--pending { padding: 28px 16px 20px; }
  .rf-pending-meta__row { flex-direction: column; gap: 2px; }
  .rf-pending-meta__row span { min-width: 0; }
  .rf-pending-meta__row strong { text-align: right; }
}

/* ── صورتحساب: پروفایل ── */
.rf-profile { display: flex; gap: 14px; align-items: center; }
.rf-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--rf-primary-light); flex-shrink: 0;
}
.rf-profile-name { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.rf-profile-meta { font-size: 12px; color: var(--rf-text-2); margin: 0 0 2px; }
.rf-profile-meta i { width: 16px; color: var(--rf-text-3); margin-left: 4px; }
.rf-ref-id {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding: 10px 14px; background: var(--rf-surface-2);
  border-radius: var(--rf-radius-sm); font-size: 12px;
}
.rf-ref-id strong { color: var(--rf-primary); font-size: 14px; }

/* وضعیت و تایمر */
.rf-status-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.rf-status-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.rf-status-label { color: var(--rf-text-3); font-weight: 500; }
.rf-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.rf-pill--ok { background: var(--rf-accent-light); color: var(--rf-accent); }
.rf-pill--warn { background: var(--rf-warn-light); color: var(--rf-warn); }
.rf-pill--no { background: var(--rf-danger-light); color: var(--rf-danger); }

.rf-timer {
  text-align: center; padding: 16px; border-radius: var(--rf-radius-sm);
  background: var(--rf-danger-light); border: 1px solid #f0c0c0; margin-top: 12px;
}
.rf-timer-label { font-size: 11px; font-weight: 600; color: var(--rf-danger); display: block; margin-bottom: 6px; }
.rf-timer-val { font-size: 16px; font-weight: 800; color: var(--rf-danger); line-height: 1.5; }

/* جمع کل */
.rf-total-panel {
  background: linear-gradient(160deg, #1a5a96 0%, #1565a8 100%);
  color: #fff; border: none;
}
.rf-total-panel .rf-panel-body { padding: 20px; }
.rf-total-label { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.rf-total-amount { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.rf-total-amount small { font-size: 12px; font-weight: 500; opacity: .8; }
.rf-total-lines { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.rf-total-lines li {
  display: flex; justify-content: space-between; padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,.15); opacity: .9;
}
.rf-total-lines .rf-muted { text-decoration: line-through; opacity: .6; }
.rf-total-lines .rf-disc { color: #ffc9c9; }
.rf-total-lines .rf-debt-line { color: #ffc9c9; font-weight: 700; }
.rf-total-lines .rf-pay-breakdown-total {
  font-weight: 800; font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.35) !important;
  margin-top: 4px; padding-top: 10px !important;
}
.rf-total-lines .rf-extra-reason {
  justify-content: flex-start; align-items: flex-start; gap: 7px;
  font-size: 10px; line-height: 1.7; opacity: .82;
}
.rf-total-lines .rf-extra-reason i { margin-top: 3px; flex-shrink: 0; }
.rf-pay-breakdown { margin-top: 8px; }
.rf-gateway-breakdown {
  list-style: none; margin: 14px 0 0; padding: 12px 14px;
  background: var(--rf-surface-2); border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-sm); font-size: 13px; text-align: right;
}
.rf-gateway-breakdown li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: 1px dashed var(--rf-border);
}
.rf-gateway-breakdown li:last-child { border-bottom: none; }
.rf-gateway-breakdown .rf-debt-line { color: var(--rf-danger); font-weight: 700; }
.rf-gateway-breakdown .rf-pay-breakdown-total {
  font-weight: 800; color: var(--rf-text); padding-top: 8px; margin-top: 4px;
  border-top: 2px solid var(--rf-border);
}
.rf-pay-debt-note {
  margin: 12px 0 0; padding: 10px 12px; font-size: 12px; line-height: 1.6;
  background: rgba(255,255,255,.12); border-radius: var(--rf-radius-sm);
  border: 1px solid rgba(255,255,255,.2);
}
.rf-pay-debt-note--inline {
  margin: 10px 0 0; text-align: center; width: 100%;
  background: var(--rf-surface-2); color: var(--rf-text-2);
  border-color: var(--rf-border);
}
.rf-debt-line { color: var(--rf-danger); font-weight: 700; }

/* جدول */
.rf-table-wrap { padding: 0 20px 20px; overflow-x: auto; }
.rf-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.rf-table th {
  text-align: right; padding: 10px 12px; font-size: 11px; font-weight: 600;
  color: var(--rf-text-3); text-transform: uppercase; letter-spacing: .3px;
  border-bottom: 2px solid var(--rf-border); background: var(--rf-surface-2);
}
.rf-table td { padding: 12px; border-bottom: 1px solid var(--rf-border); color: var(--rf-text); }
.rf-table tr:last-child td { border-bottom: none; }
.rf-td-id { color: var(--rf-primary); font-weight: 700; font-size: 12px; }
.rf-td-price { font-weight: 700; white-space: nowrap; }
.rf-days-tag {
  font-size: 11px; font-weight: 600; color: var(--rf-primary);
  background: var(--rf-primary-light); padding: 3px 10px; border-radius: 12px;
}

/* خدمات اضافی */
.rf-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 0 20px 16px; }
.rf-extra-item {
  padding: 14px; border: 1px solid var(--rf-border); border-radius: var(--rf-radius-sm);
  background: var(--rf-surface-2);
}
.rf-extra-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.rf-extra-top i { color: var(--rf-primary); }
.rf-extra-meta { font-size: 11px; color: var(--rf-text-3); display: flex; flex-wrap: wrap; gap: 8px; }
.rf-extra-meta strong { color: var(--rf-text); margin-right: auto; }
.rf-companions {
  display: flex; gap: 12px; margin: 0 20px 16px; padding: 14px;
  background: var(--rf-accent-light); border-radius: var(--rf-radius-sm); border: 1px solid #c5ddb0;
}
.rf-companions i { font-size: 20px; color: var(--rf-accent); }
.rf-companions p { margin: 4px 0 0; font-size: 13px; color: var(--rf-text-2); }

/* اکشن پرداخت */
.rf-pay-zone { padding: 20px; }
.rf-pay-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.rf-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: var(--rf-radius-sm); font-size: 14px; font-weight: 600; width: 100%;
}
.rf-banner--ok { background: var(--rf-accent-light); color: var(--rf-accent); }
.rf-banner--no { background: var(--rf-danger-light); color: var(--rf-danger); }
.rf-sms-zone { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rf-border); }

/* مودال */
.rf-modal .modal-content { border: none; border-radius: var(--rf-radius); overflow: hidden; }
.rf-modal .modal-header { background: var(--rf-surface-2); border-bottom: 1px solid var(--rf-border); }
.rf-modal .modal-title { font-size: 16px; font-weight: 700; }
.rf-modal .modal-body { padding: 24px; line-height: 1.85; font-size: 14px; }

/* لیست سهمیه — هماهنگ با جریان رزرو */
.lbqp-page.rf-page { padding-top: 16px; }
.lbqp-stepper { margin-bottom: 20px; }

/* ── سازگاری با منوی اصلی سایت (جلوگیری از رفتن dropdown زیر محتوا) ── */
header,
.navbar,
nav.navbar,
.site-header,
#main-header,
.header-area,
.top-header {
  position: relative;
  z-index: 1030 !important;
  overflow: visible !important;
}

header nav,
.navbar-collapse,
.navbar-nav,
.nav-menu {
  overflow: visible !important;
}

.dropdown-menu,
.navbar .dropdown-menu,
.nav-item .dropdown-menu,
header .dropdown-menu,
.sub-menu,
.menu-item-has-children > ul {
  z-index: 1050 !important;
}

body > .dropdown-menu,
body > .popover {
  z-index: 1055 !important;
}

/* فوتر سایت زیر نوار ثابت رزرو */
footer,
.footer,
.site-footer,
#footer,
.main-footer,
.footer-area,
.footer-bottom {
  position: relative;
  z-index: 1 !important;
}

/* دسکتاپ — فقط فوتر فرم، بدون نوار ثابت */
@media (min-width: 861px) {
  .rf-sticky-bar { display: none !important; }
  .rf-form-foot--desktop { display: block; }
}

/* ریسپانسیو — دسکتاپ بزرگ */
@media (min-width: 1440px) {
  :root {
    --rf-container-max: 1320px;
    --rf-sidebar-w: 380px;
    --rf-gap: 32px;
  }
  .rf-section { padding: 32px 40px; }
  .rf-form-foot { padding: 28px 40px; }
  .rf-panel-title { font-size: 18px; }
}

/* تبلت */
@media (max-width: 1024px) {
  :root { --rf-sidebar-w: 320px; --rf-gap: 20px; }
  .rf-container { padding: 0 20px; }
}

/* تبلت عمودی — فرم دو ستونه */
@media (min-width: 600px) and (max-width: 860px) {
  .rf-form-grid { grid-template-columns: repeat(2, 1fr); }
  .rf-form-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* موبایل و تبلت عمودی */
@media (max-width: 860px) {
  .rf-grid { grid-template-columns: 1fr; gap: 16px; }
  .rf-sidebar { position: static; gap: 12px; }
  .rf-step-connector { display: none; }
  .rf-stepper {
    gap: 20px; justify-content: center; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 14px 16px;
  }
  .rf-stepper::-webkit-scrollbar { display: none; }
  .rf-sticky-bar { display: flex; }
  .rf-form-foot--desktop { display: none !important; }
  .rf-pay-zone .rf-pay-form .rf-btn--accent { display: none; }
  .rf-page { padding: 16px 0 24px; }
  .rf-panel { overflow: visible; }
  .rf-container { padding: 0 14px; }
  .rf-header { margin-bottom: 16px; }
  .rf-panel { border-radius: 12px; }
  .rf-panel-body { padding: 16px; }
  .rf-section { padding: 18px 16px; }
  .rf-captcha-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  .rf-captcha-frame {
    width: 100%;
    max-width: none;
    height: 52px;
  }
  .rf-captcha-frame img { height: 52px; }
  .rf-captcha-input {
    flex: 1 1 100%;
    max-width: none;
    height: 48px;
    font-size: 16px;
  }
  .rf-captcha-refresh {
    flex: 1 1 auto;
    min-width: 120px;
  }
  .rf-form-foot { padding: 16px; }
  .rf-input, .rf-btn, select.rf-input, textarea.rf-input { font-size: 16px; }
  .rf-input { padding: 13px 14px; min-height: 48px; }
  .rf-amenity .rf-input { min-height: 44px; }
  .rf-pay-form { flex-direction: column; align-items: stretch; }
  .rf-pay-form .rf-btn--outline { width: 100%; min-height: 48px; }
  .rf-btn--pay { width: 100%; min-width: 0; }
  .rf-profile { gap: 12px; }
  .rf-total-amount { font-size: 22px; }
  .rf-status-row { flex-wrap: wrap; gap: 6px; }
  .rf-alert { margin-bottom: 12px; font-size: 12px; padding: 12px 14px; }
  .rf-table-wrap { padding: 0 12px 16px; }
  .rf-extras { padding: 0 12px 12px; grid-template-columns: 1fr; }
  .rf-companions { margin: 0 12px 12px; }
  .rf-pay-zone { padding: 16px; }
  .rf-hints li { font-size: 12px; }
}

/* موبایل — جدول کارتی */
@media (max-width: 640px) {
  .rf-table thead { display: none; }
  .rf-table, .rf-table tbody, .rf-table tr, .rf-table td { display: block; width: 100%; }
  .rf-table tr {
    margin-bottom: 10px; padding: 14px;
    border: 1px solid var(--rf-border); border-radius: var(--rf-radius-sm);
    background: var(--rf-surface-2);
  }
  .rf-table td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 7px 0; border-bottom: none;
    font-size: 13px; text-align: left;
  }
  .rf-table td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 600; color: var(--rf-text-3);
    flex-shrink: 0;
  }
  .rf-table td:first-child { font-weight: 600; padding-top: 0; }
  .rf-table td:last-child { padding-bottom: 0; }
  .rf-td-price { font-size: 14px; }
}

/* موبایل کوچک */
@media (max-width: 599px) {
  .rf-form-grid, .rf-form-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .rf-container { padding: 0 10px; }
  .rf-step-label { display: none; }
  .rf-stepper { gap: 28px; padding: 12px; }
  .rf-step-num { width: 32px; height: 32px; font-size: 13px; }
  .rf-amenities { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rf-date-val { font-size: 13px; }
  .rf-date-box { padding: 10px 6px; }
  .rf-date-mid { font-size: 10px; padding: 5px 8px; }
  .rf-price-val { font-size: 16px; }
  .rf-panel-head--brand { padding: 14px 16px; }
  .rf-panel-title { font-size: 15px; }
  .rf-check-text { font-size: 12px; }
  .rf-state-card { padding: 40px 20px; margin: 24px auto; }
}

/* صفحه انتقال به درگاه و وضعیت پرداخت */
.rf-gateway-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(165deg, #eef1f5 0%, #e8f2fb 45%, #edf5e6 100%);
}
.rf-gateway-card {
  width: 100%;
  max-width: 440px;
  background: var(--rf-surface);
  border-radius: var(--rf-radius);
  box-shadow: var(--rf-shadow-lg);
  padding: 32px 28px;
  text-align: center;
}
.rf-gateway-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: var(--rf-primary-light);
  color: var(--rf-primary);
}
.rf-gateway-icon--ok { background: var(--rf-accent-light); color: var(--rf-accent); }
.rf-gateway-icon--err { background: var(--rf-danger-light); color: var(--rf-danger); }
.rf-gateway-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; color: var(--rf-text); }
.rf-gateway-desc { font-size: 14px; color: var(--rf-text-2); line-height: 1.7; margin: 0 0 20px; }
.rf-gateway-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
  font-size: 15px;
  font-weight: 700;
  color: var(--rf-text);
  margin-bottom: 22px;
}
.rf-gateway-amount small { font-size: 12px; font-weight: 500; color: var(--rf-text-3); }
.rf-gateway-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 3px solid var(--rf-border);
  border-top-color: var(--rf-primary);
  border-radius: 50%;
  animation: rf-spin .85s linear infinite;
}
@keyframes rf-spin { to { transform: rotate(360deg); } }
.rf-gateway-hints {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
  font-size: 12px;
  color: var(--rf-text-3);
  line-height: 1.8;
}
.rf-gateway-hints li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.rf-gateway-hints i { color: var(--rf-primary); margin-top: 3px; flex-shrink: 0; }
.rf-pay-result { max-width: 560px; margin: 0 auto; }
.rf-pay-result .rf-state-card { margin: 32px auto; max-width: none; }
.rf-pay-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 14px;
  border-radius: var(--rf-radius-sm);
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
  font-size: 13px;
  color: var(--rf-text-2);
  text-align: right;
}
.rf-pay-meta strong { color: var(--rf-text); font-weight: 600; }

.rf-gateway-page--full { align-items: flex-start; padding-top: 28px; }
.rf-gateway-shell { width: 100%; max-width: var(--rf-container-max, 1320px); margin: 0 auto; }
.rf-page--pay { padding-top: 20px; padding-bottom: 40px; }
.rf-header--pay .rf-back { margin-bottom: 10px; }
.rf-header--pay { margin-bottom: 12px; }
.rf-header--pay .rf-pay-page-title { margin-top: 0; }
.rf-pay-page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--rf-text);
}
.rf-stepper--pay { margin-bottom: 24px; }
.rf-pay-layout {
  display: grid;
  grid-template-columns: 1fr min(320px, 34%);
  gap: var(--rf-gap, 28px);
  align-items: start;
}
.rf-pay-main { min-width: 0; }
.rf-pay-aside { position: sticky; top: 20px; }
.rf-pay-summary .rf-panel-body { display: grid; gap: 14px; }
.rf-pay-summary .rf-dates.rf-pay-summary-dates { margin: 0; }
.rf-pay-summary .rf-pay-summary-arrow {
  align-self: center;
  color: var(--rf-text-3);
  font-size: 12px;
}
.rf-ref-id--pay { margin: 0; }
.rf-ref-id--inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: var(--rf-radius-sm);
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
}
.rf-total-panel--compact {
  margin: 0;
  box-shadow: none;
  border: 1px solid var(--rf-border);
}
.rf-total-panel--compact .rf-panel-body { padding: 14px 16px; }
.rf-timer--static {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--rf-radius-sm);
  background: var(--rf-warn-light);
  border: 1px solid #f0d9a8;
}
.rf-timer-val--text { font-size: 13px; font-weight: 700; color: var(--rf-warn); }
.rf-pay-note { margin: 0 0 20px; text-align: right; max-width: 420px; margin-inline: auto; }
.rf-state-card--pay.rf-state-card--err { border-top: 4px solid var(--rf-danger); }
.rf-state-card--pay.rf-state-card--warn { border-top: 4px solid var(--rf-warn); }
.rf-state-card--pay.rf-state-card--ok { border-top: 4px solid var(--rf-accent); }
.rf-state-card--pay .rf-state-desc { max-width: 480px; margin-inline: auto; }
.rf-gateway-icon--pulse {
  position: relative;
  animation: rf-pulse-ring 2s ease-out infinite;
}
@keyframes rf-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(21,101,168,.35); }
  70% { box-shadow: 0 0 0 14px rgba(21,101,168,0); }
  100% { box-shadow: 0 0 0 0 rgba(21,101,168,0); }
}
.rf-pay-summary-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--rf-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rf-pay-summary-name i { color: var(--rf-primary); }
.rf-pay-summary-dates {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.rf-pay-summary-dates span { display: grid; gap: 2px; text-align: center; }
.rf-pay-summary-dates small { font-size: 11px; color: var(--rf-text-3); }
.rf-pay-summary-dates strong { font-size: 13px; color: var(--rf-text); }
.rf-pay-summary-arrow { color: var(--rf-text-3); font-size: 12px; }
.rf-pay-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px dashed var(--rf-border);
  font-size: 14px;
  color: var(--rf-text-2);
}
.rf-pay-summary-total strong { font-size: 18px; color: var(--rf-primary); }
.rf-pay-summary-total strong small { font-size: 12px; font-weight: 500; color: var(--rf-text-3); }
.rf-pay-summary-deadline {
  margin: 0;
  font-size: 12px;
  color: var(--rf-warn);
  display: flex;
  align-items: center;
  gap: 6px;
}
.rf-pay-state-panel { overflow: hidden; }
.rf-state-card--pay {
  margin: 0;
  max-width: none;
  box-shadow: none;
  border-radius: 0;
  padding: 40px 32px;
}
.rf-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.rf-pay-actions .rf-btn { min-width: 180px; }
.rf-gateway-panel { overflow: hidden; }
.rf-gateway-card--inline {
  max-width: none;
  box-shadow: none;
  border-radius: 0;
  padding: 36px 32px 28px;
}
.rf-gateway-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--rf-border);
  overflow: hidden;
  margin: 0 auto 18px;
  max-width: 280px;
}
.rf-gateway-progress-bar {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rf-primary), var(--rf-accent));
  animation: rf-progress-slide 1.2s ease-in-out infinite;
}
@keyframes rf-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.rf-gateway-status {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rf-primary);
}
.rf-bank-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.rf-bank-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--rf-text-2);
}
.rf-bank-trust i { color: var(--rf-primary); }
.rf-hidden { display: none !important; }
.rf-page--calendar { padding-top: 16px; padding-bottom: 56px; }
.rf-grid--calendar { align-items: start; }
.rf-panel--calendar .rf-panel-body { padding: 16px 20px 20px; }
.rf-calendar-wrap { min-height: 400px; margin-bottom: 16px; }
.rf-calendar-wrap .fc { font-family: var(--rf-font, inherit); }
.rf-calendar-wrap .fc-toolbar-title { font-size: 15px !important; font-weight: 700; }
.rf-calendar-wrap .fc-button { font-size: 12px !important; padding: 4px 10px !important; }
.rf-calendar-wrap .fc-daygrid-day-number { font-size: 12px; padding: 4px; }
.rf-date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr min(100px, 22%);
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--rf-border);
}
.rf-field--narrow { min-width: 0; }
.rf-input--center { text-align: center; font-weight: 700; }
.rf-gallery {
  position: relative;
  border-radius: var(--rf-radius-sm);
  overflow: hidden;
  background: var(--rf-surface-2);
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
}
.rf-gallery--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--rf-text-3);
  font-size: 13px;
  min-height: 160px;
}
.rf-gallery--empty i { font-size: 28px; }
.rf-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s;
}
.rf-gallery-img.is-active { opacity: 1; z-index: 1; }
.rf-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--rf-text);
  box-shadow: var(--rf-shadow);
  cursor: pointer;
  z-index: 2;
}
.rf-gallery-nav--prev { right: 8px; }
.rf-gallery-nav--next { left: 8px; }
.rf-facility-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rf-facility-list li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rf-text-2);
  padding: 8px 10px;
  border-radius: var(--rf-radius-sm);
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
}
.rf-facility-list li i { color: var(--rf-primary); text-align: center; }
.rf-price-tiers {
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.rf-price-tiers-head {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rf-text-3);
  background: var(--rf-surface-2);
  border-bottom: 1px solid var(--rf-border);
}
.rf-price-tier {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--rf-text-2);
  border-bottom: 1px solid var(--rf-border);
}
.rf-price-tier:last-child { border-bottom: none; }
.rf-price-tier strong { font-size: 12px; }
.rf-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--rf-text-3);
}
.rf-calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rf-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.rf-legend-dot--booked { background: #8123d8; }
.rf-legend-dot--pending { background: #ffcd22; }

@media (max-width: 860px) {
  .rf-grid--calendar { grid-template-columns: 1fr; }
  .rf-grid--calendar .rf-sidebar { order: -1; }
  .rf-calendar-wrap { min-height: 320px; }
  .rf-date-fields { grid-template-columns: 1fr; }
  .rf-form-foot--desktop { display: none; }
}

@media (min-width: 861px) {
  .rf-page--calendar .rf-sticky-bar { display: none !important; }
}

@media (max-width: 480px) {
  .rf-calendar-wrap { min-height: 280px; }
  .rf-price-tier { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 860px) {
  .rf-pay-layout { grid-template-columns: 1fr; gap: 16px; }
  .rf-pay-aside { position: static; order: -1; }
  .rf-state-card--pay { padding: 28px 18px; }
  .rf-gateway-card--inline { padding: 28px 18px 22px; }
  .rf-pay-actions .rf-btn { width: 100%; min-width: 0; }
  .rf-gateway-page--full { padding-top: 16px; }
}

@media (max-width: 480px) {
  .rf-gateway-card { padding: 26px 18px; }
  .rf-gateway-title { font-size: 18px; }
  .rf-pay-page-title { font-size: 18px; }
  .rf-bank-trust span { width: 100%; justify-content: center; }
}

/* ── صورتحساب رزرو (invoice) ── */
.rf-page--invoice {
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(21,101,168,.06), transparent 55%), var(--rf-bg);
}
.rf-inv-main { display: flex; flex-direction: column; gap: 16px; }
.rf-inv-sidebar { gap: 16px; }

/* بنر آبی */
.rf-inv-top {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; border-radius: var(--rf-radius);
  background: linear-gradient(135deg, #145a94 0%, #1565a8 100%);
  color: #fff; box-shadow: var(--rf-shadow);
}
.rf-inv-top__info { flex: 1; min-width: 0; }
.rf-inv-top__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; opacity: .85; margin-bottom: 8px;
}
.rf-inv-top__title { font-size: 18px; font-weight: 800; margin: 0 0 8px; line-height: 1.45; }
.rf-inv-top__meta { margin: 0; font-size: 13px; opacity: .9; line-height: 1.5; }
.rf-inv-top__sum {
  flex-shrink: 0; text-align: left; padding: 14px 18px; min-width: 200px;
  border-radius: var(--rf-radius-sm);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
}
.rf-inv-top__sum-label { display: block; font-size: 11px; font-weight: 600; opacity: .85; margin-bottom: 6px; }
.rf-inv-top__sum-val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rf-inv-top__sum-val small { font-size: 12px; font-weight: 500; opacity: .85; }
.rf-inv-top__sum-lines {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.2); font-size: 11px; font-weight: 600;
}
.rf-inv-top__sum-debt { color: #ffd4d4; }

/* کارت‌های مشترک */
.rf-inv-card { overflow: hidden; }
.rf-inv-card-head {
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--rf-border);
}
.rf-inv-block-head {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--rf-border);
  background: var(--rf-surface-2);
}
.rf-inv-block-title {
  font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--rf-text);
  display: flex; align-items: center; gap: 8px;
}
.rf-inv-block-title i { color: var(--rf-primary); font-size: 14px; }
.rf-inv-block-desc { margin: 0; font-size: 12px; color: var(--rf-text-3); }

/* سایدبار */
.rf-inv-profile .rf-avatar { width: 56px; height: 56px; }
.rf-inv-ref {
  margin-top: 14px; background: var(--rf-primary-light);
  border: 1px solid #c8ddf0;
}
.rf-inv-ref i { margin-left: 4px; opacity: .7; }
.rf-inv-status {
  margin-top: 14px; padding: 12px; border-radius: var(--rf-radius-sm);
  background: var(--rf-surface-2); border: 1px solid var(--rf-border);
}
.rf-inv-paid-at {
  margin: 12px 0 0; padding: 10px 12px; font-size: 12px;
  background: var(--rf-accent-light); color: var(--rf-accent);
  border-radius: var(--rf-radius-sm); border: 1px solid #c5ddb0;
}
.rf-inv-timer {
  margin-top: 12px; background: linear-gradient(135deg, #fff5f5, #fdeeee);
  border: 1px solid #f0c0c0;
}
.rf-inv-timer .rf-timer-val { font-variant-numeric: tabular-nums; }
.rf-inv-total--sidebar { box-shadow: 0 6px 20px rgba(21,101,168,.18); }

/* جدول و رسید */
.rf-inv-table-wrap { padding-top: 4px; }
.rf-inv-table tbody tr:hover { background: #fafbfd; }
.rf-inv-cell-name { display: block; margin-top: 2px; font-weight: 600; }
.rf-inv-receipt {
  margin: 0 20px 20px; padding: 14px 16px;
  background: var(--rf-surface-2); border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-sm);
}
.rf-inv-receipt__row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 13px; color: var(--rf-text-2);
  border-bottom: 1px dashed var(--rf-border);
}
.rf-inv-receipt__row:last-child { border-bottom: none; }
.rf-inv-receipt__row span:last-child { font-variant-numeric: tabular-nums; }
.rf-inv-receipt__row--disc span:last-child { color: var(--rf-accent); font-weight: 600; }
.rf-inv-receipt__row--debt span:last-child { color: var(--rf-danger); font-weight: 700; }
.rf-inv-receipt__row--sub {
  font-weight: 700; color: var(--rf-text);
  border-top: 2px solid var(--rf-border); margin-top: 4px; padding-top: 10px;
}
.rf-inv-receipt__row--grand {
  font-size: 14px; font-weight: 800; color: var(--rf-primary);
  background: var(--rf-primary-light); margin: 8px -16px -14px;
  padding: 12px 16px; border-radius: 0 0 var(--rf-radius-sm) var(--rf-radius-sm);
}
.rf-inv-extra-reason {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 4px 0 8px; padding: 9px 11px;
  color: #8a5a00; background: #fff8e1; border: 1px solid #ffe0a3;
  border-radius: 8px; font-size: 12px; line-height: 1.8;
}
.rf-inv-extra-reason i { margin-top: 4px; color: #f59e0b; flex-shrink: 0; }

.rf-inv-discount-why {
  margin: 8px 0 12px;
  padding: 0;
  background: #f0f7fd;
  border: 1px solid #c5ddf3;
  border-radius: 10px;
  color: #1e3a5f;
  overflow: hidden;
}
.rf-inv-discount-why__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  color: #185fa5;
  background: linear-gradient(180deg, #f7fbff, #eef6fc);
}
.rf-inv-discount-why__title::-webkit-details-marker { display: none; }
.rf-inv-discount-why__title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rf-inv-discount-why__title i.fa-info-circle { color: #185fa5; }
.rf-inv-discount-why__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #c5ddf3;
  color: #185fa5;
  font-size: 11px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.rf-inv-discount-why[open] .rf-inv-discount-why__chev {
  transform: rotate(180deg);
}
.rf-inv-discount-why__body {
  padding: 0 14px 12px;
  border-top: 1px solid #d7e6f5;
}
.rf-inv-discount-why__block {
  padding-top: 10px;
}
.rf-inv-discount-why__block + .rf-inv-discount-why__block {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed #c5ddf3;
}
.rf-inv-discount-why__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}
.rf-inv-discount-why__code {
  direction: ltr;
  font-weight: 700;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 1px 8px;
}
.rf-inv-discount-why ul {
  margin: 0;
  padding: 0 1.1rem 0 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: #334155;
}
.rf-inv-discount-why li { margin-bottom: 2px; }
.rf-inv-disc-why-side {
  align-items: flex-start !important;
  white-space: normal !important;
  line-height: 1.7;
  font-size: 11.5px !important;
  color: #475569 !important;
}

/* خدمات و همراهان */
.rf-inv-extras { padding: 16px 20px; }
.rf-inv-extra { transition: border-color .15s; }
.rf-inv-extra:hover { border-color: var(--rf-primary); }
.rf-inv-companions { margin: 0 20px 20px; }

/* کیف پول */
.rf-inv-wallet-note {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 20px; padding: 12px 14px; font-size: 13px;
  background: var(--rf-danger-light); border: 1px solid #f0c0c0;
  border-radius: var(--rf-radius-sm); color: var(--rf-danger);
}
.rf-inv-wallet-note i { font-size: 16px; }
.rf-inv-wallet-table { padding: 0 20px 20px; overflow-x: auto; }
.rf-inv-wallet-table .table { font-size: 12px; margin-bottom: 0; }
.rf-inv-wallet-table .table th { background: var(--rf-surface-2); font-size: 11px; }

/* پرداخت */
.rf-inv-card--pay { border: 2px solid #c5ddb0; }
.rf-inv-pay { padding: 0; }
.rf-inv-pay__grid {
  display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: 0;
}
.rf-inv-pay__info {
  padding: 22px 24px; border-left: 1px solid var(--rf-border);
  background: linear-gradient(180deg, #fafcf8, #fff);
}
.rf-inv-pay__title { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.rf-inv-pay__desc { font-size: 13px; color: var(--rf-text-2); margin: 0 0 14px; line-height: 1.6; }
.rf-inv-pay__trust {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.rf-inv-pay__trust li {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--rf-text-2);
  padding: 5px 10px; border-radius: 20px;
  background: #fff; border: 1px solid var(--rf-border);
}
.rf-inv-pay__trust i { color: var(--rf-accent); font-size: 11px; }
.rf-inv-pay__side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 22px 24px;
}
.rf-inv-pay__form.rf-pay-form,
.rf-inv-pay__form {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  gap: 14px;
}
.rf-inv-pay__amount {
  text-align: center; padding: 16px 14px;
  background: var(--rf-accent-light); border: 1px solid #c5ddb0;
  border-radius: var(--rf-radius-sm);
}
.rf-inv-pay__amount span { display: block; font-size: 11px; color: var(--rf-accent); font-weight: 600; margin-bottom: 4px; }
.rf-inv-pay__amount strong { font-size: 22px; font-weight: 800; color: #2d5016; font-variant-numeric: tabular-nums; }
.rf-inv-pay__amount strong small { font-size: 12px; font-weight: 500; }
.rf-inv-pay__breakdown {
  margin: 0; text-align: center; font-size: 12px; color: var(--rf-text-2);
}
.rf-inv-pay__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.rf-inv-pay__actions .rf-btn--pay,
.rf-inv-pay__form .rf-btn--accent.rf-btn--pay {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.rf-inv-pay__cancel { margin: 0; }
.rf-inv-pay__cancel .rf-btn {
  width: 100%;
  min-height: 44px;
}
.rf-inv-result {
  flex-direction: row; justify-content: flex-start; text-align: right;
  padding: 20px 24px; gap: 14px;
}
.rf-inv-result i { font-size: 28px; flex-shrink: 0; }
.rf-inv-result p { margin: 4px 0 0; font-size: 13px; font-weight: 400; opacity: .85; }
.rf-inv-sms { padding: 0 20px 20px; border-top: 1px solid var(--rf-border); }

/* نوار پایین موبایل */
.rf-inv-sticky {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 12px;
}
.rf-inv-sticky__sum { display: flex; flex-direction: column; min-width: 0; }
.rf-inv-sticky__sum span { font-size: 11px; color: var(--rf-text-3); }
.rf-inv-sticky__sum strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.rf-inv-sticky .rf-btn--accent { width: auto; min-width: 120px; flex-shrink: 0; min-height: 46px; }

@media (max-width: 1024px) {
  .rf-inv-pay__grid { grid-template-columns: 1fr; }
  .rf-inv-pay__info { border-left: none; border-bottom: 1px solid var(--rf-border); }
}

@media (max-width: 860px) {
  .rf-inv-top { flex-direction: column; padding: 16px; }
  .rf-inv-top__sum { text-align: center; min-width: 0; width: 100%; }
  .rf-inv-top__sum-lines { justify-content: center; }
  .rf-inv-top__title { font-size: 16px; }
  .rf-inv-top__sum-val { font-size: 20px; }
  .rf-inv-total--sidebar { display: none; }
  .rf-inv-receipt { margin: 0 12px 16px; }
  .rf-inv-block-head { padding: 14px 16px 12px; }
  .rf-inv-pay__info, .rf-inv-pay__side { padding: 16px; }
  .rf-inv-wallet-note { margin: 12px 16px; }
  .rf-inv-wallet-table { padding: 0 16px 16px; }
  .rf-inv-extras { padding: 12px 16px; }
  .rf-inv-companions { margin: 0 16px 16px; }
  .rf-pay-zone .rf-pay-form .rf-btn--accent,
  .rf-inv-pay__form .rf-btn--accent { display: none; }
  body.rf-has-sticky-pay { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (max-width: 480px) {
  .rf-inv-sticky { flex-direction: column; align-items: stretch; }
  .rf-inv-sticky .rf-btn--accent { width: 100%; }
}

/* ── معرفی‌نامه (پیش‌نمایش و چاپ A4) ── */
.rf-page--license {
  padding-top: 16px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(21, 101, 168, 0.08), transparent 55%),
    var(--rf-bg);
  font-family: "primary-font", Tahoma, sans-serif;
}
.rf-license-print {
  margin: 0;
  background: var(--rf-bg);
  font-family: "primary-font", Tahoma, sans-serif;
}
.rf-license-print .rf-container {
  max-width: var(--rf-container-max, 1320px);
}

.rf-license-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 14px 18px;
  background: var(--rf-surface); border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius); box-shadow: var(--rf-shadow);
}
.rf-license-toolbar-title {
  flex: 1; min-width: 180px; font-size: 15px; font-weight: 700; color: var(--rf-text);
  display: flex; align-items: center; gap: 8px;
}
.rf-license-toolbar-title i { color: var(--rf-primary); }
.rf-license-toolbar-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.rf-license-hint {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--rf-text-3);
}

.rf-license-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.rf-license-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--rf-surface);
  border: 1px solid var(--rf-border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--rf-text-2);
  box-shadow: var(--rf-shadow);
}
.rf-license-chip strong {
  color: var(--rf-text);
  font-weight: 700;
}
.rf-license-chip i {
  color: var(--rf-primary);
  font-size: 12px;
}

/* نوار مشخصات + QR روی برگه */
.rf-license-band {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.rf-license-band-main { flex: 1; min-width: 0; }
.rf-license-band-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--rf-primary);
  margin-bottom: 8px;
}
.rf-license-band-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}
.rf-license-band-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.rf-license-band-grid span {
  font-size: 10.5px;
  color: var(--rf-text-3);
}
.rf-license-band-grid strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rf-text);
  word-break: break-word;
}
.rf-license-band-span { grid-column: 1 / -1; }
.rf-license-qr-wrap {
  flex: 0 0 auto;
  width: 84px;
  text-align: center;
}
.rf-license-qr {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  padding: 2px;
  border: 1px solid #d5dbe6;
  border-radius: 6px;
  background: #fff;
}
.rf-license-qr img,
.rf-license-qr canvas {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  display: block;
}
.rf-license-qr-caption {
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--rf-text-2);
  word-break: break-all;
  line-height: 1.2;
}
.rf-license-sep {
  height: 0;
  border: 0;
  border-top: 1px solid #d8dee8;
  margin: 0 0 12px;
}
.rf-license-wallet-sum {
  margin: 6px 0 4px !important;
  font-size: 0.95em;
}
.rf-license-wallet { margin: 4px 0 8px; }
.rf-license-wallet-pay { margin-top: 4px; }

/* جداکننده بصری برای عناوین داخل متن معرفی‌نامه */
.rf-license-doc h2,
.rf-license-doc h3,
.rf-license-doc h4 {
  padding-top: 0.25em;
  border-top: 1px solid #e6ebf2;
}
.rf-license-doc h1 + h2,
.rf-license-doc h2:first-child,
.rf-license-doc h3:first-child,
.rf-license-doc h4:first-child {
  border-top: 0;
  padding-top: 0;
}

/* برگه A4 روی صفحه */
.rf-license-sheet {
  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto 32px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 12px 40px rgba(16, 24, 40, 0.1);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}
.rf-license-sheet::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--rf-primary), #3d8fd4 55%, var(--rf-accent));
}
.rf-license-sheet-inner {
  padding: 10mm 12mm 12mm;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.rf-license-doc {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  direction: rtl;
  font-family: "primary-font", Tahoma, sans-serif;
  color: #1a1f2a;
  font-size: 11pt;
  line-height: 1.65;
  letter-spacing: 0;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.rf-license-doc,
.rf-license-doc * {
  font-family: "primary-font", Tahoma, sans-serif !important;
  box-sizing: border-box !important;
}
.rf-license-doc p,
.rf-license-doc div,
.rf-license-doc section,
.rf-license-doc article,
.rf-license-doc table,
.rf-license-doc ul,
.rf-license-doc ol,
.rf-license-doc li,
.rf-license-doc pre,
.rf-license-doc blockquote {
  max-width: 100% !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal !important;
}
.rf-license-doc h1,
.rf-license-doc h2,
.rf-license-doc h3,
.rf-license-doc h4 {
  color: #122033;
  line-height: 1.4;
  margin: 0.35em 0 0.25em;
  font-weight: 700;
  max-width: 100% !important;
}
.rf-license-doc h1 { font-size: 1.2em; text-align: center; }
.rf-license-doc h2 { font-size: 1.1em; text-align: center; }
.rf-license-doc h3 { font-size: 1.02em; }
.rf-license-doc p { margin: 0.28em 0; }
.rf-license-doc ul,
.rf-license-doc ol { margin: 0.25em 0 0.4em; padding-right: 1.25em; }
.rf-license-doc li { margin: 0.12em 0; }
.rf-license-doc table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 9.5pt;
  table-layout: fixed;
}
.rf-license-doc table[width],
.rf-license-doc td[width],
.rf-license-doc th[width],
.rf-license-doc col[width] {
  width: auto !important;
}
.rf-license-doc table th,
.rf-license-doc table td {
  border: 1px solid #c9d2de;
  padding: 5px 6px;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.rf-license-doc table th {
  background: #f3f6fa;
  font-weight: 700;
  color: #243247;
}
.rf-license-doc table.table-striped tbody tr:nth-child(even) td {
  background: #fafbfd;
}
.rf-license-doc img {
  max-width: 100% !important;
  height: auto !important;
}
.rf-license-doc a { color: var(--rf-primary); }

.rf-license-print--popup {
  background: #fff;
}
.rf-license-print--popup .rf-page--license {
  padding: 0;
  background: #fff;
  min-height: auto;
}
.rf-license-print--popup .rf-license-sheet {
  width: 210mm;
  min-height: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.rf-license-print--popup .rf-license-sheet::before { display: none; }
.rf-license-print--popup .rf-license-sheet-inner { padding: 0; }

@media (max-width: 860px) {
  .rf-license-sheet {
    width: 100%;
    min-height: 0;
  }
  .rf-license-sheet-inner {
    padding: 18px 16px 22px;
  }
  .rf-license-doc { font-size: 14px; line-height: 1.65; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 7mm 8mm;
  }
  html, body.rf-license-print {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    overflow: visible !important;
  }
  .rf-license-toolbar,
  .rf-license-meta,
  .rf-license-hint,
  .rf-page--license .rf-back,
  .d-print-none {
    display: none !important;
  }
  .rf-page--license {
    padding: 0 !important;
    background: #fff !important;
    min-height: auto !important;
  }
  .rf-page--license .rf-container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .rf-license-sheet {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .rf-license-sheet::before { display: none !important; }
  .rf-license-sheet-inner {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .rf-license-doc {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    font-family: "primary-font", Tahoma, sans-serif !important;
    font-size: 9pt !important;
    line-height: 1.32 !important;
    color: #000;
  }
  .rf-license-doc,
  .rf-license-doc * {
    font-family: "primary-font", Tahoma, sans-serif !important;
  }
  .rf-license-doc p,
  .rf-license-doc div,
  .rf-license-doc li,
  .rf-license-doc span,
  .rf-license-doc td,
  .rf-license-doc th {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  .rf-license-doc p { margin: 0.1em 0 !important; }
  .rf-license-doc ul,
  .rf-license-doc ol {
    margin: 0.12em 0 0.2em !important;
    padding-right: 1.1em !important;
  }
  .rf-license-doc li { margin: 0.04em 0 !important; }
  .rf-license-doc h1 {
    font-size: 11pt !important;
    margin: 0.12em 0 !important;
    line-height: 1.25 !important;
  }
  .rf-license-doc h2 {
    font-size: 10pt !important;
    margin: 0.1em 0 !important;
    line-height: 1.25 !important;
  }
  .rf-license-doc h3,
  .rf-license-doc h4 {
    font-size: 9.5pt !important;
    margin: 0.1em 0 !important;
    line-height: 1.25 !important;
  }
  .rf-license-doc table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    page-break-inside: avoid;
    margin: 3px 0 !important;
    font-size: 7.5pt !important;
  }
  .rf-license-doc table th,
  .rf-license-doc table td {
    padding: 2px 3px !important;
    border-color: #999 !important;
  }
  .rf-license-doc img {
    max-width: 64px !important;
    max-height: 52px !important;
    height: auto !important;
    page-break-inside: avoid;
  }
  .rf-license-qr img,
  .rf-license-qr canvas {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
  }
  .rf-license-band {
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    gap: 10px !important;
  }
  .rf-license-band-title { font-size: 10pt !important; margin-bottom: 4px !important; }
  .rf-license-band-grid { gap: 3px 10px !important; }
  .rf-license-band-grid span { font-size: 7.5pt !important; }
  .rf-license-band-grid strong { font-size: 8.5pt !important; }
  .rf-license-qr-wrap { width: 72px !important; }
  .rf-license-qr {
    width: 64px !important;
    height: 64px !important;
  }
  .rf-license-qr-caption { font-size: 7pt !important; }
  .rf-license-sep { margin-bottom: 6px !important; }
  .rf-license-doc h2,
  .rf-license-doc h3,
  .rf-license-doc h4 {
    border-top-color: #ccc !important;
    padding-top: 0.15em !important;
  }
  .rf-license-doc a { color: inherit !important; text-decoration: none !important; }
  a[href]::after { content: none !important; }
}

