:root {
    --asa-primary: #f97316;
    --asa-primary-dark: #ea6c0a;
    --asa-radius: 12px;
    --asa-shadow: 0 2px 16px rgba(0,0,0,.07);
}

.asa-portal { max-width: 1000px; margin: 0 auto; font-family: inherit; color: #1a1a1a; }

/* ── Welcome banner ──────────────────────────────────────────────────────────── */
.asa-welcome-banner {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--asa-radius);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.asa-banner-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 16px; padding: 0; opacity: .7; }
.asa-banner-close:hover { opacity: 1; }

/* ── Dashboard header ────────────────────────────────────────────────────────── */
.asa-dash-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.asa-dash-greet { display: flex; align-items: center; gap: 14px; }
.asa-dash-avatar {
    width: 46px; height: 46px;
    background: var(--asa-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.asa-dash-name  { font-size: 18px; font-weight: 700; line-height: 1.2; }
.asa-dash-email { font-size: 13px; color: #888; margin-top: 2px; }

/* ── Dashboard grid ──────────────────────────────────────────────────────────── */
.asa-dash-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.asa-dash-main { display: flex; flex-direction: column; gap: 20px; }
.asa-dash-side  { display: flex; flex-direction: column; gap: 16px; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.asa-dash-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--asa-radius);
    box-shadow: var(--asa-shadow);
    padding: 24px;
}
.asa-dash-card h3 { margin: 0 0 18px; font-size: 15px; font-weight: 700; color: #1a1a1a; }
.asa-dash-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.asa-dash-card-head h3 { margin: 0; }

.asa-license-card  { border-top: 3px solid var(--asa-primary); }
.asa-expired-card  { border-top: 3px solid #ef4444; background: #fef2f2; }
.asa-upgrade-card  { background: #fafafa; }
.asa-support-card  { background: #f9fafb; }
.asa-support-card p { font-size: 13px; color: #666; margin: 0 0 14px; }

/* ── Tier badge ──────────────────────────────────────────────────────────────── */
.asa-tier-badge {
    padding: 4px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.tier-single  { background: #e0f2fe; color: #0369a1; }
.tier-5site   { background: #ede9fe; color: #6d28d9; }
.tier-10site  { background: #fce7f3; color: #9d174d; }
.tier-agency  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* ── Key display ─────────────────────────────────────────────────────────────── */
.asa-key-display { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; }
.asa-key-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.asa-key-value { display: flex; align-items: center; gap: 10px; }
.asa-key-masked { font-family: monospace; font-size: 17px; font-weight: 700; color: #1a1a1a; letter-spacing: 1px; flex: 1; }
.asa-key-toggle, .asa-key-copy {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 5px;
    padding: 4px 10px; font-size: 12px; color: #555; cursor: pointer;
    transition: all .15s; white-space: nowrap;
}
.asa-key-toggle:hover, .asa-key-copy:hover { border-color: var(--asa-primary); color: var(--asa-primary); }

/* ── License meta ────────────────────────────────────────────────────────────── */
.asa-license-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
.asa-lmeta-item { text-align: center; }
.asa-lmeta-label { display: block; font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.asa-lmeta-value { display: block; font-size: 15px; font-weight: 700; color: #1a1a1a; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.asa-btn-primary {
    display: inline-block; background: var(--asa-primary); color: #fff;
    border: none; padding: 13px 28px; border-radius: 8px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    text-decoration: none; text-align: center; transition: background .2s; width: 100%;
    box-sizing: border-box;
}
.asa-btn-primary:hover { background: var(--asa-primary-dark); color: #fff; }
.asa-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.asa-btn-download { font-size: 15px; }
.asa-dl-msg { font-size: 13px; text-align: center; margin-top: 8px; color: #888; }

.asa-btn-secondary {
    display: inline-block; background: #fff; color: var(--asa-primary);
    border: 2px solid var(--asa-primary); padding: 11px 22px;
    border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all .2s;
}
.asa-btn-secondary:hover { background: var(--asa-primary); color: #fff; }

.asa-btn-ghost {
    display: inline-block; background: transparent; color: #888;
    border: 1px solid #e5e7eb; padding: 8px 16px;
    border-radius: 7px; font-size: 13px; cursor: pointer;
    text-decoration: none; transition: all .15s;
}
.asa-btn-ghost:hover { border-color: #999; color: #333; }

.asa-btn-outline {
    display: inline-block; background: transparent; color: var(--asa-primary);
    border: 1.5px solid var(--asa-primary); padding: 9px 18px;
    border-radius: 7px; font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all .15s; width: 100%;
    box-sizing: border-box; text-align: center;
}
.asa-btn-outline:hover { background: var(--asa-primary); color: #fff; }

.asa-btn-primary-sm {
    background: var(--asa-primary); color: #fff; border: none;
    padding: 9px 18px; border-radius: 7px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: background .15s;
}
.asa-btn-primary-sm:hover { background: var(--asa-primary-dark); }

.asa-btn-cancel {
    background: none; border: none; color: #aaa; font-size: 13px; cursor: pointer; padding: 9px 12px;
}
.asa-btn-cancel:hover { color: #555; }

/* ── Side panel rows ─────────────────────────────────────────────────────────── */
.asa-side-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.asa-side-row:last-of-type { border-bottom: none; }
.asa-side-label { color: #888; }
.asa-side-value { color: #1a1a1a; font-weight: 600; word-break: break-all; text-align: right; max-width: 180px; }

.asa-email-update { margin-top: 16px; }
.asa-input {
    width: 100%; padding: 9px 12px; border: 1px solid #e5e7eb; border-radius: 7px;
    font-size: 13px; box-sizing: border-box; outline: none; transition: border-color .2s;
}
.asa-input:focus { border-color: var(--asa-primary); }
.asa-email-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* ── Orders list ─────────────────────────────────────────────────────────────── */
.asa-orders-list { list-style: none; padding: 0; margin: 0; }
.asa-order-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.asa-order-item:last-child { border-bottom: none; }
.asa-order-num  { font-size: 13px; font-weight: 700; color: #1a1a1a; }
.asa-order-date { font-size: 12px; color: #888; margin-top: 2px; }
.asa-order-view { font-size: 12px; color: var(--asa-primary); text-decoration: none; font-weight: 600; white-space: nowrap; }
.asa-order-view:hover { text-decoration: underline; }

/* ── Upgrade section ─────────────────────────────────────────────────────────── */
.asa-upgrade-badge {
    font-size: 11px; color: #888; background: #f3f4f6; padding: 3px 10px;
    border-radius: 20px; font-weight: 600;
}
.asa-upgrade-grid { display: flex; gap: 14px; }
.asa-upgrade-option {
    flex: 1; border: 2px solid #e5e7eb; border-radius: 10px;
    padding: 18px; position: relative;
}
.asa-upgrade-option.featured { border-color: var(--asa-primary); background: #fff8f4; }
.asa-upgrade-rec {
    font-size: 10px; font-weight: 700; color: var(--asa-primary);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.asa-upgrade-name  { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.asa-upgrade-sites { font-size: 12px; color: #888; margin: 3px 0 10px; }
.asa-upgrade-perks { list-style: none; padding: 0; margin: 0 0 14px; font-size: 12px; color: #555; }
.asa-upgrade-perks li { padding: 3px 0; }
.asa-upgrade-price { margin: 0 0 12px; }
.asa-price-full { font-size: 18px; font-weight: 700; color: #1a1a1a; transition: all .2s; }
.asa-price-full.asa-price-struck { text-decoration: line-through; color: #bbb; font-size: 14px; }
.asa-price-credit { display: block; margin-top: 4px; font-size: 12px; color: #16a34a; font-weight: 600; }
.asa-credit-label { display: inline-block; background: #f0fdf4; border: 1px solid #86efac; border-radius: 5px; padding: 3px 8px; }
.asa-upgrade-msg { font-size: 12px; color: #b91c1c; margin-top: 6px; }

.asa-upgrade-btn {
    display: block; text-align: center; padding: 9px 14px;
    border-radius: 7px; font-size: 13px; font-weight: 700;
    border: 2px solid var(--asa-primary); color: var(--asa-primary);
    text-decoration: none; transition: all .2s;
}
.asa-upgrade-btn:hover, .asa-upgrade-btn.primary { background: var(--asa-primary); color: #fff; }

/* ── Lookup (logged-out) ─────────────────────────────────────────────────────── */
.asa-lookup-wrap { margin-bottom: 40px; }
.asa-lookup-box {
    background: #fff; border: 1px solid #e5e7eb; border-radius: var(--asa-radius);
    box-shadow: var(--asa-shadow); padding: 40px;
    text-align: center; max-width: 520px; margin: 0 auto;
}
.asa-lookup-icon  { font-size: 34px; margin-bottom: 12px; }
.asa-lookup-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.asa-lookup-sub   { color: #666; font-size: 14px; margin: 0 0 26px; line-height: 1.6; }
.asa-lookup-sub a { color: var(--asa-primary); }

.asa-lookup-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.asa-field { display: flex; flex-direction: column; gap: 5px; }
.asa-field label { font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .4px; }
.asa-field input {
    padding: 12px 14px; border: 2px solid #e5e7eb; border-radius: 8px;
    font-size: 15px; outline: none; transition: border-color .2s; width: 100%; box-sizing: border-box;
}
.asa-field input:focus { border-color: var(--asa-primary); }
#asa-key-input { font-family: monospace; letter-spacing: 1px; }

.asa-lookup-error {
    margin-top: 14px; padding: 11px 16px; background: #fef2f2;
    border: 1px solid #fca5a5; border-radius: 8px; color: #991b1b; font-size: 14px; text-align: left;
}

/* ── Result card (logged-out) ────────────────────────────────────────────────── */
.asa-license-result { margin-bottom: 40px; }
.asa-result-card {
    background: #fff; border: 2px solid var(--asa-primary); border-radius: var(--asa-radius);
    box-shadow: var(--asa-shadow); padding: 26px 30px; max-width: 620px; margin: 0 auto;
}
.asa-result-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.asa-result-check {
    width: 42px; height: 42px; background: #dcfce7; color: #16a34a;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.asa-result-title { font-size: 17px; font-weight: 700; }
.asa-result-email { font-size: 13px; color: #888; margin-top: 2px; }
.asa-result-badge { margin-left: auto; background: var(--asa-primary); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.asa-result-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; background: #f9fafb; border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; }
.asa-result-meta-item { text-align: center; }
.asa-meta-label { display: block; font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.asa-meta-value { display: block; font-size: 14px; font-weight: 700; }
.asa-result-actions { display: flex; gap: 12px; align-items: center; }
.asa-btn-download { width: auto; flex-shrink: 0; }

/* ── Plans (logged-out) ──────────────────────────────────────────────────────── */
.asa-plans-section { margin-bottom: 40px; }
.asa-plans-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.asa-plans-sub   { color: #666; font-size: 14px; margin: 0 0 24px; }
.asa-plans-grid  { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

.asa-plan { background: #fff; border: 2px solid #e5e7eb; border-radius: var(--asa-radius); padding: 22px 18px; position: relative; display: flex; flex-direction: column; }
.asa-plan-featured { border-color: var(--asa-primary); }
.asa-plan-popular {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--asa-primary); color: #fff;
    font-size: 10px; font-weight: 700; padding: 3px 12px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}
.asa-plan-name  { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.asa-plan-limit { font-size: 12px; color: var(--asa-primary); font-weight: 600; margin: 3px 0 14px; }
.asa-plan-features { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.asa-plan-features li { padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 12.5px; display: flex; align-items: center; gap: 7px; color: #555; }
.asa-plan-features li:last-child { border-bottom: none; }
.asa-plan-features li::before { font-size: 13px; flex-shrink: 0; }
.asa-plan-features li.yes::before { content: '✓'; color: #16a34a; font-weight: 700; }
.asa-plan-features li.no { color: #ccc; }
.asa-plan-features li.no::before { content: '—'; color: #e5e7eb; }
.asa-plan-features li.yes.agency { color: var(--asa-primary); font-weight: 600; }
.asa-plan-features li.yes.agency::before { color: var(--asa-primary); }
.asa-plan-btn {
    display: block; text-align: center; padding: 10px;
    border-radius: 7px; font-size: 13px; font-weight: 700;
    border: 2px solid var(--asa-primary); color: var(--asa-primary);
    text-decoration: none; transition: all .2s; margin-top: auto;
}
.asa-plan-btn:hover, .asa-plan-featured .asa-plan-btn { background: var(--asa-primary); color: #fff; }

/* ── Support strip ───────────────────────────────────────────────────────────── */
.asa-support-strip { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: var(--asa-radius); padding: 18px 26px; margin-top: 8px; }
.asa-support-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 14px; color: #555; }

.asa-empty { color: #aaa; font-style: italic; font-size: 13px; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .asa-dash-grid    { grid-template-columns: 1fr; }
    .asa-plans-grid   { grid-template-columns: repeat(2,1fr); }
    .asa-upgrade-grid { flex-direction: column; }
}
@media (max-width: 480px) {
    .asa-plans-grid     { grid-template-columns: 1fr; }
    .asa-lookup-box     { padding: 24px 18px; }
    .asa-result-actions { flex-direction: column; }
    .asa-license-meta   { grid-template-columns: 1fr 1fr; }
    .asa-support-inner  { flex-direction: column; text-align: center; }
    .asa-dash-header    { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Changelog shortcode ─────────────────────────────────────────────────────── */
.asa-changelog { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 680px; }
.asa-cl-entry { background: #fff; border: 1px solid #e8eaf0; border-radius: 10px; padding: 22px 24px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.asa-cl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.asa-cl-version { font-size: 18px; font-weight: 800; color: #1a1a2e; }
.asa-cl-label { background: #f97316; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px; }
.asa-cl-label.old { background: #e5e7eb; color: #6b7280; }
.asa-cl-date { font-size: 13px; color: #9ca3af; margin-left: auto; }
.asa-cl-section { margin-bottom: 12px; }
.asa-cl-section:last-child { margin-bottom: 0; }
.asa-cl-section strong { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; margin-bottom: 7px; }
.asa-cl-section ul { list-style: none; padding: 0; margin: 0; }
.asa-cl-section li { font-size: 14px; color: #374151; padding: 4px 0; border-bottom: 1px solid #f3f4f6; padding-left: 16px; position: relative; line-height: 1.5; }
.asa-cl-section li:last-child { border-bottom: none; }
.asa-cl-section li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: #e5e7eb; }
.asa-cl-new li::before { background: #f97316; }
.asa-cl-improved li::before { background: #3b82f6; }
.asa-cl-fixed li::before { background: #22c55e; }
.asa-cl-history { margin-top: 4px; }
.asa-cl-history-entry { background: #fafafa; border: 1px solid #f0f0f0; border-radius: 8px; padding: 16px 20px; margin-bottom: 10px; }
.asa-cl-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid #e5e7eb; border-radius: 7px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer; margin-bottom: 14px; transition: all .15s; }
.asa-cl-toggle:hover { border-color: #f97316; color: #f97316; }
.asa-cl-toggle-arrow { transition: transform .2s; display: inline-block; }
.asa-cl-toggle.open .asa-cl-toggle-arrow { transform: rotate(180deg); }

/* ── Changelog shortcode (rl_changelog / rl_agency_hub_changelog) ────────────── */
.rl-changelog { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 700px; }

/* Latest release card */
.rl-cl-latest { background: #fff; border: 1px solid #e8eaf0; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.05); margin-bottom: 16px; }

.rl-cl-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #f0f2f5; }

.rl-cl-version-wrap { display: flex; align-items: center; gap: 10px; }

.rl-cl-badge { background: #f97316; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; }

.rl-cl-version { font-size: 22px; font-weight: 800; color: #0f172a; letter-spacing: -.3px; }

.rl-cl-date { font-size: 13px; color: #94a3b8; font-weight: 500; }

.rl-cl-body { padding: 8px 24px 20px; display: flex; flex-direction: column; gap: 4px; }

/* Section groups */
.rl-cl-group { margin-top: 14px; }

.rl-cl-group-label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 10px; border-radius: 6px; margin-bottom: 10px; }

.rl-cl-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

.rl-cl-items li { font-size: 14px; color: #374151; line-height: 1.6; padding-left: 18px; position: relative; }

.rl-cl-items li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, #e2e8f0); }

/* History toggle button */
.rl-cl-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 600; color: #64748b; cursor: pointer; margin-bottom: 14px; transition: border-color .15s, color .15s; font-family: inherit; }

.rl-cl-toggle:hover { border-color: #f97316; color: #f97316; }

.rl-cl-toggle-arrow { transition: transform .25s; flex-shrink: 0; }

.rl-cl-toggle-count { font-size: 11px; font-weight: 600; color: #94a3b8; background: #f1f5f9; padding: 2px 8px; border-radius: 20px; }

/* History entries */
.rl-cl-history { margin-bottom: 8px; }

.rl-cl-history-entry { background: #f8fafc; border: 1px solid #e8eaf0; border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }

.rl-cl-history-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.rl-cl-history-version { font-size: 15px; font-weight: 700; color: #0f172a; }

.rl-cl-history-date { font-size: 12px; color: #94a3b8; }

.rl-cl-history-section { margin-bottom: 10px; }
.rl-cl-history-section:last-child { margin-bottom: 0; }

.rl-cl-history-section-label { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; display: block; margin-bottom: 6px; }

.rl-cl-history-section ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }

.rl-cl-history-section li { font-size: 13px; color: #4b5563; line-height: 1.5; padding-left: 16px; position: relative; }

.rl-cl-history-section li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, #e2e8f0); }
