/**
 * CSS Global Moderno - Dominios.ao
 * Melhorias visuais para todas as páginas sem alterar lógica
 */

/* ============================================
   ANIMAÇÕES GLOBAIS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   CARDS MODERNOS
   ============================================ */
.card-modern {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-modern .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.card-modern .card-body {
    padding: 1.5rem;
}

/* ============================================
   BOTÕES MODERNOS - TODOS AZUIS COM ANIMAÇÕES
   ============================================ */
.btn-modern {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Botão Primário Azul */
.btn-primary-modern,
.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%) !important;
    border: none !important;
    color: white !important;
    position: relative;
    overflow: hidden;
}

.btn-primary-modern::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary-modern:hover::before,
.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-modern:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-primary-modern:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Botão Outline Azul */
.btn-outline-modern,
.btn-outline-primary {
    border: 2px solid #0d6efd !important;
    color: #0d6efd !important;
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

.btn-outline-modern::before,
.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-modern:hover::before,
.btn-outline-primary:hover::before {
    left: 0;
}

.btn-outline-modern:hover,
.btn-outline-primary:hover {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%) !important;
    color: white !important;
    border-color: #0d6efd !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.btn-outline-modern:active,
.btn-outline-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

/* Garantir que todos os botões primários sejam azuis */
.btn.btn-primary:not(.btn-primary-modern) {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.btn-primary:not(.btn-primary-modern):hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

/* Botões secundários também azuis */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Garantir que todos os botões tenham transições suaves */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn:not(.btn-link):not(.btn-close) {
    position: relative;
    overflow: hidden;
}

/* Animações para todos os botões */
.btn:not(.btn-link):not(.btn-close):not(:disabled):hover {
    transform: translateY(-2px);
}

.btn:not(.btn-link):not(.btn-close):not(:disabled):active {
    transform: translateY(0);
}

/* Botões de tamanhos diferentes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Garantir que botões disabled não tenham animação */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   FORMULÁRIOS MODERNOS
   ============================================ */
.form-control-modern {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control-modern:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-label-modern {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ============================================
   TABELAS MODERNAS
   ============================================ */
.table-modern {
    border-radius: 12px;
    overflow: hidden;
}

.table-modern thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.table-modern thead th {
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 1rem;
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table-modern tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* ============================================
   BADGES MODERNOS
   ============================================ */
.badge-modern {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    border-radius: 6px;
}

.badge-success-modern {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-danger-modern {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.badge-warning-modern {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-info-modern {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* ============================================
   ALERTAS MODERNOS
   ============================================ */
.alert-modern {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.3s ease-out;
}

.alert-modern .alert-heading {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ============================================
   HERO SECTIONS MODERNOS
   ============================================ */
.hero-modern {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom/cover no-repeat;
    opacity: 0.3;
}

.hero-modern h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.hero-modern p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.95;
    position: relative;
    z-index: 2;
}

/* ============================================
   SECTIONS MODERNAS
   ============================================ */
.section-modern {
    padding: 60px 0;
}

.section-modern-alt {
    background: #f8f9fa;
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #212529;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

/* ============================================
   GRID DE CARDS MODERNO
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   LOADING STATES MODERNOS
   ============================================ */
.loading-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-modern .spinner {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
}

/* ============================================
   UTILITÁRIOS MODERNOS
   ============================================ */
.shadow-modern {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.shadow-modern-lg {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.rounded-modern {
    border-radius: 12px;
}

.rounded-modern-lg {
    border-radius: 16px;
}

/* ============================================
   RESPONSIVIDADE GLOBAL
   ============================================ */
@media (max-width: 768px) {
    .hero-modern {
        padding: 60px 0 40px;
    }
    
    .section-modern,
    .section-modern-alt {
        padding: 40px 0;
    }
    
    .card-modern .card-body {
        padding: 1rem;
    }
    
    .table-modern {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .hero-modern {
        padding: 40px 0 30px;
    }
    
    .btn-modern {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   FORÇAR TODOS OS BOTÕES PRIMÁRIOS A SEREM AZUIS
   ============================================ */
.btn-primary:not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary) {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary:not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary):hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4) !important;
}

.btn-primary:not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary):active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3) !important;
}

/* Garantir que todos os botões tenham animação suave */
.btn:not(.btn-link):not(.btn-close):not(:disabled) {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
