/* Hide until Alpine initialises — prevents flash of unstyled content */
#leat-settings[x-cloak] { display: none !important; }

/* Hide WP admin footer on Leat settings page */
.toplevel_page_leat #wpfooter { display: none; }

/* ─── Reset & tokens ──────────────────────────────────────────────── */
#leat-settings *,
#leat-settings *::before,
#leat-settings *::after { box-sizing: border-box; margin: 0; padding: 0; }

#leat-settings {
	--ls-font: "Inter", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--ls-bg: #F0F1F7;
	--ls-card: #FFFFFF;
	--ls-border: #E2E8F0;
	--ls-nav-bg: #FFFFFF;
	--ls-nav-w: 260px;
	--ls-hdr-bg: #0F1123;
	--ls-hdr-h: 56px;
	--ls-accent: #3B4CE0;
	--ls-accent-hover: #2F3FCA;
	--ls-accent-light: #EEF0FF;
	--ls-text: #0F172A;
	--ls-text-muted: #64748B;
	--ls-label: #94A3B8;
	--ls-switch-on: #0F172A;
	--ls-switch-off: #CBD5E1;
	--ls-danger: #EF4444;
	--ls-danger-bg: #FEF2F2;
	--ls-radius: 10px;
	--ls-radius-sm: 6px;
	font-family: var(--ls-font);
	background: var(--ls-bg);
	color: var(--ls-text);
	min-height: calc(100vh - 32px);
}
#leat-settings.ls { display: flex; flex-direction: column; }

/* ─── Header bar ──────────────────────────────────────────────────── */
#leat-settings .ls__hdr { height: var(--ls-hdr-h); background: var(--ls-hdr-bg); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
#leat-settings .ls__hdr-brand { display: flex; align-items: center; gap: 10px; }
#leat-settings .ls__hdr-logo { height: 24px; width: auto; color: #fff; flex-shrink: 0; }
#leat-settings .ls__hdr-version { color: #8892B0; font-size: 13px; }
#leat-settings .ls__hdr-update-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; background: #FEF08A; color: #854D0E; font-size: 11.5px; font-weight: 600; text-decoration: none; transition: background .12s; }
#leat-settings .ls__hdr-update-pill:hover { background: #FDE047; }
#leat-settings .ls__hdr-update-pill i, #leat-settings .ls__hdr-update-pill svg { width: 12px; height: 12px; }
#leat-settings .ls__hdr-actions { display: flex; align-items: center; gap: 10px; }

/* ─── Buttons ─────────────────────────────────────────────────────── */
#leat-settings .ls__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: var(--ls-radius-sm); font-family: var(--ls-font); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; border: none; transition: background .12s, opacity .12s, transform .08s; line-height: 1; white-space: nowrap; }
#leat-settings .ls__btn--ghost { background: transparent; color: #CBD5E1; border: 1px solid #2D3462; }
#leat-settings .ls__btn--ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
#leat-settings .ls__btn--outline { background: transparent; color: var(--ls-text); border: 1px solid var(--ls-border); }
#leat-settings .ls__btn--outline:hover { background: var(--ls-bg); border-color: var(--ls-accent); color: var(--ls-accent); }
#leat-settings .ls__btn--primary { background: var(--ls-accent); color: #fff; }
#leat-settings .ls__btn--primary:hover:not(:disabled) { background: var(--ls-accent-hover); }
#leat-settings .ls__btn--primary:active:not(:disabled) { transform: scale(.98); }
#leat-settings .ls__btn--primary:disabled { opacity: .6; cursor: not-allowed; }
#leat-settings .ls__btn--sm { padding: 5px 12px; font-size: 12px; }
#leat-settings .ls__btn--secondary { background: #F1F5F9; color: var(--ls-text); border: 1px solid var(--ls-border); }
#leat-settings .ls__btn--secondary:hover:not(:disabled) { background: #E2E8F0; }
#leat-settings .ls__btn--secondary:disabled { opacity: .6; cursor: not-allowed; }
#leat-settings .ls__btn--danger { background: #FEF2F2; color: var(--ls-danger); border: 1px solid #FECACA; }
#leat-settings .ls__btn--danger:hover:not(:disabled) { background: #FEE2E2; }
#leat-settings .ls__btn--danger:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Body layout ─────────────────────────────────────────────────── */
#leat-settings .ls__body { display: flex; flex: 1; min-height: 0; }

