/* PEI Digital PIX - Admin Styles */

.pei-pix-admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.pei-pix-admin-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 25px;
    margin: -10px -20px 30px -20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.pei-pix-admin-header h1 {
    color: white !important;
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pei-pix-admin-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Estatísticas */
.pei-pix-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.pei-pix-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pei-pix-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.pei-pix-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #005a87);
}

.pei-pix-stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #0073aa;
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}

.pei-pix-stat-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navegação por abas */
.nav-tab-wrapper {
    border-bottom: 1px solid #ccd0d4;
    margin-bottom: 0;
    background: white;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-tab {
    background: #f8f9fa;
    border: none;
    border-right: 1px solid #e1e5e9;
    color: #666;
    font-weight: 500;
    padding: 15px 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    background: #e9ecef;
    color: #0073aa;
}

.nav-tab-active {
    background: white !important;
    color: #0073aa !important;
    font-weight: 600;
}

.nav-tab-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0073aa;
}

/* Conteúdo das abas */
.tab-content {
    background: white;
    padding: 30px;
    border: 1px solid #ccd0d4;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Formulários */
.form-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    width: 220px;
}

.form-table td {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.form-table input[type="text"],
.form-table input[type="number"],
.form-table input[type="password"],
.form-table select,
.form-table textarea {
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.form-table input:focus,
.form-table select:focus,
.form-table textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

.form-table .description {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-top: 8px;
    line-height: 1.4;
}

/* Botões */
.button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a73 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.button-secondary {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    padding: 10px 22px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.button-secondary:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f8f9fa;
}

/* Logs */
.log-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.log-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.log-approved {
    border-left: 4px solid #46b450;
}

.log-denied {
    border-left: 4px solid #dc3232;
}

.log-pending {
    border-left: 4px solid #ffb900;
}

/* Notices */
.notice {
    border-radius: 6px;
    padding: 15px 20px;
    margin: 20px 0;
    border-left-width: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notice p {
    margin: 0;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 768px) {
    .pei-pix-admin-header {
        padding: 20px 15px;
        margin: -10px -10px 20px -10px;
    }
    
    .pei-pix-admin-header h1 {
        font-size: 22px;
    }
    
    .pei-pix-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tab-content {
        padding: 20px 15px;
    }
    
    .form-table th,
    .form-table td {
        padding: 15px;
        display: block;
        width: 100%;
    }
    
    .form-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .form-table input,
    .form-table select,
    .form-table textarea {
        max-width: 100%;
    }
    
    .nav-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Seção de contato fixo */
.pei-pix-contact-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e1e5e9;
}

.pei-pix-contact-card {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
    animation: fadeIn 0.5s ease-out;
}

.pei-pix-contact-card h3 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 18px;
}

.pei-pix-contact-card p {
    margin: 8px 0;
    color: white;
}

.pei-pix-contact-card a {
    color: #b3d9ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.pei-pix-contact-card a:hover {
    color: white;
    text-decoration: underline;
}

/* Ícone de ajuda para gateways */
.pei-pix-help-icon {
    color: #0073aa;
    cursor: help;
    margin-left: 5px;
    font-size: 16px;
    vertical-align: middle;
}

.pei-pix-help-icon:hover {
    color: #005a87;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content {
    animation: fadeInUp 0.4s ease-out;
}

.pei-pix-stat-card {
    animation: fadeInUp 0.4s ease-out;
}

.pei-pix-stat-card:nth-child(2) { animation-delay: 0.1s; }
.pei-pix-stat-card:nth-child(3) { animation-delay: 0.2s; }
.pei-pix-stat-card:nth-child(4) { animation-delay: 0.3s; }
.pei-pix-stat-card:nth-child(5) { animation-delay: 0.4s; }

/* Estados de loading */
.pei-pix-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.pei-pix-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pei-pix-loading::before {
    content: '⏳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}