/* ==================================================
   Nuclear Fancy Pants Edition™ — NUCLEAR+++
   File: assets/css/modules.css
   Description: Modules page styles — AI provider cards, modals, header, tabs
   Last Edited: 2026-04-09
   ================================================== */

@import url('fonts.css');
@import url('tabs.css');

/* ── Page background ──────────────────────────────────────────── */
#wpcontent,
#wpbody,
#wpbody-content {
    background: #FFFFFF;
}

/* ── Hide WP footer ───────────────────────────────────────────── */
#wpfooter,
#footer-thankyou {
    display: none !important;
}

/* ── Dashboard wrap ───────────────────────────────────────────── */
#automarketer-ai-dashboard {
    background: #F9FAFB !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ── SVG icon sizing ──────────────────────────────────────────── */
.am-svg-icon {
    width: 22px;
    height: 22px;
}

/* ── Scoped reset ─────────────────────────────────────────────── */
#amai-root, #amai-root *,
#amai-act-modal, #amai-act-modal *,
#amai-help-modal, #amai-help-modal *,
#amai-sms-modal, #amai-sms-modal * {
    box-sizing: border-box;
    font-family: 'DM Sans', -apple-system, sans-serif;
}

/* ── Tokens ───────────────────────────────────────────────────── */
#amai-root {
    padding-top: 8px;
    --clay:       #D97757;
    --clay-mid:   #C4623E;
    --clay-light: #F7EDE6;
    --clay-pale:  #FDF8F5;
    --ink:        #1C1917;
    --stone:      #78716C;
    --stone-lt:   #A8A29E;
    --parchment:  #FFFFFF;
    --white:      #FFFFFF;
    --border:     #E7DDD5;
    --green:      #166534;
    --green-bg:   #DCFCE7;
    --green-s:    #15803D;
    --amber-bg:   #FEF3C7;
    --amber:      #92400E;
    --r-sm:       8px;
    --r:          14px;
    --r-lg:       18px;
    --sh-sm:      0 2px 8px rgba(28,25,23,0.07);
    --sh:         0 8px 28px rgba(28,25,23,0.11), 0 2px 8px rgba(28,25,23,0.05);
}

/* ── Page header ──────────────────────────────────────────────── */
#amai-mod-header {
    padding: 24px 0 0;
    margin-bottom: 12px;
    text-align: center;
    font-family: 'DM Sans', -apple-system, sans-serif;
}
#amai-mod-header h1 {
    font-family: 'Nunito', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #D97757 !important;
    -webkit-text-fill-color: #D97757 !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    border: none !important;
    text-shadow: none !important;
    text-align: center !important;
}
#amai-mod-header p {
    font-size: 0.95rem !important;
    color: #78716C !important;
    margin: 0 0 20px !important;
    text-align: center !important;
    font-family: 'DM Sans', -apple-system, sans-serif !important;
}

/* ── Shared tab nav — rendered by templates/partials/tabs.php ─── */

/* ── License warning ──────────────────────────────────────────── */
#amai-modules-license-warn {
    margin: 20px 0;
    padding: 14px 18px;
    background: #FEF3C7;
    border-left: 4px solid #D97706;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #92400E;
}

/* ── Section divider ──────────────────────────────────────────── */
#amai-root .am-section-divider {
    border: none;
    border-top: 1.5px solid #E7DDD5;
    margin: 36px 0 32px;
}

/* ── Section heading ──────────────────────────────────────────── */
#amai-root .am-section-head      { margin-bottom: 20px; margin-top: 0; padding-top: 0; text-align: center; }
#amai-root .am-section-head h2   { font-family: 'Nunito', sans-serif; font-size: 1.45rem; font-weight: 800; color: #1C1917; margin: 0 0 5px; text-align: center !important; }
#amai-root .am-section-head p    { font-size: 0.9rem; color: #78716C; margin: 0; line-height: 1.55; text-align: center !important; }
#amai-root .am-section-head p a  { color: #D97757; text-decoration: underline; text-decoration-style: dotted; }

