
:root {
    --gw-green: #25d366;
    --gw-green-dark: #12b85a;
    --gs-blue: #2563eb;
    --gs-blue-dark: #1d4ed8;

    --brand-gradient: linear-gradient(135deg, var(--gw-green) 0%, #20c997 46%, var(--gs-blue) 100%);
    --sidebar-bg: #101828;
    --sidebar-bg-2: #182230;
    --sidebar-border: rgba(255,255,255,.08);

    --page-bg: #f6f8fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e6eaf0;
    --text: #182230;
    --muted: #667085;

    --shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --shadow-md: 0 8px 28px rgba(16,24,40,.08);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(37,211,102,.08), transparent 28rem),
        radial-gradient(circle at 75% 0, rgba(37,99,235,.07), transparent 24rem),
        var(--page-bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gs-blue);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    width: 268px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1030;
    padding: 20px 16px;
    background:
        radial-gradient(circle at 20% 0, rgba(37,211,102,.12), transparent 18rem),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    border-right: 1px solid var(--sidebar-border);
    color: white;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 24px;
}

.brand-symbol {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--brand-gradient);
    box-shadow: 0 8px 24px rgba(37,211,102,.22);
    display: grid;
    place-items: center;
    color: white;
    font-size: 1.15rem;
}

.brand-text strong {
    display: block;
    font-size: 1rem;
    letter-spacing: -.02em;
}

.brand-text small {
    color: #98a2b3;
    font-size: .72rem;
}

.sidebar-label {
    color: #667085;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 8px 12px 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    color: #b8c0cc;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: .18s ease;
    font-size: .92rem;
    font-weight: 500;
}

.sidebar-nav a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.055);
}

.sidebar-nav a.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(37,211,102,.16), rgba(37,99,235,.11));
    border-color: rgba(37,211,102,.18);
    box-shadow: inset 3px 0 0 var(--gw-green);
}

.sidebar-bottom {
    position: absolute;
    bottom: 18px;
    left: 16px;
    right: 16px;
}

.user-mini {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 14px;
}

.user-mini-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 13px;
    background: rgba(255,255,255,.035);
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-gradient);
    color: white;
    font-weight: 700;
    font-size: .82rem;
}

.user-mini-card .user-meta {
    min-width: 0;
    flex: 1;
}

.user-mini-card .user-meta strong {
    display: block;
    color: #fff;
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-card .user-meta small {
    display: block;
    color: #98a2b3;
    font-size: .69rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-content {
    margin-left: 268px;
    min-height: 100vh;
}

.topbar {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid rgba(230,234,240,.85);
    background: rgba(255,255,255,.80);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-title {
    font-size: .86rem;
    color: var(--muted);
    margin: 0;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: white;
    color: #344054;
    font-size: .76rem;
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gw-green);
    box-shadow: 0 0 0 4px rgba(37,211,102,.12);
}

.content-wrap {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gs-blue);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.page-title {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2rem);
    letter-spacing: -.035em;
    font-weight: 750;
}

.page-description {
    color: var(--muted);
    margin: 7px 0 0;
    font-size: .91rem;
}

.modern-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

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

.card-head {
    padding: 19px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.card-head-title {
    margin: 0;
    font-size: .96rem;
    font-weight: 700;
}

.card-head-subtitle {
    color: var(--muted);
    font-size: .78rem;
    margin-top: 3px;
}

.card-body-modern {
    padding: 22px;
}

.metric-card {
    height: 100%;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    right: -28px;
    top: -28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37,211,102,.10), rgba(37,99,235,.08));
}

.metric-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--gs-blue);
    background: #eff6ff;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.metric-card.green .metric-icon {
    color: var(--gw-green-dark);
    background: #ecfdf3;
}

.metric-card.purple .metric-icon {
    color: #7c3aed;
    background: #f5f3ff;
}

.metric-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
}

