/* Inter is bundled locally to avoid runtime calls to Google Fonts. */
@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/inter/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

.fos-dash-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.fos-dash-card {
    background: #fff;
    border-radius: var(--fos-radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--fos-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fos-dash-metric {
    background: var(--fos-surface);
    padding: 18px 20px;
    border-radius: var(--fos-radius-lg);
    box-shadow: var(--fos-shadow-soft);
    border: 1px solid rgba(108, 71, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fos-dash-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--fos-shadow-float);
}

.fos-dash-metric__label {
    font-size: 10px;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 600;
    margin-bottom: 5px;
}

.fos-dash-metric__val {
    font-size: 32px;
    font-weight: 800;
    color: var(--fos-primary-dark);
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(108, 71, 255, 0.08);
}

.fos-dash-metric__sub {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Dual row metric */
.fos-dash-metric--dual {
    padding: 14px 20px;
}

.fos-dash-metric__dual-rows {
    display: flex;
    gap: 18px;
    margin-top: 9px;
    justify-items: center;
}

.fos-dash-metric__dual-row {
    display: flex;
    flex-direction: column;
}

.fos-dash-metric__dual-row .fos-dash-metric__val {
    font-size: 18px;
    margin-bottom: 0;
}

.fos-dash-metric__dual-row .fos-dash-metric__sub {
    font-size: 10px;
    margin-top: 10px;
}

/* Sprint B.2 v2 — Productions/month card uses a single-headline layout
 * matching the peer metric cards (Articles / Published / Hours).
 *
 * Structure rendered into #fos-dash-quota-root:
 *   .fos-dash-metric__capacity
 *     ├─ .fos-dash-metric__capacity-row  (headline number + Buy button inline)
 *     │    ├─ .fos-dash-metric__val      (big number — visual parity with peers)
 *     │    └─ .fos-dash-addon-buy        (compact pill, only when addon enabled)
 *     └─ .fos-dash-metric__breakdown     (single subtitle line, " · " separators)
 */

.fos-dash-metric__capacity {
    display: flex;
    flex-direction: column;
    /* No gap — keep the vertical rhythm identical to peer cards. */
}

.fos-dash-metric__capacity-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

/* The big number inherits .fos-dash-metric__val from the existing tokens —
 * no override here so peers and Productions share the exact same typography. */

.fos-dash-metric__breakdown {
    /* Inherits sub typography from the existing .fos-dash-metric__sub rule.
     * Allow the line to wrap on narrow widths without forcing card growth. */
    word-spacing: 1px;
    line-height: 1.6;
}

.fos-dash-addon-buy {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 10px;
    background: var(--fos-primary, #6c47ff);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.2px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    align-self: center;
    box-shadow: 0 1px 3px rgba(108, 71, 255, 0.25);
}

.fos-dash-addon-buy:hover,
.fos-dash-addon-buy:focus {
    background: var(--fos-primary-dark, #5837e6);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(108, 71, 255, 0.35);
}

.fos-dash-addon-buy:focus {
    outline: 2px solid rgba(108, 71, 255, 0.35);
    outline-offset: 1px;
}

.fos-dash-tag-unlimited {
    color: var(--fos-success);
    font-weight: 700;
}

.fos-dash-delta-up {
    color: var(--fos-success);
    font-weight: 600;
}

.fos-dash-delta-down {
    color: var(--fos-danger);
    font-weight: 600;
}

.fos-dash-tag-unlimited {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    background: var(--fos-accent-light);
    color: var(--fos-success);
}

.fos-dash-brand {
    background: linear-gradient(135deg, rgba(108, 71, 255, 0.08) 0%, rgba(108, 71, 255, 0.02) 100%);
    border: 1px solid rgba(108, 71, 255, 0.15);
    border-radius: var(--fos-radius-xl);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: var(--fos-shadow-soft);
    position: relative;
    overflow: hidden;
}

.fos-dash-brand::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(108, 71, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.fos-dash-brand__left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.fos-dash-brand__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    border: 1px solid rgba(108, 71, 255, 0.2);
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.08);
}

.fos-dash-brand__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--fos-text);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.fos-dash-brand__sub {
    font-size: 13px;
    color: var(--fos-text-sub);
    margin: 4px 0 0;
}

.fos-dash-brand__right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.fos-btn-new {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--fos-transition);
    font-family: inherit;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.25);
}

.fos-btn-new:hover {
    background: var(--fos-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(108, 71, 255, 0.35);
}

.fos-dash-brand .cts-badge {
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 6px;
}

.fos-skeleton-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
    display: inline-block;
}

.fos-skeleton-loading::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 0.8em;
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 0px, #e2e8f0 40px, #f1f5f9 80px);
    background-size: 600px 100%;
    background-repeat: no-repeat;
    animation: fos-skeleton-shimmer 1.6s infinite linear;
    border-radius: 4px;
}

.fos-skeleton {
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 0px, #e2e8f0 40px, #f1f5f9 80px);
    background-size: 600px 100%;
    background-repeat: no-repeat;
    animation: fos-skeleton-shimmer 1.6s infinite linear;
    border-radius: 4px;
    display: inline-block;
}

.fos-skeleton--text {
    height: 12px;
    width: 100%;
    margin: 4px 0;
}

.fos-skeleton--title {
    height: 18px;
    width: 60%;
    margin-bottom: 8px;
}

.fos-skeleton--badge {
    height: 18px;
    width: 45px;
    border-radius: 6px;
}

.fos-skeleton--circle {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.fos-skeleton--rect {
    height: 40px;
    width: 100%;
}

@keyframes fos-skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(100% + 200px) 0;
    }
}

.fos-dash-live {
    background: var(--fos-primary);
    border-radius: var(--fos-radius);
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--fos-shadow-md);
    color: #fff;
}

.fos-dash-live__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fos-dash-live__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    animation: fos-dash-pulse 1.5s ease-in-out infinite;
}

@keyframes fos-dash-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.fos-dash-live__label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.fos-dash-live__title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.fos-dash-live__right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.fos-dash-live__progress {
    text-align: right;
}

.fos-dash-live__pct {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.fos-dash-live__agent {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 1px;
}

.fos-dash-live__bar-wrap {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 6px;
    margin-left: auto;
}

.fos-dash-live__bar-fill {
    height: 100%;
    border-radius: 99px;
    background: #fff;
}

.fos-dash-live__btn {
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--fos-radius-sm);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    font-family: inherit;
    text-decoration: none;
}

.fos-dash-live__btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

@keyframes fos-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 71, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(108, 71, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 71, 255, 0);
    }
}

.fos-modal-card {
    background: #ffffff;
    border-radius: 16px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fos-modal-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f3f4f6;
}

.fos-modal-card__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fos-modal-card__hicon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(108, 71, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.fos-modal-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.fos-modal-card__close {
    background: transparent;
    border: 0;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    font-weight: 300;
}

.fos-modal-card__close:hover {
    color: #111827;
}

.fos-modal-card__body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.fos-modal-card__section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.fos-modal-card__section--ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.fos-modal-card__section--no {
    background: #fef2f2;
    border-color: #fecaca;
    margin-bottom: 0;
}

.fos-modal-card__section-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 8px;
}

.fos-modal-card__section--ok .fos-modal-card__section-title {
    color: #166534;
}

.fos-modal-card__section--no .fos-modal-card__section-title {
    color: #991b1b;
}

.fos-modal-card__list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
}

.fos-modal-card__footer {
    padding: 14px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
}

