.admin-benefits-workbench { display: grid; gap: var(--admin-space-section); min-width: 0; }
.admin-benefits-heading, .admin-benefits-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-benefits-heading h2 { margin: 0 auto 0 0; font-size: 22px; }
.admin-benefits-heading-actions { display: flex; gap: 12px; align-items: center; }
.admin-benefits-workbench .admin-benefits-heading-actions > button { box-sizing: border-box; height: 44px; min-height: 44px; margin: 0; padding: 8px 16px; font: inherit; line-height: 1.4; display: inline-flex; align-items: center; justify-content: center; }
.admin-benefits-workbench .secondary-button { min-height: 40px; padding: 8px 16px; border: 1px solid var(--admin-border-subtle, #dfe5ec); border-radius: 8px; background: var(--admin-surface, #fff); color: var(--admin-text-primary, #243044); font: inherit; cursor: pointer; }
.admin-benefits-workbench .secondary-button:hover:not(:disabled) { background: #f4f1ff; border-color: #b7a2f8; }
.admin-benefits-workbench button:disabled { cursor: not-allowed; opacity: .55; }
.admin-benefits-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.admin-benefits-filters .field { min-width: 180px; }
.admin-benefits-workbench .field { display: grid; gap: 6px; font-size: 14px; min-width: 0; }
.admin-benefits-workbench .field[hidden] { display: none; }
.admin-benefits-workbench input, .admin-benefits-workbench select, .admin-benefits-workbench textarea { width: 100%; min-height: 40px; border: 1px solid var(--admin-border-subtle, #dfe5ec); border-radius: 8px; padding: 8px 12px; font: inherit; color: inherit; background: var(--admin-surface, #fff); }
.admin-benefits-table-scroll { overflow-x: auto; border: 1px solid var(--admin-border-subtle, #dfe5ec); border-radius: var(--admin-surface-radius); background: var(--admin-surface, #fff); }
.admin-benefits-table { width: 100%; min-width: 740px; border-collapse: collapse; text-align: left; font-size: 14px; }
.admin-benefits-table th, .admin-benefits-table td { padding: 14px 16px; border-bottom: 1px solid var(--admin-border-subtle, #dfe5ec); vertical-align: middle; }
.admin-benefits-table th { background: #f8fafc; color: var(--admin-text-muted); font-weight: 600; }
.admin-benefits-row-actions { white-space: nowrap; }
.admin-benefits-row-actions button + button { margin-left: 8px; }
.admin-benefits-editor { padding: 24px; width: 100%; max-width: 1040px; justify-self: center; box-sizing: border-box; }
.admin-benefits-editor h3 { margin: 0 0 20px; font-size: 20px; }
.admin-benefits-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-benefits-form > p, .admin-benefits-form > .admin-benefits-actions { grid-column: 1 / -1; }
.admin-benefits-group-title { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid var(--admin-border-subtle); font-size: 16px; }
.admin-benefits-group-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.admin-benefits-form > .field:has(textarea) { grid-column: 1 / -1; }
.coupon-scope-tree { max-height: 400px; overflow: auto; min-width: 0; }
.coupon-scope-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; padding-block: 4px; }
.coupon-scope-row small { color: var(--admin-text-muted); font-size: 13px; }
.coupon-scope-choice { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; overflow-wrap: anywhere; }
.admin-benefits-workbench .coupon-scope-choice input { flex: 0 0 18px; width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--admin-accent, #5b2cf4); }
.coupon-scope-toggle { border: 0; background: transparent; color: var(--admin-text-primary); min-height: 44px; padding: 4px 8px; font: inherit; cursor: pointer; }
.coupon-scope-children { padding-left: 24px; }
.coupon-scope-row { display:grid; grid-template-columns:28px minmax(0,1fr); align-items:start; column-gap:4px; }
.coupon-scope-row .coupon-scope-choice { display:grid; grid-template-columns:18px minmax(0,1fr); align-items:start; gap:8px; line-height:24px; padding:10px 0; }
.coupon-scope-row .coupon-scope-choice input { width:18px; height:18px; min-height:18px; padding:0; margin:3px 0 0; }
.coupon-scope-toggle { display:flex; width:28px; height:44px; align-items:center; justify-content:center; padding:0; line-height:1; }
.coupon-scope-toggle svg { display:block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; }
.coupon-scope-arrow-slot { width:28px; }
.coupon-scope-children { padding-left:20px; border-left:1px solid #eef0f3; }
.coupon-scope-search-box { position:relative; }
.admin-benefits-scope-picker > .field { display:grid; gap:6px; min-width:0; font-size:14px; }
.coupon-scope-search-box input { box-sizing:border-box; width:100%; min-height:46px; padding:8px 94px 8px 12px; border:1px solid var(--admin-border-subtle,#dfe5ec); border-radius:8px; background:var(--admin-surface,#fff); color:inherit; font:inherit; }
.coupon-scope-clear { position:absolute; right:1px; top:1px; bottom:1px; width:88px; min-height:44px; padding:0 8px; background:transparent; border:0; color:var(--admin-text-muted,#606b79); }
.coupon-scope-row small { display:inline; font-size:12px; }
.admin-benefits-scope-selected button { white-space: normal; text-align: left; overflow-wrap: anywhere; max-width: 100%; }
.admin-benefits-scope-picker { grid-column: 1 / -1; display: grid; gap: 12px; border: 1px solid var(--admin-border-subtle, #dfe5ec); border-radius: 8px; padding: 16px; min-width: 0; }
.admin-benefits-scope-picker[hidden] { display: none; }
.admin-benefits-scope-options { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.admin-benefits-scope-options label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.admin-benefits-scope-options input { width: 18px; min-height: 18px; accent-color: #5b2cf4; }
.admin-benefits-scope-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-benefits-codes { display: grid; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--admin-border-subtle, #dfe5ec); }
.admin-benefits-codes h4 { margin: 0; font-size: 16px; }
.admin-benefits-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; min-height: 48px; overflow-wrap: anywhere; }
.admin-benefits-code-row span:first-child { font-variant-numeric: tabular-nums; }
.admin-benefits-form .admin-benefits-actions { justify-content: flex-end; margin-top: 12px; }
.admin-benefits-form .admin-benefits-actions > button { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; height:44px; min-height:44px; margin:0; padding:8px 16px; line-height:1; }
.admin-benefits-form .admin-benefits-actions .admin-button { --admin-button-height:44px; }
.admin-benefits-warning { padding: 16px; border: 1px solid #e4c27b; border-radius: 8px; background: #fff9eb; color: #624700; line-height: 1.7; }
.admin-benefits-field-hint { margin: 0; color: var(--admin-text-muted); line-height: 1.65; }
.admin-benefits-error { color: #a52323; line-height: 1.65; }
.admin-benefits-field-error { color: #a52323; font-size: 13px; line-height: 1.5; }
.admin-benefits-field-error:empty { display: none; }
.admin-benefits-workbench [aria-invalid="true"] { border-color: #a52323; }
.admin-benefits-feedback { color: #245a42; line-height: 1.65; }
.channel-funds-workbench { display: grid; gap: 20px; min-width: 0; }
.channel-funds-workbench h2 { margin: 0; font-size: 22px; }
.channel-funds-workbench .secondary-button, .customer-channel-picker button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--admin-border-subtle, #dfe5ec); border-radius: 8px; background: var(--admin-surface, #fff); color: var(--admin-text-primary, #243044); font: inherit; cursor: pointer; }
.channel-funds-workbench .field, .customer-channel-picker .field { display: grid; gap: 6px; }
.channel-funds-workbench input, .channel-funds-workbench select, .customer-channel-picker input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--admin-border-subtle); border-radius: 8px; background: var(--admin-surface, #fff); color: var(--admin-text-primary); font: inherit; min-width: 0; }
.channel-funds-workbench td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.customer-channel-picker { display: grid; grid-column: 1 / -1; gap: 12px; min-width: 0; }
.customer-channel-options { display: flex; flex-wrap: wrap; gap: 8px; max-height: 160px; overflow: auto; }
.customer-channel-picker p { margin: 0; overflow-wrap: anywhere; }
.customer-channel-picker button { justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
.admin-benefits-workbench input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; justify-self: start; accent-color: var(--admin-accent, #5b2cf4); }
.channel-settlement-qr dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; border: 1px solid var(--admin-border-subtle); border-radius: 12px; padding: 24px; color: var(--admin-text-primary); background: var(--admin-surface, #fff); }
.channel-settlement-qr dialog::backdrop { background: rgb(15 23 42 / 45%); }
.channel-settlement-qr dialog img { display: block; max-height: 340px; margin: 16px auto; object-fit: contain; }
.channel-funds-workbench :focus-visible, .customer-channel-picker :focus-visible { outline: 2px solid var(--admin-accent, #5b2cf4); outline-offset: 3px; }
.channel-settlement-review-form { display: grid; gap: 12px; }
.channel-settlement-review-form:empty { display: none; }
.channel-settlement-review-form input[type=checkbox] { width: 20px; min-height: 20px; }
.admin-benefits-workbench :focus-visible { outline: 2px solid #5b2cf4; outline-offset: 3px; }
.referrer-tabs { display:flex; flex-wrap:wrap; gap:8px; border-bottom:1px solid var(--admin-border-subtle,#dfe5ec); padding-bottom:12px; }
.referrer-tabs button[aria-selected="true"] { color:#4c2db7; border-color:#8065d8; background:#f3efff; font-weight:650; }
.referrer-config-form, .referrer-activity-editor, .referrer-alerts { display:grid; gap:20px; min-width:0; }
.referrer-section-intro { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; border:1px solid var(--admin-border-subtle,#dfe5ec); border-radius:12px; background:#fff; }
.referrer-switch, .referrer-confirm { display:flex; align-items:center; gap:10px; min-height:44px; font-size:14px; }
.referrer-switch input, .referrer-confirm input, .referrer-admin-choice input { flex:0 0 20px; width:20px!important; height:20px!important; min-height:20px!important; padding:0!important; accent-color:var(--admin-accent,#5b2cf4); }
.referrer-admin-list { display:grid; gap:12px; }
.referrer-admin-card { padding:16px 18px; border:1px solid var(--admin-border-subtle,#dfe5ec); border-radius:12px; background:#fff; }
.referrer-admin-choice { display:flex; gap:12px; align-items:center; min-height:52px; }
.referrer-admin-avatar { width:48px; height:48px; border-radius:50%; object-fit:cover; background:#eef1f5; }
.referrer-admin-identity { display:grid; flex:1 1 auto; gap:4px; min-width:160px; }
.referrer-admin-identity strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.referrer-admin-identity small { color:var(--admin-text-muted,#606b79); }
.referrer-admin-fields { display:grid; grid-template-columns:1.1fr 1.5fr .65fr 1fr; gap:14px; margin-top:16px; padding-top:16px; border-top:1px solid #edf0f4; }
.referrer-admin-fields[hidden] { display:none; }
.referrer-activity-layout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:20px; align-items:start; }
.referrer-activity-editor { padding:20px; }
.referrer-short-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
.referrer-activity-editor textarea { min-height:112px; resize:vertical; }
.referrer-preview { display:grid; gap:16px; padding:20px; position:sticky; top:16px; }
.referrer-preview h3, .referrer-alerts h3 { margin:0; font-size:18px; }
.referrer-preview-phone { position:relative; width:min(100%,390px); min-height:600px; justify-self:center; overflow:hidden; border:1px solid #d9dee7; border-radius:28px; background:#f5f6fa; box-shadow:0 18px 44px rgb(28 35 56 / 12%); }
.referrer-preview-page { min-height:600px; padding:28px 20px; color:#7a8494; background:linear-gradient(180deg,#fbfcff,#f0f2f7); }
.referrer-preview-shade { position:absolute; inset:0; display:flex; align-items:center; padding:16px; background:rgb(24 20 35 / 54%); backdrop-filter:blur(3px); }
.referrer-preview-sheet { width:100%; max-height:calc(100% - 32px); display:grid; gap:12px; overflow-x:hidden; overflow-y:auto; padding:0 22px 22px; border:1px solid rgb(202 195 217 / 90%); border-radius:24px; background:#fff; box-shadow:0 24px 70px rgb(26 28 31 / 28%); }
.referrer-preview-image { width:calc(100% + 44px); aspect-ratio:16/7; margin:0 -22px; object-fit:cover; background:#eeeafa; }
.referrer-preview-image[hidden] { display:none; }
.referrer-preview-kicker { margin-top:22px; color:#4500c5; font-size:12px; font-weight:700; letter-spacing:.08em; }
.referrer-preview-image:not([hidden]) + .referrer-preview-kicker { margin-top:8px; }
.referrer-preview-sheet h4 { margin:0; font-size:22px; line-height:1.35; }
.referrer-preview-sheet p { margin:0; color:#606b79; line-height:1.65; }
.referrer-preview-sheet .primary-button { width:100%; min-height:48px; margin-top:6px; background:#4500c5; }
.referrer-preview-dismiss { min-height:44px; border:0; background:transparent; color:#646d7b; font:inherit; }
.referrer-save-controls { grid-column:1/-1; display:grid; grid-template-columns:minmax(240px,1fr) auto auto; gap:16px; align-items:end; padding:18px 20px; border:1px solid var(--admin-border-subtle,#dfe5ec); border-radius:12px; background:#fff; }
.referrer-save-controls .primary-button { min-height:44px; align-self:end; }
.referrer-inline-alert { grid-column:1/-1; margin:0; }
.referrer-alerts { max-width:960px; }
.referrer-alerts h3:not(:first-child) { margin-top:8px; padding-top:20px; border-top:1px solid var(--admin-border-subtle,#dfe5ec); }
.referrer-empty { margin:0; padding:20px; border:1px dashed var(--admin-border-subtle,#dfe5ec); border-radius:12px; color:var(--admin-text-muted,#606b79); background:#fff; }
@media (max-width: 600px) {
  .admin-benefits-form { grid-template-columns: 1fr; }
  .admin-benefits-editor { padding: 16px; }
  .admin-benefits-filters { display: grid; grid-template-columns: 1fr; }
  .admin-benefits-heading h2 { width: 100%; }
  .admin-benefits-workbench button { min-height: 44px; }
  .referrer-section-intro { align-items:flex-start; }
  .referrer-admin-choice { display:grid; grid-template-columns:20px 44px minmax(0,1fr); }
  .referrer-admin-choice .status-badge { grid-column:2/-1; justify-self:start; }
  .referrer-admin-identity { min-width:0; }
  .referrer-admin-fields, .referrer-short-fields, .referrer-activity-layout, .referrer-save-controls { grid-template-columns:1fr; }
  .referrer-preview { position:static; }
  .referrer-preview-phone { min-height:540px; border-radius:22px; }
  .referrer-preview-page { min-height:540px; }
  .referrer-save-controls .primary-button { width:100%; }
}
