/*
 * Contentosapp Studio Admin — License and service plan styles.
 * Extracted from costudio-admin.css for page-specific loading.
 */

/* ==========================================================================
   Phase 5 — Service plan page, page-header back button, license form
   ========================================================================== */

/* ── Page-header back button ────────────────────────────────────────────────── */
.fos-page-header-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--fos-border);
    background: #fff;
    color: var(--fos-text-sub);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.15s;
    margin-right: 4px;
}

.fos-page-header-back:hover {
    border-color: rgba(108, 71, 255, 0.3);
    background: var(--fos-primary-light);
    color: var(--fos-primary);
    text-decoration: none;
}

.fos-page-header-back .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
}

.fos-lic-page-header {
    /* Legacy overrides removed to inherit global Neumorphic style */
}

/* ── Service plan page intro ────────────────────────────────────────────────── */
.fos-upgrade-intro-text {
    font-size: 14px;
    color: var(--fos-text-sub);
    margin: 4px 0 28px;
}

/* ── Service plan cards grid ────────────────────────────────────────────────── */
.fos-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
    align-items: start;
}

.fos-upgrade-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.fos-upgrade-card:hover {
    box-shadow: var(--fos-shadow-md);
}

/* M13 + M20: Card PRO com escala e elevação para destaque premium */
.fos-upgrade-card--highlight {
    border-color: var(--fos-primary);
    box-shadow: 0 0 0 2px rgba(108, 71, 255, 0.15), var(--fos-shadow-md);
    transform: scale(1.02);
    position: relative;
    z-index: 1;
}

.fos-upgrade-card--highlight:hover {
    box-shadow: 0 0 0 2px rgba(108, 71, 255, 0.25), 0 8px 28px rgba(108, 71, 255, 0.18);
    transform: scale(1.02) translateY(-3px);
}

/* Ribbon */
.fos-upgrade-card__ribbon {
    background: var(--fos-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    padding: 5px 0;
}

/* Card header */
.fos-upgrade-card__header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--fos-border);
    background: var(--fos-bg-soft);
}

.fos-upgrade-card--highlight .fos-upgrade-card__header {
    background: var(--fos-primary-light);
}

.fos-upgrade-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--fos-text);
    margin-bottom: 8px;
}

.fos-upgrade-card--highlight .fos-upgrade-card__name {
    color: var(--fos-primary);
}

.fos-upgrade-card__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.fos-upgrade-card__price-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--fos-text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.fos-upgrade-card--highlight .fos-upgrade-card__price-val {
    color: var(--fos-primary);
}

.fos-upgrade-card__price-sub {
    font-size: 13px;
    color: var(--fos-text-sub);
}

/* Feature list */
.fos-upgrade-card__features {
    list-style: none;
    margin: 0;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.fos-upgrade-card__feat {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--fos-text-sub);
    line-height: 1.4;
}

.fos-upgrade-card__feat--ok {
    color: var(--fos-text);
}

.fos-upgrade-card__feat--no {
    opacity: 0.45;
}

.fos-upgrade-card__feat-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    margin-top: 1px;
}

.fos-upgrade-card__feat--ok .fos-upgrade-card__feat-icon {
    background: rgba(5, 150, 105, 0.12);
    color: var(--fos-success);
}

.fos-upgrade-card__feat--no .fos-upgrade-card__feat-icon {
    background: rgba(156, 163, 175, 0.15);
    color: var(--fos-text-dim);
}

/* Card footer */
.fos-upgrade-card__footer {
    padding: 16px 24px 24px;
}

/* ── License key panel ──────────────────────────────────────────────────────── */
.fos-upgrade-license {
    margin-bottom: 20px;
}

.fos-upgrade-license__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.fos-upgrade-license__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 2px;
}

.fos-upgrade-license__hint {
    font-size: 12px;
    color: var(--fos-text-sub);
    margin: 0;
}

.fos-upgrade-license__form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fos-upgrade-license__form .cts-input {
    min-width: 220px;
}

.fos-upgrade-license__msg {
    font-size: 12px;
    font-weight: 600;
}

/* ── Service plan safety notice ─────────────────────────────────────────────── */
.fos-upgrade-notice {
    max-width: 600px;
}

