/* ==========================================================================
   TELA DE CONFIGURAÇÃO DE PACOTES WHATSAPP (SaaS ENTERPRISE SECURITY)
   ========================================================================== */
.wa-pack-wrapper {
    background-color: #f8fafc;
    min-height: calc(100vh - 55px);
    padding: 24px 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
}

/* 1. TOPO DA TELA */
.wa-pack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.wa-pack-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wa-pack-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.wa-pack-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.wa-pack-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 3px;
}

.wa-pack-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px !important;
    box-shadow: 0 1px 2px rgba(4, 120, 87, 0.05);
}

    .wa-pack-security-badge.corrupted {
        background-color: #fef2f2;
        border-color: #fecaca;
        color: #b91c1c;
    }

/* 2. CARDS RESUMO DO MÊS ATUAL */
.wa-pack-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 992px) {
    .wa-pack-cards-grid {
        grid-template-columns: 1fr;
    }
}

.wa-pack-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px !important;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

    .wa-pack-card.blue {
        border-top: 4px solid #0284c7;
    }

    .wa-pack-card.green {
        border-top: 4px solid #059669;
    }

    .wa-pack-card.purple {
        border-top: 4px solid #7c3aed;
    }

.wa-card-top-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.wa-card-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wa-card-icon {
    font-size: 20px;
}

.wa-pack-card.blue .wa-card-icon {
    color: #0284c7;
}

.wa-pack-card.green .wa-card-icon {
    color: #059669;
}

.wa-pack-card.purple .wa-card-icon {
    color: #7c3aed;
}

.wa-card-main-number {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 4px;
}

.wa-card-sub-info {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 14px;
}

/* Barra de Progresso */
.wa-progress-track {
    width: 100%;
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 6px !important;
    overflow: hidden;
    margin-bottom: 8px;
}

.wa-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.wa-pack-card.blue .wa-progress-bar {
    background-color: #0284c7;
}

.wa-pack-card.green .wa-progress-bar {
    background-color: #059669;
}

.wa-pack-card.purple .wa-progress-bar {
    background-color: #7c3aed;
}

.wa-card-footer-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #64748b;
}

/* 3. FORMULÁRIOS DE GESTÃO */
.wa-pack-management-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 900px) {
    .wa-pack-management-grid {
        grid-template-columns: 1fr;
    }
}

.wa-management-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px !important;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.wa-panel-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-panel-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.45;
}

/* Inputs com Stepper Múltiplos de 1000 */
.wa-stepper-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-stepper-step {
    width: 38px;
    height: 38px;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .btn-stepper-step:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

.wa-input-stepper-val {
    flex: 1;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px !important;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

    .wa-input-stepper-val:focus {
        border-color: #0284c7;
        box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
    }

.btn-save-pack-primary {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    width: 100% !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
    transition: all 0.15s ease !important;
}

    .btn-save-pack-primary:hover {
        background-color: #0369a1 !important;
        transform: translateY(-1px);
    }

.btn-save-pack-success {
    background-color: #059669 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    width: 100% !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
    transition: all 0.15s ease !important;
}

    .btn-save-pack-success:hover {
        background-color: #047857 !important;
        transform: translateY(-1px);
    }

/* 4. BLOQUEIO DE ACESSO PARA NÃO-AUTORIZADOS */
.wa-unauthorized-box {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #fecaca;
    max-width: 580px;
    margin: 40px auto;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.08);
}

.wa-unauthorized-icon {
    font-size: 48px;
    color: #dc2626;
    margin-bottom: 16px;
}

.wa-unauthorized-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px 0;
}

.wa-unauthorized-desc {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.5;
}