.metric-value {
    margin-top: 3px;
    font-size: 2rem;
    letter-spacing: -.04em;
    font-weight: 760;
}

.metric-foot {
    margin-top: 8px;
    font-size: .72rem;
    color: #98a2b3;
}

.btn-brand {
    border: 0;
    color: #fff;
    font-weight: 650;
    border-radius: 11px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--gs-blue), #1689f8);
    box-shadow: 0 7px 16px rgba(37,99,235,.18);
}

.btn-brand:hover,
.btn-brand:focus {
    color: #fff;
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--gs-blue-dark), var(--gs-blue));
}

.btn-green {
    border: 0;
    color: #fff;
    font-weight: 650;
    border-radius: 11px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--gw-green-dark), var(--gw-green));
    box-shadow: 0 7px 16px rgba(37,211,102,.20);
}

.btn-green:hover,
.btn-green:focus {
    color: #fff;
    transform: translateY(-1px);
}

.btn-soft {
    border: 1px solid var(--border);
    background: #fff;
    color: #344054;
    border-radius: 11px;
    padding: 9px 14px;
    font-weight: 600;
}

.btn-soft:hover {
    background: var(--surface-soft);
    border-color: #d0d5dd;
}

.form-label {
    font-size: .81rem;
    font-weight: 650;
    color: #344054;
    margin-bottom: 7px;
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: #d9dee7;
    border-radius: 11px;
    font-size: .88rem;
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37,99,235,.65);
    box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.form-text {
    color: #98a2b3;
    font-size: .72rem;
}

.input-group .form-control {
    border-radius: 11px 0 0 11px;
}

.input-group .btn {
    border-radius: 0 11px 11px 0;
}

.table-modern {
    margin: 0;
}

.table-modern thead th {
    padding: 13px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    color: #667085;
    font-size: .69rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.table-modern tbody td {
    padding: 15px 18px;
    border-color: #eef1f5;
    vertical-align: middle;
    font-size: .84rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: 0;
}

.table-modern tbody tr:hover {
    background: #fbfcfe;
}

.badge-soft-success,
.badge-soft-warning,
.badge-soft-secondary,
.badge-soft-danger,
.badge-soft-info {
    border-radius: 999px;
    font-size: .69rem;
    padding: 6px 9px;
    font-weight: 700;
}

.badge-soft-success {
    color: #087443;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.badge-soft-warning {
    color: #93370d;
    background: #fffaeb;
    border: 1px solid #fedf89;
}

.badge-soft-secondary {
    color: #475467;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
}

.badge-soft-danger {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.badge-soft-info {
    color: #175cd3;
    background: #eff8ff;
    border: 1px solid #b2ddff;
}

.empty-state {
    padding: 68px 24px;
    text-align: center;
}

.empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37,211,102,.12), rgba(37,99,235,.12));
    color: var(--gs-blue);
    font-size: 1.35rem;
}

.alert {
    border-radius: 12px;
    border-width: 1px;
    font-size: .85rem;
}

.section-note {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #b2ddff;
    border-radius: 12px;
    background: #eff8ff;
    color: #175cd3;
    font-size: .79rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    background: #fff;
}

.login-brand-panel {
    min-height: 100vh;
    padding: 54px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(37,211,102,.22), transparent 22rem),
        radial-gradient(circle at 90% 15%, rgba(37,99,235,.22), transparent 26rem),
        linear-gradient(150deg, #101828 0%, #172554 100%);
    color: #fff;
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    right: -260px;
    bottom: -210px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow:
        0 0 0 60px rgba(255,255,255,.025),
        0 0 0 120px rgba(255,255,255,.018);
}

.login-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.login-brand-logo .brand-symbol {
    width: 46px;
    height: 46px;
}

.login-hero {
    max-width: 650px;
    margin: auto 0;
    position: relative;
    z-index: 1;
}

.login-hero h1 {
    font-size: clamp(2.2rem, 4vw, 4.4rem);
    line-height: .99;
    letter-spacing: -.055em;
    font-weight: 800;
    margin-bottom: 22px;
}