/* ── Service plan responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .fos-upgrade-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .fos-upgrade-license__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   LICENSE SCREEN (Refactored)
   ══════════════════════════════════════════════════════════════════════════ */

.fos-lic-zone-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: 16px;
}

.fos-lic-zone-label:first-of-type {
    margin-top: 0;
}

.fos-lic-zone-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--fos-border);
}

/* ── Page Header ── */

/* ── Usage Hero (Free) ── */
.fos-lic-usage-hero {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
    box-shadow: var(--fos-shadow);
    margin-bottom: 16px;
    margin-top: 12px;
}

.fos-lic-usage-hero-top {
    background: linear-gradient(135deg, #2e1065 0%, #171329 100%);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fos-lic-plan-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fos-lic-plan-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-size: 18px;
}

.fos-lic-plan-icon .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
}

.fos-lic-plan-icon--starter {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(134, 239, 172, 0.32);
    color: #86efac;
}

.fos-lic-plan-icon--free {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(125, 211, 252, 0.34);
    color: #7dd3fc;
}

.fos-lic-plan-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.fos-lic-plan-info .fos-lic-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.fos-lic-plan-header .fos-lic-plan-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--fos-text);
    margin-bottom: 6px;
}

.fos-lic-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

.fos-lic-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 5px rgba(74, 222, 128, 0.7);
}

.fos-lic-status-text {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.fos-lic-usage-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--fos-border);
}

.fos-lic-usage-stat {
    padding: 14px 18px;
    border-right: 1px solid var(--fos-border);
}

.fos-lic-usage-stat:last-child {
    border-right: none;
}

.fos-lic-us-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    margin-bottom: 6px;
}

.fos-lic-us-value {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--fos-text);
    line-height: 1;
    margin-bottom: 2px;
}

.fos-lic-us-value.warning {
    color: var(--fos-warning);
}

.fos-lic-us-value.green {
    color: var(--fos-primary);
}

.fos-lic-us-value.amber {
    color: var(--fos-warning);
}

.fos-lic-us-sub {
    font-size: 11px;
    color: var(--fos-text-dim);
}

.fos-lic-prod-bar-wrap {
    padding: 12px 18px;
    border-top: 1px solid var(--fos-border);
    background: var(--fos-bg-soft);
}

.fos-lic-prod-bar-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--fos-text-sub);
    font-weight: 500;
    margin-bottom: 6px;
}

.fos-lic-prod-bar-label a {
    color: var(--fos-primary);
    text-decoration: none;
    font-weight: 600;
}

.fos-lic-prod-bar-label a:hover {
    text-decoration: underline;
}

.fos-lic-prod-bar-track {
    height: 5px;
    background: var(--fos-border);
    border-radius: 5px;
    overflow: hidden;
}

.fos-lic-prod-bar-reset {
    margin-top: 6px;
    font-size: 11px;
    color: var(--fos-text-dim);
    text-align: right;
}

.fos-lic-prod-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: var(--fos-warning);
    width: 0;
    /* Default, overridden via inline style in PHP */
}

.fos-lic-prod-bar-fill.fos-bg-danger {
    background: var(--fos-danger) !important;
}