/* Step badge */
#amai-root .am-section-step {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #D97757;
    background: #F7EDE6;
    border: 1px solid #E7DDD5;
    border-radius: 100px;
    padding: 3px 11px;
    margin-bottom: 10px;
}
#amai-root .am-section-step--premium {
    color: #78716C;
    background: #F1F0EE;
}

/* ── Provider grid ────────────────────────────────────────────── */
#amai-root .am-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 8px;
}

#amai-root .am-card {
    background: #FFFFFF; border: 1.5px solid #E7DDD5; border-radius: 16px;
    padding: 22px 20px 18px; display: flex; flex-direction: column;
    position: relative; box-shadow: 0 2px 8px rgba(28,25,23,0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
    overflow: hidden;
}
#amai-root .am-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(28,25,23,0.12); }
#amai-root .am-card.is-active      { border-color: #D97757; background: #FDF8F5; }
#amai-root .am-card.is-recommended { border-color: #D97757; box-shadow: 0 0 0 1px #D97757, 0 8px 28px rgba(217,119,87,0.12); }

/* Facebook card */
#amai-root .am-card--facebook {
    border-color: #1877F2;
    box-shadow: 0 0 0 1px #1877F233, 0 2px 8px rgba(28,25,23,0.07);
}
#amai-root .am-card--facebook:hover {
    box-shadow: 0 0 0 1px #1877F244, 0 10px 32px rgba(24,119,242,0.14);
}

#amai-root .am-ribbon {
    position: absolute; top: 0; right: 0;
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    padding: 4px 12px 4px 10px; border-radius: 0 16px 0 10px; color: white;
}
#amai-root .am-ribbon--active        { background: #15803D; }
#amai-root .am-ribbon--connected     { background: #15803D; }
#amai-root .am-ribbon--recommended   { background: #D97757; letter-spacing: 0.04em; }
#amai-root .am-ribbon--coming-soon   { background: #78716C; letter-spacing: 0.04em; }

/* Instagram card */
#amai-root .am-card--instagram {
    border-color: #E1306C;
    box-shadow: 0 0 0 1px #E1306C33, 0 2px 8px rgba(28,25,23,0.07);
}
#amai-root .am-card--instagram:hover {
    box-shadow: 0 0 0 1px #E1306C44, 0 10px 32px rgba(225,48,108,0.14);
}
#amai-root .am-card--instagram.is-active {
    border-color: #E1306C;
    background: #FFF5F8;
}

/* Free ribbon */
#amai-root .am-ribbon--free { background: #E7F0FE; color: #1877F2; }

/* Channel grid — max 2 columns */
#amai-root .am-channel-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
}

#amai-root .am-card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px; flex-shrink: 0;
}

#amai-root .am-card-tagline {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #A8A29E; margin: 0 0 4px;
}
#amai-root .am-card-name { font-family: 'Nunito', sans-serif; font-size: 1.25rem; font-weight: 800; color: #1C1917; margin: 0 0 9px; line-height: 1.2; }
#amai-root .am-card-desc { font-size: 13px; color: #78716C; line-height: 1.62; margin: 0; flex: 1; }

/* ── Card buttons ─────────────────────────────────────────────── */
#amai-root .am-card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

#amai-root .am-card-actions button,
#amai-root .am-card-actions a,
#amai-root .am-card-actions .am-btn-activate,
#amai-root .am-card-actions .am-btn-deactivate,
#amai-root .am-card-actions .am-btn-change {
    width: 100%; border-radius: 9px; padding: 11px 16px;
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.1s;
    text-align: center; display: block; line-height: 1.2; text-decoration: none;
}

#amai-root .am-btn-activate {
    background: #D97757 !important; color: white !important; border: none !important;
}
#amai-root .am-btn-activate:hover  { background: #C4623E !important; color: white !important; }
#amai-root .am-btn-activate:active { transform: scale(0.98); }

