/* ==========================================================================
   MHSYS OS — Componente Unificado de Cards Enxutos & Modal Detalhado de Planos
   Compatível com Landing Page Institucional (Tailwind) e LPs de Nichos (Bootstrap 5)
   Suporte integral Dark Mode & Light Mode + Responsividade Mobile (360px+)
   ========================================================================== */

.mh-plan-card-equal {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

.mh-plan-subtitle-clamp {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 2.7em !important;
    max-height: 2.8em !important;
    line-height: 1.38 !important;
}

/* ---------- Bloco Compacto de Prévia no Card ---------- */
.mh-plan-preview-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.mh-plan-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.mh-plan-preview-heading-count {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.14);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.28);
    letter-spacing: 0.02em;
    text-transform: none;
}

.mh-plan-modulos-preview-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.mh-plan-modulos-preview-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.81rem;
    line-height: 1.3;
    color: #e2e8f0;
    min-width: 0;
}

.mh-plan-modulos-preview-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    flex-shrink: 0;
}

.mh-plan-modulos-preview-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* ---------- Faixa Compacta de Aplicativos / Plugins Inclusos ---------- */
.mh-plan-apps-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mh-plan-apps-strip:hover {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.mh-plan-apps-avatars {
    display: flex;
    align-items: center;
    min-width: 0;
}

.mh-plan-app-mini {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #1e293b;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: -5px;
    color: #38bdf8;
    font-size: 0.78rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.mh-plan-app-mini:first-child {
    margin-left: 0;
}

.mh-plan-app-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mh-plan-apps-more-pill {
    font-size: 0.71rem;
    font-weight: 700;
    color: #38bdf8;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ---------- Botão Interativo de Expansão Total + Atalho Tabela ---------- */
.mh-btn-ver-tudo-plano {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.58rem 0.85rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(99, 102, 241, 0.12));
    border: 1px solid rgba(56, 189, 248, 0.32);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.mh-btn-ver-tudo-plano:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.26));
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.18);
    transform: translateY(-1px);
}

.mh-btn-ver-tudo-left {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.mh-btn-ver-tudo-left span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mh-link-comparar-tabela {
    background: transparent;
    border: none;
    padding: 0.15rem 0;
    margin: 0 auto;
    font-size: 0.73rem;
    font-weight: 600;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: color 0.18s ease;
    text-decoration: none;
}

.mh-link-comparar-tabela:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ==========================================================================
   MODAL CANÔNICO DETALHADO (#modalDetalhesCompletosPlano — Largura modal-lg)
   ========================================================================== */
.mh-modal-detalhes-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100050;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    opacity: 0;
    transition: opacity 0.22s ease;
    box-sizing: border-box;
}

.mh-modal-detalhes-backdrop.is-open {
    display: flex;
    opacity: 1;
}

.mh-modal-detalhes-dialog {
    width: 100%;
    max-width: 850px; /* Largura canônica modal-lg do MHSYS OS */
    max-height: min(88vh, 780px);
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.72);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.22s ease;
    box-sizing: border-box;
    color: #f8fafc;
}

.mh-modal-detalhes-backdrop.is-open .mh-modal-detalhes-dialog {
    transform: translateY(0) scale(1);
}

/* Header */
.mh-modal-detalhes-header {
    padding: 1.1rem 1.35rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.9) 100%);
    flex-shrink: 0;
}

.mh-modal-header-main {
    min-width: 0;
    flex: 1;
}

.mh-modal-badges-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.mh-modal-plan-badge {
    font-size: 0.67rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.16);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.35);
}

.mh-modal-cycle-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mh-modal-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.65rem;
}

.mh-modal-plan-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    color: #ffffff;
    line-height: 1.2;
}

.mh-modal-plan-price {
    font-size: 1.12rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #38bdf8;
    white-space: nowrap;
}

.mh-modal-plan-price small {
    font-size: 0.74rem;
    font-weight: 500;
    color: #94a3b8;
}

.mh-modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.mh-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

/* Barra de Abas Canônica (.modal-tabs-estavel) + Filtro Rápido */
.mh-modal-toolbar {
    padding: 0.75rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    background: rgba(15, 23, 42, 0.96);
    flex-shrink: 0;
}