.fos-modal-card__btn--primary,
.fos-modal-card__btn--ghost {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.fos-modal-card__btn--primary {
    background: #6C47FF;
    color: #ffffff;
    border: 0;
}

.fos-modal-card__btn--primary:hover {
    background: #5535E0;
}

.fos-modal-card__btn--ghost {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.fos-modal-card__btn--ghost:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.fos-tel-consent-banner {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    margin: 16px 20px 0 0;
    max-width: 1150px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fos-tel-consent-banner__icon {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: rgba(108, 71, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.fos-tel-consent-banner__body {
    flex: 1;
    min-width: 0;
}

.fos-tel-consent-banner__title {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.fos-tel-consent-banner__desc {
    margin: 0 0 16px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.fos-tel-consent-banner__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.fos-tel-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
}

.fos-tel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fos-tel-btn--primary {
    background: #6C47FF;
    color: #ffffff;
    border-color: #6C47FF;
}

.fos-tel-btn--primary:hover:not(:disabled) {
    background: #5535E0;
    border-color: #5535E0;
    color: #ffffff;
}

.fos-tel-btn--ghost {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.fos-tel-btn--ghost:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.fos-tel-link {
    margin-left: 4px;
    font-size: 12px;
    color: #6C47FF;
    text-decoration: none;
    font-weight: 500;
}

.fos-tel-link:hover {
    color: #5535E0;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .fos-tel-consent-banner {
        margin: 16px 0;
        padding: 16px;
        border-radius: 8px;
    }

    .fos-tel-consent-banner__icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .fos-tel-link {
        margin-left: 0;
        margin-top: 4px;
        flex-basis: 100%;
    }
}

/* ── Review request banner (WordPress.org) — same anatomy as the consent banner ── */

.fos-review-banner {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    margin: 16px 20px 0 0;
    max-width: 1150px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #6C47FF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fos-review-banner__icon {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: rgba(108, 71, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.fos-review-banner__body {
    flex: 1;
    min-width: 0;
}

.fos-review-banner__title {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.fos-review-banner__desc {
    margin: 0 0 16px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    max-width: 720px;
}

.fos-review-banner__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* The banner's actions are anchors, not <button>s — normalize link chrome. */
.fos-review-banner__actions a.fos-tel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

@media (max-width: 600px) {
    .fos-review-banner {
        margin: 16px 0;
        padding: 16px;
        border-radius: 8px;
    }

    .fos-review-banner__icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .fos-review-banner__actions .fos-tel-link {
        margin-left: 0;
        margin-top: 4px;
        flex-basis: 100%;
    }
}

.fos-dash-nextup {
    background: linear-gradient(90deg, var(--fos-primary-faint), #fff);
    border: 1px solid var(--fos-primary-light);
    border-left: 3px solid var(--fos-primary);
    border-radius: var(--fos-radius-lg);
    padding: 12px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.05);
}

.fos-dash-nextup__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--fos-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fos-dash-nextup__kw {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
    flex: 1;
}

.fos-dash-nextup__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fos-dash-nextup__site {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--fos-bg-soft);
    color: var(--fos-text-sub);
    border: 1px solid var(--fos-border);
}

.fos-dash-nextup__cat {
    font-size: 10px;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.fos-dash-nextup__btn {
    font-size: 13px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--fos-transition);
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(108, 71, 255, 0.2);
}

.fos-btn-pulse {
    animation: fos-pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.fos-dash-nextup__btn:hover {
    background: var(--fos-primary-dark);
    color: #fff;
    box-shadow: 0 4px 8px rgba(108, 71, 255, 0.3);
}

.fos-dash-nextup__priority {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fos-dash-nextup__priority--high {
    background: var(--fos-danger);
}

.fos-dash-nextup__priority--med {
    background: var(--fos-warning);
}

.fos-dash-nextup__priority--low {
    background: var(--fos-text-dim);
}

.fos-dash-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto auto auto auto;
    gap: 0 12px;
}

.fos-dash-zone {
    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: 8px;
}

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

.fos-dash-zone-health {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 8px;
}

.fos-dash-zone-queue {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 8px;
}

.fos-dash-zone-articles {
    grid-column: 1;
    grid-row: 3;
    margin-bottom: 8px;
    margin-top: 12px;
}

.fos-dash-zone-actions {
    grid-column: 2;
    grid-row: 3;
    margin-bottom: 8px;
    margin-top: 12px;
}

.fos-dash-card-health {
    grid-column: 1;
    grid-row: 2;
}

.fos-dash-card-queue {
    grid-column: 2;
    grid-row: 2;
}

.fos-dash-card-articles {
    grid-column: 1;
    grid-row: 4;
}

.fos-dash-card-actions {
    grid-column: 2;
    grid-row: 4;
    align-self: start;
}

.fos-dash-card {
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
    box-shadow: var(--fos-shadow);
}

.fos-dash-card__footer {
    padding: 9px 16px;
    border-top: 1px solid var(--fos-border);
    display: flex;
    justify-content: center;
}

.fos-dash-card__action {
    font-size: 11px;
    color: var(--fos-primary);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--fos-transition);
}

.fos-dash-card__action:hover {
    color: var(--fos-primary-dark);
}

.fos-dash-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: var(--fos-bg-soft);
}

.fos-dash-health-item {
    padding: 14px 16px;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-lg);
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fos-dash-health-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--fos-shadow-md);
}

.fos-dash-health-item__label {
    font-size: 10px;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin-bottom: 5px;
}

.fos-dash-health-item__val {
    font-size: 12px;
    font-weight: 600;
    color: var(--fos-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fos-dash-health-item__sub {
    font-size: 10px;
    color: var(--fos-text-dim);
    margin-top: 3px;
}

.fos-dash-health-item__link {
    font-size: 10px;
    color: var(--fos-primary);
    font-weight: 500;
    margin-top: 3px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.fos-dash-health-item__link:hover {
    color: var(--fos-primary-dark);
}

.fos-dash-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fos-dash-dot--ok {
    background: var(--fos-accent);
    box-shadow: 0 0 4px rgba(0, 196, 140, 0.4);
}

.fos-dash-dot--warn {
    background: var(--fos-warning);
}

.fos-dash-dot--err {
    background: var(--fos-danger);
}

.fos-dash-article {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--fos-border);
    transition: background 0.12s;
    text-decoration: none;
    color: inherit;
}

.fos-dash-article:last-child {
    border-bottom: none;
}

.fos-dash-article:hover {
    background: var(--fos-bg-soft);
}

.fos-dash-article__num {
    font-size: 11px;
    color: var(--fos-text-dim);
    width: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    font-weight: 500;
}

.fos-dash-article__status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.fos-dash-article__status--pub {
    background: var(--fos-accent);
}

.fos-dash-article__status--draft {
    background: var(--fos-warning);
}

.fos-dash-article__body {
    flex: 1;
    min-width: 0;
}

.fos-dash-article__title {
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fos-dash-article__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.fos-dash-article__site {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--fos-primary-light);
    color: var(--fos-primary-dark);
}

.fos-dash-article__date {
    font-size: 10px;
    color: var(--fos-text-dim);
}

.fos-dash-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--fos-border);
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    color: inherit;
}

.fos-dash-queue-item:last-child {
    border-bottom: none;
}

.fos-dash-queue-item:hover {
    background: var(--fos-bg-soft);
}

.fos-dash-priority {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fos-dash-priority--high {
    background: var(--fos-danger);
}

.fos-dash-priority--med {
    background: var(--fos-warning);
}

.fos-dash-priority--low {
    background: var(--fos-text-dim);
}

.fos-dash-priority--neutral {
    background: var(--fos-border);
}

.fos-dash-queue-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--fos-border);
    background: linear-gradient(180deg, #fff, var(--fos-bg-soft));
}

.fos-dash-queue-summary__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--fos-text-dim);
}

.fos-dash-queue-summary__value {
    margin-top: 2px;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--fos-text);
}

.fos-dash-queue-summary__slot {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--fos-border);
    color: var(--fos-text-sub);
    background: #fff;
}

.fos-dash-queue-summary--busy .fos-dash-queue-summary__slot {
    color: var(--fos-primary);
    background: var(--fos-primary-faint);
    border-color: rgba(109, 40, 217, 0.18);
}

.fos-dash-queue-summary--free .fos-dash-queue-summary__slot {
    color: var(--fos-success-dark);
    background: var(--fos-success-light);
    border-color: rgba(16, 185, 129, 0.18);
}

.fos-dash-queue-item__pos {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--fos-bg-soft);
    border: 1px solid var(--fos-border);
    color: var(--fos-text-sub);
    font-family: var(--fos-font-mono);
    font-size: 11px;
    font-weight: 700;
}

.fos-dash-queue-item__info {
    flex: 1;
    min-width: 0;
}

.fos-dash-queue-item__kw {
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fos-dash-queue-item__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.fos-dash-queue-item__site {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--fos-bg-soft);
    color: var(--fos-text-sub);
    border: 1px solid var(--fos-border);
}

.fos-dash-queue-item__cat {
    font-size: 10px;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.fos-dash-queue-item__rocket {
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
}

.fos-dash-queue-item:hover .fos-dash-queue-item__rocket {
    opacity: 1;
}

.fos-dash-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: var(--fos-bg-soft);
}

.fos-dash-action-item {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-lg);
    background: #fff;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.fos-dash-action-item:hover {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(108, 71, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    border-color: rgba(108, 71, 255, 0.3);
}

.fos-dash-action-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.fos-dash-action-item__icon--purple {
    background: var(--fos-primary-light);
    color: var(--fos-primary-dark);
}

.fos-dash-action-item__icon--green {
    background: var(--fos-accent-light);
    color: var(--fos-success-dark);
}

.fos-dash-action-item__icon--blue {
    background: #DBEAFE;
    color: #1D4ED8;
}

.fos-dash-action-item__icon--amber {
    background: var(--fos-warning-light);
    color: var(--fos-warning-dark);
}

.fos-dash-action-item__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--fos-text);
}

.fos-dash-action-item__sub {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 2px;
}

