/* Custom CSS for SMTP Manager */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.min-vh-100 {
    min-height: 100vh !important;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 15px 20px;
}

/* Button Styling */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Input Group */
.input-group-text {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 5px 0 0 5px;
}

/* Table Styling */
.table {
    background-color: white;
}

.table thead {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
    cursor: pointer;
}

/* List Group */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Badge Styling */
.badge {
    padding: 5px 10px;
    font-weight: 500;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
    border: none;
}

/* Navbar */
.navbar-brand {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Message Body */
.message-body {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.message-body pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert {
    animation: fadeIn 0.5s ease;
}

/* Dashboard Stats Cards */
.display-4 {
    font-weight: 700;
}

.opacity-50 {
    opacity: 0.5;
}

.bg-opacity-75 {
    background-color: rgba(0, 0, 0, 0.75);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Email Preview */
.list-group-item-light {
    background-color: #e7f3ff;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#backToTop:active {
    transform: translateY(-2px);
}