/* ─── Nav sidebar ─────────────────────────────────────────────────── */
#leat-settings .ls__nav-sidebar { width: var(--ls-nav-w); background: var(--ls-nav-bg); border-right: 1px solid var(--ls-border); flex-shrink: 0; padding: 20px 0; display: flex; flex-direction: column; gap: 0; }
#leat-settings .ls__nav-section { padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
#leat-settings .ls__nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ls-label); padding: 8px 10px 6px; }
#leat-settings .ls__nav-divider { height: 1px; background: var(--ls-border); margin: 12px 16px; }
#leat-settings .ls__nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--ls-radius-sm); border: none; background: none; cursor: pointer; font-family: var(--ls-font); font-size: 13.5px; font-weight: 400; color: var(--ls-text-muted); text-align: left; width: 100%; transition: background .1s, color .1s; position: relative; box-shadow: none; }
#leat-settings .ls__nav-item:hover { background: #F8FAFC; color: var(--ls-text); }
#leat-settings .ls__nav-item--active { background: var(--ls-accent-light); color: var(--ls-accent); font-weight: 500; }
#leat-settings .ls__nav-item--active::after { content: ''; position: absolute; right: 0; top: 6px; bottom: 6px; width: 3px; background: var(--ls-accent); border-radius: 3px 0 0 3px; }
#leat-settings .ls__nav-icon { display: flex; align-items: center; flex-shrink: 0; }
#leat-settings .ls__nav-icon i,
#leat-settings .ls__nav-icon svg { width: 15px; height: 15px; }

/* ─── Content ─────────────────────────────────────────────────────── */
#leat-settings .ls__content { flex: 1; padding: 28px 32px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ─── Loading ─────────────────────────────────────────────────────── */
#leat-settings .ls__loading { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--ls-text-muted); }
#leat-settings .ls__spinner { animation: ls-spin 1s linear infinite; display: inline-block; width: 18px; height: 18px; vertical-align: middle; }
@keyframes ls-spin { to { transform: rotate(360deg); } }

/* ─── Page header ─────────────────────────────────────────────────── */
#leat-settings .ls__page-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
#leat-settings .ls__page-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--ls-text); line-height: 1.2; }
#leat-settings .ls__page-desc { font-size: 13px; color: var(--ls-text-muted); margin-top: 4px; }
#leat-settings .ls__page-hdr-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#leat-settings .ls__docs-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; text-decoration: none; background: var(--ls-card); color: var(--ls-text-muted); border: 1px solid var(--ls-border); }
#leat-settings .ls__docs-link:hover { background: var(--ls-card); color: var(--ls-accent); border-color: var(--ls-accent); }
#leat-settings .ls__docs-link svg { width: 14px; height: 14px; }
#leat-settings .ls__save-btn { padding: 9px 20px; font-size: 13.5px; flex-shrink: 0; }
#leat-settings .ls__save-btn--saved { background: #16A34A !important; }
#leat-settings .ls__save-state { display: flex; align-items: center; gap: 6px; }
#leat-settings .ls__save-state .ls__spinner { width: 13px; height: 13px; }
#leat-settings .ls__save-state svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ─── Two-column tab layout ───────────────────────────────────────── */
#leat-settings .ls__tab-layout { display: flex; align-items: flex-start; gap: 20px; }
#leat-settings .ls__col-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
#leat-settings .ls__col-aside { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }

/* ─── Card header ─────────────────────────────────────────────────── */
#leat-settings .ls__card-hdr { padding: 14px 20px; border-bottom: 1px solid var(--ls-border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#leat-settings .ls__card-hdr-text { flex: 1; }
#leat-settings .ls__card-title { font-size: 13.5px; font-weight: 600; color: var(--ls-text); line-height: 1.3; }
#leat-settings .ls__card-desc { font-size: 12px; color: var(--ls-text-muted); margin-top: 2px; line-height: 1.4; }