@media (max-width: 900px) {
    .fos-dash-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0;
        display: flex;
        /* Flexbox facilita o reordenamento simples neste caso */
        flex-direction: column;
    }

    /* Reset grid positions and set logical order for stacking */
    .fos-dash-zone,
    .fos-dash-card {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .fos-dash-zone-health {
        order: 1;
    }

    .fos-dash-card-health {
        order: 2;
        margin-bottom: 20px;
    }

    .fos-dash-zone-queue {
        order: 3;
    }

    .fos-dash-card-queue {
        order: 4;
        margin-bottom: 20px;
    }

    .fos-dash-zone-articles {
        order: 5;
    }

    .fos-dash-card-articles {
        order: 6;
        margin-bottom: 20px;
    }

    .fos-dash-zone-actions {
        order: 7;
    }

    .fos-dash-card-actions {
        order: 8;
        margin-bottom: 20px;
    }

    .fos-dash-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .fos-dash-health-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .fos-dash-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .fos-dash-metric {
        padding: 12px 14px;
    }

    .fos-dash-metric__label {
        font-size: 9px;
    }

    .fos-dash-metric__val {
        font-size: 22px;
    }

    .fos-dash-metric__sub {
        font-size: 10px;
    }

    /* O card de Produções/Mês é um pouco mais largo, vamos garantir que ele caiba */
    .fos-dash-metric--dual .fos-dash-metric__dual-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .fos-dash-live {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .fos-dash-live__right {
        width: 100%;
        justify-content: space-between;
    }

    .fos-dash-live__bar-wrap {
        width: 100%;
        margin-left: 0;
    }

    /* Table responsiveness */
    .fos-dash-card-articles {
        overflow-x: auto;
    }

    .fos-dash-recent-table {
        min-width: 600px;
        /* Força scroll horizontal na tabela em vez de esmagar colunas */
    }
}

/* ==========================================================================
   Contentosapp Studio Standalone - KPI Cards
   ========================================================================== */

:root {
    /* Primary */
    --fos-primary: #6C47FF;
    --fos-primary-dark: #5535E0;
    --fos-primary-light: #EAE6FF;
    --fos-primary-faint: rgba(108, 71, 255, 0.06);
    --fos-primary-border: rgba(108, 71, 255, 0.2);

    /* Semantic */
    --fos-accent: #00C48C;
    --fos-accent-light: #E6FAF4;
    --fos-accent-border: rgba(0, 196, 140, 0.2);
    --fos-success: #059669;
    --fos-success-light: #d1fae5;
    --fos-success-dark: #047857;
    --fos-warning: #b07c12;
    --fos-warning-light: #FEF3C7;
    --fos-warning-dark: #b45309;
    --fos-danger: #EF4444;
    --fos-danger-light: #FEF2F2;

    /* Text — M1: #9ca3af (ratio 2.9:1) → #6b7280 (ratio 4.6:1, aprovado WCAG AA) */
    --fos-text: #1d2327;
    --fos-text-sub: #50575e;
    --fos-text-dim: #6b7280;

    /* Surfaces */
    --fos-border: #e5e7eb;
    --fos-border-input: #d1d5db;
    --fos-bg-soft: #f9fafb;
    --fos-surface: #ffffff;

    /* Shadows — M10: --fos-shadow-sm diferenciado (era duplicado de --fos-shadow) */
    --fos-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --fos-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --fos-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --fos-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --fos-shadow-soft: 0 12px 32px rgba(108, 71, 255, 0.05);
    --fos-shadow-float: 0 16px 40px rgba(0, 0, 0, 0.04);

    /* Shape */
    --fos-radius: 10px;
    --fos-radius-lg: 16px;
    --fos-radius-xl: 20px;
    --fos-radius-sm: 7px;
    --fos-transition: all 0.15s ease;

    /* M12: Focus ring centralizado — use em todos os elementos interativos */
    --fos-focus-ring: 0 0 0 3px rgba(108, 71, 255, 0.18);
    --fos-focus-ring-offset: 0 0 0 1px #fff, 0 0 0 4px rgba(108, 71, 255, 0.22);

    /* Type — family */
    --fos-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --fos-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Type — scale */
    --fos-text-xs: 10px;
    --fos-text-sm: 11px;
    --fos-text-base: 12px;
    --fos-text-md: 13px;
    --fos-text-lg: 14px;
    --fos-text-xl: 16px;
    --fos-text-2xl: 22px;
    --fos-text-3xl: 32px;

    /* Type — weight */
    --fos-weight-regular: 400;
    --fos-weight-medium: 500;
    --fos-weight-semibold: 600;
    --fos-weight-bold: 700;
    --fos-weight-extra: 800;

    /* Spacing */
    --fos-space-1: 4px;
    --fos-space-2: 8px;
    --fos-space-3: 12px;
    --fos-space-4: 16px;
    --fos-space-5: 20px;
    --fos-space-6: 24px;
    --fos-space-8: 32px;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

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

@keyframes fos-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* M6: Tipografia Inter + fallback system stack */
.fos-standalone-wrap {
    max-width: 1200px;
    font-size: 12px;
    color: var(--fos-text-sub);
    font-family: var(--fos-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

.fos-standalone-wrap>h1.wp-heading-inline {
    display: none;
}

#adminmenu #toplevel_page_costudio .wp-menu-image::before {
    color: rgba(108, 71, 255, 0.7) !important;
}

#adminmenu #toplevel_page_costudio.current>a,
#adminmenu #toplevel_page_costudio.wp-has-current-submenu>a {
    background: rgba(108, 71, 255, 0.10) !important;
    color: var(--fos-primary-light) !important;
    font-weight: 600;
}

#adminmenu #toplevel_page_costudio .wp-submenu .current>a,
#adminmenu #toplevel_page_costudio .wp-submenu a:hover,
#adminmenu #toplevel_page_costudio .wp-submenu a:focus {
    color: var(--fos-primary-light) !important;
}

.fos-detalhe-page-header {
    border-left: 4px solid var(--fos-primary) !important;
    padding: 16px 20px !important;
    margin-bottom: 10px !important;
}

.fos-detalhe-page-header .cts-page-header__icon {
    width: 36px !important;
    height: 36px !important;
    background: var(--fos-primary-faint) !important;
    border: 1px solid var(--fos-primary-border) !important;
    color: var(--fos-text) !important;
    font-size: 17px !important;
    border-radius: 9px !important;
}

.fos-detalhe-page-header .cts-page-header__title {
    font-size: 16px !important;
}

.fos-detalhe-page-header .cts-page-header__sub {
    font-size: 12px !important;
}

.cts-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(108, 71, 255, 0.08) 0%, rgba(108, 71, 255, 0.02) 100%);
    border: 1px solid rgba(108, 71, 255, 0.15);
    border-radius: var(--fos-radius-xl);
    box-shadow: var(--fos-shadow-soft);
    padding: 24px 28px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.cts-page-header::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(108, 71, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cts-page-header__left {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.cts-page-header h1 {
    margin: 0 0 3px;
    font-size: 22px;
    font-weight: 700;
    color: var(--fos-text);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.cts-page-header h1 .dashicons {
    color: var(--fos-primary);
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.cts-page-header p {
    margin: 0;
    font-size: 13px;
    color: var(--fos-text-sub);
    line-height: 1.5;
}

/* Both __actions and __right work (views use __right, standard is __actions) */
.cts-page-header__actions,
.cts-page-header__right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Hero variant for Dashboard */
.cts-page-header--hero {
    background: linear-gradient(135deg, #6C47FF 0%, #5535E0 100%) !important;
    border: none !important;
    color: #fff !important;
    padding: 20px 24px !important;
    box-shadow: var(--fos-shadow-lg) !important;
}

.cts-page-header--hero .cts-page-header__icon {
    background: rgba(255, 255, 255, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 24px !important;
}

.cts-page-header--hero .cts-page-header__title {
    color: #fff !important;
    font-size: 22px !important;
    font-weight: 800 !important;
}

.cts-page-header--hero .cts-page-header__sub {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px !important;
}

.cts-page-header--hero .fos-btn-new {
    background: #fff !important;
    color: var(--fos-primary) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.cts-page-header--hero .fos-btn-new:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Brand-card variant */
.cts-page-header--brand-card .cts-page-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cts-page-header--brand-card .cts-page-header__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: var(--fos-primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    border: 1px solid rgba(108, 71, 255, 0.35);
}

.cts-page-header__icon-img {
    width: 90%;
    height: 90%;
    display: block;
    object-fit: contain;
}

.fos-license-page-header .cts-page-header__icon-img {
    width: 82%;
    height: 82%;
}

.cts-page-header--brand-card .cts-page-header__title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--fos-text);
    line-height: 1.25;
    display: block;
}

.cts-page-header--brand-card .cts-page-header__sub {
    margin: 1px 0 0;
    font-size: 12px;
    color: var(--fos-text-sub);
    line-height: 1.45;
}

@media screen and (max-width: 782px) {
    .cts-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.cts-panel {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    box-shadow: var(--fos-shadow);
    overflow: hidden;
    margin-bottom: 20px;
    padding: 20px 24px;
}

.cts-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid #f3f4f6;
    background: var(--fos-bg-soft);
    margin: -20px -24px 20px;
}

.cts-panel__header h2,
.cts-panel__header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fos-text);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.cts-panel__actions {
    display: flex;
    gap: 8px;
}

.cts-panel__body {
    padding: 24px;
    margin: -20px -24px -20px;
}

.cts-panel__body--compact {
    padding: 0;
}

.cts-panel__empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--fos-text-dim);
}

.cts-panel__empty .dashicons {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    color: var(--fos-text-dim);
}

.cts-panel__empty p {
    margin: 4px 0;
    font-size: 14px;
}

.cts-panel__empty p:first-of-type {
    font-weight: 600;
    color: var(--fos-text-sub);
}

.cts-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--fos-primary);
    color: #fff;
    border: 1px solid var(--fos-primary);
    border-radius: var(--fos-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--fos-transition);
    line-height: 1.4;
    white-space: nowrap;
    box-sizing: border-box;
}

.cts-btn:hover,
.cts-btn:focus {
    background: var(--fos-primary-dark);
    border-color: var(--fos-primary-dark);
    color: #fff;
    text-decoration: none;
    outline: none;
    box-shadow: 0 2px 8px rgba(108, 71, 255, 0.25);
}

.cts-btn:active {
    box-shadow: none;
}

.cts-btn:disabled,
.cts-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.cts-btn .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
}

.cts-btn--secondary {
    background: #fff;
    color: var(--fos-primary);
    border-color: var(--fos-primary);
}

.cts-btn--secondary:hover {
    background: var(--fos-primary-light);
    color: var(--fos-primary-dark);
    border-color: var(--fos-primary-dark);
    box-shadow: none;
}

.cts-btn--danger {
    background: var(--fos-danger);
    border-color: var(--fos-danger);
    color: #fff;
}

.cts-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    color: #fff;
}

.cts-btn--ghost {
    background: transparent;
    color: var(--fos-text-sub);
    border-color: var(--fos-border);
}

.cts-btn--ghost:hover {
    background: var(--fos-bg-soft);
    color: var(--fos-text);
    box-shadow: none;
    border: 1px solid rgba(108, 71, 255, 0.32);
}

.cts-btn--sm {
    padding: 6px 13px;
    font-size: 12px;
}

.cts-btn--sm .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

/* "ghost purple" variant used in Content Hub */
.fos-btn-ghost-primary {
    background: transparent;
    color: var(--fos-primary);
    border-color: rgba(108, 71, 255, 0.35);
}

.fos-btn-ghost-primary:hover {
    background: var(--fos-primary-faint);
    box-shadow: none;
}

.cts-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
}

.cts-badge--success {
    background: var(--fos-primary-light) !important;
    color: var(--fos-primary);
    border: 1px solid rgba(108, 71, 255, 0.35);
}

.cts-badge--danger {
    background: #fee2e2;
    color: #991b1b;
}

.cts-badge--info {
    background: var(--fos-primary-light);
    color: var(--fos-primary);
    border: 1px solid rgba(108, 71, 255, 0.35);
}

.cts-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.cts-badge--neutral {
    background: #f1f5f9;
    color: #475569;
}


.cts-badge--lg {
    font-size: 13px;
    padding: 5px 14px;
}

.cts-notice {
    padding: 10px 14px;
    border-radius: var(--fos-radius-sm);
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.cts-notice--success {
    background: #f0fdf4;
    color: #065f46;
    border-left: 3px solid var(--fos-success);
}

.cts-notice--error {
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    border-left: 3px solid var(--fos-danger);
}

.cts-notice--info {
    background: rgba(108, 71, 255, 0.08);
    color: #6b7280;
    border: 1px solid rgba(108, 71, 255, 0.25);
}

.cts-notice--warning {
    background: #fffbeb;
    color: #78350f;
    border: 1px solid #fde68a;
    border-left: 3px solid var(--fos-warning);
}

.cts-notice-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* â”€â”€ Tab Navigation (cts-tab-nav for pages that use ContentOS tab pattern) â”€â”€â”€ */
.cts-tab-nav {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--fos-surface);
    border-radius: var(--fos-radius-lg);
    border: 1px solid rgba(108, 71, 255, 0.08);
    box-shadow: var(--fos-shadow-soft);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cts-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--fos-radius-sm);
    border: none;
    background: transparent;
    color: var(--fos-text-sub);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fos-transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    outline: none;
}

.cts-tab-btn:hover {
    color: var(--fos-primary);
    background: rgba(108, 71, 255, 0.04);
    text-decoration: none;
}

.cts-tab-btn:focus {
    outline: none;
}

.cts-tab-btn.is-active {
    background: var(--fos-primary-light);
    color: var(--fos-primary);
    box-shadow: none;
}

.cts-tab-panel {
    display: none;
}

.cts-tab-panel.is-active {
    display: block;
}

/* ── Content Hub Responsiveness ────────────────────────────────────────── */