/* ── Plan Comparison ── */
.fos-lic-plan-compare {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

/* Four-plan comparison (Free · Starter · Pro · Studio). */
.fos-lic-plan-compare--four {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 1180px) {
    .fos-lic-plan-compare--four {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .fos-lic-plan-compare--four {
        grid-template-columns: 1fr;
    }
}

.fos-lic-plan-card {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: visible;
    box-shadow: var(--fos-shadow);
    transition: var(--fos-transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.fos-lic-plan-card:hover {
    box-shadow: var(--fos-shadow-md);
    transform: translateY(-2px);
}

/* M13: Card PRO na grade de planos com escala e destaque */
.fos-lic-plan-card.featured {
    border-color: var(--fos-primary);
    box-shadow: 0 0 0 1.5px var(--fos-primary), var(--fos-shadow-md);
    transform: scale(1.025);
    position: relative;
    z-index: 1;
}

.fos-lic-plan-card.featured:hover {
    box-shadow: 0 0 0 2px var(--fos-primary), 0 12px 32px rgba(108, 71, 255, 0.22);
    transform: scale(1.025) translateY(-3px);
}

/* ContentOS Pro variant */
.fos-lic-plan-card--contentos {
    border-color: #0EA5E9;
    background: linear-gradient(180deg, #F0F9FF 0%, #ffffff 60%);
}

.fos-lic-plan-card--contentos:hover {
    border-color: #0284C7;
    box-shadow: 0 0 0 1px #0EA5E9, var(--fos-shadow-md);
}

.fos-lic-plan-card--contentos .fos-lic-plan-badge-top {
    background: #0EA5E9;
}

.fos-lic-plan-card--contentos .fos-lic-plan-name {
    color: #0284C7;
}

.fos-lic-plan-badge-top {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--fos-primary), var(--fos-primary-dark));
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(108, 71, 255, 0.3);
}

.fos-lic-plan-header {
    padding: 28px 20px 14px;
    border-radius: var(--fos-radius) var(--fos-radius) 0 0;
    border-bottom: 1px solid var(--fos-border);
}

.fos-lic-plan-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.fos-lic-plan-card.featured .fos-lic-plan-name {
    color: var(--fos-primary);
}

.fos-lic-plan-price {
    font-size: 34px;
    font-weight: 800;
    color: var(--fos-text);
    letter-spacing: -1.5px;
    line-height: 1;
    display: inline;
}

.fos-lic-plan-period {
    font-size: 13px;
    font-weight: 400;
    color: var(--fos-text-sub);
    letter-spacing: 0;
}

.fos-lic-plan-price-free {
    font-size: 30px;
    font-weight: 800;
    color: var(--fos-text);
    letter-spacing: -1.5px;
    line-height: 1;
}

.fos-lic-plan-annual {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 5px;
}

.fos-lic-plan-annual-price {
    font-weight: 600;
    color: var(--fos-text-sub);
}

/* M4b: Badges de economia anual — font-size 9px → 11px (WCAG: mínimo legível) */
.fos-lic-plan-annual-save {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    background: #E6FAF4;
    color: #065F46;
    border: 1px solid rgba(0, 196, 140, 0.25);
}

.fos-lic-plan-annual-save--blue {
    background: #E0F2FE;
    color: #0284C7;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.fos-lic-plan-desc {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 8px;
    line-height: 1.45;
}

.fos-lic-plan-body {
    padding: 16px 20px 0px 20px;
    flex: 1;
}

.fos-lic-plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.fos-lic-plan-feature {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: var(--fos-text-sub);
    line-height: 1.5;
}

.fos-lic-feature-check {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.fos-lic-feature-check--green {
    background: #E6FAF4;
    border: 1px solid rgba(0, 196, 140, 0.25);
    color: var(--fos-accent);
}

.fos-lic-feature-check--primary {
    background: var(--fos-primary-light);
    border: 1px solid var(--fos-primary-border);
    color: var(--fos-primary);
}

.fos-lic-feature-check--blue {
    background: #E0F2FE;
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #0284C7;
}

.fos-lic-feature-check--muted {
    background: #F3F4F6;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #9CA3AF;
}

.fos-lic-plan-feature--muted {
    color: #9CA3AF;
}

.fos-lic-feature-service-note {
    display: block;
    font-size: 10px;
    color: #C4C9D1;
    margin-top: 1px;
    line-height: 1.3;
}

.fos-lic-plan-footer {
    padding: 14px 20px;
}

.fos-lic-btn-plan {
    display: block;
    width: 100%;
    padding: 9px 0px;
    border-radius: var(--fos-radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    text-decoration: none;
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
    border: 1px solid var(--fos-primary-border);
}

.fos-lic-btn-plan:hover {
    border: 1px solid rgba(108, 71, 255, 0.35);
    color: var(--fos-primary-dark);
    background: var(--fos-primary-light);
    text-decoration: none;
}

/* M3: Botão Go Pro — CTA primário com gradiente e sombra de presença premium */
.fos-lic-btn-plan--primary {
    background: linear-gradient(135deg, var(--fos-primary) 0%, #9b7af7 100%);
    color: #fff;
    border: none;
    width: auto;
    box-shadow: 0 4px 14px rgba(108, 71, 255, 0.35);
    letter-spacing: 0.01em;
}

.fos-lic-btn-plan--primary:hover {
    background: linear-gradient(135deg, #5535E0 0%, #8260e8 100%);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 6px 20px rgba(108, 71, 255, 0.45);
    text-decoration: none;
}

.fos-lic-btn-plan--current {
    background: var(--fos-bg-soft);
    color: var(--fos-text-dim);
    border: 1px solid var(--fos-border);
    cursor: default;
}

.fos-lic-btn-plan--current:hover {
    background: var(--fos-bg-soft);
    color: var(--fos-text-dim);
    border: 1px solid var(--fos-border);
}

.fos-lic-btn-plan--contentos {
    background: transparent;
    color: #0284C7;
    border: 1px solid rgba(14, 165, 233, 0.4);
    width: auto;
}

.fos-lic-btn-plan--contentos:hover {
    background: #0EA5E9;
    color: #fff;
}

.fos-lic-plan-contentos-note {
    font-size: 10px;
    color: var(--fos-text-dim);
    text-align: center;
    margin-top: 20px;
}

/* ── Ecosystem Banner ── */
.fos-lic-ecosystem-banner {
    background: var(--fos-bg-soft);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--fos-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fos-lic-ecosystem-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fos-lic-ecosystem-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
    display: grid;
    place-items: center;
    font-size: 17px;
}

.fos-lic-ecosystem-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 2px;
}

.fos-lic-ecosystem-desc {
    font-size: 11px;
    color: var(--fos-text-sub);
    line-height: 1.4;
}

.fos-lic-ecosystem-desc strong {
    color: var(--fos-primary);
    font-weight: 600;
}

.fos-lic-btn-ecosystem {
    padding: 8px 16px;
    border-radius: var(--fos-radius-sm);
    background: transparent;
    color: var(--fos-primary);
    border: 1px solid var(--fos-primary-border);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.fos-lic-btn-ecosystem:hover {
    background: var(--fos-primary);
    color: #fff;
}

/* ── Activation Form ── */
.fos-lic-activation-card {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
    box-shadow: var(--fos-shadow);
}

.fos-lic-activation-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--fos-border);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fos-bg-soft);
}

.fos-lic-activation-header-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
    display: grid;
    place-items: center;
    font-size: 11px;
}

.fos-lic-activation-header-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
}

.fos-lic-activation-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.fos-lic-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fos-lic-field-label {
    font-size: 12px;
    font-weight: 500;
    color: rgb(107, 114, 128);
}

.fos-lic-field-hint {
    font-size: 11px;
    color: var(--fos-text-dim);
}

.fos-lic-field-input-wrap {
    position: relative;
}

.fos-standalone-wrap .fos-lic-field-input,
.fos-lic-activation-body .fos-lic-field-input {
    width: 100%;
    padding: 9px 36px 9px 12px;
    border: 1px solid var(--fos-border-input) !important;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-surface) !important;
    font-size: 13px;
    color: var(--fos-text);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 1px;
    outline: none;
    box-shadow: none !important;
    transition: var(--fos-transition);
    height: auto;
    min-height: 0;
    line-height: normal;
}

.fos-standalone-wrap .fos-lic-field-input.email,
.fos-lic-activation-body .fos-lic-field-input.email {
    letter-spacing: 0;
    padding-right: 12px;
}

.fos-standalone-wrap .fos-lic-field-input::placeholder,
.fos-lic-activation-body .fos-lic-field-input::placeholder {
    color: var(--fos-text-dim);
    letter-spacing: 0;
    font-family: inherit;
}

.fos-standalone-wrap .fos-lic-field-input:focus,
.fos-lic-activation-body .fos-lic-field-input:focus {
    border-color: var(--fos-primary) !important;
    background: var(--fos-surface) !important;
    box-shadow: 0 0 0 3px var(--fos-primary-faint) !important;
    outline: none !important;
}

.fos-lic-toggle-vis {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fos-text-dim);
    font-size: 14px;
}

