/**
 * Custom CSS - Sistema dominios-ao
 * Design moderno e profissional
 */

:root {
    --primary-color: #007bff;
    --primary-dark: #1a2b4d;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --orange-brand: #ff6600;
}

/* Estilos para SweetAlert2 - Personalização Profissional */
.swal2-popup {
    border-radius: 1rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
    padding: 2rem !important;
}

.swal2-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
    margin-bottom: 1rem !important;
}

.swal2-content {
    font-size: 1rem !important;
    color: #6c757d !important;
    line-height: 1.6 !important;
}

.swal2-confirm {
    border-radius: 0.5rem !important;
    padding: 0.75rem 2rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    background: var(--primary-color) !important;
    border: none !important;
}

.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.swal2-cancel {
    border-radius: 0.5rem !important;
    padding: 0.75rem 2rem !important;
    font-weight: 500 !important;
    background: #6c757d !important;
    border: none !important;
}

.swal2-cancel:hover {
    background: #5c636a !important;
    transform: translateY(-2px) !important;
}

/* Toast Notifications - Design Moderno e Profissional */
.custom-toast-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.95) 0%, rgba(40, 167, 69, 0.95) 100%) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 8px 32px rgba(25, 135, 84, 0.3) !important;
    padding: 1rem 1.25rem !important;
    min-width: 320px !important;
    max-width: 420px !important;
    color: #fff !important;
}

.custom-toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.custom-toast-icon {
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
    animation: checkmark 0.5s ease-in-out;
}

.custom-toast-message {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    flex: 1;
}

.custom-toast-title {
    display: none !important;
}

.custom-toast-undo-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    margin-top: 0.75rem !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px) !important;
}

.custom-toast-undo-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.custom-toast-progress {
    background: rgba(255, 255, 255, 0.3) !important;
    height: 3px !important;
}

/* Animações para Toast */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsividade para Toast */
@media (max-width: 576px) {
    .custom-toast-success {
        min-width: calc(100vw - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        margin: 1rem !important;
        padding: 0.875rem 1rem !important;
    }
    
    .custom-toast-icon {
        font-size: 1.25rem;
    }
    
    .custom-toast-message {
        font-size: 0.875rem;
    }
}

/* Melhorias para Toast padrão do SweetAlert2 */
.swal2-toast {
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.swal2-icon {
    width: 4rem !important;
    height: 4rem !important;
    margin: 0 auto 1.5rem !important;
}

.swal2-icon.swal2-success {
    border-color: var(--success-color) !important;
    color: var(--success-color) !important;
}

.swal2-icon.swal2-error {
    border-color: var(--danger-color) !important;
    color: var(--danger-color) !important;
}

.swal2-icon.swal2-warning {
    border-color: var(--warning-color) !important;
    color: var(--warning-color) !important;
}

.swal2-icon.swal2-info {
    border-color: var(--info-color) !important;
    color: var(--info-color) !important;
}

.swal2-icon.swal2-question {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.swal2-actions {
    margin-top: 1.5rem !important;
    gap: 0.75rem !important;
}

.swal2-loader {
    border-color: var(--primary-color) transparent var(--primary-color) transparent !important;
}

/* Animações personalizadas */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Geral */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Botões */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.625rem 1.25rem;
    position: relative;
    overflow: hidden;
}

.btn:hover:not(:disabled):not(.btn-loading) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: white;
}

.btn-primary:hover:not(:disabled):not(.btn-loading) {
    background: #0056b3;
    border-color: #0056b3;
}

/* Estado de Loading para Botões */
.btn-loading {
    cursor: wait !important;
    opacity: 0.8;
    pointer-events: none;
    position: relative;
    animation: pulse-loading 1.5s ease-in-out infinite;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes pulse-loading {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.btn-loading .spinner-border {
    display: inline-block !important;
    vertical-align: middle;
}

.btn-loading:disabled {
    opacity: 0.7;
}

/* Tabelas */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

/* Formulários */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Alerts Bootstrap */
.alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Loading Spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-light {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e9ecef;
}

.navbar-light .navbar-nav .nav-link {
    color: #212529 !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #007bff !important;
}

.navbar-light .navbar-toggler {
    border-color: rgba(0,0,0,0.1);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Logo Responsivo */
.logo-header {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-footer {
    height: 80px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

/* Footer */
footer.footer-custom {
    margin-top: auto;
    background-color: #f8f9fa !important;
    color: #212529;
}

footer.footer-custom .footer-heading {
    color: #212529;
    font-weight: 700;
    font-size: 1rem;
}

footer.footer-custom .footer-link {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer.footer-custom .footer-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

footer.footer-custom .footer-description {
    color: #212529;
    font-size: 0.9rem;
    line-height: 1.6;
}

footer.footer-custom .footer-text {
    color: #212529;
    font-size: 0.9rem;
}

footer.footer-custom .footer-copyright {
    color: #6c757d;
    font-size: 0.875rem;
}

footer.footer-custom .footer-bottom-links {
    color: #6c757d;
    font-size: 0.875rem;
}

footer.footer-custom .footer-bottom-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer.footer-custom .footer-bottom-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

footer.footer-custom .dns-badge {
    display: inline-block;
    background-color: #212529;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

footer.footer-custom .dns-logo {
    height: 65px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

footer.footer-custom .payment-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

footer.footer-custom .border-secondary {
    border-color: #dee2e6 !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Logo menor em mobile */
    .logo-header {
        height: 45px;
        max-width: 150px;
    }
    
    .logo-footer {
        height: 60px;
        max-width: 200px;
    }
    
    /* Navbar brand ajuste */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Tabelas responsivas */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* Cards em mobile */
    .card-body {
        padding: 1rem;
    }
    
    /* Estatísticas em coluna única */
    .stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .logo-header {
        height: 40px;
        max-width: 120px;
    }
    
    .logo-footer {
        height: 50px;
        max-width: 180px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    /* Botões em mobile pequeno */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.5rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Animações de entrada */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideInRight 0.5s ease-out;
}

/* Utilitários */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--orange-brand) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}