@media (max-width: 900px) {
    .fos-hub-preheader {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .fos-hub-tabs {
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        width: 100%;
    }

    .fos-hub-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .fos-hub-preheader__actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .fos-hub-preheader__actions .cts-btn {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 782px) {
    .fos-filter-bar {
        flex-direction: column;
        gap: 12px;
    }

    .fos-filter-bar__search-wrap {
        width: 100%;
    }

    .fos-filter-bar__filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    .fos-filter-bar__select {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Table Protection */
    #fos-central-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--fos-radius);
        margin: 0 -16px;
        /* Bleed effect */
        padding: 0 16px;
    }

    #fos-central-table-wrap table {
        min-width: 800px;
        /* Garante que as colunas não fiquem ilegíveis */
    }

    /* Bulk Bar Mobile */
    .fos-bulk-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        border-radius: 0;
        border-top: 1px solid var(--fos-border);
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    }

    .fos-bulk-bar__actions {
        width: 100%;
        justify-content: space-between;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 8px;
    }

    .fos-bulk-bar__actions select {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .fos-hub-preheader__actions {
        grid-template-columns: 1fr;
    }

    .fos-plan-field-row {
        grid-template-columns: 1fr;
    }
}

.cts-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.cts-field-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

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

.cts-field--full {
    grid-column: 1 / -1;
}

.cts-field>label,
.cts-field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
}

.cts-field__hint {
    font-size: 12px;
    color: var(--fos-text-sub);
    margin: 4px 0 0;
}

.cts-field-hint {
    font-size: 11px;
    color: var(--fos-text-dim);
    line-height: 1.5;
    margin: 0;
}

.cts-field-required {
    color: #dc2626;
    margin-left: 2px;
}

@media screen and (max-width: 782px) {
    .cts-field-grid {
        grid-template-columns: 1fr;
    }

    .cts-field--full {
        grid-column: auto;
    }
}

.cts-input,
.cts-select,
.cts-field input[type="text"],
.cts-field input[type="url"],
.cts-field input[type="email"],
.cts-field input[type="password"],
.cts-field select {
    border: 1px solid var(--fos-border-input);
    border-radius: var(--fos-radius-sm);
    padding: 9px 12px;
    font-size: 12px;
    color: var(--fos-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    line-height: normal;
    outline: none;
    font-family: inherit;
}

.cts-input:focus,
.cts-select:focus,
.cts-field input:focus,
.cts-field select:focus {
    border-color: var(--fos-primary);
    box-shadow: 0 0 0 3px rgba(108, 71, 255, 0.12);
    background: #fff;
    outline: none;
}

.cts-form-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0 4px;
    border-top: 1px solid #f3f4f6;
    margin-top: 20px;
}

.cts-form-footer.cts-settings-save-bar {
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px 20px;
    margin-top: 20px;
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    box-shadow: var(--fos-shadow);
}

.cts-settings-save-bar__hint {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fos-text-dim);
    line-height: 1.4;
}

.cts-settings-save-bar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.cts-settings-save-bar__status {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.cts-settings-save-bar__status:empty {
    display: none;
}

.cts-settings-save-bar__status--success {
    color: #065f46;
}

.cts-settings-save-bar__status--error {
    color: #991b1b;
}

.cts-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: 20px 0 12px;
}

.cts-zone-label:first-child {
    margin-top: 0;
}

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

.cts-divider {
    border: none;
    border-top: 1px solid var(--fos-border);
    margin: 18px 0;
}

.cts-text-muted {
    color: var(--fos-text-sub);
}

.cts-text-dim {
    color: var(--fos-text-dim);
}

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

.cts-link:hover {
    color: var(--fos-primary-dark);
    text-decoration: underline;
}

.fos-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* PRO badge used in nav tabs */
.fos-badge-pro {
    display: inline-block;
    background: var(--fos-primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.4;
}

/* Site card status variants (page-settings-sites.php) */
.fos-site-url {
    color: var(--fos-text-dim);
    font-size: 12px;
}

.fos-site-status {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

.fos-status--ok {
    color: var(--fos-success);
}

.fos-status--error {
    color: var(--fos-danger);
}

/* Inline Sync Button */
.fos-sync-quota-inline {
    appearance: none;
    background: none;
    border: none;
    padding: 2px;
    margin-left: 4px;
    cursor: pointer;
    color: var(--fos-text-dim);
    transition: var(--fos-transition);
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    border-radius: 4px;
}

.fos-sync-quota-inline:hover {
    color: var(--fos-primary);
    background: var(--fos-primary-faint);
}

.fos-sync-quota-inline.is-spinning {
    animation: fos-spin 0.8s linear infinite;
}

/* Site limit notice */
.fos-limit-notice {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 3px solid var(--fos-warning);
    padding: 12px 14px;
    border-radius: var(--fos-radius-sm);
    margin-top: 16px;
    font-size: 13px;
    color: #78350f;
}

/* Generic form group (used in modal forms) */
.fos-form-group {
    margin-bottom: 16px;
}

.fos-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
    color: var(--fos-text);
}

.fos-form-group input,
.fos-form-group select {
    width: 100%;
}

/* Agents tab â€” readonly state */
.fos-agents-readonly textarea {
    background: var(--fos-bg-soft);
    cursor: not-allowed;
}

.fos-agents-readonly .fos-agent-card {
    opacity: 0.85;
}

.fos-agents-readonly .fos-reset-prompt-btn,
.fos-agents-readonly button[type="submit"] {
    pointer-events: none;
    opacity: 0.5;
}

/* Agent cards */
.fos-agent-card {
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

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

.fos-agent-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    background: var(--fos-bg-soft);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.fos-agent-card--open .fos-agent-card__header {
    border-bottom-color: var(--fos-border);
}

.fos-agent-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--fos-text);
}

.fos-agent-card__icon {
    font-size: 18px;
    line-height: 1;
}

.fos-agent-card__role {
    font-size: 11px;
    font-weight: 400;
    color: var(--fos-text-sub);
    margin-top: 1px;
}

.fos-agent-card__toggle {
    font-size: 16px;
    color: var(--fos-text-dim);
    transition: transform 0.2s;
}

.fos-agent-card--open .fos-agent-card__toggle {
    transform: rotate(180deg);
}

.fos-agent-card__body {
    display: none;
    padding: 16px 18px;
}

.fos-agent-card--open .fos-agent-card__body {
    display: block;
}

.fos-agent-card__vars {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.fos-agent-card__var {
    font-size: 10px;
    font-weight: 600;
    font-family: monospace;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--fos-primary-light);
    color: var(--fos-primary);
    border: 1px solid rgba(108, 71, 255, 0.15);
}

.fos-agent-card__textarea {
    width: 100%;
    min-height: 180px;
    padding: 10px 12px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    border: 1px solid var(--fos-border-input);
    border-radius: var(--fos-radius-sm);
    background: var(--fos-bg-soft);
    color: var(--fos-text);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.fos-agent-card__textarea:focus {
    outline: none;
    border-color: var(--fos-primary);
    background: #fff;
}

.fos-agent-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.fos-agent-custom-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--fos-primary-light);
    color: var(--fos-primary);
}

.fos-agent-using-default {
    font-size: 12px;
    color: var(--fos-text-dim);
}

/* â”€â”€ Row action buttons (aligned with costudio-content-hub.html .action-btn) â”€ */

.fos-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(108, 71, 255, 0.15);
    background: transparent;
    color: var(--fos-text-sub);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.fos-action-btn__icon {
    font-size: 12px;
    line-height: 1;
    display: inline-block;
}

.fos-action-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.fos-action-btn:hover {
    border-color: rgba(108, 71, 255, 0.35);
    color: var(--fos-primary);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 71, 255, 0.12);
}

.fos-action-btn--primary {
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
    border-color: rgba(108, 71, 255, 0.25);
}

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

.fos-action-btn--danger:hover {
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
    background: #fff;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.12);
}

.fos-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: fos-fade-in 0.18s ease-out;
}

.fos-modal__box,
.fos-modal__content {
    background: #fff;
    border-radius: var(--fos-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 480px;
    margin: 16px;
    overflow: hidden;
    animation: fos-slide-up 0.2s ease-out;
}

.fos-modal__backdrop {
    display: none;
}

/* backdrop handled by .fos-modal bg */

.fos-modal__content h3 {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--fos-text);
}

.fos-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--fos-border);
}

.fos-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fos-border);
}

.fos-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--fos-text);
}

.fos-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--fos-text-dim);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.fos-modal__close:hover {
    color: var(--fos-text);
}

.fos-modal__body {
    padding: 20px;
}

.fos-modal__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--fos-border);
}

#fos-site-modal .fos-modal__box--site {
    max-width: 580px;
}

#fos-site-modal input[type="text"],
#fos-site-modal input[type="url"],
#fos-site-modal input[type="email"],
#fos-site-modal input[type="password"],
#fos-site-modal select,
#fos-site-modal textarea {
    padding: 8px 12px;
    border: 1px solid var(--fos-border, #d1d5db);
    border-radius: 7px;
    background: #f8f8f9;
    font-size: 13px;
    color: var(--fos-text, #0f172a);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    line-height: normal;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
    font-family: inherit;
    margin: 0;
}

#fos-site-modal input[type="text"]::placeholder,
#fos-site-modal input[type="url"]::placeholder,
#fos-site-modal input[type="email"]::placeholder,
#fos-site-modal input[type="password"]::placeholder {
    color: var(--fos-text-dim, #94a3b8);
}

#fos-site-modal input[type="text"]:focus,
#fos-site-modal input[type="url"]:focus,
#fos-site-modal input[type="email"]:focus,
#fos-site-modal input[type="password"]:focus,
#fos-site-modal select:focus,
#fos-site-modal textarea:focus {
    border-color: var(--fos-primary, #6c47ff);
    background: #fff;
    box-shadow: 0 0 0 3px var(--fos-primary-faint, rgba(108, 71, 255, 0.1));
}



/* Title group (icon + h2) */
.fos-modal__title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fos-modal__title-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--fos-primary-faint);
    border: 1px solid rgba(108, 71, 255, 0.2);
    display: grid;
    place-items: center;
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

/* Footer: split left/right */
#fos-site-modal .fos-modal__footer {
    justify-content: space-between;
}

.fos-modal__footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fos-modal__footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 2-column form grid */
.fos-form-grid {
    margin-bottom: 14px;
}

.fos-form-grid:last-of-type {
    margin-bottom: 0;
}

.fos-form-grid--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .fos-form-grid--2col {
        grid-template-columns: 1fr;
    }
}

/* Form field */
.fos-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fos-form-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text-sub);
    margin: 0;
}