/* ─── Connected badge ─────────────────────────────────────────────── */
#leat-settings .ls__badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 500; flex-shrink: 0; line-height: 1.5; }
#leat-settings .ls__badge--connected { background: #DCFCE7; color: #15803D; }
#leat-settings .ls__badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #16A34A; display: inline-block; flex-shrink: 0; }

/* ─── Help block ──────────────────────────────────────────────────── */
#leat-settings .ls__help-block { background: #0F1123; border-radius: var(--ls-radius); padding: 18px 20px; }
#leat-settings .ls__help-eyebrow { color: #8892B0; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
#leat-settings .ls__help-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ls-accent); display: inline-block; flex-shrink: 0; }
#leat-settings .ls__help-desc { color: #94A3B8; font-size: 12.5px; line-height: 1.6; margin-bottom: 12px; }
#leat-settings .ls__help-link { color: #818CF8; font-size: 13px; font-weight: 500; text-decoration: none; }
#leat-settings .ls__help-link:hover { text-decoration: underline; }

/* ─── Alert ───────────────────────────────────────────────────────── */
#leat-settings .ls__alert { padding: 10px 14px; border-radius: var(--ls-radius-sm); font-size: 13px; margin-bottom: 20px; }
#leat-settings .ls__alert--error { background: var(--ls-danger-bg); color: var(--ls-danger); border: 1px solid #FECACA; }
#leat-settings .ls__alert--info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ─── Card ────────────────────────────────────────────────────────── */
#leat-settings .ls__card { background: var(--ls-card); border: 1px solid var(--ls-border); border-radius: var(--ls-radius); overflow: visible; }

/* ─── Fields ──────────────────────────────────────────────────────── */
#leat-settings .ls__field { padding: 18px 24px; border-bottom: 1px solid var(--ls-border); }
#leat-settings .ls__field:last-child { border-bottom: none; }
#leat-settings .ls__field--error .ls__input,
#leat-settings .ls__field--error .ls__select { border-color: var(--ls-danger) !important; }
#leat-settings .ls__field-hdr { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
#leat-settings .ls__field-label { font-size: 13.5px; font-weight: 500; color: var(--ls-text); display: block; }
#leat-settings .ls__field-desc { font-size: 12px; color: var(--ls-text-muted); line-height: 1.55; margin-top: 6px; }
#leat-settings .ls__field-desc a { color: var(--ls-accent); text-decoration: none; }
#leat-settings .ls__field-desc a:hover { text-decoration: underline; }
#leat-settings .ls__field-error { font-size: 12px; color: var(--ls-danger); margin-top: 5px; }
#leat-settings .ls__tooltip { position: relative; display: inline-flex; align-items: center; color: var(--ls-label); cursor: help; }
#leat-settings .ls__tooltip i,
#leat-settings .ls__tooltip svg { width: 13px; height: 13px; }
#leat-settings .ls__tooltip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); background: var(--ls-bg-dark, #1e1e2e); color: #fff; font-size: 11.5px; font-weight: 400; line-height: 1.45; padding: 6px 10px; border-radius: 6px; white-space: normal; width: max-content; max-width: 240px; pointer-events: none; opacity: 0; transition: opacity .15s ease; z-index: 10; }
#leat-settings .ls__tooltip:hover::after { opacity: 1; }

/* ─── Switch field ────────────────────────────────────────────────── */
#leat-settings .ls__switch-row { display: flex; align-items: center; gap: 16px; }
#leat-settings .ls__switch-text { flex: 1; }
#leat-settings .ls__switch-text .ls__field-label { font-size: 14px; }
#leat-settings .ls__switch-text .ls__field-desc { margin-top: 2px; }
#leat-settings .ls__switch { position: relative; width: 36px; height: 20px; border-radius: 10px; border: none; background: var(--ls-switch-off); cursor: pointer; padding: 0; transition: background .15s; flex-shrink: 0; box-shadow: none; outline: none; }
#leat-settings .ls__switch--on { background: var(--ls-switch-on); }
#leat-settings .ls__switch-thumb { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .15s; display: block; }
#leat-settings .ls__switch--on .ls__switch-thumb { transform: translateX(16px); }