.login-hero h1 span {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-hero p {
    color: #cbd5e1;
    max-width: 520px;
    font-size: 1rem;
    line-height: 1.65;
}

.login-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.055);
    color: #e2e8f0;
    font-size: .76rem;
}

.login-form-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 38px;
    background:
        radial-gradient(circle at 90% 0, rgba(37,211,102,.05), transparent 22rem),
        #fff;
}

.login-form-wrap {
    width: 100%;
    max-width: 430px;
}

.login-form-wrap .eyebrow {
    color: var(--gw-green-dark);
    font-size: .73rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.login-form-wrap h2 {
    font-weight: 780;
    letter-spacing: -.04em;
    margin-bottom: 8px;
}

.login-form-wrap > p {
    color: var(--muted);
    font-size: .88rem;
    margin-bottom: 28px;
}

.login-form-wrap .btn-brand {
    min-height: 46px;
}

.login-footer-note {
    margin-top: 22px;
    color: #98a2b3;
    font-size: .72rem;
    text-align: center;
}

.mobile-topbar {
    display: none;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 20px 0 50px rgba(16,24,40,.20);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-topbar {
        display: inline-flex;
    }

    .content-wrap {
        padding: 22px 18px;
    }

    .topbar {
        padding: 0 18px;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        padding: 24px;
    }
}

@media (max-width: 575.98px) {
    .page-header {
        flex-direction: column;
    }

    .page-header .page-actions,
    .page-header .page-actions .btn {
        width: 100%;
    }

    .topbar-badge {
        display: none;
    }
}


/* V8 - Gerenciar afiliado */
.form-select-sm,
.form-control-sm {
    min-height: 38px;
    border-radius: 10px;
    font-size: .8rem;
}

.page-actions .btn {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 auto;
    }
}


.marketplace-logo-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37,211,102,.12), rgba(37,99,235,.12));
    color: var(--gs-blue);
    font-size: 1.15rem;
    flex: 0 0 auto;
}


/* V12 - Logout mais intuitivo */
.logout-button {
    margin-top: 10px;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 11px;
    border: 1px solid rgba(248,113,113,.18);
    background: rgba(127,29,29,.16);
    color: #fca5a5;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    transition: .18s ease;
}

.logout-button:hover,
.logout-button:focus {
    color: #fff;
    background: rgba(185,28,28,.34);
    border-color: rgba(248,113,113,.34);
    transform: translateY(-1px);
}


/* V21 - API Mercado Livre */
.scope-details {
    max-width: 100%;
}

.scope-summary,
.technical-details > summary {
    cursor: pointer;
    list-style: none;
}

.scope-summary::-webkit-details-marker,
.technical-details > summary::-webkit-details-marker {
    display: none;
}

.scope-summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    font-size: .78rem;
}

.scope-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #f9fafb;
}

.scope-chip {
    display: block;
    margin-bottom: 6px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: .72rem;
}

.ml-result-image {
    width: 64px;
    height: 64px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    color: #98a2b3;
    font-size: 1.25rem;
}

.ml-result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.ml-result-description {
    max-width: 600px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.technical-details > summary {
    color: #2563eb;
    font-size: .78rem;
    font-weight: 600;
}

.min-w-0 {
    min-width: 0;
}


/* V50 - Cookies globais */
.cookie-global-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
    background: #f9fafb;
}

.cookie-global-item > i {
    margin-top: 1px;
    color: #175cd3;
}

.cookie-global-item strong,
.cookie-global-item small {
    display: block;
}

.cookie-global-item strong {
    color: #101828;
    font-size: .76rem;
}

.cookie-global-item small {
    margin-top: 2px;
    color: #667085;
    font-size: .65rem;
    line-height: 1.45;
}

/* ==========================================================
   V55 - Sidebar SuperAdmin + suporte temporário
   ========================================================== */