.fos-form-field .cts-input {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.fos-form-field__hint {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin: 0;
    line-height: 1.45;
    padding: 2px 16px 8px 16px;
    background: white;
}

.fos-field-required {
    color: #ef4444;
    margin-left: 1px;
}

/* Test connection button */
.fos-btn-test-conn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid var(--fos-border);
    color: var(--fos-text-sub);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.fos-btn-test-conn:hover:not(:disabled) {
    border-color: rgba(108, 71, 255, 0.3);
    color: var(--fos-primary);
    background: var(--fos-primary-faint);
}

.fos-btn-test-conn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Test status inline */
.fos-modal__test-status {
    font-size: 12px;
    color: var(--fos-text-dim);
}

/* Connection result banner */
.fos-modal__conn-result {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.fos-modal__conn-result.is-testing {
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
    border: 1px solid rgba(108, 71, 255, 0.2);
}

.fos-modal__conn-result.is-success {
    background: rgba(0, 229, 160, 0.08);
    color: #065F46;
    border: 1px solid rgba(0, 229, 160, 0.22);
}

.fos-modal__conn-result.is-error {
    background: rgba(220, 38, 38, 0.06);
    color: #991B1B;
    border: 1px solid rgba(220, 38, 38, 0.18);
}

.fos-cat-area {
    margin-top: 14px;
    border: 1px solid var(--fos-border);
    border-radius: 8px;
    overflow: hidden;
}

.fos-cat-area__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--fos-bg-soft);
    border-bottom: 1px solid var(--fos-border);
}

.fos-cat-area__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--fos-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fos-cat-area__load-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid var(--fos-border);
    background: #fff;
    color: var(--fos-text-sub);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.fos-cat-area__load-btn:hover:not(:disabled) {
    border-color: rgba(108, 71, 255, 0.3);
    color: var(--fos-primary);
    background: var(--fos-primary-faint);
}

.fos-cat-area__load-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fos-cat-area__body {
    min-height: 40px;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    background: white;
}

.fos-cat-area__empty,
.fos-cat-area__loading {
    font-size: 12px;
    color: var(--fos-text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Category tag pill */
.fos-cat-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--fos-border);
    background: #f1f5f9;
    color: var(--fos-text-sub);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.12s;
    user-select: none;
}

.fos-cat-tag:hover {
    border-color: rgba(108, 71, 255, 0.3);
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
}

.fos-cat-tag--selected {
    background: rgba(108, 71, 255, 0.12);
    border-color: rgba(108, 71, 255, 0.35);
    color: var(--fos-primary);
}

/* Spinner */
.fos-conn-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: fos-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes fos-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Plan idea modal â€” Content Hub (mock: costudio-modal-nova-ideia.html) */


#fos-plan-modal.fos-modal--plan-idea .fos-modal__box--plan-idea {
    max-width: 520px;
    border: 1px solid var(--fos-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

#fos-plan-modal .fos-plan-modal__heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

#fos-plan-modal .fos-plan-modal__title-icon {
    width: 24px;
    height: 24px;
    background: var(--fos-primary-faint);
    border: 1px solid rgba(108, 71, 255, 0.25);
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

#fos-plan-modal .fos-modal__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

#fos-plan-modal .fos-modal__close--text {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    color: var(--fos-text-dim);
}

#fos-plan-modal .fos-modal__close--text:hover {
    background: var(--fos-bg-soft);
    color: var(--fos-text-sub);
}

/* Form = header (fora) + corpo + rodapÃ© em coluna â€” rodapÃ© largura total da caixa */
#fos-plan-modal .fos-plan-modal__form {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    min-height: 0;
}

#fos-plan-modal .fos-modal__body--plan-idea {
    flex: 1 1 auto;
    padding: 20px;
    min-height: 0;
}

#fos-plan-modal .fos-plan-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

#fos-plan-modal .fos-plan-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

#fos-plan-modal .fos-plan-field-row .fos-plan-field {
    margin-bottom: 0;
}

#fos-plan-modal .fos-plan-field--primary .fos-plan-field__label {
    color: var(--fos-text);
    font-weight: 600;
}

#fos-plan-modal .fos-plan-field--primary .fos-plan-field__control {
    background: #fff;
    border-color: rgba(108, 71, 255, 0.35);
    box-shadow: 0 1px 0 rgba(108, 71, 255, 0.05);
}

#fos-plan-modal .fos-plan-field__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text-sub);
}

#fos-plan-modal .fos-plan-field__required {
    color: #ef4444;
    margin-left: 2px;
}

#fos-plan-modal .fos-plan-field__hint {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin: 0;
    line-height: 1.45;
}

#fos-plan-modal .fos-plan-ai-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

#fos-plan-modal .fos-plan-ai-input-wrap .fos-plan-field__control {
    padding-right: 42px;
}

#fos-plan-modal .fos-plan-ai-input-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--fos-primary);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, opacity 0.12s;
}

#fos-plan-modal .fos-plan-ai-input-btn:hover,
#fos-plan-modal .fos-plan-ai-input-btn:focus {
    background: var(--fos-primary-faint);
    outline: none;
}

#fos-plan-modal .fos-plan-ai-input-btn:disabled {
    cursor: default;
    opacity: 0.42;
}

#fos-plan-modal .fos-plan-ai-input-btn__icon {
    font-size: 14px;
    line-height: 1;
}

#fos-plan-modal .fos-plan-ai-input-btn__spinner {
    display: none;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(108, 71, 255, 0.22);
    border-top-color: var(--fos-primary);
    border-radius: 50%;
    animation: fos-title-ai-spin 650ms linear infinite;
}

#fos-plan-modal .fos-plan-ai-input-btn.is-loading .fos-plan-ai-input-btn__icon {
    display: none;
}

#fos-plan-modal .fos-plan-ai-input-btn.is-loading .fos-plan-ai-input-btn__spinner {
    display: block;
}

#fos-plan-modal .fos-title-suggestions {
    margin: 10px 0 2px 0;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--fos-bg-soft);
}

#fos-plan-modal .fos-title-suggestions[hidden] {
    display: none;
}

#fos-plan-modal .fos-title-suggestions.is-entering {
    animation: fos-title-suggestions-enter 360ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

#fos-plan-modal .fos-title-suggestions.is-entering .fos-title-suggestion-chip {
    animation: fos-title-suggestion-chip-enter 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

#fos-plan-modal .fos-title-suggestions.is-entering .fos-title-suggestion-chip:nth-child(2) {
    animation-delay: 70ms;
}

#fos-plan-modal .fos-title-suggestions.is-entering .fos-title-suggestion-chip:nth-child(3) {
    animation-delay: 140ms;
}

#fos-plan-modal .fos-title-suggestions__head {
    margin-bottom: 8px;
}

#fos-plan-modal .fos-title-suggestions__label {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#fos-plan-modal .fos-title-suggestions__chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#fos-plan-modal .fos-title-suggestion-chip {
    width: 100%;
    min-height: 36px;
    padding: 9px 11px;
    border: 1px solid rgba(108, 71, 255, 0.18);
    border-radius: 7px;
    background: #fff;
    color: var(--fos-text-sub);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s, background 0.12s, box-shadow 0.12s;
}

#fos-plan-modal .fos-title-suggestion-chip:hover,
#fos-plan-modal .fos-title-suggestion-chip:focus {
    border-color: rgba(108, 71, 255, 0.42);
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
    box-shadow: 0 0 0 3px rgba(108, 71, 255, 0.08);
    outline: none;
}

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

@keyframes fos-title-suggestions-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fos-title-suggestion-chip-enter {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fos-title-ai-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    #fos-plan-modal .fos-title-suggestions.is-entering,
    #fos-plan-modal .fos-title-suggestions.is-entering .fos-title-suggestion-chip,
    #fos-plan-modal .fos-plan-ai-input-btn__spinner {
        animation: none;
    }
}

#fos-plan-modal .fos-plan-field__control {
    padding: 8px 12px;
    border: 1px solid var(--fos-border-input, #d1d5db);
    border-radius: 7px;
    background: #f8f8f9;
    font-size: 13px;
    color: var(--fos-text);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
    line-height: normal;
}

#fos-plan-modal .fos-plan-field__control::placeholder {
    color: var(--fos-text-dim);
}

#fos-plan-modal .fos-plan-field__control:focus {
    border-color: var(--fos-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--fos-primary-faint);
}

#fos-plan-modal input[type="date"].fos-plan-field__control::-webkit-calendar-picker-indicator {
    opacity: 0.45;
    cursor: pointer;
}

/* Reset WordPress Admin's global min-height: 30px / line-height: 2 on input[type=date]
   Also force explicit height so it perfectly matches adjacent selects/inputs (36px). */
#fos-plan-modal input[type="date"].fos-plan-field__control {
    min-height: 0;
    height: 35px;
    line-height: normal;
    padding: 8px 12px;
    box-sizing: border-box;
}


#fos-plan-modal .fos-plan-field__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    line-height: normal;
}

#fos-plan-modal #fos-plan-priority.fos-plan-priority-select--high {
    border-left: 3px solid #ef4444;
}

#fos-plan-modal #fos-plan-priority.fos-plan-priority-select--medium {
    border-left: 3px solid var(--fos-primary);
}

#fos-plan-modal #fos-plan-priority.fos-plan-priority-select--low {
    border-left: 3px solid var(--fos-text-dim);
}

#fos-plan-modal .fos-modal__footer--plan-idea {
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0;
    padding: 14px 20px;
    background: #f8f8f9;
    border-top: 1px solid var(--fos-border);
}

@media (max-width: 600px) {
    #fos-plan-modal .fos-plan-field-row {
        grid-template-columns: 1fr;
    }
}

@keyframes fos-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fos-slide-up {
    from {
        transform: translateY(12px);
    }

    to {
        transform: translateY(0);
    }
}

.fos-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fos-radio-option {
    position: relative;
    cursor: pointer;
}

.fos-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fos-radio-option__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: 1.5px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text-sub);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    min-width: 80px;
    text-align: center;
}

.fos-radio-option__label .fos-radio-icon {
    font-size: 20px;
    line-height: 1;
}

.fos-radio-option input:checked+.fos-radio-option__label {
    border-color: var(--fos-primary);
    background: var(--fos-primary-faint);
    color: var(--fos-primary);
    font-weight: 600;
}

.fos-radio-option__label:hover {
    border-color: var(--fos-primary);
}

.fos-links-panel {
    background: #0f172a;
    border-radius: var(--fos-radius-sm);
    padding: 16px;
    margin-top: 10px;
}

.fos-links-panel .fos-links-output {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.7;
    white-space: pre-line;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.fos-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.fos-kpi-grid--dashboard {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 12px;
    margin-top: 12px;
}

#fos-kpi-section {
    margin-top: 20px;
}

.fos-kpi-grid--hub {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.fos-kpi-card {
    background: #fff;
    border: 1px solid var(--fos-border);
    border-top-width: 3px;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.fos-kpi-card--purple {
    border-top-color: var(--fos-primary);
}

.fos-kpi-card--green {
    border-top-color: var(--fos-accent, #00c48c);
}

.fos-kpi-card--amber {
    border-top-color: #f59e0b;
}

.fos-kpi-card--blue {
    border-top-color: #3b82f6;
}

.fos-limit-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(108, 71, 255, 0.06), rgba(108, 71, 255, 0.02));
    border: 1px solid rgba(108, 71, 255, 0.18);
    border-radius: var(--fos-radius);
    padding: 14px 20px;
    margin-bottom: 20px;
}

.fos-limit-banner__info {
    flex: 1;
    min-width: 0;
}

.fos-limit-banner__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 8px;
}