#amai-root .am-card.is-recommended .am-btn-activate {
    background: #D97757 !important;
    box-shadow: 0 4px 14px rgba(217,119,87,0.35);
}

#amai-root .am-btn-deactivate {
    background: transparent; color: #78716C; border: 1.5px solid #E7DDD5;
}
#amai-root .am-btn-deactivate:hover { border-color: #c0392b; color: #c0392b; }

#amai-root .am-btn-change {
    background: transparent; color: #D97757; border: 1.5px solid #F7EDE6;
    font-weight: 500;
}
#amai-root .am-btn-change:hover { background: #FDF8F5; border-color: #D97757; }

/* Coming soon button */
#amai-root .am-btn-coming-soon {
    width: 100%; border-radius: 9px; padding: 11px 16px;
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
    text-align: center; display: block; line-height: 1.2;
    background: #F1F0EE; color: #A8A29E; border: 1.5px solid #E7DDD5;
    cursor: not-allowed;
}

#amai-root .am-card-actions form { margin: 0; }

#amai-root .am-locked {
    display: flex; flex-direction: column; gap: 6px;
}
#amai-root .am-locked-btn {
    width: 100%; padding: 9px 14px;
    border: 1px solid #E7DDD5; border-radius: 8px;
    background: #F9FAFB; color: #A8A29E;
    font-size: 13px; font-family: inherit;
    cursor: not-allowed; opacity: 0.7; text-align: center;
}
#amai-root .am-locked-hint {
    font-size: 11.5px; color: #A8A29E; text-align: center; line-height: 1.4; margin: 0;
}
#amai-root .am-locked a { display: inline; color: #92400E; font-weight: 600; text-decoration: underline; }

/* ── Premium locked grid ──────────────────────────────────────── */
#amai-root .am-premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}
#amai-root .am-premium-card {
    background: #FAFAF9;
    border: 1.5px dashed #E7DDD5;
    border-radius: 13px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    opacity: 0.75;
}
#amai-root .am-premium-lock {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #A8A29E;
}
#amai-root .am-premium-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-bottom: 4px;
}
#amai-root .am-premium-tagline {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #A8A29E;
}
#amai-root .am-premium-name {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem; font-weight: 800; color: #78716C;
}
#amai-root .am-premium-desc {
    font-size: 12px; color: #A8A29E; line-height: 1.55;
}

/* ── Notices ──────────────────────────────────────────────────── */
#amai-root .am-notice {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 40px 13px 15px; border-radius: 9px;
    font-size: 13px; line-height: 1.55; margin-bottom: 10px; position: relative;
}
#amai-root .am-notice.info    { background: #EFF6FF; border-left: 3px solid #3B82F6; color: #1E40AF; }
#amai-root .am-notice.success { background: #DCFCE7; border-left: 3px solid #15803D; color: #166534; }
#amai-root .am-notice-x {
    position: absolute; top: 10px; right: 12px; background: none; border: none;
    font-size: 17px; color: inherit; cursor: pointer; opacity: 0.55; line-height: 1; padding: 0;
}
#amai-root .am-notice-x:hover { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   ACTIVATION MODAL
══════════════════════════════════════════════════════════════ */
#amai-act-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(28,25,23,0.52);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 999990; align-items: center; justify-content: center; padding: 20px;
}
#amai-act-modal.show { display: flex !important; }