.sidebar {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.16) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255,255,255,.14);
}

.sidebar-bottom {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 18px;
}

.support-master-key-result {
    padding: 13px;
    border: 1px solid #abefc6;
    border-radius: 12px;
    background: #ecfdf3;
}

.support-master-key-result small {
    color: #475467;
    font-size: .68rem;
    line-height: 1.45;
}

.support-access-history {
    border-top: 1px solid #eaecf0;
    padding-top: 14px;
}

.support-access-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f4f7;
}

.support-access-history-item strong,
.support-access-history-item small {
    display: block;
}

.support-access-history-item strong {
    color: #344054;
    font-size: .72rem;
}

.support-access-history-item small {
    margin-top: 2px;
    color: #667085;
    font-size: .62rem;
}


/* ==========================================================
   V70 - Identidade visual do Super Admin
   ========================================================== */
.brand-logo-image {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.brand-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.login-logo-image {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(2, 8, 23, .22);
}

.login-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.login-form-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: .66rem;
    font-weight: 700;
}

.login-form-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.platform-brand-preview {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #f9fafb;
}

.platform-brand-preview > div:last-child {
    min-width: 0;
}

.platform-brand-preview strong,
.platform-brand-preview small {
    display: block;
}

.platform-brand-preview strong {
    color: #101828;
    font-size: .83rem;
}

.platform-brand-preview small {
    margin-top: 4px;
    color: #667085;
    font-size: .64rem;
}

.platform-logo-preview {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.platform-favicon-preview {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
    color: #2563eb;
    font-size: 1.1rem;
}

.platform-favicon-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}


/* ==========================================================
   V89 - Monitoramento operacional do Super Admin
   ========================================================== */
.monitoring-metric.attention .metric-icon {
    color: #b54708;
    background: #fffaeb;
}

.monitoring-metric.critical .metric-icon {
    color: #b42318;
    background: #fef3f2;
}

.monitor-service-card {
    height: 100%;
    padding: 18px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
}

.monitor-service-card.monitor-service-ok {
    border-color: #abefc6;
    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f6fef9
        );
}

.monitor-service-card.monitor-service-warning {
    border-color: #fedf89;
    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fffcf5
        );
}

.monitor-service-card.monitor-service-critical {
    border-color: #fecdca;
    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fff8f7
        );
}

.monitor-service-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.monitor-service-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eff6ff;
    color: #175cd3;
    font-size: 1rem;
}

.monitor-service-status {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: .64rem;
    font-weight: 700;
}

.monitor-service-ok .monitor-service-status {
    background: #ecfdf3;
    color: #067647;
}

.monitor-service-warning .monitor-service-status {
    background: #fffaeb;
    color: #b54708;
}

.monitor-service-critical .monitor-service-status {
    background: #fef3f2;
    color: #b42318;
}

.monitor-service-card > strong {
    display: block;
    color: #101828;
    font-size: .88rem;
}

.monitor-service-card > p {
    min-height: 38px;
    margin: 5px 0 15px;
    color: #667085;
    font-size: .7rem;
    line-height: 1.5;
}

.monitor-service-meta {
    display: grid;
    grid-template-columns: 1.5fr .75fr .75fr;
    gap: 8px;
}

.monitor-service-meta span {
    min-width: 0;
    padding: 9px;
    border-radius: 10px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(228,231,236,.8);
}

.monitor-service-meta small,
.monitor-service-meta strong {
    display: block;
}

.monitor-service-meta small {
    color: #98a2b3;
    font-size: .56rem;
}

.monitor-service-meta strong {
    margin-top: 2px;
    color: #344054;
    font-size: .67rem;
    overflow-wrap: anywhere;
}

.monitor-service-message {
    margin-top: 10px;
    color: #667085;
    font-size: .62rem;
    line-height: 1.45;
}

.monitor-integration-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #f9fafb;
}