.fos-limit-banner__progress {
    background: rgba(108, 71, 255, 0.12);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.fos-limit-banner__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fos-primary), #9b7af7);
    transition: width 0.4s ease;
}

.fos-limit-banner__cta {
    flex-shrink: 0;
}

.fos-dashboard-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media screen and (max-width: 900px) {
    .fos-dashboard-main {
        grid-template-columns: 1fr;
    }

    .fos-kpi-grid--dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .fos-dash-quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .fos-kpi-grid--dashboard {
        grid-template-columns: 1fr 1fr;
    }

    .fos-dash-quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .fos-central-toolbar {
        flex-wrap: wrap;
    }
}

.fos-dashboard-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.fos-dashboard-panel h3,
.fos-dashboard-panel__header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--fos-text);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Last production */
.fos-last-prod__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fos-text);
    margin: 0 0 6px;
    line-height: 1.4;
}

.fos-last-prod__keyword {
    font-size: 12px;
    color: var(--fos-text-sub);
    margin-bottom: 10px;
}

.fos-last-prod__meta {
    display: flex;
    gap: 16px;
    color: var(--fos-text-sub);
    font-size: 13px;
    flex-wrap: wrap;
    align-items: center;
}

.fos-last-prod__meta a {
    color: var(--fos-primary);
    text-decoration: none;
    font-weight: 500;
}

.fos-last-prod__meta a:hover {
    text-decoration: underline;
}

/* Dashboard empty state */
.fos-dash-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--fos-text-dim);
}

.fos-dash-empty__icon {
    font-size: 32px;
    margin-bottom: 8px;
    line-height: 1;
}

.fos-dash-empty p {
    font-size: 13px;
    margin: 0 0 14px;
    color: var(--fos-text-sub);
}

.fos-status-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.fos-status-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--fos-border);
    border-left: 3px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    background: var(--fos-bg-soft);
    transition: border-color 0.15s;
}

.fos-status-card--ok {
    border-left-color: var(--fos-success);
}

.fos-status-card--warn {
    border-left-color: var(--fos-warning);
}

.fos-status-card--err {
    border-left-color: var(--fos-danger);
}

.fos-status-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--fos-border);
}

.fos-status-card--ok .fos-status-card__dot {
    background: var(--fos-success);
}

.fos-status-card--warn .fos-status-card__dot {
    background: var(--fos-warning);
}

.fos-status-card--err .fos-status-card__dot {
    background: var(--fos-danger);
}

.fos-status-card__body {
    flex: 1;
    min-width: 0;
}

.fos-status-card__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    margin-bottom: 1px;
}

.fos-status-card__value {
    font-size: 13px;
    font-weight: 500;
    color: var(--fos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fos-status-card__badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.fos-status-card__badge--ok {
    background: rgba(5, 150, 105, 0.1);
    color: var(--fos-success);
}

.fos-status-card__badge--warn {
    background: rgba(217, 119, 6, 0.1);
    color: var(--fos-warning);
}

.fos-status-card__action {
    font-size: 12px;
    font-weight: 600;
    color: var(--fos-primary);
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.fos-status-card__action:hover {
    text-decoration: underline;
}

.fos-dash-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--fos-border);
}

.fos-dash-qa-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    background: #fff;
    color: var(--fos-text-sub);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: all 0.15s;
    cursor: pointer;
}

.fos-dash-qa-btn:hover {
    border-color: rgba(108, 71, 255, 0.3);
    background: var(--fos-primary-light);
    color: var(--fos-primary);
    box-shadow: var(--fos-shadow);
    text-decoration: none;
}

.fos-dash-qa-btn__icon {
    font-size: 20px;
    line-height: 1;
}

.fos-kpi-card__sub {
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    color: var(--fos-text-dim);
}

.fos-kpi-card__sub--ok {
    color: var(--fos-success);
}

.fos-kpi-card__sub--warn {
    color: var(--fos-warning);
}

.fos-kpi-card__icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 8px;
    display: block;
}

.fos-panel-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--fos-border);
}

.fos-panel-footer a {
    color: var(--fos-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.fos-panel-footer a:hover {
    text-decoration: underline;
}

.fos-limit-banner__limit-hit {
    color: var(--fos-danger);
    font-weight: 700;
}

.fos-empty-text {
    color: var(--fos-text-dim);
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

/* Backward-compat: old status list (kept in case used elsewhere) */
.fos-status-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fos-status-icon {
    font-size: 10px;
}

.fos-status-icon.ok {
    color: #22c55e;
}

.fos-status-icon.err {
    color: #ef4444;
}

.fos-kpi-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    margin-bottom: 10px;
}

.fos-kpi-value {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--fos-text);
}

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

.fos-kpi-value--green {
    color: var(--fos-accent, #00c48c);
}

.fos-kpi-value--amber {
    color: #f59e0b;
}

.fos-kpi-value--blue {
    color: #3b82f6;
}

/* Aliases used by page-dashboard.php (__val / __label BEM naming) */
.fos-kpi-card__val {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--fos-primary);
}

.fos-kpi-card__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fos-text-dim);
    margin: 0;
}

.fos-kpi-sub {
    font-size: 12px;
    color: var(--fos-text-sub);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.fos-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

.fos-kpi-trend--up {
    color: #065f46;
    background: #e6faf4;
}

.fos-kpi-trend--down {
    color: #991b1b;
    background: #fef2f2;
}

.fos-kpi-trend--neutral {
    color: var(--fos-text-dim);
    background: #f8f8f9;
}

.fos-wizard-wrap {
    max-width: 640px;
    margin: 20px auto;
    padding: 0 20px;
}

.fos-wizard-brand {
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: var(--fos-shadow);
}

.fos-wizard-brand__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fos-wizard-brand__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.fos-wizard-brand__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--fos-text);
}

.fos-wizard-brand__sub {
    font-size: 11px;
    color: var(--fos-text-sub);
    margin-top: 1px;
}

.fos-wizard-brand__skip {
    font-size: 11px;
    color: var(--fos-text-dim);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.12s;
}

.fos-wizard-brand__skip:hover {
    color: var(--fos-text-sub);
}

.fos-wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--fos-shadow);
}

.fos-wizard-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-right: 1px solid var(--fos-border);
    cursor: default;
    transition: background 0.12s;
}

.fos-wizard-step:last-child {
    border-right: none;
}

.fos-wizard-step--active {
    background: var(--fos-primary-faint);
}

.fos-wizard-step--done {
    background: var(--fos-bg-soft);
}

.fos-wizard-step--pending {
    opacity: 0.5;
}

.fos-wizard-step__num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--fos-border);
    color: var(--fos-text-sub);
    transition: var(--fos--transition);
}

.fos-wizard-step--active .fos-wizard-step__num {
    background: var(--fos-primary);
    color: #fff;
}

.fos-wizard-step--done .fos-wizard-step__num {
    background: var(--fos-success);
    color: #fff;
}

.fos-wizard-step__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--fos-text-sub);
}

.fos-wizard-step--active .fos-wizard-step__label {
    color: var(--fos-primary-dark);
    font-weight: 600;
}

.fos-wizard-card {
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    overflow: hidden;
    box-shadow: var(--fos-shadow);
}

.fos-wizard-card__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--fos-border);
}

.fos-wizard-card__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--fos-text);
    margin-bottom: 5px;
}

.fos-wizard-card__sub {
    font-size: 12px;
    color: var(--fos-text-sub);
    line-height: 1.6;
}

.fos-wizard-card__body {
    padding: 20px 24px;
}

.fos-wizard-card__footer {
    padding: 14px 24px;
    border-top: 1px solid var(--fos-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fos-wizard-panel {
    display: none;
}

.fos-wizard-panel.is-active {
    display: block;
}

.fos-wizard-providers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.fos-wizard-provider[data-provider="contentos"] {
    grid-column: 1 / -1;
    display: flex;
    text-align: left;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(82, 49, 244, 0.03) 0%, rgba(82, 49, 244, 0.06) 100%);
    border-color: rgba(82, 49, 244, 0.4);
}

.fos-wizard-provider.is-selected[data-provider="contentos"] {
    background: var(--fos-primary-light);
    border-color: var(--fos-primary);
    box-shadow: 0 4px 12px rgba(82, 49, 244, 0.12);
}

.fos-wizard-provider[data-provider="contentos"] .fos-wizard-provider__logo {
    margin: 0;
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.fos-wizard-provider[data-provider="contentos"] .fos-wizard-provider__content {
    flex: 1;
}

.fos-wizard-provider[data-provider="contentos"] .fos-wizard-provider__name {
    font-size: 16px;
    margin-bottom: 2px;
}

.fos-wizard-provider[data-provider="contentos"] .fos-wizard-provider__hint {
    margin-top: 4px;
}

.fos-wizard-provider {
    border: 1.5px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    padding: 14px 12px;
    cursor: pointer;
    text-align: center;
    transition: var(--fos-transition);
}

.fos-wizard-provider:hover {
    border-color: #AFA9EC;
    background: #FAFAFE;
}

.fos-wizard-provider.is-selected {
    border-color: var(--fos-primary);
    background: var(--fos-primary-light);
}

.fos-wizard-provider__logo {
    width: 38px;
    height: 38px;
    border-radius: var(--fos-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 8px;
}

.fos-wizard-provider__logo--gemini {
    background: #E8F0FE;
    color: #1a73e8;
}

.fos-wizard-provider__logo--openai {
    background: #f0f0f0;
    color: #333;
}

.fos-wizard-provider__logo--claude {
    background: #FEF3E8;
    color: #d97706;
}

.fos-wizard-provider__name {
    font-size: 12px;
    font-weight: 600;
    color: var(--fos-text);
    margin-bottom: 5px;
}

.fos-wizard-provider__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    margin-bottom: 6px;
}

.fos-wizard-provider__badge--free {
    background: var(--fos-success-light);
    color: #065F46;
}

.fos-wizard-provider__badge--paid {
    background: var(--fos-warning-light);
    color: #92400E;
}

.fos-wizard-provider__hint {
    font-size: 10px;
    color: var(--fos-text-dim);
    line-height: 1.4;
}

.fos-wizard-provider.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.fos-wizard-provider.is-disabled:hover {
    border-color: var(--fos-border);
    background: transparent;
}

.fos-wizard-freetier {
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
    border-radius: var(--fos-radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.fos-wizard-freetier__icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.fos-wizard-freetier__text {
    font-size: 12px;
    color: var(--fos-primary-dark);
    line-height: 1.6;
}

.fos-wizard-freetier__text a {
    color: var(--fos-primary) !important;
    text-decoration: none !important;
}

.fos-wizard-freetier__text a:hover {
    color: var(--fos-primary-dark) !important;
    text-decoration: underline !important;
}

.fos-wizard-freetier__link {
    color: var(--fos-primary);
    font-weight: 600;
    text-decoration: none;
}

.fos-wizard-field {
    margin-bottom: 16px;
}

.fos-wizard-field__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 6px;
    display: block;
}

.fos-wizard-field__row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fos-wizard-field__input {
    flex: 1 !important;
    font-size: 12px !important;
    height: 36px !important;
    border: 1px solid var(--fos-primary-border) !important;
    border-radius: var(--fos-radius-sm) !important;
    padding: 0 12px !important;
    color: var(--fos-text) !important;
    background: var(--fos-surface) !important;
    font-family: inherit !important;
    transition: border-color 0.12s !important;
    width: 100% !important;
}

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

.fos-wizard-test-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 7px;
    background: var(--fos-primary-faint);
    border: 1px solid var(--fos-primary-border);
    color: var(--fos-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all .12s;
}

.fos-wizard-test-btn:hover {
    border: 1px solid rgba(108, 71, 255, 0.35);
    color: var(--fos-primary-dark);
    background: var(--fos-primary-light);
}

.fos-wizard-test-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.fos-wizard-test-result {
    margin-top: 8px;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: var(--fos-radius-sm);
    display: none;
    align-items: center;
    gap: 6px;
}

.fos-wizard-test-result.is-ok {
    display: flex;
    background: #e6faf4;
    color: #065f46;
    border: 1px solid rgba(0, 196, 140, .25);
}

.fos-wizard-test-result.is-err {
    display: flex;
    background: var(--fos-danger-light);
    color: #991B1B;
    border: 1px solid var(--fos-danger-border);
}

.fos-wizard-test-result.is-loading {
    display: flex;
    background: var(--fos-bg-soft);
    color: var(--fos-text-sub);
    border: 1px solid var(--fos-border);
}

.fos-wizard-spinner {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid var(--fos-border);
    border-top-color: var(--fos-primary);
    animation: fos-wiz-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes fos-wiz-spin {
    to {
        transform: rotate(360deg);
    }
}

.fos-wizard-site-connected {
    border: 1px solid rgba(0, 196, 140, 0.3);
    border-radius: var(--fos-radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--fos-accent-light);
    margin-bottom: 10px;
}

.fos-wizard-site-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fos-accent);
    flex-shrink: 0;
}

.fos-wizard-site-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--fos-text);
}