/* ─── Text / Select ───────────────────────────────────────────────── */
#leat-settings .ls__input,
#leat-settings .ls__select { display: block; width: 100%; max-width: 520px; padding: 8px 12px; border: 1px solid var(--ls-border); border-radius: var(--ls-radius-sm); font-family: var(--ls-font); font-size: 13.5px; color: var(--ls-text); background: #F8FAFC; outline: none; transition: border-color .12s, box-shadow .12s, background .12s; box-shadow: none; }
#leat-settings .ls__col-aside .ls__input,
#leat-settings .ls__col-aside .ls__select { max-width: 100%; }
#leat-settings .ls__input:focus,
#leat-settings .ls__select:focus { border-color: var(--ls-accent); box-shadow: 0 0 0 3px rgba(59,76,224,.12); background: #fff; }
#leat-settings .ls__input--error { border-color: var(--ls-danger) !important; }
#leat-settings .ls__select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

/* ─── Secret / API key field ──────────────────────────────────────── */
#leat-settings .ls__secret-field { position: relative; max-width: 520px; }
#leat-settings .ls__secret-field .ls__input { padding-right: 42px; }
#leat-settings .ls__secret-toggle { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 38px; display: flex; align-items: center; justify-content: center; background: none; border: none; border-left: 1px solid var(--ls-border); cursor: pointer; color: var(--ls-text-muted); border-radius: 0 var(--ls-radius-sm) var(--ls-radius-sm) 0; transition: color .12s, background .12s; box-shadow: none; }
#leat-settings .ls__secret-toggle:hover { color: var(--ls-text); background: #F1F5F9; }
#leat-settings .ls__secret-toggle svg { width: 16px; height: 16px; }

/* ─── Checkboxes ──────────────────────────────────────────────────── */
#leat-settings .ls__checkboxes { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
#leat-settings .ls__checkbox { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ls-border); cursor: pointer; font-size: 13.5px; color: var(--ls-text); }
#leat-settings .ls__checkbox:last-child { border-bottom: none; padding-bottom: 0; }
#leat-settings .ls__checkbox-input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1.5px solid #CBD5E1; border-radius: 4px; background: #fff; cursor: pointer; flex-shrink: 0; transition: background .12s, border-color .12s; }
#leat-settings .ls__checkbox-input:checked { background: var(--ls-accent); border-color: var(--ls-accent); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 10px 8px; }

/* ─── Translatable ────────────────────────────────────────────────── */
#leat-settings .ls__translatable { display: flex; flex-direction: column; }
#leat-settings .ls__lang-tabs { display: flex; border-bottom: 1px solid var(--ls-border); margin-bottom: 0; width: fit-content; }
#leat-settings .ls__lang-tab { padding: 5px 12px; border: none; background: none; font-size: 11px; font-family: var(--ls-font); color: var(--ls-text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-transform: uppercase; letter-spacing: .05em; font-weight: 500; transition: color .1s, border-color .1s; box-shadow: none; }
#leat-settings .ls__lang-tab:hover { color: var(--ls-text); }
#leat-settings .ls__lang-tab--active { color: var(--ls-accent); border-bottom-color: var(--ls-accent); }
#leat-settings .ls__translatable .ls__input { border-top-left-radius: 0; }

/* ─── Webhook tab ─────────────────────────────────────────────────── */
#leat-settings .ls__card--warning { border-color: #FCD34D; background: #FFFBEB; }
#leat-settings .ls__card--warning .ls__card-hdr { border-bottom-color: #FCD34D; }
#leat-settings .ls__card--warning .ls__card-title { color: #92400E; }
#leat-settings .ls__card--warning .ls__card-desc { color: #A16207; }