.fos-lic-activation-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--fos-border);
    background: var(--fos-bg-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fos-lic-activation-link {
    font-size: 12px;
    color: var(--fos-text-dim);
}

.fos-lic-activation-link a {
    color: var(--fos-primary);
    text-decoration: none;
    font-weight: 500;
}

.fos-lic-activation-link a:hover {
    text-decoration: underline;
}

.fos-lic-btn-activate {
    padding: 9px 22px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fos-lic-btn-activate:hover {
    background: var(--fos-primary-dark);
    transform: translateY(-1px);
}

.fos-lic-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fos-lic-inline-msg {
    font-size: 12px;
    font-weight: 600;
}

/* ── Pro Hero ── */
.fos-lic-license-hero {
    background: #fff;
    border: 1px solid rgba(108, 71, 255, 0.08);
    border-radius: var(--fos-radius-xl);
    overflow: hidden;
    box-shadow: var(--fos-shadow-soft);
    margin-bottom: 24px;
    margin-top: 12px;
}

.fos-lic-license-hero-top {
    background: linear-gradient(135deg, var(--fos-primary) 0%, #8B5CF6 100%);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fos-lic-lh-plan-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fos-lic-lh-plan-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-size: 22px;
}

.fos-lic-lh-plan-icon .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
    line-height: 24px;
}

.fos-lic-lh-plan-icon--pro {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
    color: #dbeafe;
}

.fos-lic-lh-plan-icon--studio {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fef3c7;
}

.fos-lic-lh-plan-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.fos-lic-lh-plan-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.fos-lic-lh-status {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 7px 14px;
    border-radius: 20px;
}

.fos-lic-lh-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.5
    }
}

