/* Adicione isso ao final do seu arquivo CSS */

/* Modal Sheet View */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: flex-end; /* Modal Sheet Style para Mobile */
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-sheet {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: 24px 24px 0 0;
    padding: 2rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-bottom: none;
}
.modal-overlay.active .modal-sheet {
    transform: translateY(0);
}
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center; /* Centralizado em telas grandes */
    }
    .modal-sheet {
        border-radius: 16px;
        border-bottom: 1px solid var(--border-color);
    }
}
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-right: 2rem; /* Para não encostar no botão X */
}

/* Lista de Redirecionamentos Modernos (Cards) */
.redirects-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.redirect-card {
    background: linear-gradient(135deg, #1e293b, #0f172a); /* Tailwind Slate 800 a Slate 900 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.redirect-card:hover {
    border-color: rgba(59, 130, 246, 0.4); /* Tailwind Blue 500 border soft */
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.redirect-info {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.redirect-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.redirect-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.redirect-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.redirect-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}
.redirect-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.redirect-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    width: max-content;
}

.redirect-actions {
    flex-shrink: 0;
}

.btn-delete-redirect {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}
.btn-delete-redirect:hover {
    background: var(--danger-color);
    color: #ffffff;
    border-color: var(--danger-color);
}

.empty-message {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
}

/* Estilos Responsivos para o Modal no Mobile */
@media (max-width: 768px) {
    .modal-sheet {
        padding: 1.25rem 1rem !important;
        border-radius: 16px 16px 0 0 !important;
    }
    
    .modal-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .modal-close {
        top: 1.2rem !important;
        right: 1rem !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
    }
    
    .modal-sheet .grid-2 {
        gap: 0.75rem !important;
    }
    
    .modal-sheet .form-group {
        margin-bottom: 0.75rem !important;
    }
    
    .modal-sheet .form-control {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .modal-sheet .btn-primary {
        padding: 0.6rem !important;
        font-size: 0.9rem !important;
    }

    /* Ajustes específicos para o Mobile (empilhamento de card) */
    .redirect-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0.85rem 1rem !important;
        background: linear-gradient(135deg, #1c2235, #0f1420) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    .redirect-info {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }
    
    .redirect-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .redirect-value,
    .redirect-link {
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        font-size: 0.85rem !important;
    }
    
    .redirect-badge {
        font-size: 0.78rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .redirect-actions {
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-top: 0.6rem !important;
        display: flex !important;
        justify-content: center !important; /* Centralizado no rodapé */
        width: 100% !important;
    }
    
    .btn-delete-redirect {
        width: 100% !important;
        max-width: 140px !important;
        justify-content: center !important;
        height: 36px !important;
    }
}

/* Nova Lista de Domínios Baseada em Cards Modernos */
.domains-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.domain-card {
    background: linear-gradient(135deg, #1e293b, #0f172a); /* Tailwind Slate 800 a Slate 900 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.domain-card:hover {
    border-color: rgba(59, 130, 246, 0.4); /* Hover com borda azul do Tailwind */
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.domain-card-info {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.domain-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.domain-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.domain-card-name {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.domain-card-name:hover {
    color: var(--primary-color);
}

.domain-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.domain-card-actions {
    flex-shrink: 0;
}

/* Responsivo para Domain Card */
@media (max-width: 768px) {
    .domain-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0.85rem 1rem !important;
    }
    
    .domain-card-info {
        gap: 0.75rem !important;
    }
    
    .domain-card-name {
        font-size: 0.95rem !important;
    }
    
    .domain-card-actions {
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-top: 0.6rem !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }
    
    .domain-card-actions .btn-manage-domain {
        width: 100% !important;
        max-width: 140px !important;
        justify-content: center !important;
        height: 36px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
}