#leat-settings .ls__wh-missing-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #FCD34D; gap: 12px; }
#leat-settings .ls__wh-missing-row:last-child { border-bottom: none; }
#leat-settings .ls__wh-missing-name { font-size: 13px; font-weight: 500; color: #92400E; }

#leat-settings .ls__wh-row { padding: 14px 20px; border-bottom: 1px solid var(--ls-border); }
#leat-settings .ls__wh-row:last-child { border-bottom: none; }
#leat-settings .ls__wh-row-main { display: flex; flex-direction: column; gap: 4px; }
#leat-settings .ls__wh-row-top { display: flex; align-items: center; gap: 8px; }
#leat-settings .ls__wh-name { font-size: 13.5px; font-weight: 500; color: var(--ls-text); }
#leat-settings .ls__wh-url { font-size: 12px; color: var(--ls-text-muted); word-break: break-all; }
#leat-settings .ls__wh-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
#leat-settings .ls__wh-event-type { font-size: 11px; font-weight: 500; color: var(--ls-text-muted); background: #F1F5F9; padding: 2px 7px; border-radius: 4px; letter-spacing: .02em; }
#leat-settings .ls__wh-mismatch { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #B45309; }

#leat-settings .ls__badge--active { background: #DCFCE7; color: #15803D; }
#leat-settings .ls__badge--inactive { background: #F1F5F9; color: #64748B; }

#leat-settings .ls__wh-empty { padding: 24px 20px; font-size: 13.5px; color: var(--ls-text-muted); display: flex; align-items: center; gap: 8px; }

#leat-settings .ls__inline-icon { display: inline-block; width: 14px; height: 14px; vertical-align: text-bottom; margin-right: 2px; }
#leat-settings .ls__inline-icon svg { width: 14px; height: 14px; }

/* ─── WP admin overrides ──────────────────────────────────────────── */
#wpbody-content { padding: 0 !important; }
#wpbody-content .wrap { margin: 0 !important; padding: 0 !important; }
#wpcontent { padding-left: 0 !important; }

/* ─── Rule list & form (earn-rules / spend-rules tabs) ────────── */
#leat-settings .ls__rule-loading { display: flex; align-items: center; gap: 8px; padding: 24px 20px; color: var(--ls-text-muted); font-size: 13px; }
#leat-settings .ls__rule-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--ls-border); cursor: pointer; transition: background .1s; }
#leat-settings .ls__rule-row:last-child { border-bottom: none; }
#leat-settings .ls__rule-row:hover { background: #F8FAFC; }
#leat-settings .ls__rule-row-main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
#leat-settings .ls__rule-name { font-size: 13.5px; font-weight: 500; color: var(--ls-text); }
#leat-settings .ls__rule-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#leat-settings .ls__rule-type-chip { font-size: 11px; font-weight: 500; color: var(--ls-text-muted); background: #F1F5F9; padding: 2px 7px; border-radius: 4px; }
#leat-settings .ls__rule-arrow { width: 16px; height: 16px; color: var(--ls-label); flex-shrink: 0; margin-left: 8px; }
#leat-settings .ls__rule-form-footer { padding: 16px 20px; border-top: 1px solid var(--ls-border); display: flex; gap: 8px; }
#leat-settings .ls__back-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ls-text-muted); background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 6px; font-family: var(--ls-font); transition: color .1s; box-shadow: none; }
#leat-settings .ls__back-btn:hover { color: var(--ls-text); }
#leat-settings .ls__rule-back-bar { margin-bottom: 16px; }
#leat-settings .ls__rule-back-bar-right { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
#leat-settings .ls__col-aside .ls__rule-form-footer { border-top: none; flex-direction: column; gap: 0; }

