/* IB invitation configuration: aligned with ForexCRM design tokens and promotion-link-create.css. */
[data-client-create-resources][hidden],
.agent-invite-demo [hidden],
.agent-invite-demo[hidden] { display: none !important; }

.agent-demo-card {
  min-width: 0;
  border: 1px solid var(--border-light, #e8edf3);
  border-radius: 10px;
  background: var(--surface, #fff);
}

.agent-invite-demo [data-agent-demo-editor],
.agent-demo-stage { min-width: 0; }

.promotion-link-create-form[data-agent-demo-transition] .agent-demo-stage { overflow: hidden; }

.promotion-link-create-form [data-agent-demo-back][hidden],
.promotion-link-create-form.is-agent-demo [data-agent-demo-extra],
.promotion-link-create-form.is-agent-demo .promotion-create-link-type > p,
.promotion-link-create-form.is-agent-demo .promotion-create-link-preview { display: none !important; }

/* Minimal 3-Step Horizontal Progress Bar */
.agent-demo-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 12px 18px;
  list-style: none;
}

.agent-demo-progress li {
  position: relative;
  min-width: 0;
  color: var(--muted, #7c899b);
}

.agent-demo-progress button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.agent-demo-progress button:disabled { opacity: 1; cursor: default; }
.agent-demo-progress button:focus-visible { outline: none; }
.agent-demo-progress button:focus-visible span { outline: 2px solid var(--blue); outline-offset: 2px; }

.agent-demo-progress li:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: calc(50% + 48px);
  width: calc(100% - 96px);
  height: 1px;
  background: var(--border, #dce3ed);
  content: "";
}

.agent-demo-progress li:not(:last-child)::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: calc(50% + 48px);
  width: calc(100% - 96px);
  height: 1px;
  background: var(--blue, #247fff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1);
  content: "";
}

.agent-demo-progress li.is-complete:not(:last-child)::before { transform: scaleX(1); }

.agent-demo-progress li span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border, #dce3ed);
  border-radius: 50%;
  background: var(--surface, #fff);
  font-size: 11px;
  font-weight: 800;
  transition: background-color .18s, border-color .18s, box-shadow .18s;
}

.agent-demo-progress li strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-demo-progress li.is-current,
.agent-demo-progress li.is-complete { color: var(--blue, #247fff); }

.agent-demo-progress li.is-current span {
  border-color: var(--blue, #247fff);
  background: var(--blue, #247fff);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb, 36, 127, 255), .12);
}

.agent-demo-progress li.is-complete span {
  border-color: var(--blue, #247fff);
  background: var(--blue, #247fff);
  color: #fff;
  font-size: 0;
}

.agent-demo-progress li.is-complete span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 5px;
  border-bottom: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
  transform: translate(-50%, -58%) rotate(-45deg);
  content: "";
}

/* Shared Native Text Button */
.agent-demo-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 26px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue, #247fff);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .14s, color .14s;
}

.agent-demo-text-btn:hover { background: rgba(var(--blue-rgb, 36, 127, 255), .08); }
.agent-demo-text-btn.is-muted { color: var(--muted, #7c899b); }
.agent-demo-text-btn.is-muted:hover { color: var(--text-strong, var(--text)); }

/* Section Layout & Permission Cards */
.agent-demo-permission-cards {
  display: grid;
  gap: 12px;
}

.agent-demo-section { padding: 14px 16px 16px; }
.agent-demo-section-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.agent-demo-section-head h4 { margin: 0 0 2px; color: var(--text-strong, var(--text)); font-size: 13px; font-weight: 900; line-height: 1.3; }
.agent-demo-section-head h4:focus, .agent-demo-review-head h4:focus { outline: none; }
.agent-demo-section-head h4 em { margin-left: 5px; color: var(--muted, #7c899b); font-size: 11px; font-style: normal; font-weight: 600; }
.agent-demo-section-head p { margin: 0; color: var(--muted, #7c899b); font-size: 11px; line-height: 1.45; }

.agent-demo-permission-head {
  position: relative;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin: 0;
  padding: 10px 14px;
}

.agent-demo-permission-head label::after { position: absolute; inset: 0; z-index: 1; content: ""; cursor: pointer; }
.agent-demo-switch-control { position: relative; z-index: 2; display: grid; width: 44px; height: 34px; flex: none; place-items: center; }
.agent-invite-demo .agent-demo-switch-control input[type="checkbox"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.agent-demo-permission-head:has(:disabled) label::after, .agent-invite-demo .agent-demo-switch-control input:disabled { cursor: not-allowed; }
.agent-demo-permission-body { padding: 0 14px 14px; }

.agent-demo-switch { position: relative; width: 36px; height: 20px; flex: none; border-radius: 12px; background: #b9c2cf; transition: background .15s; pointer-events: none; }
.agent-demo-switch::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .16); content: ""; transition: transform .15s; }
.agent-demo-switch-control input:checked + .agent-demo-switch { background: var(--blue, #247fff); }
.agent-demo-switch-control input:checked + .agent-demo-switch::after { transform: translateX(16px); }
.agent-demo-switch-control input:focus-visible + .agent-demo-switch { outline: 2px solid var(--blue, #247fff); outline-offset: 2px; }

/* Resource Builder & Inline Leverage Bar */
.agent-invite-demo input[type="checkbox"]:not([role="switch"]),
.agent-invite-demo input[type="radio"] {
  width: 15px;
  height: 15px;
  flex: none;
  accent-color: var(--blue, #247fff);
}

.agent-demo-resource-builder { display: grid; gap: 10px; }
.agent-demo-resource-builder .promotion-create-server-panel > header > div { grid-template-columns: minmax(0, 1fr); }
.agent-invite-demo .agent-demo-resource-builder :is(.promotion-create-option input, .promotion-create-server-account-head > input) { position: absolute; width: 1px; height: 1px; opacity: 0; }
.agent-demo-resource-builder :is(.promotion-create-option input, .promotion-create-server-account-head > input):focus-visible + .promotion-create-option-check { outline: 2px solid var(--blue, #247fff); outline-offset: 2px; }

.agent-demo-block-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.agent-demo-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-right: 6px;
}

.agent-demo-account-bar > .promotion-create-server-account-head {
  flex: 1 1 auto;
}

.agent-demo-leverage-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.agent-demo-leverage-text {
  color: var(--muted, #7c899b);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.agent-demo-leverage-text.is-custom { color: var(--text-strong, var(--text)); }
.agent-demo-leverage-text.is-empty { color: var(--danger, #dc2626); }

/* Sub-Agent Inherit Row (Clean & Flat) */
.agent-demo-inherit-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light, #e8edf3);
  border-radius: 8px;
  background: var(--surface-muted, #f3f6fb);
}

.agent-demo-inherit-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agent-demo-inherit-copy > strong {
  color: var(--text-strong, var(--text));
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.agent-demo-inherit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted, #7c899b);
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.agent-demo-inherit-list .is-empty { color: var(--muted, #7c899b); }

.agent-demo-custom-wrap { display: grid; gap: 10px; }

.agent-demo-custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--surface-muted, #f3f6fb);
  color: var(--muted, #7c899b);
  font-size: 11px;
  font-weight: 750;
}

/* Lightweight Merged Self-Account Row */
.agent-demo-self-card { margin-top: 12px; }
.agent-demo-self-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
}

.agent-demo-self-check {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  cursor: pointer;
}

.agent-demo-self-check > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.agent-demo-self-check > .promotion-create-option-check { margin-top: 1px; }
.agent-demo-self-check > input:checked + .promotion-create-option-check { border-color: var(--blue, #247fff); background: var(--blue, #247fff); }
.agent-demo-self-check > input:checked + .promotion-create-option-check::after {
  width: 7px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: rotate(-45deg) translate(1px, -1px);
}

.agent-demo-self-copy { min-width: 0; display: grid; gap: 2px; }
.agent-demo-self-copy > strong { color: var(--text-strong, var(--text)); font-size: 12px; font-weight: 850; line-height: 1.35; }
.agent-demo-self-copy > small { color: var(--muted, #7c899b); font-size: 11px; line-height: 1.4; }
.agent-demo-self-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.agent-demo-self-body { padding: 0 14px 14px; }

/* Step 2: Rebates (Quiet until checked) */
.agent-demo-rebate-list { display: grid; gap: 8px; }

.agent-demo-rebate-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 186px;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-light, #e5eaf1);
  border-radius: 8px;
  background: var(--surface, #fff);
  transition: border-color .16s, background-color .16s;
}

.agent-demo-rebate-card:has(input[name="demoRebate"]:checked) {
  border-color: rgba(var(--blue-rgb, 36, 127, 255), .35);
  background: rgba(var(--blue-rgb, 36, 127, 255), .025);
}

.agent-demo-rebate-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}

.agent-demo-rebate-choice > input { flex: none; }
.agent-demo-rebate-choice > span { display: grid; min-width: 0; gap: 2px; }
.agent-demo-rebate-choice strong { color: var(--text-strong, var(--text)); font-size: 12px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.agent-demo-rebate-choice small { color: var(--muted, #7c899b); font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums; }

.agent-demo-rebate-field { display: grid; min-width: 0; }

.agent-demo-rebate-input {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border, #dce3ed);
  border-radius: 7px;
  background: var(--surface, #fff);
  transition: border-color .16s, box-shadow .16s, opacity .16s;
}

.agent-demo-rebate-input input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-strong, var(--text));
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.agent-demo-rebate-input:focus-within {
  border-color: var(--blue, #247fff);
  box-shadow: 0 0 0 2px rgba(var(--blue-rgb, 36, 127, 255), .14);
}

.agent-demo-rebate-input:has(input[aria-invalid="true"]) {
  border-color: var(--danger, #dc2626);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .08);
}

.agent-demo-rebate-input:has(input:disabled) { opacity: .45; }
.agent-demo-rebate-prefix {
  flex: none;
  padding-right: 6px;
  border-right: 1px solid var(--border-light, #e5eaf1);
  color: var(--muted, #7c899b);
  font-style: normal;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  pointer-events: none;
}
.agent-demo-rebate-input > span { flex: none; color: var(--muted, #7c899b); font-size: 10px; white-space: nowrap; pointer-events: none; }

.agent-demo-rebate-calc {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-light, #e5eaf1);
  border-radius: 7px;
  background: var(--surface-muted, #f3f6fb);
  font-variant-numeric: tabular-nums;
  transition: border-color .16s, background-color .16s;
}

.agent-demo-rebate-calc.is-valid {
  border-color: rgba(var(--blue-rgb, 36, 127, 255), .18);
  background: rgba(var(--blue-rgb, 36, 127, 255), .04);
}

.agent-demo-rebate-calc.is-zero {
  border-color: rgba(194, 65, 12, .22);
  background: var(--warning-soft, #fff7ed);
}

.agent-demo-rebate-calc.is-invalid {
  border-color: rgba(220, 38, 38, .24);
  background: var(--danger-soft, #fff1f2);
}

.agent-demo-rebate-earn-label {
  color: var(--text-soft, #475569);
  font-size: 11px;
  font-weight: 750;
}

.agent-demo-rebate-calc.is-invalid .agent-demo-rebate-earn-label {
  color: var(--danger, #dc2626);
}

.agent-demo-rebate-earn-value {
  color: var(--blue, #247fff);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.agent-demo-rebate-calc.is-empty .agent-demo-rebate-earn-value {
  color: var(--muted, #94a3b8);
  font-size: 12px;
  font-weight: 700;
}

.agent-demo-rebate-calc.is-zero .agent-demo-rebate-earn-value {
  color: var(--warning, #c2410c);
}

.agent-demo-rebate-calc.is-invalid .agent-demo-rebate-earn-value {
  color: var(--danger, #dc2626);
  font-size: 11px;
  font-weight: 700;
}

.agent-demo-rebate-zero-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid var(--border-light, #e5eaf1);
  border-radius: 8px;
  background: var(--surface-muted, #f3f6fb);
  color: var(--muted, #64748b);
  font-size: 11px;
  line-height: 1.5;
}

.agent-demo-rebate-zero-notice i {
  margin-top: 1px;
  flex: none;
  color: var(--blue, #247fff);
  font-size: 12px;
}

.agent-demo-rebate-error {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 24px;
  color: var(--danger, #dc2626);
  font-size: 11px;
  line-height: 1.45;
}

.agent-demo-empty { margin: 0; padding: 10px 0; color: var(--muted, #7c899b); font-size: 12px; }

/* Step 3: Dedicated Review Summary */
.agent-demo-review-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.agent-demo-review { padding: 13px 15px; }

.agent-demo-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.agent-demo-review-head h4 {
  margin: 0;
  color: var(--text-strong, var(--text));
  font-size: 13px;
  font-weight: 900;
}

.agent-demo-review-list {
  display: grid;
  border-top: 1px solid var(--border-light, #e8edf3);
}

.agent-demo-review-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light, #e8edf3);
}

.agent-demo-review-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.agent-demo-review-label {
  color: var(--muted, #7c899b);
  font-size: 11px;
  font-weight: 750;
}

.agent-demo-review-val {
  display: grid;
  gap: 3px;
  color: var(--text-strong, var(--text));
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.agent-demo-review-val .is-empty {
  color: var(--muted, #94a3b8);
  font-weight: 600;
}

.agent-demo-review-rebates {
  display: grid;
  border-top: 1px solid var(--border-light, #e8edf3);
}

.agent-demo-review-rebate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light, #e8edf3);
  font-variant-numeric: tabular-nums;
}

.agent-demo-review-rebate-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.agent-demo-review-rebate-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.agent-demo-review-rebate-name strong {
  color: var(--text-strong, var(--text));
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.agent-demo-review-rebate-name small,
.agent-demo-review-rebate-result small {
  color: var(--muted, #7c899b);
  font-size: 10px;
  line-height: 1.35;
}

.agent-demo-review-rebate-result {
  display: grid;
  gap: 2px;
  flex: none;
  text-align: right;
}

.agent-demo-review-earn {
  color: var(--blue, #247fff);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.agent-demo-review-earn.is-zero {
  color: var(--warning, #c2410c);
}

.agent-demo-review-empty {
  margin: 0;
  padding: 10px 0 2px;
  color: var(--muted, #7c899b);
  font-size: 11px;
  line-height: 1.5;
}

.agent-demo-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  color: var(--muted, #7c899b);
  font-size: 11px;
  line-height: 1.45;
}

.agent-demo-notice i { color: var(--blue, #247fff); font-size: 12px; }

/* Transitions & Footer Buttons */
.agent-demo-resource-builder .promotion-create-option,
.agent-demo-resource-builder .promotion-create-server-account {
  transition: border-color .16s, background-color .16s, box-shadow .16s;
}

.promotion-link-create-form.is-agent-demo .modal-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color .16s, border-color .16s, box-shadow .16s, transform .16s;
}

.promotion-link-create-form.is-agent-demo .modal-footer > [data-close-modal] { display: none; }
.promotion-link-create-form.is-agent-demo .modal-footer > [data-agent-demo-back]::before { content: "←"; }
.promotion-link-create-form.is-agent-demo .modal-footer > [type="submit"]::after { content: "→"; }
.promotion-link-create-form.is-agent-demo[data-agent-demo-final="true"] .modal-footer > [type="submit"]::after,
.promotion-link-create-form.is-agent-demo[data-agent-demo-step="3"] .modal-footer > [type="submit"]::after { content: "✓"; }
.promotion-link-create-form[data-agent-demo-transition] .modal-footer > :is([data-agent-demo-back], [type="submit"]) { cursor: wait; opacity: .7; }
.promotion-link-create-form[data-agent-demo-transition="forward"] .modal-footer > [type="submit"]::after,
.promotion-link-create-form[data-agent-demo-transition="back"] .modal-footer > [data-agent-demo-back]::before {
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: agent-demo-navigation-spin .65s linear infinite;
  content: "";
}

@keyframes agent-demo-navigation-spin { to { transform: rotate(360deg); } }
.promotion-link-create-form.is-agent-demo .modal-footer button:active { transform: translateY(1px); }

@media (hover: hover) and (pointer: fine) {
  .agent-demo-progress button:not(:disabled):hover span { border-color: var(--blue, #247fff); }
  .agent-demo-resource-builder .promotion-create-option:hover { border-color: rgba(var(--blue-rgb, 36, 127, 255), .3); }
  .promotion-link-create-form.is-agent-demo .modal-footer button:hover:not(:active) { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .agent-invite-demo *, .agent-invite-demo *::before, .agent-invite-demo *::after,
  .promotion-link-create-form.is-agent-demo .modal-footer button,
  .promotion-link-create-form.is-agent-demo .modal-footer button::before,
  .promotion-link-create-form.is-agent-demo .modal-footer button::after { transition: none !important; animation: none !important; }
}

@media (max-width: 560px) {
  .agent-demo-progress { padding: 10px 12px; }
  .agent-demo-progress li:not(:last-child)::after,
  .agent-demo-progress li:not(:last-child)::before { display: none; }
  .agent-demo-rebate-card { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
  .agent-demo-review-row { grid-template-columns: 1fr; gap: 4px; }
  .agent-demo-review-rebate-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .agent-demo-review-rebate-result { text-align: left; }
}

.invite-method { margin: 0; padding: 8px 14px 14px; }
.invite-method legend { padding: 0 5px; color: var(--text-primary, #18243a); font-size: 13px; font-weight: 700; }
.invite-method-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.invite-method-option {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px;
  border: 1px solid var(--border-light, #e1e8f1); border-radius: 8px;
  background: var(--surface, #fff); cursor: pointer;
  transition: border-color .16s, background-color .16s, box-shadow .16s;
}
.invite-method-option:hover { border-color: #a9c9ff; background: #f8faff; }
.invite-method-option:has(input:checked) { border-color: #8bb9ff; background: #f1f6ff; box-shadow: 0 0 0 1px rgba(36, 127, 255, .08); }
.invite-method-option:has(input:focus-visible) { outline: 2px solid var(--blue, #247fff); outline-offset: 2px; }
.invite-method-option input { margin: 0; }
.invite-method-copy { display: grid; min-width: 0; gap: 3px; }
.invite-method-copy strong { color: var(--text-primary, #18243a); font-size: 12px; line-height: 1.3; }
.invite-method-copy small { color: var(--text-secondary, #687b98); font-size: 11px; line-height: 1.35; }
@media (max-width: 560px) { .invite-method-options { grid-template-columns: 1fr; } }
.invite-offer-panel { padding: 18px; display: grid; gap: 16px; }
.invite-offer-panel h4, .invite-offer-panel p { margin: 0; }
.invite-offer-panel p { color: var(--text-secondary, #556478); font-size: 13px; }
.invite-review-package { display: grid; gap: 4px; overflow-wrap: anywhere; }
.invite-review-package + .invite-review-package { border-top: 1px solid var(--border-light, #e8edf3); padding-top: 8px; margin-top: 4px; }
.invite-review-package > span { font-weight: 500; }
.invite-offer-panel header { display: grid; gap: 4px; }
.invite-package-group { display: grid; gap: 6px; min-width: 0; }
.invite-package-group > label { font-size: 13px; font-weight: 600; }
.invite-package-group > label em { margin-left: 5px; color: var(--muted, #7c899b); font-size: 11px; font-style: normal; font-weight: 600; }
.invite-package-search { position: relative; }
.invite-package-search::after {
  content: ""; position: absolute; right: 14px; top: calc(50% - 5px); width: 6px; height: 6px;
  border: solid var(--muted, #657892); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none;
}
.invite-defaults { margin-top: 12px; padding: 12px 14px; }
.invite-package-search input {
  width: 100%; min-height: 38px; box-sizing: border-box; padding: 8px 34px 8px 12px; font: inherit; font-size: 13px;
  color: inherit; background: var(--surface, #fff); border: 1px solid var(--border, #dce3ed); border-radius: 8px;
}
.invite-package-search input:focus { outline: 2px solid var(--blue, #247fff); outline-offset: -1px; }
.invite-package-menu {
  max-height: 195px; overflow-y: auto; overscroll-behavior: contain; padding: 4px;
  background: var(--surface, #fff); border: 1px solid var(--border, #dce3ed); border-radius: 8px;
  box-shadow: 0 4px 12px rgba(35, 56, 84, .08);
}
.invite-package-menu [role="option"] {
  position: relative; display: grid; gap: 2px; width: 100%; padding: 8px 30px 8px 9px; border: 0;
  border-radius: 5px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.invite-package-menu [role="option"]:is(:hover, .is-highlighted) { background: var(--surface-muted, #f2f6fc); }
.invite-package-menu [aria-selected="true"]::after { content: "✓"; position: absolute; right: 10px; top: 8px; color: var(--blue, #247fff); }
.invite-package-menu strong { font-size: 13px; overflow-wrap: anywhere; }
.invite-package-menu small, .invite-package-menu p { color: var(--text-secondary, #556478); font-size: 12px; }
.invite-package-menu p { padding: 8px; }
.invite-package-selected { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.invite-package-selected:empty { display: none; }
.invite-package-tag {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 26px; box-sizing: border-box;
  padding: 3px 5px 3px 10px; border: 1px solid rgba(var(--blue-rgb, 36, 127, 255), .2); border-radius: 7px;
  background: rgba(var(--blue-rgb, 36, 127, 255), .06); color: var(--text-primary, #1e293b);
  font-size: 12px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere;
  transition: border-color .14s, background-color .14s;
}
.invite-package-tag > span { min-width: 0; }
.invite-package-tag [data-remove-package] {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: var(--muted, #64748b); cursor: pointer;
  transition: background-color .14s, color .14s;
}
.invite-package-tag button svg { display: block; pointer-events: none; }
.invite-package-tag [data-remove-package]:hover { background: rgba(var(--blue-rgb, 36, 127, 255), .14); color: var(--blue, #247fff); }
.invite-package-tag button:focus-visible { outline: 2px solid var(--blue, #247fff); outline-offset: 1px; }
.invite-package-name {
  min-width: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: inherit;
  font: inherit; text-align: start; overflow-wrap: anywhere; cursor: help;
}
.invite-package-preview:not([hidden]) {
  position: absolute; z-index: 8; top: 100%; display: grid; gap: 8px; box-sizing: border-box;
  overflow: auto; overscroll-behavior: contain; padding: 12px 14px;
  background: color-mix(in srgb, var(--surface-muted, #f3f6fb) 68%, #839bb8 18%);
  color: var(--text-strong, #0f172a); border: 1px solid rgba(113, 139, 172, .32); border-radius: 10px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px rgba(28, 52, 82, .16); font-size: 12px; font-weight: 500; line-height: 1.45;
}
.invite-package-preview.is-above { top: auto; bottom: 100%; }
.invite-preview-purpose, .invite-preview-empty { color: var(--text-soft, #475569); }
.invite-preview-server { display: grid; gap: 4px; border-top: 1px solid rgba(113, 139, 172, .24); padding-top: 7px; }
.invite-preview-server > span { display: flex; flex-wrap: wrap; gap: 4px; }
:root .invite-package-preview .invite-preview-server > span > small {
  padding: 1px 7px; border-radius: 5px; background: rgba(var(--blue-rgb, 36, 127, 255), .09);
  color: var(--text-soft, #475569); font: inherit;
}
