/**
 * ZaltScreen Admin - Estilos do Painel SuperAdmin Master
 */

body.admin-body {
    background-color: #04060b;
}

/* Identidade visual em destaque Roxo/Ãndigo para o SuperAdmin */
.admin-banner-side {
    background: radial-gradient(circle at 10% 20%, #4c1d95 0%, #090d16 90%);
}

.master-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 20px;
    color: #c7d2fe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* CorreÃ§Ã£o de alinhamento do Topbar Logo no Admin */
.admin-body .topbar-logo {
    width: 260px;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    border-right: 1px solid var(--border);
}

.admin-body .topbar-logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.admin-body .topbar-center {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
}

.master-topbar-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

/* BotÃ£o Ver Site na Topbar */
.btn-ver-site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-ver-site:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Badges de Status da LicenÃ§a na Tabela */
.btn-status-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-status-pill.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.btn-status-pill.inadimplente {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.btn-status-pill.desativado {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Cores vibrantes nos Ãcones da Sidebar do Admin Master */
.sidebar-nav .nav-item i {
    font-size: 1.05rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-nav .nav-item .fa-building-user { color: #a78bfa !important; }
.sidebar-nav .nav-item .fa-tags { color: #f59e0b !important; }
.sidebar-nav .nav-item .fa-tv { color: #38bdf8 !important; }
.sidebar-nav .nav-item .fa-bullhorn { color: #fbbf24 !important; }
.sidebar-nav .nav-item .fa-hard-drive { color: #f472b6 !important; }
.sidebar-nav .nav-item .fa-shield-halved { color: #34d399 !important; }
.sidebar-nav .nav-item .fa-gear { color: #c084fc !important; }
.sidebar-nav .nav-item .fa-arrow-right-to-bracket { color: #9ca3af !important; }

.sidebar-nav .nav-item:hover i {
    transform: scale(1.15);
}

.master-topbar-badge i {
    color: #fbbf24 !important;
}

/* BotÃµes de AÃ§Ã£o na Tabela AÃ§Ãµes Master (Visual Colorido Premium) */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.92rem;
}

.action-btn.impersonate {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
    color: #a78bfa;
}

.action-btn.impersonate:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.action-btn.view {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.action-btn.view:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #f59e0b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.action-btn.edit {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
}

.action-btn.edit:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.action-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.action-btn.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.action-btn.success:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Botão em formato de Pílula para Ações com Texto */
.btn-pill-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    height: 34px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    background: rgba(139, 92, 246, 0.15) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    color: #a78bfa !important;
}

.btn-pill-action:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    border-color: #8b5cf6 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

/* Modal Glassmorphic Master */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 550px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-card {
    transform: translateY(0);
}

.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1rem;
}

/* â”€â”€ ESTILOS RESTAURADOS PARA O ADMIN MASTER â”€â”€ */

/* Grid de EstatÃ­sticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card[onclick]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -2px rgba(124, 58, 237, 0.25);
    border-color: rgba(139, 92, 246, 0.4);
}

.btn-filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #94a3b8);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-filter-pill:hover, .btn-filter-pill.active {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: #ffffff;
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.25);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.card-purple::before { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.card-green::before { background: linear-gradient(90deg, #10B981, #34D399); }
.card-amber::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.card-blue::before { background: linear-gradient(90deg, #3B82F6, #60A5FA); }

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.stat-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: #E2E8F0;
    align-self: flex-start;
}

.card-purple .stat-card-pill { background: rgba(139, 92, 246, 0.15); color: #C4B5FD; }
.card-green .stat-card-pill { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; }
.card-amber .stat-card-pill { background: rgba(245, 158, 11, 0.15); color: #FCD34D; }
.card-blue .stat-card-pill { background: rgba(59, 130, 246, 0.15); color: #93C5FD; }

.stat-card-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.card-purple .stat-card-icon-box { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.card-green .stat-card-icon-box { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.card-amber .stat-card-icon-box { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.card-blue .stat-card-icon-box { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }

.stat-card-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #F8FAFC;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card-footer {
    font-size: 0.75rem;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tabelas */
.admin-table-container {
    background: #141A28;
    border: 1px solid #1E293B;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #1E293B;
}

.admin-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #1E293B;
    color: #F8FAFC;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.empresa-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.empresa-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #0F1523;
    padding: 4px;
    border: 1px solid #1E293B;
}

.empresa-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #1E293B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #94A3B8;
    font-weight: 700;
}

.empresa-nome {
    font-weight: 600;
    font-size: 1rem;
    color: #F8FAFC;
}

.empresa-cnpj {
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 2px;
}

.gestor-info {
    display: flex;
    flex-direction: column;
}

.gestor-nome {
    font-weight: 500;
    color: #E2E8F0;
}

.gestor-email {
    font-size: 0.8rem;
    color: #3B82F6;
    text-decoration: none;
}

.telas-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #60A5FA;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-ativo { background: rgba(16, 185, 129, 0.1); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-inativo { background: rgba(239, 68, 68, 0.1); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.status-pendente { background: rgba(245, 158, 11, 0.1); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.2); }

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon:hover {
    color: #F8FAFC;
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon.danger:hover {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal,
.modal-close,
.modal-close-round {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
    font-size: 1.1rem !important;
    font-family: inherit !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    line-height: 1 !important;
    outline: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.btn-close-modal:hover,
.modal-close:hover,
.modal-close-round:hover {
    color: #ffffff !important;
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    transform: scale(1.1);
}

/* EstilizaÃ§Ã£o Completa dos Campos dos FormulÃ¡rios (Form Controls & Buttons) */
.admin-body .form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.admin-body select.form-control {
    background-color: rgba(0, 0, 0, 0.45);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="%239ca3af" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m2 5 6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
}

.admin-body .form-control:focus {
    border-color: #818cf8;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.admin-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.admin-body .btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}/* =========================================================================
   TOOLTIP CUSTOMIZADO MASTER
   ========================================================================= */
.master-tooltip {
    position: absolute;
    background: #1e293b;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateY(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.master-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.master-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
/* Grid de Cards de Planos */
.planos-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.plano-card {
    background: #111827;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    overflow: hidden;
}
.plano-card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.4); box-shadow: 0 15px 35px rgba(124,58,237,.2); }
.plano-card.destaque { border: 2px solid #8b5cf6; background: linear-gradient(180deg,rgba(139,92,246,.1) 0%,#111827 100%); }
.plano-badge-popular { position: absolute; top: 16px; right: 16px; background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; font-size: .7rem; font-weight: 800; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; box-shadow: 0 2px 8px rgba(245,158,11,.4); display: flex; align-items: center; gap: 4px; }
.plano-badge-promo { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: #f87171; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.plano-title { font-family: 'Outfit',sans-serif; font-size: 1.35rem; font-weight: 700; color: #fff; margin: 0 0 4px 0; }
.plano-desc { font-size: .83rem; color: #9ca3af; margin-bottom: 1.25rem; min-height: 38px; }
.plano-preco-box { background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); border-radius: 14px; padding: 1.2rem; margin-bottom: 1.25rem; }
.plano-preco-val { font-family: 'Outfit',sans-serif; font-size: 2.1rem; font-weight: 800; color: #fff; line-height: 1; }
.plano-preco-de { font-size: .85rem; color: #6b7280; text-decoration: line-through; margin-right: 6px; }
.plano-freq-badge { font-size: .75rem; color: #a78bfa; font-weight: 600; text-transform: uppercase; }
.plano-specs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 1.25rem; }
.plano-spec-pill { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px 6px; text-align: center; }
.plano-spec-pill i { font-size: .95rem; margin-bottom: 3px; display: block; }
.plano-spec-pill span { font-size: .7rem; color: #9ca3af; display: block; }
.plano-spec-pill strong { font-size: .85rem; color: #fff; display: block; }
.plano-recursos-list { list-style: none; padding: 0; margin: 0 0 1.5rem 0; display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; }
.plano-recursos-list li { font-size: .82rem; color: #e5e7eb; display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.plano-recursos-list li i { color: #34d399; font-size: .85rem; margin-top: 2px; flex-shrink: 0; }
.plano-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }

.btn-tipo-pessoa { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.05); color: var(--text-muted); cursor: pointer; transition: all 0.3s ease; font-family: inherit; font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.btn-tipo-pessoa:hover { background: rgba(255,255,255,0.1); color: white; }
.btn-tipo-pessoa.active { background: rgba(139, 92, 246, 0.2); border-color: rgba(139, 92, 246, 0.5); color: #a78bfa; box-shadow: inset 0 0 10px rgba(139, 92, 246, 0.1); }

/* =========================================================================
   SISTEMA DE RESPONSIVIDADE MOBILE & TABLET (MASTER ADMIN)
   ========================================================================= */

/* Botões do Menu Mobile */
.mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-toggle:hover, .mobile-toggle:active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

.mobile-close-btn {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}
.mobile-close-btn:hover, .mobile-close-btn:active {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Backdrop escuro para fechar o menu lateral */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 11, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-locked {
    overflow: hidden !important;
}

/* ── TABLETS & TELAS MÉDIAS (<= 1024px) ── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .settings-container {
        grid-template-columns: 220px 1fr !important;
        gap: 1.5rem !important;
    }
    
    .planos-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── SMARTPHONES & TELAS PEQUENAS (<= 768px) ── */
@media (max-width: 768px) {
    .app-layout {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        overflow-x: hidden !important;
    }

    .mobile-toggle {
        display: inline-flex !important;
    }

    .mobile-close-btn {
        display: inline-flex !important;
    }

    .sidebar-backdrop {
        display: block !important;
    }

    /* Sidebar vira gaveta deslizante estilo app nativo */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important;
        width: 290px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 9999 !important;
        background: #090d16 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85) !important;
        transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .sidebar.mobile-open {
        left: 0 !important;
    }

    /* Topbar compacta e fixa no topo */
    .topbar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 62px !important;
        padding: 0 1rem !important;
        z-index: 1000 !important;
        background: rgba(9, 13, 22, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .topbar-right .user-info {
        display: none !important;
    }

    .master-topbar-badge {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
        letter-spacing: 0px !important;
    }

    /* Conteúdo principal adaptado */
    .main-content {
        padding: 1rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Page Header em coluna */
    .page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 1.25rem !important;
    }

    .page-header-text h1 {
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
    }

    .page-header-text p {
        font-size: 0.8rem !important;
    }

    .page-header-actions {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .page-header-actions .btn-primary,
    .page-header-actions .btn-save,
    .page-header-actions button,
    .page-header-actions a {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 16px !important;
    }

    /* Grid de Estatísticas */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        margin-bottom: 1.25rem !important;
    }

    .stat-card {
        padding: 1.1rem !important;
    }

    .stat-card-value {
        font-size: 1.6rem !important;
    }

    .stat-card-footer {
        font-size: 0.75rem !important;
    }

    /* Barra de Busca e Filtros de Clientes */
    .card-table-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .toolbar-filters-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        width: 100% !important;
        padding-bottom: 6px !important;
    }

    .toolbar-filters-row::-webkit-scrollbar {
        height: 3px;
    }

    .toolbar-filters-row::-webkit-scrollbar-thumb {
        background: rgba(139, 92, 246, 0.5);
        border-radius: 3px;
    }

    .btn-filter-pill {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 7px 12px !important;
        font-size: 0.76rem !important;
        justify-content: center !important;
    }

    .toolbar-search-box {
        width: 100% !important;
        min-width: 100% !important;
    }

    /* Badges sem quebra de linha */
    .badge, .btn-status-pill, .master-topbar-badge, span[class*="badge"] {
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        line-height: 1.2 !important;
    }

    /* Tabelas com Scroll Horizontal Touch Fluido */
    .table-wrapper, .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 14px !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-top: 0.5rem !important;
        display: block !important;
    }

    .table-wrapper::-webkit-scrollbar, .table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .table-wrapper::-webkit-scrollbar-thumb, .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(139, 92, 246, 0.5);
        border-radius: 4px;
    }

    .data-table, .table-wrapper table, .table-responsive table {
        min-width: 680px !important;
        width: 100% !important;
    }

    .data-table th, .data-table td,
    .table-responsive th, .table-responsive td {
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
    }

    /* Modais Fluidos no Mobile */
    .modal-overlay {
        padding: 16px !important;
        align-items: center !important;
        justify-content: center !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .modal-card, .modal-card-flush {
        width: 100% !important;
        max-width: 520px !important;
        border-radius: 20px !important;
        max-height: 88vh !important;
        max-height: 88dvh !important;
        margin: auto !important;
        padding: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .modal-header {
        padding: 1rem 1.25rem !important;
    }

    .modal-header h3 {
        font-size: 1.05rem !important;
    }

    .modal-body {
        padding: 1.15rem !important;
        max-height: calc(92vh - 75px) !important;
        max-height: calc(92dvh - 75px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }

    .modal-card form {
        padding: 1.15rem !important;
        max-height: calc(92vh - 75px) !important;
        max-height: calc(92dvh - 75px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }

    /* Grids internos dentro dos modais colapsam para 1 coluna */
    .modal-card div[style*="grid-template-columns"],
    .modal-body div[style*="grid-template-columns"],
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    /* Configurações Master */
    .settings-container {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .settings-nav {
        flex-direction: row !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding: 6px !important;
        background: rgba(17, 24, 39, 0.6) !important;
        border-radius: 12px !important;
    }

    .settings-nav::-webkit-scrollbar {
        height: 3px;
    }

    .settings-nav-item {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        width: auto !important;
    }

    .settings-section {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    .settings-subnav {
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 1rem !important;
    }

    /* Upload de Logo e Ícone no Mobile */
    .logo-upload-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .logo-preview-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 120px !important;
        margin: 0 auto !important;
    }

    .logo-upload-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .logo-upload-actions .btn-primary {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
    }

    /* Planos Grid */
    .planos-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .plano-card {
        padding: 1.35rem !important;
    }

    /* SweetAlert2 no Mobile */
    .swal2-popup {
        width: 92% !important;
        max-width: 420px !important;
        padding: 1.25rem !important;
        border-radius: 20px !important;
    }

    .swal2-title {
        font-size: 1.15rem !important;
    }

    .swal2-html-container {
        font-size: 0.85rem !important;
    }

    .pagination-footer {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
        padding: 1rem !important;
    }
    .pagination-controls {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .pagination-pages {
        justify-content: center !important;
        width: 100% !important;
    }
}

/* =========================================================================
   ESTILOS DE PAGINAÇÃO MASTER SAAS (DESKTOP & UNIVERSAL)
   ========================================================================= */
.pagination-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 24, 39, 0.4);
    border-radius: 0 0 16px 16px;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.pagination-info {
    font-size: 0.83rem;
    color: var(--text-muted, #9ca3af);
}

.pagination-info strong, .pagination-info span {
    color: #ffffff;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted, #9ca3af);
}

.pagination-per-page select {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.pagination-per-page select:focus {
    border-color: #8b5cf6;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pag-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: #ffffff;
}

.pag-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%) !important;
    border-color: #7c3aed !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.pag-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pag-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 34px;
    color: var(--text-muted, #9ca3af);
    font-size: 0.85rem;
}

/* Custom Checkbox Gateway */
.custom-checkbox-label {
    user-select: none;
    position: relative;
    padding-left: 28px;
}

.custom-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-box {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox-label:hover input ~ .custom-checkbox-box {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

.custom-checkbox-label input:checked ~ .custom-checkbox-box {
    background: #0ea5e9;
    border-color: #0ea5e9;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.custom-checkbox-box:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox-label input:checked ~ .custom-checkbox-box:after {
    display: block;
}

/* Modal Popup Asaas Conectado */
.swal2-asaas-popup {
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.15) !important;
    padding: 2rem 1.5rem !important;
    max-width: 440px !important;
}

.btn-asaas-confirm {
    padding: 10px 42px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35) !important;
}



.action-btn.whatsapp {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.35);
    color: #25D366;
}

.action-btn.whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-color: #25D366;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.swal2-container {
    z-index: 999999 !important;
}