/* ─── Split button ────────────────────────────────────────────────── */
#leat-settings .ls__split-btn { position: relative; display: inline-flex; }
#leat-settings .ls__split-btn-main { border-top-right-radius: 0; border-bottom-right-radius: 0; }
#leat-settings .ls__split-btn-toggle { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid rgba(255,255,255,.25); padding: 7px 8px; display: flex; align-items: center; }
#leat-settings .ls__split-btn-menu { position: absolute; right: 0; bottom: calc(100% + 4px); background: #fff; border: 1px solid var(--ls-border); border-radius: var(--ls-radius-sm); box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 160px; z-index: 10; overflow: hidden; }
#leat-settings .ls__split-btn-option { display: block; width: 100%; text-align: left; padding: 9px 14px; background: none; border: none; font-family: var(--ls-font); font-size: 13px; color: var(--ls-text); cursor: pointer; white-space: nowrap; box-shadow: none; }
#leat-settings .ls__split-btn-option:hover { background: var(--ls-bg); color: var(--ls-accent); }
#leat-settings .ls__btn--ghost.ls__btn--danger { background: none; border: none; color: var(--ls-danger); }
#leat-settings .ls__btn--ghost.ls__btn--danger:hover { background: var(--ls-danger-bg); }
#leat-settings .ls__link { color: var(--ls-accent); text-decoration: underline; }
#leat-settings .ls__btn--icon { width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--ls-border); border-radius: var(--ls-radius-sm); color: var(--ls-text-muted); cursor: pointer; flex-shrink: 0; }
#leat-settings .ls__btn--icon:hover { background: #F8FAFC; color: var(--ls-text); }
#leat-settings .ls__btn--icon:disabled { opacity: .4; cursor: not-allowed; }
#leat-settings .ls__btn--icon i, #leat-settings .ls__btn--icon svg { width: 14px; height: 14px; }
#leat-settings .ls__btn--icon-danger { color: var(--ls-danger); border-color: #FECACA; }
#leat-settings .ls__shops-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ls-text-muted); padding: 2px 0; }
#leat-settings .ls__link-btn { background: none; border: none; padding: 0; font-family: var(--ls-font); font-size: 13px; color: var(--ls-accent); cursor: pointer; text-decoration: underline; }
#leat-settings .ls__btn--icon-danger:hover:not(:disabled) { background: #FEF2F2; }

/* ─── Dialog / modal ─────────────────────────────────────────────── */
#leat-settings .ls__dialog-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); }
#leat-settings .ls__dialog { background: #fff; border-radius: var(--ls-radius); box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-width: 440px; font-family: var(--ls-font); }
#leat-settings .ls__dialog-hdr { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ls-border); }
#leat-settings .ls__dialog-title { font-size: 15px; font-weight: 600; color: var(--ls-text); margin: 0; }
#leat-settings .ls__dialog-close { background: none; border: none; font-size: 20px; line-height: 1; color: var(--ls-text-muted); cursor: pointer; padding: 0 2px; box-shadow: none; }
#leat-settings .ls__dialog-close:hover { color: var(--ls-text); }
#leat-settings .ls__dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
#leat-settings .ls__dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--ls-border); }

/* ─── Onboarding timeline ────────────────────────────────────────── */
#leat-settings .ls__onboarding { max-width: 680px; }
#leat-settings .ls__timeline { position: relative; }

#leat-settings .ls__timeline-step { display: flex; gap: 16px; position: relative; }
#leat-settings .ls__timeline-step:last-child .ls__timeline-line { display: none; }

/* Indicator column */
#leat-settings .ls__timeline-indicator { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 28px; }
#leat-settings .ls__timeline-dot { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; border: 2px solid var(--ls-border); background: var(--ls-card); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s ease; overflow: hidden; position: relative; }
#leat-settings .ls__timeline-dot--active { border-color: var(--ls-accent); background: var(--ls-accent-light); }
#leat-settings .ls__timeline-dot--complete { border-color: #22C55E; background: #22C55E; }
#leat-settings .ls__timeline-num { font-size: 12px; font-weight: 600; color: var(--ls-label); line-height: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; padding: 0; }
#leat-settings .ls__timeline-dot--active .ls__timeline-num { color: var(--ls-accent); }
#leat-settings .ls__timeline-line { width: 2px; flex: 1; background: var(--ls-border); margin: 4px 0; min-height: 16px; }
#leat-settings .ls__timeline-step--complete .ls__timeline-line { background: #22C55E; }