.monitor-integration-row > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.monitor-integration-row strong,
.monitor-integration-row small {
    display: block;
}

.monitor-integration-row strong {
    color: #101828;
    font-size: .76rem;
}

.monitor-integration-row small {
    margin-top: 2px;
    color: #667085;
    font-size: .63rem;
}

.monitor-integration-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eff6ff;
    color: #175cd3;
}

.monitoring-filter-head {
    align-items: flex-end;
}

.monitoring-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.monitoring-filter-form .form-select {
    width: auto;
    min-width: 190px;
}

.monitoring-table td {
    min-width: 130px;
}

.monitoring-table td:first-child {
    min-width: 230px;
}

.monitor-tenant-name strong,
.monitor-tenant-name small {
    display: block;
}

.monitor-tenant-name strong {
    color: #101828;
    font-size: .8rem;
}

.monitor-tenant-name small {
    margin-top: 3px;
    color: #667085;
    font-size: .62rem;
}

.monitor-mini-note {
    margin-top: 6px;
    font-size: .59rem;
    font-weight: 650;
}

.monitor-mini-note.danger {
    color: #b42318;
}

.monitor-mini-note.warning {
    color: #b54708;
}

.monitor-module-summary {
    display: grid;
    gap: 3px;
}

.monitor-module-summary strong {
    color: #344054;
    font-size: .72rem;
}

.monitor-module-summary > span {
    color: #667085;
    font-size: .62rem;
}

.monitor-module-summary small {
    color: #98a2b3;
    font-size: .57rem;
    white-space: nowrap;
}

.monitor-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.monitor-issues-list {
    display: grid;
}

.monitor-issue {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: start;
    padding: 15px 18px;
    border-bottom: 1px solid #eef1f5;
}

.monitor-issue:last-child {
    border-bottom: 0;
}

.monitor-issue:hover {
    background: #fbfcfe;
}

.monitor-issue-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fffaeb;
    color: #b54708;
}

.monitor-issue.critical .monitor-issue-icon {
    background: #fef3f2;
    color: #b42318;
}

.monitor-issue-content {
    min-width: 0;
}