.fos-wizard-site-url {
    font-size: 10px;
    color: var(--fos-text-dim);
    margin-top: 1px;
}

.fos-wizard-site-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fos-wizard-site-remove,
.fos-wizard-site-edit {
    font-size: 11px;
    color: var(--fos-text-dim);
    cursor: pointer;
    transition: color 0.12s;
    white-space: nowrap;
}

.fos-wizard-site-remove:hover {
    color: var(--fos-danger);
}

.fos-wizard-site-edit:hover {
    color: var(--fos-primary);
}

.fos-wizard-site-add {
    border: 1.5px dashed var(--fos-border-input);
    border-radius: var(--fos-radius-sm);
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--fos-transition);
    margin-bottom: 6px;
}

.fos-wizard-site-add:hover {
    border-color: var(--fos-primary);
    background: var(--fos-primary-faint);
}

.fos-wizard-site-add__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-bg-soft);
    border: 1px solid var(--fos-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--fos-text-dim);
    flex-shrink: 0;
}

.fos-wizard-site-limit-notice {
    font-size: 12px;
    color: var(--fos-text-dim);
    padding: 10px 14px;
    background: var(--fos-bg-soft);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-sm);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fos-wizard-site-form {
    border: 1px solid var(--fos-primary-border);
    border-radius: var(--fos-radius-sm);
    padding: 16px 14px;
    background: var(--fos-primary-faint);
    margin-bottom: 6px;
    display: none;
}

.fos-wizard-site-form.is-open {
    display: block;
}

.fos-wizard-apppass-help {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 4px;
    line-height: 1.5;
}

.fos-wizard-skip {
    font-size: 11px;
    color: var(--fos-text-dim);
    cursor: pointer;
    display: block;
    margin-top: 8px;
    transition: color 0.12s;
    text-decoration: none;
}

.fos-wizard-skip:hover {
    color: var(--fos-primary-dark);
}

.fos-wizard-ready-hero {
    padding: 28px 24px;
    text-align: center;
    border-bottom: 1px solid var(--fos-border);
}

.fos-wizard-ready-hero__icon {
    width: 56px;
    height: 56px;
    background: var(--fos-primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.fos-wizard-ready-hero__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--fos-text);
    margin-bottom: 8px;
}

.fos-wizard-ready-hero__sub {
    font-size: 13px;
    color: var(--fos-text-sub);
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

.fos-wizard-checklist {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--fos-border);
}

.fos-wizard-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--fos-text-sub);
    line-height: 1.5;
}

.fos-wizard-check a:hover {
    color: var(--fos-primary-dark) !important;
}

.fos-wizard-inline-action {
    color: var(--fos-primary);
    font-weight: 600;
    text-decoration: none;
}

.fos-wizard-inline-action:hover,
.fos-wizard-inline-action:focus {
    color: var(--fos-primary-dark);
    text-decoration: underline;
}

.fos-wizard-check__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.fos-wizard-check__dot--ok {
    background: var(--fos-success-light);
    color: #065F46;
}

.fos-wizard-check__dot--warn {
    background: var(--fos-warning-light);
    color: #92400E;
}

.fos-wizard-check__dot--skip {
    background: var(--fos-bg-soft);
    color: var(--fos-text-dim);
    border: 1px solid var(--fos-border);
}

.fos-wizard-ready-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px 0;
    flex-wrap: wrap;
}

.fos-wizard-ready-nav .fos-wizard-btn {
    min-width: 190px;
    justify-content: center;
}

.fos-wizard-ready-footer {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fos-wizard-cta {
    height: 42px;
    padding: 0 32px;
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fos-wizard-cta:hover {
    background: var(--fos-primary-dark);
    border-color: var(--fos-primary-dark);
    color: #fff;
}

.fos-wizard-btn {
    height: 36px;
    padding: 0 18px;
    border-radius: var(--fos-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fos-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--fos-border-input);
    background: var(--fos-surface);
    color: var(--fos-text);
}

.fos-wizard-btn--primary {
    background: var(--fos-primary);
    color: #fff;
    border-color: var(--fos-primary);
}

.fos-wizard-btn--primary:hover {
    background: var(--fos-primary-dark);
    border-color: var(--fos-primary-dark);
}

@media (max-width: 640px) {
    .fos-wizard-ready-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .fos-wizard-ready-nav .fos-wizard-btn {
        width: 100%;
    }
}

.fos-wizard-welcome-banner {
    background: linear-gradient(135deg, var(--fos-primary) 0%, #8b5cf6 100%);
    border-radius: var(--fos-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 71, 255, 0.2);
}

.fos-wizard-welcome-banner__content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fos-wizard-welcome-banner__icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fos-wizard-welcome-banner__text {
    font-size: 14px;
    line-height: 1.5;
}

.fos-wizard-welcome-banner__text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.fos-wizard-welcome-banner__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fos-wizard-welcome-banner__btn {
    background: #fff;
    color: var(--fos-primary);
    padding: 8px 20px;
    border-radius: var(--fos-radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.fos-wizard-welcome-banner__btn:hover {
    transform: translateY(-1px);
    color: var(--fos-primary-dark);
}

.fos-wizard-welcome-banner__close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
}

.fos-wizard-welcome-banner__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── Wizard: local site connect card ─────────────────────────────────── */
.fos-wizard-local-connect {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--fos-primary);
    border-radius: var(--fos-radius-sm);
    background: var(--fos-primary-faint);
    margin-bottom: 16px;
}

.fos-wizard-local-connect__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.fos-wizard-local-connect__body {
    flex: 1;
    min-width: 0;
}

.fos-wizard-local-connect__title {
    font-weight: 600;
    font-size: 14px;
    color: var(--fos-text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.fos-wizard-local-connect__url {
    font-size: 12px;
    color: var(--fos-text-light);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fos-wizard-local-connect__sub {
    font-size: 11px;
    color: var(--fos-text-dim);
}

.fos-wizard-local-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
    background: var(--fos-primary);
    color: #fff;
    vertical-align: middle;
}

.fos-wizard-site-local .fos-wizard-site-url {
    color: var(--fos-primary);
}

/* ==========================================================================
   Contentosapp Studio — Design System Primitives
   Shared atoms: buttons, cards, inputs, selects, toggles.
   Badge variants supplement existing .cts-badge rules above.
   ========================================================================== */

/* ── Buttons (.fos-btn) ─────────────────────────────────────────────────── */
.fos-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fos-text-base);
    font-weight: var(--fos-weight-medium);
    padding: 6px 13px;
    border-radius: var(--fos-radius-sm);
    border: 1px solid var(--fos-border-input);
    background: var(--fos-surface);
    color: var(--fos-text);
    cursor: pointer;
    transition: var(--fos-transition);
    font-family: inherit;
    text-decoration: none;
    line-height: 1.4;
}

.fos-btn:hover {
    background: var(--fos-bg-soft);
    border-color: #c0c4cc;
}

.fos-btn:focus-visible {
    outline: none;
    box-shadow: var(--fos-focus-ring);
}

.fos-btn:disabled,
.fos-btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

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

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

.fos-btn--success {
    background: var(--fos-success);
    color: #fff;
    border-color: var(--fos-success);
}

.fos-btn--success:hover {
    background: var(--fos-success-dark);
    border-color: var(--fos-success-dark);
    color: #fff;
}

.fos-btn--danger {
    background: var(--fos-danger);
    color: #fff;
    border-color: var(--fos-danger);
}

.fos-btn--danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.fos-btn--ghost {
    background: transparent;
    border-color: var(--fos-border);
    color: var(--fos-text-sub);
}

.fos-btn--ghost:hover {
    background: var(--fos-bg-soft);
    border-color: #cbd5e1;
    color: var(--fos-text);
}

.fos-btn--ghost-primary {
    background: transparent;
    border-color: var(--fos-border);
    color: var(--fos-text-sub);
}

.fos-btn--ghost-primary:hover {
    background: var(--fos-primary-faint);
    border-color: var(--fos-primary-dark);
    color: var(--fos-primary-dark);
}

.fos-btn--sm {
    font-size: var(--fos-text-sm);
    padding: 4px 9px;
}

/* ── Cards (.fos-card) ──────────────────────────────────────────────────── */
.fos-card {
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius);
    box-shadow: var(--fos-shadow);
    overflow: hidden;
}

.fos-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--fos-space-3);
    padding: var(--fos-space-3) var(--fos-space-4);
    border-bottom: 1px solid var(--fos-border);
    background: var(--fos-bg-soft);
}