/* Card */
#leat-settings .ls__timeline-card { flex: 1; background: var(--ls-card); border: 1px solid var(--ls-border); border-radius: var(--ls-radius); margin-bottom: 12px; overflow: visible; }
#leat-settings .ls__timeline-header { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 20px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; }
#leat-settings .ls__timeline-header:hover { background: var(--ls-accent-light); border-radius: var(--ls-radius); }
#leat-settings .ls__timeline-title { font-size: 14px; font-weight: 600; color: var(--ls-text); line-height: 1.3; }
#leat-settings .ls__timeline-desc { font-size: 12px; color: var(--ls-text-muted); margin-top: 2px; }
#leat-settings .ls__timeline-body { padding: 0 20px 20px; }

/* Step complete state */
#leat-settings .ls__timeline-step--complete .ls__timeline-title { color: var(--ls-text-muted); }

/* Onboarding form elements */
#leat-settings .ls__ob-form { }
#leat-settings .ls__ob-form .ls__field-label { margin-bottom: 6px; }
#leat-settings .ls__ob-form .ls__field-desc { margin-bottom: 10px; }
#leat-settings .ls__ob-doc-link { color: var(--ls-accent); text-decoration: none; font-weight: 500; white-space: nowrap; }
#leat-settings .ls__ob-doc-link:hover { text-decoration: underline; }

#leat-settings .ls__ob-question { }
#leat-settings .ls__ob-question-text { font-size: 14px; font-weight: 500; color: var(--ls-text); margin-bottom: 12px; }
#leat-settings .ls__ob-question-actions { display: flex; gap: 10px; flex-wrap: wrap; }

#leat-settings .ls__ob-info { }
#leat-settings .ls__ob-info p { font-size: 13px; color: var(--ls-text-muted); margin-bottom: 12px; line-height: 1.5; }

#leat-settings .ls__ob-success { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ls-text); padding: 4px 0; flex-wrap: wrap; }
#leat-settings .ls__ob-success-links { display: inline-flex; gap: 12px; margin-left: auto; }
#leat-settings .ls__ob-hint { font-size: 13px; color: var(--ls-text-muted); font-style: italic; }

/* Radio cards */
#leat-settings .ls__ob-radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
#leat-settings .ls__ob-radio-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 2px solid var(--ls-border); border-radius: var(--ls-radius-sm); cursor: pointer; min-width: 160px; flex: 1; transition: border-color .15s ease, background .15s ease; }
#leat-settings .ls__ob-radio-card:hover { border-color: var(--ls-accent); }
#leat-settings .ls__ob-radio-card--active { border-color: var(--ls-accent); background: var(--ls-accent-light); }
#leat-settings .ls__ob-radio-card strong { font-size: 13px; color: var(--ls-text); }
#leat-settings .ls__ob-radio-card span { font-size: 11.5px; color: var(--ls-text-muted); }
#leat-settings .ls__ob-radio-input { position: absolute; opacity: 0; pointer-events: none; }
#leat-settings .ls__ob-earn-rules { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
#leat-settings .ls__ob-earn-rule-option { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ls-border); cursor: pointer; font-size: 13.5px; color: var(--ls-text); }
#leat-settings .ls__ob-earn-rule-option:last-child { border-bottom: none; }
#leat-settings .ls__ob-earn-rule-option .ls__checkbox-input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid #CBD5E1; border-radius: 4px; background: #fff; cursor: pointer; flex-shrink: 0; transition: background .12s, border-color .12s; margin: 0; padding: 0; min-width: 18px; }
#leat-settings .ls__ob-earn-rule-option .ls__checkbox-input:checked { background: var(--ls-accent); border-color: var(--ls-accent); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 10px 8px; }