.fos-lic-lh-status-text {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.fos-lic-license-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--fos-border);
}

.fos-lic-license-stat {
    padding: 16px 18px;
    border-right: 1px solid var(--fos-border);
}

.fos-lic-license-stat:last-child {
    border-right: none;
}

.fos-lic-ls-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    margin-bottom: 6px;
}

.fos-lic-ls-value {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--fos-text);
    line-height: 1;
    margin-bottom: 2px;
}

.fos-lic-ls-value.green {
    color: var(--fos-primary);
}

.fos-lic-ls-value.purple {
    color: var(--fos-primary);
}

.fos-lic-ls-value.amber {
    color: var(--fos-warning);
}

.fos-lic-ls-sub {
    font-size: 11px;
    color: var(--fos-text-dim);
}

/* ── Details Grid ── */
.fos-lic-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    .fos-lic-details-grid {
        grid-template-columns: 1fr;
    }
}

.fos-lic-detail-card {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    padding: 18px 20px;
    box-shadow: var(--fos-shadow);
}

.fos-lic-detail-card-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    margin-bottom: 14px;
}

.fos-lic-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--fos-border);
}

.fos-lic-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fos-lic-detail-row:first-child {
    padding-top: 0;
}

.fos-lic-detail-key {
    font-size: 12px;
    color: var(--fos-text-sub);
}

.fos-lic-detail-val {
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.fos-lic-detail-val.normal {
    font-family: inherit;
}

.fos-lic-detail-val.green {
    color: var(--fos-primary);
    font-family: inherit;
}

.fos-lic-detail-val.amber {
    color: var(--fos-warning);
    font-family: inherit;
}

.fos-lic-badge-active {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: #E6FAF4;
    color: #00C48C;
    border: 1px solid rgba(0, 196, 140, 0.25);
}

/* ── Migration Card ── */
.fos-lic-migration-card {
    background: rgba(108, 71, 255, 0.02);
    border: 1px solid rgba(108, 71, 255, 0.15);
    border-radius: var(--fos-radius-lg);
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: var(--fos-shadow-soft);
}

.fos-lic-migration-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.fos-lic-migration-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    background: var(--fos-primary-faint);
    border: 1px solid rgba(108, 71, 255, 0.22);
    display: grid;
    place-items: center;
    font-size: 17px;
}

.fos-lic-migration-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 3px;
}

.fos-lic-migration-desc {
    font-size: 11px;
    color: var(--fos-text-sub);
    line-height: 1.5;
}

.fos-lic-migration-desc strong {
    color: var(--fos-primary);
    font-weight: 600;
}

.fos-lic-migration-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.fos-lic-migration-module {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid rgba(108, 71, 255, 0.15);
    box-shadow: 0 2px 4px rgba(108, 71, 255, 0.02);
}

.fos-lic-migration-module-icon {
    font-size: 14px;
    flex-shrink: 0;
    background: var(--fos-primary-faint);
    padding: 4px;
    border-radius: 6px;
}

.fos-lic-migration-module-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--fos-text-sub);
}