.mh-modal-tabs-estavel {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.5rem;
    max-width: 100%;
    padding-bottom: 0;
}

.mh-modal-tabs-estavel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.mh-tab-label-desktop {
    display: inline;
}

.mh-tab-label-mobile {
    display: none;
}

.mh-modal-tab-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    border-radius: 999px;
    padding: 0.42rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(30, 41, 59, 0.65);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mh-modal-tab-pill:hover {
    border-color: rgba(56, 189, 248, 0.45);
    color: #ffffff;
}

.mh-modal-tab-pill.active {
    background: rgba(2, 132, 199, 0.22);
    border-color: #0284c7;
    color: #38bdf8;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.18);
}

.mh-modal-tab-count {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

.mh-modal-search-wrap {
    position: relative;
    flex: 1 1 210px;
    max-width: 260px;
    min-width: 180px;
}

.mh-modal-search-wrap i {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    color: #64748b;
    pointer-events: none;
}

.mh-modal-search-input {
    width: 100%;
    height: 34px;
    padding: 0.28rem 0.65rem 0.28rem 2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(30, 41, 59, 0.7);
    color: #f8fafc;
    font-size: 0.8rem;
    outline: none;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.mh-modal-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

/* Corpo com Rolagem Interna Blindada (Anti-Scroll Horizontal) */
.mh-modal-detalhes-body {
    flex: 1 1 auto;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding: 1.1rem 1.35rem;
}

.mh-modal-category-block {
    margin-bottom: 1.25rem;
}

.mh-modal-category-block:last-child {
    margin-bottom: 0;
}

.mh-modal-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mh-modal-category-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
}

.mh-modal-category-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
}

.mh-modal-items-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.mh-modal-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.68rem 0.8rem;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.07);
    min-width: 0;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.mh-modal-feature-card:hover {
    border-color: rgba(56, 189, 248, 0.32);
    background: rgba(30, 41, 59, 0.82);
}

.mh-modal-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.24);
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    overflow: hidden;
}

.mh-modal-feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mh-modal-feature-content {
    min-width: 0;
    flex: 1;
}

.mh-modal-feature-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

.mh-modal-feature-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-modal-plugin-tag {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.28);
    flex-shrink: 0;
    white-space: nowrap;
}

.mh-modal-feature-desc {
    margin: 0;
    font-size: 0.73rem;
    line-height: 1.35;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rodapé Fixo de Conversão */
.mh-modal-detalhes-footer {
    padding: 0.9rem 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.98);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mh-modal-footer-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.mh-modal-footer-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.mh-modal-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.mh-modal-btn-secondary {
    padding: 0.52rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mh-modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.mh-modal-btn-cta {
    padding: 0.58rem 1.3rem;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 700;
    border: none;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.mh-modal-btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.5);
    filter: brightness(1.06);
}

/* ==========================================================================
   MODO CLARO (LIGHT MODE — body.light-mode / html.light-mode / [data-theme="light"])
   ========================================================================== */
body.light-mode .mh-plan-preview-section,
html.light-mode .mh-plan-preview-section,
[data-theme="light"] .mh-plan-preview-section {
    border-top-color: rgba(15, 23, 42, 0.09);
}

body.light-mode .mh-plan-preview-heading,
html.light-mode .mh-plan-preview-heading,
[data-theme="light"] .mh-plan-preview-heading {
    color: #475569;
}

body.light-mode .mh-plan-preview-heading-count,
html.light-mode .mh-plan-preview-heading-count,
[data-theme="light"] .mh-plan-preview-heading-count {
    background: rgba(2, 132, 199, 0.1);
    color: #0369a1;
    border-color: rgba(2, 132, 199, 0.25);
}

body.light-mode .mh-plan-modulos-preview-item,
html.light-mode .mh-plan-modulos-preview-item,
[data-theme="light"] .mh-plan-modulos-preview-item {
    color: #1e293b;
}

body.light-mode .mh-plan-modulos-preview-icon,
html.light-mode .mh-plan-modulos-preview-icon,
[data-theme="light"] .mh-plan-modulos-preview-icon {
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.22);
    color: #0284c7;
}