/* All-done banner */
#leat-settings .ls__ob-complete { text-align: center; padding: 20px 24px; }
#leat-settings .ls__ob-complete h3 { font-size: 18px; font-weight: 600; color: var(--ls-text); margin-top: 12px; }
#leat-settings .ls__ob-complete p { font-size: 13px; color: var(--ls-text-muted); margin-top: 6px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ─── Sidebar onboarding widget ──────────────────────────────────── */
#leat-settings .ls__ob-widget { margin: 12px 12px 0; padding: 12px; background: var(--ls-accent-light); border-radius: var(--ls-radius-sm); cursor: pointer; transition: background .15s ease; }
#leat-settings .ls__ob-widget:hover { background: #DDE1FF; }
#leat-settings .ls__ob-widget-hdr { display: flex; justify-content: space-between; align-items: center; }
#leat-settings .ls__ob-widget-title { font-size: 12px; font-weight: 600; color: var(--ls-accent); }
#leat-settings .ls__ob-widget-dismiss { background: none; border: none; font-size: 16px; color: var(--ls-label); cursor: pointer; padding: 0 2px; line-height: 1; }
#leat-settings .ls__ob-widget-dismiss:hover { color: var(--ls-text); }
#leat-settings .ls__ob-widget-bar { height: 4px; background: var(--ls-border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
#leat-settings .ls__ob-widget-fill { height: 100%; background: var(--ls-accent); border-radius: 2px; transition: width .3s ease; }
#leat-settings .ls__ob-widget-text { font-size: 11px; color: var(--ls-text-muted); margin-top: 4px; display: block; }

/* ─── Sync details ───────────────────────────────────────────────── */
#leat-settings .ls__sync-details { margin-top: 12px; padding: 10px 12px; background: var(--ls-bg); border-radius: var(--ls-radius-sm); font-size: 12px; }
#leat-settings .ls__sync-detail-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; }
#leat-settings .ls__sync-detail-row + .ls__sync-detail-row { border-top: 1px solid var(--ls-border); }
#leat-settings .ls__sync-detail-label { color: var(--ls-text-muted); font-weight: 500; }
#leat-settings .ls__sync-detail-value { color: var(--ls-text); font-variant-numeric: tabular-nums; }
#leat-settings .ls__text-error { color: var(--ls-danger); }
#leat-settings .ls__text-center { text-align: center; }
#leat-settings .ls__text-muted { color: var(--ls-text-muted); }
#leat-settings .ls__help-desc--muted { font-size: 12px; color: var(--ls-label); margin-top: 6px; }
#leat-settings .ls__card--compact .ls__card-hdr { padding-bottom: 12px; }

/* ─── Multi-select tags & search ─────────────────────────────────── */
#leat-settings .ls__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
#leat-settings .ls__tags:empty { display: none; }
#leat-settings .ls__tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--ls-accent-light); color: var(--ls-accent); border-radius: var(--ls-radius-sm); font-size: 12.5px; font-weight: 500; line-height: 1; }
#leat-settings .ls__tag-remove { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--ls-accent); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; opacity: .7; transition: opacity .1s; }
#leat-settings .ls__tag-remove:hover { opacity: 1; }
#leat-settings .ls__search-select { position: relative; }
#leat-settings .ls__search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; background: var(--ls-card); border: 1px solid var(--ls-border); border-radius: var(--ls-radius-sm); margin-top: 4px; max-height: 200px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
#leat-settings .ls__search-result { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: none; border-bottom: 1px solid var(--ls-border); cursor: pointer; font-family: var(--ls-font); font-size: 13px; color: var(--ls-text); text-align: left; transition: background .1s; }
#leat-settings .ls__search-result:last-child { border-bottom: none; }
#leat-settings .ls__search-result:hover { background: var(--ls-accent-light); }
#leat-settings .ls__search-result-id { font-size: 11.5px; color: var(--ls-label); flex-shrink: 0; }
#leat-settings .ls__search-loading { padding: 10px 12px; font-size: 12.5px; color: var(--ls-text-muted); }

/* ─── Progress bar ───────────────────────────────────────────────── */
#leat-settings .ls__progress-bar { height: 4px; background: var(--ls-border); border-radius: 2px; overflow: hidden; }
#leat-settings .ls__progress-fill { height: 100%; background: var(--ls-accent); border-radius: 2px; transition: width .3s ease; }