.fos-lic-migration-module-desc {
    font-size: 10px;
    color: var(--fos-text-dim);
}

.fos-lic-migration-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--fos-border);
    gap: 12px;
}

.fos-lic-migration-promo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 7px;
    background: var(--fos-primary-faint);
    border: 1px solid rgba(108, 71, 255, 0.22);
    font-size: 11px;
    color: var(--fos-primary);
    font-weight: 500;
}

.fos-lic-btn-migrate {
    padding: 9px 18px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.fos-lic-btn-migrate:hover {
    background: var(--fos-primary-dark);
    transform: translateY(-1px);
    color: #fff;
}

/* ── Deactivation ── */
.fos-lic-deactivate-card {
    background: #fff;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--fos-radius-lg);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: var(--fos-shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fos-lic-deactivate-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 3px;
}

.fos-lic-deactivate-info span {
    font-size: 12px;
    color: var(--fos-text-dim);
}

.fos-lic-btn-deactivate {
    padding: 8px 16px;
    border-radius: 7px;
    background: transparent;
    color: var(--fos-danger);
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.fos-lic-btn-deactivate:hover {
    background: #FEF2F2;
    border-color: var(--fos-danger);
}

/* ── Account Management Card ── */
.fos-lic-account-card {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-lg);
    overflow: hidden;
    box-shadow: var(--fos-shadow-soft);
    margin-bottom: 12px;
}

.fos-lic-account-card__header {
    padding: 10px 20px;
    border-bottom: 1px solid var(--fos-border);
    background: var(--fos-bg-soft);
    display: flex;
    align-items: center;
    gap: 7px;
}

.fos-lic-account-card__title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--fos-text-dim);
}

.fos-lic-account-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fos-border);
    transition: background 0.15s;
}

.fos-lic-account-row:last-child {
    border-bottom: none;
}

.fos-lic-account-row__icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.fos-lic-account-row__icon--primary {
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
}

.fos-lic-account-row__icon--neutral {
    background: var(--fos-bg-soft);
    border: 1px solid var(--fos-border);
}

.fos-lic-account-row__body {
    flex: 1;
    min-width: 0;
}

.fos-lic-account-row__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 2px;
}

.fos-lic-account-row__desc {
    font-size: 11.5px;
    color: var(--fos-text-dim);
    line-height: 1.45;
}

.fos-lic-btn-manage {
    padding: 8px 16px;
    border-radius: 7px;
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
    border: 1px solid var(--fos-primary-border);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.fos-lic-btn-manage:hover {
    background: var(--fos-primary);
    color: #fff;
    border-color: var(--fos-primary);
    transform: translateY(-1px);
}

.fos-lic-btn-manage:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Extra Quotas (addon) — Sprint B.1                                       */
/* Card sits between license stats and details grid. Only renders when     */
/* the server reports addon.enabled=true (PRO/Studio plans).               */
/* ─────────────────────────────────────────────────────────────────────── */

.fos-lic-addon-card {
    background: linear-gradient(135deg, #faf8ff 0%, #ffffff 100%);
    border: 1px solid rgba(108, 71, 255, 0.15);
    border-radius: var(--fos-radius-lg);
    padding: 20px 24px;
    box-shadow: var(--fos-shadow-soft);
    margin-bottom: 16px;
}

.fos-lic-addon-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(108, 71, 255, 0.1);
    margin-bottom: 16px;
}

.fos-lic-addon-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6c47ff 0%, #8a6dff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.25);
}

.fos-lic-addon-title-block {
    flex: 1;
    min-width: 0;
}

.fos-lic-addon-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 2px;
}

.fos-lic-addon-subtitle {
    font-size: 12.5px;
    color: var(--fos-text-dim);
    line-height: 1.4;
}

.fos-lic-addon-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--fos-primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(108, 71, 255, 0.3);
}

.fos-lic-addon-buy-btn:hover {
    background: var(--fos-primary-dark);
    transform: translateY(-1px);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.4);
}

.fos-lic-addon-buy-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Body — stats grid */
.fos-lic-addon-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.fos-lic-addon-stat {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    padding: 12px 14px;
}

.fos-lic-addon-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--fos-text-dim);
    margin-bottom: 6px;
}

.fos-lic-addon-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--fos-text);
    line-height: 1.1;
    margin-bottom: 4px;
}