body.light-mode .mh-plan-apps-strip,
html.light-mode .mh-plan-apps-strip,
[data-theme="light"] .mh-plan-apps-strip {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .mh-plan-apps-strip:hover,
html.light-mode .mh-plan-apps-strip:hover,
[data-theme="light"] .mh-plan-apps-strip:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
}

body.light-mode .mh-plan-app-mini,
html.light-mode .mh-plan-app-mini,
[data-theme="light"] .mh-plan-app-mini {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0284c7;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
}

body.light-mode .mh-plan-apps-more-pill,
html.light-mode .mh-plan-apps-more-pill,
[data-theme="light"] .mh-plan-apps-more-pill {
    color: #0369a1;
}

body.light-mode .mh-btn-ver-tudo-plano,
html.light-mode .mh-btn-ver-tudo-plano,
[data-theme="light"] .mh-btn-ver-tudo-plano {
    color: #0369a1;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.09), rgba(79, 70, 229, 0.07));
    border-color: rgba(2, 132, 199, 0.3);
}

body.light-mode .mh-btn-ver-tudo-plano:hover,
html.light-mode .mh-btn-ver-tudo-plano:hover,
[data-theme="light"] .mh-btn-ver-tudo-plano:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    border-color: #0284c7;
}

body.light-mode .mh-link-comparar-tabela,
html.light-mode .mh-link-comparar-tabela,
[data-theme="light"] .mh-link-comparar-tabela {
    color: #64748b;
}

body.light-mode .mh-link-comparar-tabela:hover,
html.light-mode .mh-link-comparar-tabela:hover,
[data-theme="light"] .mh-link-comparar-tabela:hover {
    color: #0284c7;
}

body.light-mode .mh-modal-detalhes-dialog,
html.light-mode .mh-modal-detalhes-dialog,
[data-theme="light"] .mh-modal-detalhes-dialog {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.25);
}

body.light-mode .mh-modal-detalhes-header,
html.light-mode .mh-modal-detalhes-header,
[data-theme="light"] .mh-modal-detalhes-header {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom-color: #e2e8f0;
}

body.light-mode .mh-modal-plan-title,
html.light-mode .mh-modal-plan-title,
[data-theme="light"] .mh-modal-plan-title {
    color: #0f172a;
}

body.light-mode .mh-modal-plan-price,
html.light-mode .mh-modal-plan-price,
[data-theme="light"] .mh-modal-plan-price {
    color: #0284c7;
}

body.light-mode .mh-modal-plan-badge,
html.light-mode .mh-modal-plan-badge,
[data-theme="light"] .mh-modal-plan-badge {
    background: rgba(2, 132, 199, 0.1);
    color: #0369a1;
    border-color: rgba(2, 132, 199, 0.28);
}

body.light-mode .mh-modal-cycle-pill,
html.light-mode .mh-modal-cycle-pill,
[data-theme="light"] .mh-modal-cycle-pill {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.28);
}

