/* =====================================================================
   Affiliate Licensing Portal — styles
   Everything is scoped to .alp-root so the WordPress theme is not affected.
   Brand colours come from Settings → Affiliate Portal → Branding and are
   applied to --alp-primary and --alp-accent.
   ===================================================================== */
.alp-root {
  --alp-primary: #0e5c55;
  --alp-accent: #c7891c;
  --alp-ink: #17211f;
  --alp-ink-2: #3d4a47;
  --alp-muted: #5f6d69;
  --alp-line: #dde3e0;
  --alp-line-2: #c9d1ce;
  --alp-bg: #f4f6f5;
  --alp-surface: #ffffff;
  --alp-primary-soft: color-mix(in srgb, var(--alp-primary) 9%, #fff);
  --alp-primary-line: color-mix(in srgb, var(--alp-primary) 35%, #fff);
  --alp-ok: #1d7a46;
  --alp-ok-soft: #e7f4ec;
  --alp-warn: #94580a;
  --alp-warn-soft: #fdf3e2;
  --alp-err: #b42318;
  --alp-err-soft: #fdecea;
  --alp-info: #1f5f9e;
  --alp-info-soft: #e9f1fa;
  --alp-radius: 12px;
  --alp-radius-sm: 8px;
  --alp-shadow: 0 1px 2px rgba(16, 24, 22, .05), 0 2px 8px rgba(16, 24, 22, .04);
  --alp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  font-family: var(--alp-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--alp-ink);
  background: var(--alp-bg);
  border-radius: var(--alp-radius);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.alp-root *, .alp-root *::before, .alp-root *::after { box-sizing: border-box; }
.alp-root h2, .alp-root h3, .alp-root h4, .alp-root p, .alp-root ul, .alp-root ol, .alp-root dl, .alp-root dd, .alp-root figure, .alp-root fieldset { margin: 0; padding: 0; }
.alp-root ul, .alp-root ol { list-style: none; }
.alp-root h2, .alp-root h3, .alp-root h4 { font-family: var(--alp-font); color: var(--alp-ink); letter-spacing: -0.01em; text-transform: none; }
.alp-root button, .alp-root input, .alp-root select, .alp-root textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.alp-root a { color: var(--alp-primary); }
.alp-root [hidden] { display: none !important; }
.alp-root :focus-visible { outline: 3px solid color-mix(in srgb, var(--alp-primary) 45%, transparent); outline-offset: 2px; }

.alp-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.alp-icon { display: inline-flex; width: 20px; height: 20px; flex: none; }
.alp-icon svg { width: 100%; height: 100%; }
.alp-muted { color: var(--alp-muted); font-size: 14px; }

/* ----------------------------------------------------------- brand bar */
.alp-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px; background: var(--alp-primary); color: #fff; border-radius: var(--alp-radius) var(--alp-radius) 0 0; }
.alp-brand__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.alp-brand__logo { height: 40px; width: auto; max-width: 160px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px; }
.alp-brand__name { font-weight: 700; font-size: 18px; line-height: 1.2; }
.alp-brand__tag { font-size: 13px; opacity: .85; }
.alp-brand__right { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.alp-brand__contact { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.alp-brand__contact a { color: #fff; text-decoration: none; opacity: .92; }
.alp-brand__contact a:hover { text-decoration: underline; opacity: 1; }

/* --------------------------------------------------------------- shell */
.alp-shell { margin: 0 auto; padding: 28px 24px 40px; }
.alp-shell--form { max-width: 1040px; }
.alp-shell--dash { max-width: 1200px; }
.alp-head { margin-bottom: 20px; }
.alp-title { font-size: 28px; font-weight: 700; line-height: 1.2; }
.alp-sub { color: var(--alp-muted); margin-top: 4px; }

/* -------------------------------------------------------------- banners */
.alp-banner { border-radius: var(--alp-radius-sm); padding: 12px 16px; margin-bottom: 20px; font-size: 14px; border: 1px solid; }
.alp-banner__row { display: flex; gap: 10px; align-items: flex-start; }
.alp-banner__row .alp-icon { margin-top: 1px; }
.alp-banner--demo { background: var(--alp-warn-soft); border-color: #efd29f; color: #5e3a05; }
.alp-banner--info { background: var(--alp-info-soft); border-color: #c4d9ef; color: #173f66; }
.alp-demo { margin-top: 10px; }
.alp-demo summary { cursor: pointer; font-weight: 600; }
.alp-demo__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.alp-demo__ctl { display: grid; gap: 4px; font-weight: 600; }
.alp-demo__ctl .alp-input { min-height: 38px; padding: 6px 10px; }

/* -------------------------------------------------------------- stepper */
.alp-stepper { margin-bottom: 24px; }
.alp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.alp-steps__item { position: relative; }
.alp-steps__btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--alp-radius-sm); border: 1px solid var(--alp-line); background: var(--alp-surface); text-align: left; font-size: 14px; font-weight: 600; color: var(--alp-muted); }
button.alp-steps__btn { cursor: pointer; }
button.alp-steps__btn:hover { border-color: var(--alp-primary-line); color: var(--alp-ink); }
.alp-steps__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--alp-line-2); font-size: 13px; flex: none; background: #fff; }
.alp-steps__num .alp-icon { width: 16px; height: 16px; }
.is-current .alp-steps__btn { border-color: var(--alp-primary); color: var(--alp-ink); box-shadow: inset 0 -3px 0 var(--alp-primary); }
.is-current .alp-steps__num { background: var(--alp-primary); border-color: var(--alp-primary); color: #fff; }
.is-done .alp-steps__num { background: var(--alp-primary-soft); border-color: var(--alp-primary); color: var(--alp-primary); }
.alp-steps__mobile, .alp-steps__bar { display: none; }

/* ---------------------------------------------------------------- cards */
.alp-card { background: var(--alp-surface); border: 1px solid var(--alp-line); border-radius: var(--alp-radius); padding: 24px; box-shadow: var(--alp-shadow); }
.alp-step-head { margin-bottom: 20px; }
.alp-step-title { font-size: 22px; font-weight: 700; outline: none; }
.alp-step-text { color: var(--alp-muted); margin-top: 4px; }

/* ------------------------------------------------------ service picker */
.alp-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.alp-service { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 20px; border: 1.5px solid var(--alp-line); border-radius: var(--alp-radius); background: var(--alp-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; box-shadow: var(--alp-shadow); }
.alp-service:hover { border-color: var(--alp-primary-line); }
.alp-service:focus-within { outline: 3px solid color-mix(in srgb, var(--alp-primary) 40%, transparent); outline-offset: 2px; }
.alp-service.is-selected { border-color: var(--alp-primary); background: var(--alp-primary-soft); box-shadow: 0 0 0 1px var(--alp-primary); }
.alp-service__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--alp-primary-soft); color: var(--alp-primary); flex: none; }
.is-selected .alp-service__icon { background: var(--alp-primary); color: #fff; }
.alp-service__body { display: grid; gap: 4px; padding-right: 24px; }
.alp-service__label { font-weight: 700; font-size: 17px; }
.alp-service__desc { color: var(--alp-muted); font-size: 14px; }
.alp-service__tick { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--alp-primary); color: #fff; padding: 3px; opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s; }
.alp-service__tick svg { width: 100%; height: 100%; stroke-width: 2.5; }
.is-selected .alp-service__tick { opacity: 1; transform: none; }

.alp-subpanel { margin-top: 16px; }
.alp-subpanel--note { display: flex; gap: 10px; align-items: center; color: var(--alp-ok); background: var(--alp-ok-soft); border-color: #bfe0cb; }
.alp-subpanel--note p { color: var(--alp-ink-2); }
.alp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.alp-option { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--alp-line); border-radius: var(--alp-radius-sm); cursor: pointer; background: #fff; }
.alp-option:hover { border-color: var(--alp-primary-line); }
.alp-option.is-selected { border-color: var(--alp-primary); background: var(--alp-primary-soft); }
.alp-option input { margin: 3px 0 0; accent-color: var(--alp-primary); width: 18px; height: 18px; flex: none; }
.alp-option__body { display: grid; gap: 2px; }
.alp-option__label { font-weight: 600; line-height: 1.3; }
.alp-option__desc { font-size: 13px; color: var(--alp-muted); }

/* --------------------------------------------------------------- fields */
.alp-sections { display: grid; gap: 16px; }
.alp-section__title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.alp-section__desc { color: var(--alp-muted); font-size: 14px; margin-bottom: 4px; }
.alp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-top: 14px; }
.alp-field { display: grid; gap: 6px; align-content: start; }
.alp-field--full { grid-column: 1 / -1; }
.alp-fieldset { border: 0; min-width: 0; }
.alp-label { display: block; font-weight: 600; font-size: 15px; color: var(--alp-ink); padding: 0; }
legend.alp-label { margin-bottom: 6px; }
.alp-req { color: var(--alp-err); }
.alp-opt { color: var(--alp-muted); font-weight: 400; font-size: 14px; }
.alp-field__help { font-size: 13px; color: var(--alp-muted); margin-top: -2px; }
.alp-input { display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--alp-line-2); border-radius: var(--alp-radius-sm); background: #fff; color: var(--alp-ink); font-size: 16px; line-height: 1.4; box-shadow: none; margin: 0; }
textarea.alp-input { min-height: 72px; resize: vertical; }
.alp-input:hover { border-color: #aab5b1; }
.alp-input:focus { outline: none; border-color: var(--alp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--alp-primary) 20%, transparent); }
.alp-input:disabled { background: #f1f3f2; color: var(--alp-muted); }
.alp-select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235f6d69' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.is-invalid > .alp-input, .is-invalid .alp-input, .alp-input[aria-invalid="true"] { border-color: var(--alp-err); }
.alp-field__error { color: var(--alp-err); font-size: 14px; font-weight: 600; display: flex; gap: 6px; }
.alp-field__error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--alp-err); color: #fff; font-size: 12px; flex: none; margin-top: 1px; }

.alp-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.alp-choice { position: relative; cursor: pointer; }
.alp-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.alp-choice__box { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 16px; border: 1.5px solid var(--alp-line-2); border-radius: var(--alp-radius-sm); background: #fff; font-weight: 500; }
.alp-choice__dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--alp-line-2); flex: none; }
.alp-choice:hover .alp-choice__box { border-color: var(--alp-primary-line); }
.alp-choice input:checked + .alp-choice__box { border-color: var(--alp-primary); background: var(--alp-primary-soft); }
.alp-choice input:checked + .alp-choice__box .alp-choice__dot { border-color: var(--alp-primary); background: radial-gradient(circle, var(--alp-primary) 45%, transparent 50%); }
.alp-choice input:focus-visible + .alp-choice__box { outline: 3px solid color-mix(in srgb, var(--alp-primary) 45%, transparent); outline-offset: 2px; }
.alp-choice input:disabled + .alp-choice__box { opacity: .55; cursor: not-allowed; }
.is-invalid .alp-choice__box { border-color: var(--alp-err); }

.alp-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.alp-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--alp-primary); flex: none; }
.alp-check--strong { padding: 12px 14px; border: 1.5px solid var(--alp-line-2); border-radius: var(--alp-radius-sm); background: #fff; font-weight: 600; }
.alp-check--strong:has(input:checked) { border-color: var(--alp-ok); background: var(--alp-ok-soft); }

.alp-repeater { display: grid; gap: 14px; }
.alp-repeater__item { position: relative; border: 1px solid var(--alp-line); border-radius: var(--alp-radius-sm); padding: 16px; background: #fafbfa; }
.alp-repeater__legend { font-weight: 700; padding: 0 6px; margin-left: -6px; }
.alp-repeater__item > .alp-link { position: absolute; top: 12px; right: 14px; }
.alp-repeater__item .alp-grid { margin-top: 4px; }
.alp-field--repeater > .alp-btn { justify-self: start; margin-top: 4px; }

.alp-error-summary { border: 2px solid var(--alp-err); background: var(--alp-err-soft); border-radius: var(--alp-radius-sm); padding: 14px 18px; margin-bottom: 16px; outline: none; }
.alp-error-summary__title { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--alp-err); margin-bottom: 6px; }
.alp-error-summary ul { display: grid; gap: 4px; padding-left: 28px; }
.alp-error-summary li { list-style: disc; color: var(--alp-err); }

/* -------------------------------------------------------------- buttons */
.alp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: var(--alp-radius-sm); border: 1.5px solid transparent; font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; white-space: nowrap; }
.alp-btn--primary { background: var(--alp-primary); color: #fff !important; }
.alp-btn--primary:hover { background: color-mix(in srgb, var(--alp-primary) 85%, #000); }
.alp-btn--secondary { background: #fff; color: var(--alp-ink) !important; border-color: var(--alp-line-2); }
.alp-btn--secondary:hover { border-color: var(--alp-primary); color: var(--alp-primary) !important; }
.alp-btn--ghost { background: transparent; color: var(--alp-primary) !important; border-color: transparent; }
.alp-btn--ghost:hover { background: var(--alp-primary-soft); }
.alp-btn--sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.alp-btn--block { width: 100%; }
.alp-btn:disabled { opacity: .45; cursor: not-allowed; }
.alp-btn--primary:disabled:hover { background: var(--alp-primary); }
.alp-link { background: none; border: 0; padding: 0; color: var(--alp-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; font-size: inherit; }
.alp-link:disabled { color: var(--alp-muted); text-decoration: none; cursor: not-allowed; }
.alp-link--danger { color: var(--alp-err); font-size: 14px; }
.alp-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--alp-muted); cursor: pointer; flex: none; }
.alp-iconbtn:hover { background: var(--alp-err-soft); color: var(--alp-err); }
.alp-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--alp-line); }

/* ------------------------------------------------------------ documents */
.alp-doc-status { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--alp-radius-sm); margin-bottom: 16px; border: 1px solid; outline: none; }
.alp-doc-status.is-complete { background: var(--alp-ok-soft); border-color: #bfe0cb; color: var(--alp-ok); }
.alp-doc-status.is-pending { background: var(--alp-info-soft); border-color: #c4d9ef; color: var(--alp-info); }
.alp-doc-status.is-error { background: var(--alp-err-soft); border-color: var(--alp-err); color: var(--alp-err); }
.alp-doc-status p { color: var(--alp-ink); }
.alp-missing { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.alp-missing li { list-style: none; }
.alp-docs { display: grid; gap: 12px; }
.alp-doc { background: var(--alp-surface); border: 1.5px solid var(--alp-line); border-radius: var(--alp-radius); padding: 16px 18px; display: grid; gap: 12px; transition: border-color .15s, background-color .15s; }
.alp-doc.has-files { border-color: #bfe0cb; }
.alp-doc.is-invalid { border-color: var(--alp-err); background: #fffafa; }
.alp-doc.is-drag { border-style: dashed; border-color: var(--alp-primary); background: var(--alp-primary-soft); }
.alp-doc__head { display: flex; gap: 12px; align-items: flex-start; }
.alp-doc__icon { display: inline-flex; width: 36px; height: 36px; padding: 7px; border-radius: 8px; background: #eef1f0; color: var(--alp-muted); flex: none; }
.has-files .alp-doc__icon { background: var(--alp-ok-soft); color: var(--alp-ok); }
.alp-doc__titles { flex: 1; min-width: 0; }
.alp-doc__title { font-weight: 700; }
.alp-doc__help { font-size: 13px; color: var(--alp-muted); }
.alp-doc__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alp-doc__drop { font-size: 13px; color: var(--alp-muted); }
.alp-doc__errors { color: var(--alp-err); font-size: 14px; display: grid; gap: 2px; }
.alp-doc__held { font-size: 14px; color: var(--alp-ink-2); }
.alp-files { display: grid; gap: 6px; }
.alp-file { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; background: #f6f8f7; border: 1px solid var(--alp-line); border-radius: var(--alp-radius-sm); font-size: 14px; min-width: 0; }
.alp-file > .alp-icon { color: var(--alp-muted); width: 18px; height: 18px; }
.alp-file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.alp-file__meta { color: var(--alp-muted); white-space: nowrap; font-size: 13px; }
.alp-fineprint { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--alp-muted); margin-top: 14px; }
.alp-fineprint .alp-icon { width: 16px; height: 16px; }

.alp-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; vertical-align: middle; }
.alp-badge--required { background: var(--alp-err-soft); color: var(--alp-err); }
.alp-badge--optional { background: #eef1f0; color: var(--alp-muted); }
.alp-badge--required_if_not_held { background: var(--alp-warn-soft); color: var(--alp-warn); }

/* --------------------------------------------------------------- review */
.alp-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.alp-review-col, .alp-review-side { display: grid; gap: 16px; }
.alp-review-side { position: sticky; top: 24px; }
.alp-review { padding: 20px 22px; }
.alp-review__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.alp-review__head h3 { font-size: 17px; font-weight: 700; }
.alp-edit { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 14px; }
.alp-edit .alp-icon { width: 16px; height: 16px; }
.alp-dl { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 8px 16px; font-size: 15px; }
.alp-dl dt { color: var(--alp-muted); }
.alp-dl dd { font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.alp-dl dd.is-empty { color: var(--alp-muted); font-weight: 400; font-style: italic; }
.alp-review-docs { display: grid; gap: 10px; }
.alp-review-docs li { display: flex; gap: 10px; }
.alp-review-docs__icon { width: 20px; height: 20px; color: var(--alp-ok); flex: none; margin-top: 2px; }
.alp-review-docs__label { font-weight: 600; }
.alp-review-docs__files { font-size: 14px; color: var(--alp-ink-2); overflow-wrap: anywhere; }
.alp-review-docs__files.is-empty { color: var(--alp-muted); font-style: italic; }

.alp-price, .alp-payment, .alp-submit { padding: 20px; }
.alp-price__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.alp-price__head h3, .alp-payment h3 { font-size: 17px; font-weight: 700; }
.alp-price__lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--alp-muted); background: #eef1f0; padding: 3px 9px; border-radius: 999px; }
.alp-price__lock .alp-icon { width: 14px; height: 14px; }
.alp-price__table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; border: 0; }
.alp-price__table th, .alp-price__table td { padding: 8px 0; border: 0; border-bottom: 1px solid var(--alp-line); background: none; vertical-align: top; }
.alp-price__table th { text-align: left; font-weight: 400; color: var(--alp-ink-2); padding-right: 12px; }
.alp-price__table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.alp-price__table .is-discount td { color: var(--alp-ok); }
.alp-price__table tfoot th, .alp-price__table tfoot td { border-bottom: 0; padding-top: 12px; font-weight: 700; color: var(--alp-ink); }
.alp-price__total { font-size: 22px; }
.alp-price__note { font-size: 13px; color: var(--alp-muted); margin-top: 10px; }
.alp-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.alp-tag--demo { background: var(--alp-warn-soft); color: var(--alp-warn); border: 1px solid #efd29f; }
.alp-payment { display: grid; gap: 14px; }
.alp-payment__intro { font-size: 14px; color: var(--alp-muted); margin-top: -8px; }
.alp-submit { display: grid; gap: 14px; }
.alp-checklist { display: grid; gap: 6px; font-size: 14px; color: var(--alp-muted); padding: 12px 14px; background: #f6f8f7; border-radius: var(--alp-radius-sm); }
.alp-checklist li { display: flex; gap: 8px; align-items: center; }
.alp-checklist__mark { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--alp-line-2); flex: none; padding: 1px; }
.alp-checklist .is-ok { color: var(--alp-ink); }
.alp-checklist .is-ok .alp-checklist__mark { background: var(--alp-ok); border-color: var(--alp-ok); color: #fff; }
.alp-checklist__mark svg { width: 100%; height: 100%; stroke-width: 3; }

.alp-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--alp-radius-sm); font-size: 14px; border: 1px solid; }
.alp-alert > div { display: grid; gap: 4px; }
.alp-alert .alp-icon { margin-top: 1px; }
.alp-alert--warn { background: var(--alp-warn-soft); border-color: #efd29f; color: #5e3a05; }
.alp-alert--error { background: var(--alp-err-soft); border-color: #f4b9b3; color: #7a1a12; }
.alp-alert--info { background: var(--alp-info-soft); border-color: #c4d9ef; color: #173f66; }
.alp-alert .alp-btn { justify-self: start; margin-top: 6px; }
.alp-price > .alp-btn { margin-top: 12px; }

.alp-progress { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.alp-progress__bar { height: 8px; border-radius: 99px; background: #e6ebe9; overflow: hidden; position: relative; }
.alp-progress__bar span { display: block; height: 100%; background: var(--alp-primary); border-radius: 99px; transition: width .2s; }
.alp-progress__bar.is-indeterminate span { position: absolute; width: 35%; animation: alp-slide 1.3s ease-in-out infinite; }
@keyframes alp-slide { from { left: -35%; } to { left: 100%; } }
.alp-skeleton { display: grid; gap: 10px; }
.alp-skeleton span { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #eceff0, #f6f7f7, #eceff0); background-size: 200% 100%; animation: alp-shimmer 1.4s infinite; }
.alp-skeleton span:nth-child(2) { width: 80%; } .alp-skeleton span:nth-child(3) { width: 60%; }
@keyframes alp-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .alp-root * { animation: none !important; transition: none !important; } }

/* -------------------------------------------------------------- success */
.alp-success { max-width: 640px; margin: 0 auto; background: var(--alp-surface); border: 1px solid var(--alp-line); border-radius: var(--alp-radius); padding: 32px; box-shadow: var(--alp-shadow); text-align: center; outline: none; }
.alp-success .alp-banner { text-align: left; }
.alp-success__mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--alp-ok-soft); color: var(--alp-ok); padding: 14px; }
.alp-success__mark svg { width: 100%; height: 100%; stroke-width: 2.4; }
.alp-success__title { font-size: 26px; font-weight: 700; }
.alp-success__lead { color: var(--alp-ink-2); margin-top: 6px; }
.alp-success__ref { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 22px 0; padding: 18px; background: var(--alp-primary-soft); border: 1px dashed var(--alp-primary-line); border-radius: var(--alp-radius-sm); }
.alp-success__reflabel { width: 100%; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--alp-muted); }
.alp-success__refval { font-size: 26px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; color: var(--alp-ink); overflow-wrap: anywhere; }
.alp-dl--success { text-align: left; margin: 0 auto 16px; max-width: 460px; }
.alp-success > .alp-muted { margin-top: 8px; }
.alp-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ------------------------------------------------------------ dashboard */
.alp-dash { display: grid; gap: 20px; }
.alp-dash__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.alp-dash__actions { display: flex; gap: 10px; }
.alp-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.alp-stat { background: var(--alp-surface); border: 1px solid var(--alp-line); border-radius: var(--alp-radius); padding: 18px 20px; box-shadow: var(--alp-shadow); border-top: 4px solid var(--alp-line-2); }
.alp-stat--total { border-top-color: var(--alp-primary); }
.alp-stat--successful { border-top-color: var(--alp-ok); }
.alp-stat--pending { border-top-color: var(--alp-info); }
.alp-stat--attention { border-top-color: var(--alp-accent); }
.alp-stat__label { font-size: 14px; color: var(--alp-muted); font-weight: 600; }
.alp-stat__value { font-size: 32px; font-weight: 800; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.alp-recent h3, .alp-history h3 { font-size: 18px; font-weight: 700; }
.alp-recent__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.alp-recent__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--alp-line); border-radius: var(--alp-radius-sm); background: #fff; text-align: left; cursor: pointer; }
.alp-recent__item:hover { border-color: var(--alp-primary-line); background: var(--alp-primary-soft); }
.alp-recent__main { display: grid; min-width: 0; }
.alp-recent__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alp-recent__type { font-size: 13px; color: var(--alp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alp-recent__side { display: grid; justify-items: end; gap: 4px; flex: none; }
.alp-recent__date { font-size: 12px; color: var(--alp-muted); }
.alp-history__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.alp-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 12px; align-items: end; margin: 16px 0; }
.alp-filter { display: grid; gap: 4px; min-width: 0; }
.alp-filter .alp-label { font-size: 13px; }
.alp-filter .alp-input { min-height: 42px; padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
.alp-searchbox { position: relative; }
.alp-searchbox .alp-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--alp-muted); width: 18px; height: 18px; pointer-events: none; }
.alp-searchbox .alp-input { padding-left: 38px; }
.alp-filters__clear { grid-column: 1 / -1; justify-self: start; font-size: 14px; }
.alp-tablewrap { overflow-x: auto; border: 1px solid var(--alp-line); border-radius: var(--alp-radius-sm); }
.alp-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; border: 0; }
.alp-table th, .alp-table td { padding: 12px 14px; text-align: left; border: 0; border-bottom: 1px solid var(--alp-line); background: none; vertical-align: middle; }
.alp-table thead th { background: #f6f8f7; font-size: 13px; color: var(--alp-muted); font-weight: 700; white-space: nowrap; }
.alp-table tbody tr:last-child td { border-bottom: 0; }
.alp-table tbody tr:hover td { background: #fafbfa; }
.alp-table__ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 14px; white-space: nowrap; }
.alp-table td:nth-child(4) { white-space: nowrap; }
.alp-table__num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.alp-table__act { text-align: right !important; }
.alp-empty-row { padding: 28px; text-align: center; color: var(--alp-muted); border: 1px dashed var(--alp-line-2); border-radius: var(--alp-radius-sm); }
.alp-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--alp-muted); }
.alp-pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.alp-pill--successful { background: var(--alp-ok-soft); color: var(--alp-ok); }
.alp-pill--pending { background: var(--alp-info-soft); color: var(--alp-info); }
.alp-pill--attention { background: var(--alp-warn-soft); color: var(--alp-warn); }
.alp-pill--other { background: #eef1f0; color: var(--alp-muted); }
.alp-empty { text-align: center; padding: 40px 24px; }
.alp-empty__icon { display: inline-flex; width: 48px; height: 48px; padding: 10px; border-radius: 50%; background: var(--alp-info-soft); color: var(--alp-info); margin-bottom: 10px; }
.alp-empty h3 { font-size: 18px; margin-bottom: 6px; }
.alp-empty p { color: var(--alp-muted); max-width: 520px; margin: 0 auto; }

.alp-modal { position: fixed; inset: 0; background: rgba(15, 23, 21, .5); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 100000; overflow-y: auto; }
.alp-modal__panel { width: 100%; max-width: 680px; background: #fff; border-radius: var(--alp-radius); box-shadow: 0 20px 50px rgba(0,0,0,.25); outline: none; }
.alp-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--alp-line); }
.alp-modal__head h3 { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.alp-modal__close:hover { background: #eef1f0; color: var(--alp-ink); }
.alp-modal__body { padding: 20px 22px 26px; display: grid; gap: 18px; }
.alp-modal__sec h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; padding-top: 14px; border-top: 1px solid var(--alp-line); }
.alp-modal__docs { display: grid; gap: 6px; font-size: 14px; }
.alp-modal__docs li { display: flex; justify-content: space-between; gap: 12px; }
.alp-timeline { display: grid; gap: 10px; font-size: 14px; border-left: 2px solid var(--alp-line); padding-left: 14px; }
.alp-timeline li { display: grid; gap: 1px; position: relative; }
.alp-timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--alp-primary); }
.alp-timeline__date { font-size: 12px; color: var(--alp-muted); }
.alp-timeline__status { font-weight: 700; }

/* login / access messages printed by WordPress */
.alp-gate { max-width: 460px; margin: 0 auto; }
.alp-gate h3 { font-size: 20px; margin-bottom: 8px; }
.alp-gate p { color: var(--alp-muted); margin-bottom: 14px; }
.alp-gate form p { margin-bottom: 12px; }
.alp-gate label { display: block; font-weight: 600; margin-bottom: 4px; }
.alp-gate input[type=text], .alp-gate input[type=password], .alp-gate input[type=email], .alp-gate input[type=tel] { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--alp-line-2); border-radius: 8px; }
.alp-gate input[type=submit] { background: var(--alp-primary); color: #fff; border: 0; min-height: 44px; padding: 8px 22px; border-radius: 8px; font-weight: 600; cursor: pointer; }


.alp-gate__alt { margin: 14px 0 0; font-size: 14px; }
.alp-gate__alt a { color: var(--alp-primary); font-weight: 600; }
.alp-gate__signup { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--alp-line); }
.alp-gate__signup p { margin-bottom: 10px; }
.alp-gate__btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 44px; }
.alp-gate__notice { padding: 10px 12px; border-radius: 8px; font-weight: 600; margin-bottom: 14px; border: 1px solid var(--alp-line-2); }
.alp-gate__notice--error { background: #fdecec; border-color: #e4b4b4; color: #8f1d1d; }
.alp-gate__notice--info { background: #eaf4f2; border-color: #b9d8d3; color: #0b4a44; }
.alp-gate input[type=submit] { width: 100%; }
.alp-stat--commission { border-top-color: var(--alp-accent); }

/* ----------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .alp-review-layout { grid-template-columns: 1fr; }
  .alp-review-side { position: static; }
  .alp-stats { grid-template-columns: repeat(2, 1fr); }
  .alp-stat--commission { grid-column: 1 / -1; }
  .alp-filters { grid-template-columns: 1fr 1fr; }
  .alp-filter--search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .alp-shell { padding: 20px 16px 32px; }
  .alp-brand { padding: 14px 16px; }
  .alp-title { font-size: 24px; }
  .alp-step-title { font-size: 20px; }
  .alp-card { padding: 18px 16px; }
  .alp-services { grid-template-columns: 1fr; gap: 10px; }
  .alp-service { padding: 16px; }
  .alp-grid { grid-template-columns: 1fr; }
  .alp-steps { display: none; }
  .alp-steps__mobile { display: block; font-size: 14px; color: var(--alp-muted); margin-bottom: 8px; }
  .alp-steps__mobile strong { color: var(--alp-ink); }
  .alp-steps__bar { display: block; height: 6px; border-radius: 99px; background: #e2e7e5; overflow: hidden; }
  .alp-steps__bar span { display: block; height: 100%; background: var(--alp-primary); border-radius: 99px; }
  .alp-nav { position: sticky; bottom: 0; background: var(--alp-bg); margin: 20px -16px 0; padding: 12px 16px; z-index: 5; }
  .alp-nav .alp-btn { flex: 1; }
  .alp-dl { grid-template-columns: 1fr; gap: 2px; }
  .alp-dl dd { margin-bottom: 8px; }
  .alp-recent__list { grid-template-columns: 1fr; }
  .alp-dash__top { align-items: stretch; }
  .alp-dash__actions .alp-btn { flex: 1; }
  .alp-success { padding: 24px 16px; }
  .alp-success__refval { font-size: 21px; }
  .alp-success__actions .alp-btn { width: 100%; }
  /* table → stacked cards */
  .alp-tablewrap { border: 0; overflow: visible; }
  .alp-table thead { display: none; }
  .alp-table, .alp-table tbody, .alp-table tr, .alp-table td { display: block; width: 100%; }
  .alp-table tr { border: 1px solid var(--alp-line); border-radius: var(--alp-radius-sm); margin-bottom: 10px; padding: 6px 0; background: #fff; }
  .alp-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 14px; border: 0; text-align: right; }
  .alp-table td::before { content: attr(data-label); color: var(--alp-muted); font-weight: 600; font-size: 13px; text-align: left; font-family: var(--alp-font); }
  .alp-table__act { justify-content: flex-end !important; }
  .alp-table tbody tr:hover td { background: none; }
}
@media (max-width: 420px) {
  .alp-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .alp-stat { padding: 14px; }
  .alp-stat__value { font-size: 26px; }
  .alp-filters { grid-template-columns: 1fr; }
  .alp-brand__contact { display: none; }
}

/* ---------------------------------------------------------------- print */
@media print {
  body.alp-printing * { visibility: hidden !important; }
  body.alp-printing .alp-print-area, body.alp-printing .alp-print-area * { visibility: visible !important; }
  body.alp-printing .alp-print-area { position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: 0; box-shadow: none; }
  .alp-no-print, .alp-print-area .alp-btn { display: none !important; }
}

.alp-root .alp-brand__out { color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid rgba(255,255,255,.55); border-radius: 8px; padding: 6px 12px; margin-left: 12px; white-space: nowrap; }
.alp-root .alp-brand__out:hover { background: rgba(255,255,255,.15); }

.alp-paid { color: #0b6b3a; font-weight: 700; }
.alp-pay .alp-table--pay { font-size: 14px; }
.alp-payform { margin-top: 14px; padding: 14px; border: 1px solid var(--alp-line); border-radius: 10px; background: #fafbfa; }
.alp-payform .alp-btn { margin-top: 10px; }
.alp-modal__body, .alp-pay { min-width: 0; }
.alp-pay .alp-tablewrap { overflow-x: auto; max-width: 100%; }
.alp-table--pay { width: 100%; }
.alp-table--pay th, .alp-table--pay td { padding: 8px 10px; vertical-align: top; }
.alp-table--pay td:first-child, .alp-table--pay td.alp-table__num { white-space: nowrap; }

.alp-stat__sub { display: block; margin-top: 4px; font-size: 13px; color: var(--alp-muted, #5b6b67); }
.alp-comm { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.alp-comm--earned { background: #e3f3ea; color: #0b6b3a; }
.alp-comm--expected { background: #fdf1d9; color: #7a5200; }

/* logo on the sign-in screen */
.alp-gate__logo { text-align: center; margin: 0 0 16px; }
.alp-gate__logo img { max-height: 72px; max-width: 220px; width: auto; height: auto; object-fit: contain; }
.alp-gate__logo--name { font-size: 22px; font-weight: 700; color: var(--alp-primary); }

/* keep logos small whatever the theme does to images */
.alp-root .alp-brand__logo { height: 44px !important; width: auto !important; max-height: 44px !important; max-width: 140px !important; min-width: 0; object-fit: contain; flex: 0 0 auto; display: block; margin: 0; }
.alp-root .alp-brand__id { align-items: center; gap: 12px; }
.alp-root .alp-gate__logo img { height: auto !important; width: auto !important; max-height: 64px !important; max-width: 200px !important; display: inline-block; margin: 0 auto; }
@media (max-width: 600px) { .alp-root .alp-brand__logo { height: 36px !important; max-height: 36px !important; max-width: 110px !important; } }