.fos-lic-addon-stat-value.purple {
    color: var(--fos-primary);
}

.fos-lic-addon-stat-value.small {
    font-size: 15px;
    font-weight: 600;
}

.fos-lic-addon-stat-sub {
    font-size: 11.5px;
    color: var(--fos-text-dim);
}

/* Empty state */
.fos-lic-addon-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px dashed rgba(108, 71, 255, 0.25);
    border-radius: var(--fos-radius);
}

.fos-lic-addon-empty-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.fos-lic-addon-empty-text {
    font-size: 13px;
    color: var(--fos-text-dim);
    line-height: 1.5;
}

.fos-lic-addon-empty-text strong {
    color: var(--fos-text);
    font-weight: 600;
}

/* History expand toggle */
.fos-lic-addon-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    padding: 6px 10px;
    background: transparent;
    color: var(--fos-primary);
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
}

.fos-lic-addon-history-toggle:hover {
    background: rgba(108, 71, 255, 0.06);
    border-color: rgba(108, 71, 255, 0.15);
}

.fos-lic-addon-history-toggle .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.fos-lic-addon-history-toggle[aria-expanded="true"] .dashicons {
    transform: rotate(180deg);
}

/* History table */
.fos-lic-addon-history {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
}

.fos-lic-addon-history-loading,
.fos-lic-addon-history-empty {
    padding: 24px;
    text-align: center;
    color: var(--fos-text-dim);
    font-size: 13px;
}

.fos-lic-addon-history table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.fos-lic-addon-history th {
    text-align: left;
    padding: 10px 14px;
    background: #fafafa;
    border-bottom: 1px solid var(--fos-border);
    font-weight: 600;
    color: var(--fos-text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.fos-lic-addon-history td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--fos-border);
    color: var(--fos-text);
}

.fos-lic-addon-history tr:last-child td {
    border-bottom: none;
}

.fos-lic-addon-history-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fos-lic-addon-history-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.fos-lic-addon-history-status.refunded {
    background: #fef3c7;
    color: #92400e;
}

.fos-lic-addon-history-status.manual {
    background: #ede9fe;
    color: #5b21b6;
}

/* ── License Sync Button ── */
.fos-lic-sync-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 8px;
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
    border-radius: 6px;
    color: var(--fos-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
}

.fos-lic-sync-btn:hover {
    background: var(--fos-primary-light);
    border-color: var(--fos-primary);
    transform: scale(1.05);
}

.fos-lic-sync-btn:active {
    transform: scale(0.95);
}

.fos-lic-sync-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    transition: transform 0.2s;
}

.fos-lic-sync-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.fos-lic-sync-btn.is-loading .dashicons {
    animation: fos-sync-spin 1s linear infinite;
}

@keyframes fos-sync-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Tooltip style override if needed */
.fos-lic-sync-btn[title] {
    position: relative;
}

/* ══════════════════════════════════════════════════════════════════════════
   PLAN VALUE MATRIX (Fluxo 2) — grouped feature lists + Auto/BYOK clarifier
   ══════════════════════════════════════════════════════════════════════════ */

/* Small uppercase group label inside a plan's feature list. */
.fos-lic-feat-group {
    list-style: none;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--fos-text-soft, #8a94a6);
    margin: 10px 0 2px;
    padding-top: 8px;
    border-top: 1px solid var(--fos-border, #eceef3);
}

.fos-lic-plan-features>.fos-lic-feat-group:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* Neutral marker for "available, but not via Auto on this tier" lines. */
.fos-lic-feature-check--muted {
    background: #f1f3f7;
    border: 1px solid rgba(138, 148, 166, 0.25);
    color: #8a94a6;
}

/* Auto-vs-BYOK clarifier note. */
.fos-lic-byok-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
    padding: 12px 16px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--fos-text, #3a4254);
    background: var(--fos-primary-light, #eef2ff);
    border: 1px solid var(--fos-primary-border, #d7defc);
    border-radius: 10px;
}

.fos-lic-byok-note-icon {
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1.4;
}

/* Contextual BYOK rate-limit upsell — warmer accent than the neutral note. */
.fos-lic-byok-note--upsell {
    background: var(--fos-warning-light, #fff7ed);
    border-color: var(--fos-warning-border, #fed7aa);
}