body.light-mode .mh-modal-close-btn,
html.light-mode .mh-modal-close-btn,
[data-theme="light"] .mh-modal-close-btn {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

body.light-mode .mh-modal-toolbar,
html.light-mode .mh-modal-toolbar,
[data-theme="light"] .mh-modal-toolbar {
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}

body.light-mode .mh-modal-tab-pill,
html.light-mode .mh-modal-tab-pill,
[data-theme="light"] .mh-modal-tab-pill {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

body.light-mode .mh-modal-tab-pill.active,
html.light-mode .mh-modal-tab-pill.active,
[data-theme="light"] .mh-modal-tab-pill.active {
    background: rgba(2, 132, 199, 0.12);
    border-color: #0284c7;
    color: #0284c7;
}

body.light-mode .mh-modal-tab-count,
html.light-mode .mh-modal-tab-count,
[data-theme="light"] .mh-modal-tab-count {
    background: rgba(15, 23, 42, 0.07);
}

body.light-mode .mh-modal-search-input,
html.light-mode .mh-modal-search-input,
[data-theme="light"] .mh-modal-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.light-mode .mh-modal-category-header,
html.light-mode .mh-modal-category-header,
[data-theme="light"] .mh-modal-category-header {
    border-bottom-color: #e2e8f0;
}

body.light-mode .mh-modal-category-title,
html.light-mode .mh-modal-category-title,
[data-theme="light"] .mh-modal-category-title {
    color: #0f172a;
}

body.light-mode .mh-modal-category-badge,
html.light-mode .mh-modal-category-badge,
[data-theme="light"] .mh-modal-category-badge {
    background: #f1f5f9;
    color: #475569;
}

body.light-mode .mh-modal-feature-card,
html.light-mode .mh-modal-feature-card,
[data-theme="light"] .mh-modal-feature-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .mh-modal-feature-card:hover,
html.light-mode .mh-modal-feature-card:hover,
[data-theme="light"] .mh-modal-feature-card:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
}

body.light-mode .mh-modal-feature-name,
html.light-mode .mh-modal-feature-name,
[data-theme="light"] .mh-modal-feature-name {
    color: #0f172a;
}

body.light-mode .mh-modal-feature-desc,
html.light-mode .mh-modal-feature-desc,
[data-theme="light"] .mh-modal-feature-desc {
    color: #475569;
}

body.light-mode .mh-modal-plugin-tag,
html.light-mode .mh-modal-plugin-tag,
[data-theme="light"] .mh-modal-plugin-tag {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}

body.light-mode .mh-modal-detalhes-footer,
html.light-mode .mh-modal-detalhes-footer,
[data-theme="light"] .mh-modal-detalhes-footer {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}

body.light-mode .mh-modal-footer-trust,
html.light-mode .mh-modal-footer-trust,
[data-theme="light"] .mh-modal-footer-trust {
    color: #475569;
}

body.light-mode .mh-modal-btn-secondary,
html.light-mode .mh-modal-btn-secondary,
[data-theme="light"] .mh-modal-btn-secondary {
    border-color: #cbd5e1;
    color: #334155;
}

body.light-mode .mh-modal-btn-secondary:hover,
html.light-mode .mh-modal-btn-secondary:hover,
[data-theme="light"] .mh-modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ==========================================================================
   RESPONSIVIDADE MOBILE (360px / 375px / < 640px)
   ========================================================================== */
@media (max-width: 640px) {
    .mh-modal-detalhes-backdrop {
        padding: 0.45rem;
        align-items: flex-end;
    }

    .mh-modal-detalhes-dialog {
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 18px 18px 14px 14px;
    }

    .mh-modal-detalhes-header {
        padding: 0.85rem 0.95rem 0.7rem;
        gap: 0.65rem;
    }

    .mh-modal-plan-title {
        font-size: 1.08rem;
    }

    .mh-modal-plan-price {
        font-size: 1rem;
    }

    .mh-modal-toolbar {
        padding: 0.65rem 0.9rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }

    .mh-modal-tabs-estavel {
        width: 100% !important;
        max-width: 100% !important;
        gap: 0.4rem !important;
        padding-bottom: 0 !important;
    }

    .mh-tab-label-desktop {
        display: none !important;
    }

    .mh-tab-label-mobile {
        display: inline !important;
    }

    .mh-modal-tab-pill {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        justify-content: center !important;
        padding: 0.46rem 0.5rem !important;
        font-size: 0.75rem !important;
        gap: 0.34rem !important;
    }

    .mh-modal-tab-count {
        font-size: 0.66rem;
        padding: 0.06rem 0.4rem;
        flex-shrink: 0;
    }

    .mh-modal-search-wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }

    .mh-modal-search-input {
        height: 36px;
        font-size: 16px !important;
    }

    .mh-btn-ver-tudo-plano {
        padding: 0.56rem 0.72rem;
        font-size: 0.75rem;
    }

    .mh-btn-ver-tudo-left span {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.25;
    }

    .mh-modal-detalhes-body {
        padding: 0.85rem 0.95rem;
    }

    .mh-modal-category-title {
        font-size: 0.8rem;
    }

    .mh-modal-items-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mh-modal-detalhes-footer {
        padding: 0.7rem 0.9rem;
    }

    .mh-modal-footer-trust {
        display: none;
    }

    .mh-modal-footer-actions {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .mh-modal-btn-secondary {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mh-modal-btn-cta {
        flex: 1;
        justify-content: center;
        padding: 0.54rem 0.85rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
}


/* ==========================================================================
   INTEGRAÇÃO APPSTORE MHSYS — CARDS, BANNER LP & MODAL (DARK + LIGHT + MOBILE)
   ========================================================================== */
.mh-card-appstore-note {
    margin-top: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px dashed rgba(56, 189, 248, 0.28);
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #cbd5e1;
}

.mh-card-appstore-icon {
    color: #38bdf8;
    font-size: 0.82rem;
    margin-top: 0.08rem;
    flex-shrink: 0;
}

.mh-card-appstore-note a {
    color: #38bdf8;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mh-card-appstore-note a:hover {
    color: #7dd3fc;
}

.mh-lp-appstore-callout {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.10) 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #e2e8f0;
    font-size: 0.86rem;
    line-height: 1.5;
}

.mh-lp-appstore-callout a.mh-lp-appstore-link {
    color: #38bdf8;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mh-lp-appstore-callout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.mh-lp-appstore-callout-btn:hover {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
}

.mh-modal-appstore-banner {
    margin-top: 1.25rem;
    padding: 0.9rem 1.05rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.mh-modal-appstore-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.mh-modal-appstore-banner-text {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.mh-modal-appstore-banner-text a {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mh-modal-appstore-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: #0284c7;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mh-modal-appstore-banner-cta:hover {
    background: #0369a1;
}

body.light-mode .mh-card-appstore-note,
html.light-mode .mh-card-appstore-note,
[data-theme="light"] .mh-card-appstore-note {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #334155;
}

body.light-mode .mh-card-appstore-note a,
html.light-mode .mh-card-appstore-note a,
[data-theme="light"] .mh-card-appstore-note a,
body.light-mode .mh-card-appstore-icon,
html.light-mode .mh-card-appstore-icon,
[data-theme="light"] .mh-card-appstore-icon {
    color: #0284c7;
}

body.light-mode .mh-lp-appstore-callout,
html.light-mode .mh-lp-appstore-callout,
[data-theme="light"] .mh-lp-appstore-callout {
    background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%);
    border-color: #bae6fd;
    color: #1e293b;
}

body.light-mode .mh-lp-appstore-callout a.mh-lp-appstore-link,
html.light-mode .mh-lp-appstore-callout a.mh-lp-appstore-link,
[data-theme="light"] .mh-lp-appstore-callout a.mh-lp-appstore-link {
    color: #0284c7;
}

body.light-mode .mh-lp-appstore-callout-btn,
html.light-mode .mh-lp-appstore-callout-btn,
[data-theme="light"] .mh-lp-appstore-callout-btn {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

body.light-mode .mh-modal-appstore-banner,
html.light-mode .mh-modal-appstore-banner,
[data-theme="light"] .mh-modal-appstore-banner {
    background: #f0f9ff;
    border-color: #bae6fd;
}

body.light-mode .mh-modal-appstore-banner-icon,
html.light-mode .mh-modal-appstore-banner-icon,
[data-theme="light"] .mh-modal-appstore-banner-icon {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}

body.light-mode .mh-modal-appstore-banner-text,
html.light-mode .mh-modal-appstore-banner-text,
[data-theme="light"] .mh-modal-appstore-banner-text {
    color: #334155;
}

body.light-mode .mh-modal-appstore-banner-text a,
html.light-mode .mh-modal-appstore-banner-text a,
[data-theme="light"] .mh-modal-appstore-banner-text a {
    color: #0284c7;
}

@media (max-width: 640px) {
    .mh-lp-appstore-callout,
    .mh-modal-appstore-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .mh-lp-appstore-callout-btn,
    .mh-modal-appstore-banner-cta {
        width: 100%;
        justify-content: center;
    }
}