.fos-card__header-title {
    margin: 0;
    font-size: var(--fos-text-lg);
    font-weight: var(--fos-weight-semibold);
    color: var(--fos-text);
    display: flex;
    align-items: center;
    gap: var(--fos-space-2);
    line-height: 1.4;
}

/* ── Badge extras (.cts-badge) ──────────────────────────────────────────── */
.cts-badge--accent {
    background: var(--fos-accent-light);
    color: var(--fos-accent);
    border: 1px solid var(--fos-accent-border);
}

.cts-badge--done {
    background: var(--fos-success-light);
    color: var(--fos-success);
}

/* ── Inputs (.fos-input) ────────────────────────────────────────────────── */
.fos-input {
    font-family: inherit;
    font-size: var(--fos-text-md);
    padding: 7px 11px;
    border: 1px solid var(--fos-border-input);
    border-radius: var(--fos-radius-sm);
    background: var(--fos-bg-soft);
    color: var(--fos-text);
    transition: var(--fos-transition);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.fos-input:focus {
    background: var(--fos-surface);
    border-color: var(--fos-primary);
    box-shadow: var(--fos-focus-ring);
}

.fos-input::placeholder {
    color: var(--fos-text-dim);
}

/* ── Selects (.fos-select) ──────────────────────────────────────────────── */
.fos-select {
    font-family: inherit;
    font-size: var(--fos-text-md);
    padding: 7px 32px 7px 11px;
    border: 1px solid var(--fos-border-input);
    border-radius: var(--fos-radius-sm);
    background: var(--fos-bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--fos-text);
    transition: var(--fos-transition);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.fos-select:focus {
    background-color: var(--fos-surface);
    border-color: var(--fos-primary);
    box-shadow: var(--fos-focus-ring);
}

/* ── Toggle (.fos-toggle) ───────────────────────────────────────────────── */
.fos-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    cursor: pointer;
}

.fos-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.fos-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: var(--fos-border-input);
    transition: background 0.15s;
}

.fos-toggle input:checked+.fos-toggle__track {
    background: var(--fos-primary);
}

.fos-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: left 0.15s;
}

.fos-toggle input:checked~.fos-toggle__thumb {
    left: 18px;
}

.fos-toggle input:focus-visible+.fos-toggle__track {
    box-shadow: var(--fos-focus-ring);
}

/* Simple Mode */
.fos-np-mode-simple .fos-advanced-only {
    display: none !important;
}

/* ==========================================================================
   Contentosapp Studio — Unified Pipeline Timeline (Phase 1)
   Refactored vertical timeline for production progress.
   ========================================================================== */

.fos-pipeline-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Pipeline Header ─────────────────────────────────────────────────── */
.fos-pipeline-header {
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-lg);
    overflow: hidden;
    box-shadow: var(--fos-shadow-soft);
}

.fos-pipeline-header__top {
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(108, 71, 255, 0.08) 0%, rgba(108, 71, 255, 0.02) 100%);
    border-bottom: 1px solid var(--fos-border);
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 12px;
}

.fos-pipeline-header--completed .fos-pipeline-header__top {
    background: linear-gradient(135deg, var(--fos-primary) 0%, var(--fos-primary-dark) 100%);
    color: #fff;
    border-radius: var(--fos-radius-lg);
}

.fos-pipeline-header--error .fos-pipeline-header__top {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.fos-pipeline-header__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.fos-pipeline-header__info {
    flex: 1;
    min-width: 0;
}

.fos-pipeline-header__title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 2px;
}

.fos-pipeline-header--completed .fos-pipeline-header__title {
    font-size: 20px;
    color: #fff;
    font-weight: 800;
}

.fos-pipeline-header__meta {
    font-size: 11.5px;
    color: var(--fos-text-sub);
}

.fos-pipeline-header--completed .fos-pipeline-header__meta {
    color: rgba(255, 255, 255, 0.85);
}

.fos-pipeline-header__status-badge {
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Pipeline Stats Grid ─────────────────────────────────────────────── */
.fos-pipeline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    background: var(--fos-surface);
}

.fos-pipeline-stat {
    padding: 12px 24px;
    border-right: 1px solid var(--fos-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.fos-pipeline-stat__label {
    font-size: 10px;
    font-weight: 800;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.fos-pipeline-stat__value {
    font-size: 20px;
    font-weight: 800;
    color: var(--fos-text);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.fos-pipeline-stat__sub {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 4px;
}

/* ── Timeline Container ──────────────────────────────────────────────── */
.fos-pipeline-body {
    background: var(--fos-surface);
    border: 1px solid var(--fos-border);
    border-radius: var(--fos-radius-lg);
    overflow: hidden;
    box-shadow: var(--fos-shadow-soft);
}

.fos-pipeline-body__header {
    padding: 14px 24px;
    border-bottom: 1px solid var(--fos-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Timeline Row ───────────────────────────────────────────────────── */
.fos-pipeline-row {
    border-bottom: 1px solid var(--fos-border);
    transition: background 0.15s ease;
}

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

.fos-pipeline-row__trigger {
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    position: relative;
}

.fos-pipeline-row--running {
    background: var(--fos-primary-faint);
}

.fos-pipeline-row--error {
    background: var(--fos-danger-light);
}

.fos-pipeline-row--awaiting {
    background: #EFF6FF;
}

.fos-pipeline-row--paused {
    background: #FFFBEB;
}

/* ── Timeline Node (Dot/Glyph) ────────────────────────────────────────── */
.fos-pipeline-node {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--fos-border);
    background: #fff;
    color: var(--fos-text-dim);
    transition: var(--fos-transition);
}

.fos-pipeline-row--done .fos-pipeline-node {
    background: var(--fos-success);
    border-color: var(--fos-success);
    color: #fff;
}

.fos-pipeline-row--skipped .fos-pipeline-node {
    background: var(--fos-bg-soft, #f4f4f5);
    border-color: var(--fos-border);
    color: var(--fos-text-dim);
    opacity: 0.65;
}

.fos-pipeline-row--running .fos-pipeline-node,
.fos-pipeline-row--starting .fos-pipeline-node {
    background: var(--fos-primary);
    border-color: var(--fos-primary);
    color: #fff;
    animation: fos-pulse 1.6s infinite;
}

.fos-pipeline-row--error .fos-pipeline-node {
    background: var(--fos-danger);
    border-color: var(--fos-danger);
    color: #fff;
}

.fos-pipeline-row--awaiting .fos-pipeline-node {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
}

/* ── Timeline Row Content ────────────────────────────────────────────── */
.fos-pipeline-row__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.fos-pipeline-row__info {
    flex: 1;
    min-width: 0;
}

.fos-pipeline-row__agent-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--fos-text-dim);
    font-family: var(--fos-font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fos-pipeline-row__agent-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--fos-text);
}

.fos-pipeline-row__agent-desc {
    font-size: 11.5px;
    color: var(--fos-text-sub);
    margin-top: 1px;
}

.fos-pipeline-row__meta {
    min-width: 100px;
}

.fos-pipeline-row__duration {
    font-size: 15px;
    font-weight: 700;
    font-family: var(--fos-font-mono);
}

.fos-pipeline-row__meta-label {
    font-size: 11px;
    color: var(--fos-text-dim);
    margin-top: 2px;
}

.fos-pipeline-row__badge {
    padding: 2px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
    border: 1px solid var(--fos-border);
}

/* ── Timeline Expanded Content ────────────────────────────────────────── */
.fos-pipeline-row__details {
    padding: 4px 24px 20px 72px;
    background: var(--fos-bg-soft);
    border-top: 1px solid var(--fos-border);
}

.fos-pipeline-row__caret {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-left: 4px;
    border-radius: 6px;
    color: var(--fos-text-dim);
    background: transparent;
    transition: background 0.15s ease, transform 0.2s ease;
}

.fos-pipeline-row__caret svg {
    display: block;
    transition: transform 0.2s ease;
}

.fos-pipeline-row__trigger:hover .fos-pipeline-row__caret,
.fos-log-trigger:hover .fos-pipeline-row__caret {
    background: var(--fos-bg-soft);
    color: var(--fos-text);
}

.fos-pipeline-row__caret.is-open svg {
    transform: rotate(180deg);
}

.fos-pipeline-grid-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px 0;
}

.fos-pending-queue-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0 12px;
    padding: 14px 16px;
    border: 1px solid rgba(109, 40, 217, 0.14);
    border-left: 3px solid var(--fos-primary);
    border-radius: 8px;
    background: var(--fos-primary-faint);
}

.fos-pending-queue-note__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(109, 40, 217, 0.16);
    font-size: 14px;
}

.fos-pending-queue-note__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--fos-text);
}

.fos-pending-queue-note__text {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--fos-text-sub);
}

.fos-pending-queue-grid {
    margin-top: 12px;
}

.fos-pipeline-mini-stat {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: 8px;
    margin-bottom: 10px;
}

.fos-pipeline-mini-stat__label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--fos-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.fos-pipeline-mini-stat__value {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--fos-text);
    margin-top: 2px;
}

.fos-pipeline-row__output-preview {
    position: relative;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--fos-border);
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--fos-text-sub);
    margin-bottom: 12px;
    max-height: 130px;
    overflow: hidden;
}

.fos-pipeline-row__output-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
    border-radius: 0 0 8px 8px;
}

.fos-pipeline-row__output-preview .fos-preview-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fos-text-dim);
    margin-bottom: 6px;
}

.fos-pipeline-row__output-preview p {
    margin: 0 0 6px;
}

.fos-pipeline-row__output-preview h1,
.fos-pipeline-row__output-preview h2,
.fos-pipeline-row__output-preview h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--fos-text);
}

.fos-pipeline-row__output-preview ul,
.fos-pipeline-row__output-preview ol {
    margin: 0 0 6px;
    padding-left: 18px;
}

.fos-pipeline-row__output-preview li {
    margin-bottom: 2px;
}

.fos-pipeline-row__output-preview strong {
    color: var(--fos-text);
}

.fos-pipeline-row__output-preview code {
    font-size: 11px;
    background: var(--fos-bg-soft);
    padding: 1px 4px;
    border-radius: 3px;
}

@keyframes fos-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 71, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(108, 71, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 71, 255, 0);
    }
}