.am-act-wrap {
    background: #FFFFFF; border-radius: 18px; width: 100%; max-width: 500px;
    max-height: 92vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(28,25,23,0.18), 0 4px 20px rgba(28,25,23,0.1);
    display: flex; flex-direction: column;
    transform: translateY(18px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
}
#amai-act-modal.show .am-act-wrap { transform: translateY(0) scale(1); }
#amai-sms-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(28,25,23,0.52);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 999990; align-items: center; justify-content: center; padding: 20px;
}
#amai-sms-modal.show { display: flex !important; }
#amai-sms-modal.show .am-act-wrap { transform: translateY(0) scale(1); }
.am-act-hint { font-size: 12px; color: #78716C; margin-top: 12px; line-height: 1.5; }
.am-act-hint a { color: #D97757; text-decoration: none; }
.am-act-hint a:hover { text-decoration: underline; }

.am-act-header {
    padding: 22px 24px 0;
    display: flex; align-items: flex-start; justify-content: space-between; flex-shrink: 0;
}
.am-act-eyebrow {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: #D97757; margin-bottom: 4px;
}
.am-act-title { font-family: 'Nunito', sans-serif; font-size: 1.3rem; font-weight: 800; color: #1C1917; line-height: 1.3; margin: 0; }
.am-act-close {
    background: #FFFFFF; border: 1.5px solid #E7DDD5; border-radius: 50%;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #78716C; flex-shrink: 0; margin-left: 14px;
    font-size: 15px; line-height: 1; transition: background 0.18s, color 0.18s;
}
.am-act-close:hover { background: #F7EDE6; color: #D97757; }

.am-act-body { padding: 18px 24px 4px; flex: 1; }

.am-act-error {
    display: none; background: #FEF2F2; border-left: 3px solid #DC2626;
    color: #991B1B; font-size: 13px; padding: 10px 13px; border-radius: 6px;
    margin-bottom: 14px; line-height: 1.5;
}
.am-act-label { display: block; font-size: 12.5px; font-weight: 600; color: #1C1917; margin-bottom: 6px; }
.am-act-input {
    width: 100%; background: #FFFFFF; border: 1.5px solid #E7DDD5;
    border-radius: 8px; padding: 11px 13px;
    font-family: 'DM Mono', monospace; font-size: 13px; color: #1C1917;
    outline: none; transition: border-color 0.18s; margin-bottom: 15px;
}
.am-act-input:focus { border-color: #D97757; }
.am-act-select {
    width: 100%; background: #FFFFFF; border: 1.5px solid #E7DDD5;
    border-radius: 8px; padding: 11px 36px 11px 13px;
    font-family: 'DM Sans', sans-serif; font-size: 13.5px; color: #1C1917;
    outline: none; transition: border-color 0.18s; margin-bottom: 18px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%2378716C' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
}
.am-act-select:focus    { border-color: #D97757; }
.am-act-select:disabled { opacity: 0.45; cursor: not-allowed; }

.am-act-help-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; color: #78716C; background: none; border: none;
    cursor: pointer; padding: 0; transition: color 0.18s; margin-bottom: 6px;
}
.am-act-help-link:hover { color: #D97757; }

.am-act-footer {
    padding: 14px 24px 18px; border-top: 1px solid #E7DDD5;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0; background: #FFFFFF; border-radius: 0 0 18px 18px;
}
.am-act-btns { display: flex; gap: 8px; }
.am-act-btn-cancel {
    background: transparent; border: 1.5px solid #E7DDD5; border-radius: 8px;
    padding: 10px 18px; font-size: 13.5px; font-weight: 500; color: #78716C;
    cursor: pointer; transition: border-color 0.18s, color 0.18s;
}
.am-act-btn-cancel:hover { border-color: #D97757; color: #D97757; }
.am-act-btn-save {
    background: #D97757; border: none; border-radius: 8px;
    padding: 10px 22px; font-size: 13.5px; font-weight: 600;
    color: white; cursor: pointer; transition: background 0.18s, transform 0.1s;
}
.am-act-btn-save:hover  { background: #C4623E; }
.am-act-btn-save:active { transform: scale(0.97); }

/* ══════════════════════════════════════════════════════════════
   HELP MODAL
══════════════════════════════════════════════════════════════ */
#amai-help-modal {
    display: none; position: fixed; inset: 0;
    background: rgba(28,25,23,0.58);
    backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
    z-index: 999999; align-items: center; justify-content: center; padding: 20px;
}
#amai-help-modal.show { display: flex !important; }

.am-hlp-wrap {
    background: #FFFFFF; border-radius: 18px; width: 100%; max-width: 660px;
    max-height: 92vh; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 24px 80px rgba(28,25,23,0.18), 0 4px 20px rgba(28,25,23,0.1);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
}
#amai-help-modal.show .am-hlp-wrap { transform: translateY(0) scale(1); }

.am-hlp-header {
    padding: 22px 28px 0; display: flex; align-items: flex-start;
    justify-content: space-between; flex-shrink: 0;
}
.am-hlp-eyebrow {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: #D97757; margin-bottom: 4px;
}
.am-hlp-title { font-family: 'Nunito', sans-serif; font-size: 1.3rem; font-weight: 800; color: #1C1917; line-height: 1.3; margin: 0; }
.am-hlp-close {
    background: #FFFFFF; border: 1.5px solid #E7DDD5; border-radius: 50%;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #78716C; flex-shrink: 0; margin-left: 14px;
    font-size: 15px; line-height: 1; transition: background 0.18s, color 0.18s;
}
.am-hlp-close:hover { background: #F7EDE6; color: #D97757; }

.am-hlp-progress { padding: 16px 28px 0; flex-shrink: 0; }
.am-hlp-labels   { display: flex; justify-content: space-between; margin-bottom: 7px; }
.am-hlp-lbl {
    font-size: 10.5px; font-weight: 500; color: #A8A29E;
    transition: color 0.25s; flex: 1; text-align: center;
}
.am-hlp-lbl:first-child { text-align: left; }
.am-hlp-lbl:last-child  { text-align: right; }
.am-hlp-lbl.active { color: #D97757; font-weight: 700; }
.am-hlp-lbl.done   { color: #78716C; }

.am-hlp-track { height: 4px; background: #E7DDD5; border-radius: 99px; overflow: hidden; }
.am-hlp-fill  { height: 100%; background: linear-gradient(90deg,#D97757,#C4623E); border-radius: 99px; transition: width 0.42s cubic-bezier(0.4,0,0.2,1); }
.am-hlp-counter { padding: 5px 28px 0; font-size: 11px; color: #A8A29E; flex-shrink: 0; }

.am-hlp-body { padding: 18px 28px; overflow-y: auto; flex: 1; }

.am-hlp-step { display: none; animation: amStepIn 0.25s ease forwards; }
.am-hlp-step.active { display: block; }
@keyframes amStepIn { from{opacity:0;transform:translateX(13px);}to{opacity:1;transform:translateX(0);} }

.am-hlp-headline { font-family: 'Nunito', sans-serif; font-size: 1.1rem; font-weight: 800; color: #1C1917; margin: 0 0 9px; line-height: 1.35; }
.am-hlp-text     { font-size: 13.5px; color: #78716C; line-height: 1.68; margin-bottom: 14px; }
.am-hlp-text strong { color: #1C1917; font-weight: 600; }
.am-hlp-text a      { color: #D97757; text-decoration: none; }
.am-hlp-text a:hover { text-decoration: underline; }
.am-hlp-text code { font-family: 'DM Mono', monospace; font-size: 12px; background: #F7EDE6; padding: 1px 5px; border-radius: 4px; color: #C4623E; }

.am-hlp-note    { background: #FDF8F5; border-left: 3px solid #D97757; border-radius: 6px; padding: 10px 13px; font-size: 13px; color: #78716C; line-height: 1.6; margin-bottom: 13px; }
.am-hlp-warn    { background: #FEF3C7; border-left: 3px solid #D97706; border-radius: 6px; padding: 10px 13px; font-size: 13px; color: #92400E; line-height: 1.6; margin-bottom: 13px; }
.am-hlp-success { background: #DCFCE7; border-left: 3px solid #16A34A; border-radius: 6px; padding: 10px 13px; font-size: 13px; color: #166534; line-height: 1.6; margin-bottom: 13px; }

.am-console { border-radius: 11px; overflow: hidden; border: 1.5px solid #252525; box-shadow: 0 7px 24px rgba(0,0,0,0.24); margin-bottom: 7px; }
.am-chrome  { background: #252525; padding: 7px 11px; display: flex; align-items: center; gap: 7px; }
.am-dots    { display: flex; gap: 5px; }
.am-dot     { width: 9px; height: 9px; border-radius: 50%; }
.am-url     { flex: 1; background: #1A1A1A; border-radius: 4px; padding: 3px 9px; font-size: 10.5px; color: #888; font-family: 'DM Mono', monospace; margin: 0 7px; }
.am-url span { color: #CCC; }
.am-screen  { background: #0F1117; min-height: 125px; display: flex; align-items: center; justify-content: center; padding: 18px; color: #E2E8F0; font-size: 12px; }

.am-ann { display: flex; align-items: center; gap: 6px; margin-top: -2px; margin-bottom: 13px; padding-left: 11px; }
.am-ann-line { width: 22px; height: 2px; background: #D97757; position: relative; flex-shrink: 0; }
.am-ann-line::after { content: ''; position: absolute; right: -5px; top: -4px; border: 5px solid transparent; border-left-color: #D97757; border-right: none; }
.am-ann-text { font-size: 11px; font-weight: 600; color: #D97757; font-style: italic; }

.am-m-sidebar { width: 150px; background: #1A1D27; border-right: 1px solid #2D3148; padding: 11px 0; flex-shrink: 0; }
.am-m-logo    { display: flex; align-items: center; gap: 6px; padding: 0 11px 10px; border-bottom: 1px solid #2D3148; margin-bottom: 5px; }
.am-m-mark    { width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; color: white; flex-shrink: 0; }
.am-m-brand   { color: #E2E8F0; font-size: 10.5px; font-weight: 600; }
.am-m-nav     { display: flex; align-items: center; gap: 6px; padding: 6px 11px; font-size: 10.5px; color: #8B92A5; }
.am-m-nav.active { background: rgba(217,119,87,0.14); color: #D97757; border-right: 2px solid #D97757; font-weight: 500; }
.am-m-main    { flex: 1; padding: 14px; overflow: hidden; }
.am-m-h       { color: #E2E8F0; font-size: 11.5px; font-weight: 600; margin-bottom: 9px; }
.am-m-btn     { display: inline-flex; align-items: center; gap: 4px; background: #D97757; color: white; border: none; border-radius: 5px; padding: 5px 11px; font-size: 10.5px; font-weight: 600; cursor: default; }
.am-m-hl      { outline: 2px solid #D97757; outline-offset: 3px; border-radius: 4px; animation: amHl 2s ease-in-out infinite; }
@keyframes amHl { 0%,100%{box-shadow:0 0 0 0 rgba(217,119,87,0.4);}50%{box-shadow:0 0 0 5px rgba(217,119,87,0);} }
.am-m-keybox  { background: #0F1117; border: 1px solid #2D3148; border-radius: 5px; padding: 7px 8px; font-family: 'DM Mono', monospace; font-size: 9.5px; color: #86EFAC; word-break: break-all; margin-bottom: 7px; line-height: 1.55; }
.am-m-warn    { background: rgba(217,119,87,0.12); border: 1px solid rgba(217,119,87,0.3); border-radius: 5px; padding: 6px 8px; font-size: 9.5px; color: #FDBA74; margin-bottom: 8px; line-height: 1.5; }
.am-m-copy    { background: #D97757; color: white; border: none; border-radius: 5px; padding: 6px 11px; font-size: 10.5px; font-weight: 600; width: 100%; text-align: center; cursor: default; }
.am-m-cgrid   { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 9px; }
.am-m-cbox    { background: #1A1D27; border: 1px solid #2D3148; border-radius: 6px; padding: 9px; }
.am-m-clbl    { font-size: 9px; color: #8B92A5; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.am-m-cval    { font-size: 17px; font-weight: 700; color: #E2E8F0; }
.am-m-csub    { font-size: 9px; color: #8B92A5; margin-top: 1px; }

.am-hlp-footer {
    padding: 13px 28px 17px; border-top: 1px solid #E7DDD5;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0; background: #FFFFFF; border-radius: 0 0 18px 18px;
}
.am-hlp-nav { display: flex; gap: 7px; }
.am-hlp-btn-back {
    background: transparent; border: 1.5px solid #E7DDD5; border-radius: 8px;
    padding: 10px 17px; font-size: 13px; font-weight: 500; color: #78716C;
    cursor: pointer; transition: border-color 0.18s, color 0.18s;
}
.am-hlp-btn-back:hover { border-color: #D97757; color: #D97757; }
.am-hlp-btn-back:disabled { opacity: 0.28; cursor: default; pointer-events: none; }
.am-hlp-btn-next {
    background: #D97757; border: none; border-radius: 8px; padding: 10px 19px;
    font-size: 13px; font-weight: 600; color: white;
    cursor: pointer; transition: background 0.18s;
}
.am-hlp-btn-next:hover { background: #C4623E; }
.am-hlp-btn-done {
    background: #15803D; border: none; border-radius: 8px; padding: 10px 19px;
    font-size: 13px; font-weight: 600; color: white;
    cursor: pointer; display: none; transition: background 0.18s;
}
.am-hlp-btn-done:hover  { background: #166534; }
.am-hlp-btn-done.show   { display: inline-flex; align-items: center; gap: 5px; }
.am-hlp-tip { font-size: 11px; color: #A8A29E; max-width: 155px; text-align: right; line-height: 1.4; }

/* ── Image provider cost badge ─────────────────────────────── */
.am-card-cost {
    display: inline-block;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: #D97757;
    background: #FDF3EE;
    border: 1px solid #F0CFC0;
    border-radius: 6px;
    padding: 2px 8px;
    margin: 2px 0 6px;
    letter-spacing: 0.01em;
}

/* ── New model available badge ─────────────────────────────── */
.am-new-model-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #166534;
    background: #DCFCE7;
    border: 1px solid #86EFAC;
    border-radius: 6px;
    padding: 2px 7px;
    letter-spacing: 0.01em;
    cursor: default;
    z-index: 2;
}
/* -- Social channels layout -- */
#amai-root .am-channels-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
}
#amai-root .am-channels-row--local { grid-template-columns: repeat(auto-fill, 212px); }
#amai-root .am-channel-free-border {
    position: absolute;
    top: -14px;
    left: -1px;
    border: 1.5px solid #D0C8C2;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}
#amai-root .am-channel-group-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
#amai-root .am-channel-group-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #15803D;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}
#amai-root .am-channel-grid--free {
    max-width: 100%;
    margin: 0;
}
#amai-root .am-channel-grid--paid {
    max-width: 100%;
    margin-bottom: 0;
}
#amai-root .am-ribbon--starter {
    background: #D97757;
}
#amai-root .am-ribbon--premium {
    background: #7C3AED;
    letter-spacing: 0.04em;
}

/* -- Coming-soon module cards (non-premium, no lock, no fade) -- */
#amai-root .am-coming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}
#amai-root .am-coming-card {
    background: #FFFFFF;
    border: 1.5px solid #E7DDD5;
    border-radius: 13px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#amai-root .am-coming-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 4px;
}
#amai-root .am-coming-name {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #1C1917;
}
#amai-root .am-coming-desc {
    font-size: 12px;
    color: #78716C;
    line-height: 1.55;
    flex: 1;
}
#amai-root .am-coming-card .am-btn-coming-soon {
    margin-top: 4px;
}

#amai-root .am-woo-row {
    display: flex;
    align-items: stretch;
    gap: 18px;
    flex-wrap: wrap;
}
#amai-root .am-woo-row .am-card {
    width: 230px;
    min-width: 230px;
    flex-shrink: 0;
}
#amai-root .am-woo-row .am-coming-grid {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

/* Over-limit banner */
.amai-over-limit-banner {
    background: #FEF3C7; border: 1.5px solid #F59E0B; border-radius: 12px;
    padding: 14px 20px; margin-bottom: 24px; font-size: 13.5px; color: #92400E;
    line-height: 1.5;
}
.amai-over-limit-banner strong { font-weight: 700; }


/* ---- Store provider modal ---- */
#amai-store-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28,25,23,.45);
    backdrop-filter: blur(4px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}
#amai-store-modal.show {
    display: flex;
}
#amai-store-modal .am-act-wrap {
    width: 440px;
    max-width: 96vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* ---- Store module note ---- */
.amai-store-module-toggle {
    margin-top: 12px;
}
.amai-store-module-note {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #78716C;
    margin: 0;
}
.amai-store-module-note a {
    color: #D97757;
    text-decoration: none;
}
.amai-store-module-note a:hover {
    text-decoration: underline;
}


#amai-root #amai-email-row {
    position: relative;
    border: 1.5px solid #D0C8C2;
    border-radius: 20px;
    padding: 24px 16px 16px;
    margin-top: 20px;
    display: inline-block;
    min-width: 0;
}

#amai-root #amai-email-border {
    display: none;
}

#amai-root #amai-email-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #15803D;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 2;
    display: block;
    width: max-content;
}
.am-card-note { font-size: 12px; color: #A8A29E; margin: 8px 0 0; line-height: 1.5; }
.am-card-note--link { display: block; margin-top: 10px; text-align: center; color: #D97757; text-decoration: none; font-size: 12.5px; }
.am-card-note--link:hover { text-decoration: underline; }
.amai-dc-modal { display:none; position:fixed; inset:0; z-index:99999; background:rgba(0,0,0,0.45); backdrop-filter:blur(2px); align-items:center; justify-content:center; }
.amai-dc-modal.show { display:flex; }
.amai-dc-wrap { background:#fff; border-radius:16px; width:100%; max-width:420px; margin:16px; box-shadow:0 20px 60px rgba(0,0,0,0.18); overflow:hidden; }
.amai-dc-header { display:flex; align-items:flex-start; justify-content:space-between; padding:24px 24px 0; }
.amai-dc-eyebrow { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#D97757; margin-bottom:4px; }
.amai-dc-title { font-family:'Nunito',sans-serif; font-size:18px; font-weight:800; color:#1C1917; }
.amai-dc-close { background:none; border:none; cursor:pointer; font-size:14px; color:#A8A29E; padding:0; line-height:1; margin-top:2px; }
.amai-dc-close:hover { color:#1C1917; }
.amai-dc-body { padding:16px 24px 20px; }
.amai-dc-warning-text { font-size:14px; color:#57534E; line-height:1.6; margin:0 0 8px; }
.amai-dc-warning-sub { font-size:12.5px; color:#A8A29E; margin:0; }
.amai-dc-footer { display:flex; gap:10px; padding:16px 24px 24px; border-top:1px solid #F5F0EC; }
.amai-dc-btn-cancel { flex:1; padding:10px; border:1.5px solid #E7DDD5; border-radius:8px; background:#fff; font-size:13.5px; font-weight:600; color:#57534E; cursor:pointer; }
.amai-dc-btn-cancel:hover { background:#F9FAFB; }
.amai-dc-btn-disconnect { flex:1; padding:10px; border:none; border-radius:8px; background:#DC2626; font-size:13.5px; font-weight:700; color:#fff; cursor:pointer; }
.amai-dc-btn-disconnect:hover { background:#B91C1C; }
