/*
 * Settings › Integrations: a legacy app's Auth tab (app-sync-details) and its Edit app page
 * (app-sync-edit), from the 6 Nov data-integration design (HUB-687). Copied from the design's
 * assets/css/app-sync-details.css and app-sync-edit.css: only the asd- / ase- rules (the
 * design's body.layout-full and sk- drawer rules are left out; the scope drawer is the Service
 * Keys one). CRM additions at the end.
 */

/* ---- app-sync-details.css (Auth tab, Webhooks empty state) ---- */
.asd-info-banner { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background-color: var(--surface-2, #f9fafb); border: 1px solid var(--border, #e4e7ec); border-radius: var(--radius, 10px); color: var(--text-muted, #475467); font-size: 13.5px; }
.asd-auth-value-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background-color: var(--surface-2, #f9fafb); border: 1px solid var(--border, #e4e7ec); border-radius: var(--radius, 10px); margin-top: var(--sp-2); }
.asd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; color: var(--text, #101828); }
.asd-action-link { background: none; border: none; padding: 0; font-size: 13.5px; font-weight: 500; color: var(--brand, #0070e0); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.asd-action-link:hover { color: var(--brand-hover, #0056b3); }
.asd-action-divider { color: var(--border-strong, #cbd5e1); }
.asd-scopes-wrap { margin-top: var(--sp-3); max-height: 280px; overflow-y: auto; padding: var(--sp-1); }
.asd-scopes-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.asd-scope-badge { display: inline-flex; align-items: center; padding: 4px 10px; background-color: var(--surface-2, #f9fafb); border: 1px solid var(--border, #e4e7ec); border-radius: var(--radius-pill, 999px); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11.5px; color: var(--text-muted, #475467); letter-spacing: -0.01em; transition: all 0.15s ease; }
.asd-scope-badge:hover { background-color: var(--surface-hover, #f2f4f7); border-color: var(--border-strong, #d0d5dd); color: var(--text, #101828); }
.asd-empty-state { text-align: center; padding: var(--sp-12) var(--sp-6); background: var(--surface, #ffffff); border: 1px solid var(--border, #e4e7ec); border-radius: var(--radius-lg, 12px); margin-top: var(--sp-4); }
.asd-empty-icon { width: 56px; height: 56px; margin: 0 auto var(--sp-4); color: var(--warning, #eab308); }
.asd-empty-title { font-size: 18px; font-weight: 600; color: var(--text, #101828); margin: 0 0 var(--sp-2); }
.asd-empty-desc { font-size: 14px; color: var(--text-muted, #475467); max-width: 480px; margin: 0 auto var(--sp-3); line-height: 1.5; }

/* ---- app-sync-edit.css (Edit app) ---- */
.ase-page { display: flex; flex-direction: column; min-height: 100vh; width: 100%; background-color: var(--bg, #f5f8fa); color: var(--text, #101828); }
.ase-topbar { background-color: #1e293b; color: #ffffff; height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; flex-shrink: 0; }
.ase-topbar__left { display: flex; align-items: center; width: 200px; }
.ase-topbar__center { display: flex; align-items: center; justify-content: center; flex: 1; }
.ase-topbar__right { display: flex; align-items: center; justify-content: flex-end; width: 200px; }
.ase-back-link { display: inline-flex; align-items: center; gap: 6px; color: #ffffff; font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity 0.15s ease; }
.ase-back-link:hover { opacity: 0.85; text-decoration: none; }
.ase-title-wrap { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm, 4px); transition: background-color 0.15s ease; }
.ase-title-wrap:hover { background-color: rgba(255, 255, 255, 0.1); }
.ase-title { color: #ffffff; font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.01em; white-space: nowrap; }
.ase-title-edit-btn { background: none; border: none; padding: 2px; color: rgba(255, 255, 255, 0.7); cursor: pointer; border-radius: var(--radius-sm, 4px); display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s ease; }
.ase-title-edit-btn:hover { color: #ffffff; background-color: rgba(255, 255, 255, 0.2); }
.ase-commit-btn { font-weight: 600; padding: 8px 18px; border-radius: var(--radius, 6px); white-space: nowrap; }
.ase-subnav { background-color: var(--surface, #ffffff); border-bottom: 1px solid var(--border, #e4e7ec); height: 52px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 56px; z-index: 90; flex-shrink: 0; }
.ase-subnav__left { display: flex; align-items: center; width: 200px; }
.ase-subnav__center { display: flex; align-items: center; justify-content: center; flex: 1; }
.ase-subnav__right { width: 200px; }
.ase-learn-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border, #e4e7ec); border-radius: 9999px; background: var(--surface, #ffffff); color: var(--text, #33475b); font-size: 13px; font-weight: 500; text-decoration: none; transition: all 0.15s ease; }
.ase-learn-pill:hover { border-color: var(--border-strong, #cbd5e1); background-color: var(--surface-hover, #f8fafc); text-decoration: none; }
.ase-tabs { display: flex; align-items: center; gap: 28px; height: 52px; margin: 0; }
.ase-tab { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 4px; background: none; border: none; border-bottom: 3px solid transparent; color: var(--text-muted, #516f90); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; position: relative; white-space: nowrap; }
.ase-tab:hover { color: var(--text, #101828); }
.ase-tab.is-active { color: var(--text, #101828); font-weight: 600; border-bottom-color: var(--text, #33475b); }
.ase-tab__icon { width: 16px; height: 16px; flex-shrink: 0; }
.ase-content-container { max-width: 820px; width: 100%; margin: 0 auto; padding: 36px 24px 80px; flex: 1; box-sizing: border-box; }
.ase-section-title { font-size: 22px; font-weight: 700; color: var(--text, #101828); margin: 0 0 8px; letter-spacing: -0.015em; }
.ase-section-desc { font-size: 14px; color: var(--text-muted, #516f90); line-height: 1.5; margin: 0 0 32px; }
.ase-tab-panel { display: none; }
.ase-tab-panel.is-active { display: block; }
.ase-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--radius, 6px); margin-bottom: 28px; animation: aseFadeIn 0.2s ease-out; }
.ase-banner--info { background-color: #eaf8fb; border-left: 4px solid var(--brand, #0091ae); color: #1e3a5f; }
.ase-banner--warning { background-color: #fef8e7; border-left: 4px solid #f59e0b; color: #92400e; }
.ase-banner--danger { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.ase-banner__content { display: flex; align-items: flex-start; gap: 12px; flex: 1; }
.ase-banner__icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.ase-banner__text { font-size: 13.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 2px; }
.ase-banner__close { background: none; border: none; padding: 2px; color: inherit; cursor: pointer; opacity: 0.6; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transition: opacity 0.15s ease; }
.ase-banner__close:hover { opacity: 1; }
.ase-field-group { margin-bottom: 28px; }
.ase-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text, #101828); margin-bottom: 4px; }
.ase-required { color: var(--danger, #f2545b); }
.ase-help-text { font-size: 13px; color: var(--text-muted, #516f90); line-height: 1.45; margin: 0 0 10px; }
.ase-link-btn { background: none; border: none; padding: 0; color: var(--brand, #0070e0); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; margin-bottom: 8px; transition: text-decoration 0.15s ease; }
.ase-link-btn:hover { text-decoration: underline; }
.ase-info-tip { color: var(--text-muted, #516f90); cursor: help; display: inline-flex; align-items: center; }
.ase-input, .ase-textarea { width: 100%; border: 1px solid var(--border, #cbd5e1); border-radius: var(--radius, 6px); background: var(--surface, #ffffff); color: var(--text, #101828); font-family: inherit; font-size: 14px; padding: 9px 12px; transition: all 0.15s ease; box-sizing: border-box; }
.ase-input { height: 40px; }
.ase-input:focus, .ase-textarea:focus { outline: none; border-color: var(--brand, #0070e0); box-shadow: 0 0 0 3px rgba(0, 112, 224, 0.15); }
.ase-counter { font-size: 12px; color: var(--text-muted, #516f90); text-align: right; margin-top: 6px; }
.ase-logo-upload-wrap { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.ase-logo-avatar { width: 56px; height: 56px; border-radius: 8px; background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%); color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.ase-logo-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ase-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border, #cbd5e1); border-radius: var(--radius, 6px); background: var(--surface, #ffffff); color: var(--text, #101828); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; }
.ase-upload-btn:hover { background-color: var(--surface-hover, #f8fafc); border-color: var(--border-strong, #94a3b8); }
.ase-scopes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 12px; }
.ase-sub-title { font-size: 16px; font-weight: 600; color: var(--text, #101828); margin: 0; }
.ase-scopes-list { display: flex; flex-direction: column; }
.ase-scope-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-light, #f1f5f9); }
.ase-scope-badge { background-color: var(--surface-2, #eaedf1); color: var(--text, #33475b); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; padding: 4px 10px; border-radius: 4px; display: inline-block; line-height: 1.4; }
.ase-scope-del-btn { background: none; border: none; padding: 4px 8px; color: var(--brand, #007a87); font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 4px; transition: all 0.15s ease; }
.ase-scope-del-btn:hover { color: var(--danger, #f2545b); background-color: rgba(242, 84, 91, 0.08); }
.ase-webhooks-settings-grid { display: grid; grid-template-columns: 1fr 180px; gap: 24px; align-items: start; margin-bottom: 40px; }
.ase-url-prefix-input { display: flex; align-items: stretch; width: 100%; }
.ase-url-addon { display: inline-flex; align-items: center; padding: 0 12px; background-color: var(--surface-2, #f2f4f7); border: 1px solid var(--border, #cbd5e1); border-right: none; border-radius: var(--radius, 6px) 0 0 var(--radius, 6px); color: var(--text-muted, #516f90); font-size: 14px; font-weight: 500; }
.ase-url-input { border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0 !important; flex: 1; }
.ase-field-error { color: var(--danger, #f2545b); font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.ase-subscriptions-section { margin-top: 36px; padding-top: 4px; }
.ase-subscriptions-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ase-sub-empty { padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface, #ffffff); border: 1px dashed var(--border-strong, #cbd5e1); border-radius: var(--radius-md, 8px); }
.ase-sub-empty__icon-wrap { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2, #fef3c7); color: var(--warning-ink, #d97706); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.ase-sub-empty__title { font-size: 18px; font-weight: 700; color: var(--text, #101828); margin: 0 0 8px; }
.ase-sub-empty__desc { font-size: 14px; color: var(--text-muted, #516f90); max-width: 480px; margin: 0 0 16px; line-height: 1.5; }
.ase-learn-link { color: var(--brand, #0070e0); font-size: 13.5px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ase-learn-link:hover { text-decoration: underline; }
.ase-sub-table-wrap { border: 1px solid var(--border, #e4e7ec); border-radius: var(--radius-md, 8px); overflow: hidden; background: var(--surface, #ffffff); box-shadow: var(--shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.04)); width: 100%; }
.ase-sub-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 14px; }
.ase-sub-table thead tr { background: var(--surface-2, #f9fafb); border-bottom: 1px solid var(--border, #e4e7ec); }
.ase-sub-table th { padding: 12px 18px; background: var(--surface-2, #f9fafb); color: var(--text-muted, #475467); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; text-align: left; border-bottom: 1px solid var(--border, #e4e7ec); white-space: nowrap; }
.ase-sub-table th.ase-th-object { width: 25%; padding-left: 20px; }
.ase-sub-table th.ase-th-event { width: 45%; }
.ase-sub-table th.ase-th-status { width: 15%; text-align: center; }
.ase-sub-table th.ase-th-actions { width: 15%; text-align: right; padding-right: 20px; }
.ase-sub-table tbody tr { border-bottom: 1px solid var(--border, #e4e7ec); background: var(--surface, #ffffff); transition: background-color 0.12s ease; }
.ase-sub-table tbody tr:last-child { border-bottom: none; }
.ase-sub-table tbody tr:hover { background-color: var(--surface-hover, #f8fafc); }
.ase-sub-table td { padding: 14px 18px; vertical-align: middle; color: var(--text, #101828); font-size: 14px; }
.ase-sub-td--object { padding-left: 20px !important; font-weight: 600; color: var(--text, #101828); }
.ase-sub-td--event { min-width: 0; }
.ase-event-code { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; line-height: 1.4; color: var(--text, #101828); background: var(--surface-3, #eef1f5); border: 1px solid var(--border, #e4e7ec); border-radius: 4px; padding: 3px 8px; font-weight: 500; }
.ase-sub-td--status { text-align: center !important; }
.ase-sub-td--actions { text-align: right !important; padding-right: 20px !important; }
.ase-table-switch { position: relative; display: inline-flex; align-items: center; width: 38px; height: 20px; cursor: pointer; user-select: none; margin: 0 auto; vertical-align: middle; }
.ase-table-switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.ase-table-switch__slider { position: absolute; inset: 0; background-color: var(--border-strong, #cbd5e1); border-radius: 20px; transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.ase-table-switch__slider::before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: #ffffff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.ase-table-switch input:checked + .ase-table-switch__slider { background-color: var(--brand, #2456e6); }
.ase-table-switch input:checked + .ase-table-switch__slider::before { transform: translateX(18px); }
.ase-table-switch:focus-within .ase-table-switch__slider { box-shadow: 0 0 0 3px var(--focus-ring, rgba(36, 86, 230, 0.2)); }
.ase-table-del-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm, 6px); background: transparent; color: var(--text-muted, #64748b); cursor: pointer; transition: all 0.15s ease; }
.ase-table-del-btn:hover { background-color: var(--danger-soft, rgba(239, 68, 68, 0.1)); color: var(--danger, #ef4444); }
.ase-table-del-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.ase-drawer-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(16, 24, 40, 0.45); backdrop-filter: blur(2px); z-index: 1100; display: none; opacity: 0; transition: opacity 0.2s ease; }
.ase-drawer-backdrop.is-open { display: block; opacity: 1; }
.ase-drawer { position: fixed; top: 0; right: 0; width: min(760px, 100vw); height: 100vh; background-color: var(--surface, #ffffff); box-shadow: -8px 0 24px rgba(16, 24, 40, 0.12); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); z-index: 1101; }
.ase-drawer-backdrop.is-open .sk-drawer, .ase-drawer-backdrop.is-open .ase-drawer { transform: translateX(0); }
.ase-drawer__head { padding: 20px 30px 18px; min-height: 69px; border-bottom: 1px solid var(--border, #e4e7ec); display: flex; align-items: center; justify-content: space-between; background: var(--surface, #ffffff); }
.ase-drawer__head h2 { font-size: 20px; font-weight: 600; color: var(--text, #101828); margin: 0; }
.ase-drawer__foot { padding: 24px 30px 18px; min-height: 82px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border, #e4e7ec); background: var(--surface, #ffffff); }
.ase-drawer__foot .btn-crm { min-width: 96px; font-weight: 600; }
.ase-drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.ase-drawer__body--padded { padding: 24px 30px; }
.ase-drawer-intro { font-size: 14px; color: var(--text-muted, #516f90); line-height: 1.5; margin: 0 0 24px; }
.ase-toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ase-toggle-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text, #101828); margin-bottom: 4px; }
.ase-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.ase-switch input { opacity: 0; width: 0; height: 0; }
.ase-switch__slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-strong, #cbd5e1); transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 24px; }
.ase-switch__slider::before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #ffffff; transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.ase-switch input:checked + .ase-switch__slider { background-color: var(--brand, #0070e0); }
.ase-switch input:checked + .ase-switch__slider::before { transform: translateX(20px); }
.ase-multi-select { position: relative; }
.ase-multi-select__input { min-height: 42px; padding: 6px 12px; border: 1px solid var(--border, #cbd5e1); border-radius: var(--radius, 6px); background: var(--surface, #ffffff); display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; transition: all 0.15s ease; }
.ase-multi-select__input:focus, .ase-multi-select__input.is-open { outline: none; border-color: var(--brand, #0070e0); box-shadow: 0 0 0 3px rgba(0, 112, 224, 0.15); }
.ase-selected-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.ase-tag { background-color: var(--surface-2, #f2f4f7); color: var(--text, #101828); font-size: 12.5px; font-weight: 500; padding: 3px 8px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; }
.ase-tag__remove { background: none; border: none; padding: 0; color: var(--text-muted, #516f90); cursor: pointer; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; }
.ase-tag__remove:hover { color: var(--danger, #f2545b); }
.ase-multi-select__menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface, #ffffff); border: 1px solid var(--border, #e4e7ec); border-radius: var(--radius, 6px); box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1)); max-height: 220px; overflow-y: auto; padding: 6px 0; z-index: 100; }
.ase-check-opt { display: flex; align-items: center; gap: 12px; padding: 8px 16px; cursor: pointer; font-size: 13.5px; color: var(--text, #101828); transition: background-color 0.15s ease; }
.ase-check-opt:hover { background-color: var(--surface-hover, #f8fafc); }
.ase-check-opt .sk-scope-checkbox { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.ase-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background-color: #1e293b; color: #ffffff; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); z-index: 2000; opacity: 0; pointer-events: none; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.ase-toast.is-show { transform: translateX(-50%) translateY(0); opacity: 1; }
@keyframes aseFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
.ase-topbar { padding: 0 16px; }
.ase-topbar__left, .ase-topbar__right { width: auto; }
.ase-title { font-size: 14px; }
.ase-subnav { padding: 0 16px; }
.ase-subnav__left, .ase-subnav__right { display: none; }
.ase-tabs { gap: 16px; }
.ase-content-container { padding: 24px 16px 60px; }
.ase-webhooks-settings-grid { grid-template-columns: 1fr; }
.ase-drawer { width: 100vw; }
}

/* ---- CRM additions ---- */
.asd-card{padding:20px 24px;margin-bottom:var(--sp-4,16px)}
.asd-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:8px}
.asd-card-head h4{margin:0;font-size:16px;font-weight:700;color:var(--text,#101828)}
.asd-card-head p{margin:4px 0 0;font-size:13px;color:var(--text-muted,#475467)}
.asd-card--danger{border-color:rgba(225,29,72,.25)}
.asd-card--danger h4{color:var(--danger,#e11d48)}
.asd-auth-value-row .asd-mono{min-width:0;overflow-wrap:anywhere}
.asd-auth-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.asd-action-link:disabled{opacity:.55;cursor:default}
.asd-note{margin:8px 0 0;font-size:13px;color:var(--text-muted,#475467)}
.asd-rotate-dropdown{position:relative;flex-shrink:0}
.asd-rotate-dropdown>.btn-crm{display:inline-flex;align-items:center;gap:6px}
.asd-rotate-dropdown>.btn-crm svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.asd-rotate-popover{position:absolute;top:calc(100% + 6px);right:0;z-index:30;width:min(320px,calc(100vw - 32px));padding:16px;background:var(--surface,#fff);border:1px solid var(--border,#e4e7ec);border-radius:12px;box-shadow:0 12px 32px rgba(16,24,40,.16);text-align:left}
.asd-rotate-popover h5{margin:0 0 4px;font-size:14px;font-weight:600;color:var(--text,#101828)}
.asd-rotate-popover p{margin:0 0 12px;font-size:12.5px;color:var(--text-muted,#475467)}
.asd-rotate-popover .btn-crm{width:100%;justify-content:center}
.asd-rotate-popover>div{display:flex;flex-direction:column;gap:8px}
.asd-rotate-popover label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--text,#101828)}
.asd-empty-icon{display:block;fill:none;stroke:currentColor;stroke-width:1.5}
.ase-page{min-height:0;border:1px solid var(--border,#e4e7ec);border-radius:12px;overflow:clip}
.ase-topbar{position:static}
.ase-title-edit-btn svg,.ase-tab__icon,.ase-back-link svg,.ase-banner__icon,.ase-banner__close svg,.ase-learn-pill svg,.ase-info-tip svg{fill:none;stroke:currentColor}
.ase-tab-panel[hidden]{display:none!important}
.ase-scope-row .sk-muted{font-size:12px}
.ase-webhook-status{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0 0;padding:12px 16px;border:1px solid var(--border,#e4e7ec);border-radius:10px;background:var(--surface,#fff);font-size:13px;color:var(--text-muted,#475467)}
.ase-webhook-status>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ase-webhook-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.ase-sub-filter{display:block;margin-top:2px;font-size:12px;color:var(--text-muted,#475467)}
.ase-sub-td--actions{white-space:nowrap}
.ase-table-del-btn+.ase-table-del-btn{margin-left:4px}
.ase-field-help{margin:6px 0 0;font-size:12.5px;color:var(--text-muted,#475467)}
.ase-select{width:100%}
.ase-back-link svg{width:16px;height:16px;stroke-width:2.5}
.ase-title-edit-btn svg{width:14px;height:14px}
.ase-scopes-header .btn-crm,.ase-subscriptions-header .btn-crm{display:inline-flex;align-items:center;gap:6px}
.ase-scopes-header .btn-crm svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.ase-multi-select__input>svg{width:14px;height:14px;flex-shrink:0}
.ase-sub-empty__icon-wrap svg{width:28px;height:28px}
.ase-banner__close svg{width:14px;height:14px}
.ase-sub-table th,.ase-sub-table td{text-transform:none}

/* Event names are code: keep their case (settings tables capitalise the 2nd column). */
.ase-event-code {
  text-transform: none;
}