.monitor-issue-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.monitor-issue-head > div {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

.monitor-issue-head strong {
    color: #101828;
    font-size: .73rem;
}

.monitor-issue-head span {
    color: #667085;
    font-size: .65rem;
}

.monitor-issue-head time {
    flex: 0 0 auto;
    color: #98a2b3;
    font-size: .59rem;
}

.monitor-issue-object {
    margin-top: 3px;
    color: #475467;
    font-size: .66rem;
    font-weight: 650;
}

.monitor-issue p {
    margin: 5px 0 0;
    color: #667085;
    font-size: .66rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.monitoring-empty-ok .empty-icon {
    background: #ecfdf3;
    color: #067647;
}

@media (max-width: 991.98px) {
    .monitoring-filter-head {
        align-items: stretch;
        flex-direction: column;
    }

    .monitoring-filter-form {
        width: 100%;
    }

    .monitoring-filter-form .form-select {
        flex: 1 1 220px;
        width: 100%;
        min-width: 0;
    }

    .monitor-service-meta {
        grid-template-columns: 1fr 1fr;
    }

    .monitor-service-meta span:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .monitor-integration-row {
        align-items: stretch;
        flex-direction: column;
    }

    .monitor-issue {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .monitor-issue > .btn {
        grid-column: 2;
        justify-self: start;
    }

    .monitor-issue-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* ==========================================================
   V94 - Inteligência Artificial
   ========================================================== */
.ai-current-config {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #abefc6;
    border-radius: 14px;
    background: #f6fef9;
}

.ai-current-config > div {
    min-width: 0;
    flex: 1;
}

.ai-current-config strong,
.ai-current-config small {
    display: block;
}

.ai-current-config strong {
    color: #101828;
    font-size: .82rem;
}

.ai-current-config small {
    margin-top: 2px;
    color: #667085;
    font-size: .64rem;
}

.ai-current-icon,
.ai-provider-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #eff6ff;
    color: #175cd3;
    flex: 0 0 auto;
}

.ai-model-card {
    height: 100%;
    padding: 16px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
}

.ai-model-new {
    border-style: dashed;
    background: #fbfcfe;
}

.ai-plan-limits {
    margin-top: 4px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e4e7ec;
    background: #f9fafb;
}

.ai-tenant-super-status {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
}

.ai-tenant-super-status strong {
    color: #344054;
    font-size: .67rem;
    line-height: 1.45;
}

.ai-tenant-super-status small {
    color: #667085;
    font-size: .6rem;
}

/* ==========================================================
   V95 - Sincronização de modelos de IA por API
   ========================================================== */
.ai-provider-actions {
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-provider-sync-box {
    display: grid;
    grid-template-columns: 1.3fr .85fr auto;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #f9fafb;
}

.ai-provider-sync-box > div:not(.ai-provider-sync-status) {
    display: grid;
    gap: 2px;
}

.ai-provider-sync-label {
    color: #667085;
    font-size: .68rem;
}

.ai-provider-sync-box strong {
    color: #101828;
    font-size: .76rem;
}

.ai-provider-sync-status {
    justify-self: end;
}

.ai-catalog-panel {
    height: 100%;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.ai-catalog-head,
.ai-catalog-toolbar,
.ai-catalog-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.ai-catalog-head {
    justify-content: space-between;
    border-bottom: 1px solid #eaecf0;
    background: #fcfcfd;
}

.ai-catalog-head > div {
    display: grid;
    gap: 2px;
}

.ai-catalog-head strong {
    color: #101828;
    font-size: .86rem;
}

.ai-catalog-head small {
    color: #667085;
    font-size: .66rem;
}

.ai-catalog-toolbar {
    min-height: 50px;
    border-bottom: 1px solid #f2f4f7;
}

.ai-catalog-list {
    max-height: 430px;
    overflow: auto;
}

.ai-catalog-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 11px 14px;
    border-bottom: 1px solid #f2f4f7;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.ai-catalog-row:hover {
    background: #f9fafb;
}

.ai-catalog-row:last-child {
    border-bottom: 0;
}

.ai-catalog-row.is-other {
    background: #fcfcfd;
}

.ai-catalog-check {
    padding-top: 2px;
}

.ai-catalog-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ai-catalog-main strong {
    color: #101828;
    font-size: .76rem;
}

.ai-catalog-main code {
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #344054;
    font-size: .65rem;
    background: #f2f4f7;
    padding: 2px 5px;
    border-radius: 5px;
}

.ai-catalog-main small {
    color: #667085;
    font-size: .62rem;
    line-height: 1.4;
}

.ai-catalog-meta {
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.ai-catalog-meta small {
    color: #667085;
    font-size: .58rem;
}

.ai-catalog-footer {
    justify-content: space-between;
    border-top: 1px solid #eaecf0;
    background: #fcfcfd;
}

.ai-catalog-default {
    flex: 1 1 260px;
    max-width: 360px;
}

.ai-catalog-submit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-catalog-submit small {
    color: #667085;
    white-space: nowrap;
}

.ai-catalog-empty {
    min-height: 210px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: #667085;
}

.ai-catalog-empty i {
    font-size: 1.5rem;
}

.ai-catalog-empty strong {
    color: #344054;
    font-size: .78rem;
}

.ai-catalog-empty span {
    max-width: 330px;
    font-size: .66rem;
    line-height: 1.5;
}

@media (max-width: 767.98px) {
    .ai-provider-sync-box {
        grid-template-columns: 1fr;
    }

    .ai-provider-sync-status {
        justify-self: start;
    }

    .ai-catalog-row {
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .ai-catalog-meta {
        grid-column: 2;
        min-width: 0;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ai-catalog-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-catalog-default {
        max-width: none;
    }

    .ai-catalog-submit {
        justify-content: space-between;
    }
}


/* ==========================================================
   V96 - Gestão de afiliado: layout organizado
   ========================================================== */
.tenant-manage-sections {
    width: 100%;
}

.tenant-manage-sections > .row:last-child {
    margin-bottom: 0;
}

.tenant-manage-sections .modern-card {
    margin-bottom: 0 !important;
}

.tenant-manage-sections .card-head {
    min-height: 68px;
}

.tenant-manage-sections .section-note {
    margin-top: 14px;
}

@media (min-width: 1400px) {
    /*
     * A tela de gestão possui muitos controles.
     * Nela aproveitamos toda a largura útil do Super Admin,
     * sem criar uma faixa vazia desnecessária por centralização.
     */
    .content-wrap.tenant-manage-content {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 1199.98px) {
    .tenant-manage-sections > .row {
        row-gap: 20px;
    }
}


/* ==========================================================
   V100 - Arquitetura de marketplaces
   ========================================================== */
.marketplace-architecture-note {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.marketplace-architecture-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 14px;
    border: 1px solid #e4e7ec;
    border-radius: 13px;
    background: #fff;
}

.marketplace-architecture-item > i {
    color: #2563eb;
    font-size: 1rem;
}

.marketplace-architecture-item > div {
    display: grid;
    gap: 2px;
}

.marketplace-architecture-item strong {
    color: #101828;
    font-size: .75rem;
}

.marketplace-architecture-item span {
    color: #667085;
    font-size: .64rem;
    line-height: 1.4;
}

.marketplace-platform-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
}

.marketplace-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.marketplace-meta-grid > div {
    padding: 9px 10px;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #fcfcfd;
    display: grid;
    gap: 2px;
}

.marketplace-meta-grid small {
    color: #667085;
    font-size: .58rem;
}

.marketplace-meta-grid strong {
    color: #101828;
    font-size: .68rem;
}

.marketplace-platform-config {
    padding: 13px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #f9fafb;
}

.plan-marketplace-option {
    width: 100%;
    min-height: 78px;
    padding: 12px 13px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.plan-marketplace-option:hover {
    background: #f9fafb;
    border-color: #b2ccff;
}

.plan-marketplace-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.plan-marketplace-main strong {
    color: #101828;
    font-size: .76rem;
}

.plan-marketplace-main small {
    color: #667085;
    font-size: .62rem;
    line-height: 1.4;
}

@media (max-width: 991.98px) {
    .marketplace-architecture-note {
        grid-template-columns: 1fr;
    }

    .marketplace-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .plan-marketplace-option {
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .plan-marketplace-option > .badge-soft-info {
        grid-column: 2;
        width: fit-content;
    }
}



/* ==========================================================
   V103 - Meta Integration Hub / planos sociais
   ========================================================== */
.meta-copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.meta-copy-field .form-control {
    min-width: 0;
}

.meta-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.meta-scope-option {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
    background: #fcfcfd;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.meta-scope-option span {
    color: #344054;
    font-size: .68rem;
    overflow-wrap: anywhere;
}

.plan-social-option {
    min-height: 150px;
    padding: 13px;
    border: 1px solid #e4e7ec;
    border-radius: 13px;
    background: #fff;
    display: grid;
    gap: 12px;
}

.plan-social-main {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    cursor: pointer;
}

.plan-social-main > span {
    display: grid;
    gap: 3px;
}

.plan-social-main strong {
    color: #101828;
    font-size: .78rem;
}

.plan-social-main small {
    color: #667085;
    font-size: .62rem;
    line-height: 1.45;
}

.plan-social-permissions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.plan-social-permissions .form-check-label {
    font-size: .68rem;
}

@media (max-width: 767.98px) {
    .meta-scope-grid {
        grid-template-columns: 1fr;
    }

    .meta-copy-field {
        grid-template-columns: 1fr;
    }
}
