/* Login Page Styling */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.bg-login-image {
    background: url('../img/login-bg.jpg');
    background-position: center;
    background-size: cover;
}

.login-card {
    border-radius: 15px;
    overflow: hidden;
}

.login-form-container {
    padding: 3rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: -webkit-linear-gradient(45deg, #4e73df, #224abe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-login-section {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    position: relative;
    overflow: hidden;
    border-top-left-radius: .35rem;
    border-bottom-left-radius: .35rem;
}

.login-welcome-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    width: 80%;
}

.login-welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.login-welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.form-control-user {
    font-size: 0.9rem;
    border-radius: 10rem;
    padding: 1rem;
    height: auto;
}

.form-control-user:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-user {
    font-size: 0.9rem;
    border-radius: 10rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-user:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(78, 115, 223, 0.3);
}

.alert {
    border-radius: 1rem;
    font-size: 0.9rem;
}

.input-group-text {
    border-radius: 10rem 0 0 10rem;
    width: 15px;
}

.form-control {
    border-radius: 0 10rem 10rem 0;
}

/* Modern Email Table Styles */
.email-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.email-filters-container .card {
    border: none;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.email-filters-container .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
}

.table-controls {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e3e6f0;
}

#email-table {
    margin-bottom: 0;
}

#email-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    color: #5a5c69;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

#email-table .sort-btn {
    color: #5a5c69;
    text-decoration: none;
    font-weight: inherit;
    font-size: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    border: none;
    background: none;
    padding: 0;
}

#email-table .sort-btn:hover {
    color: #4e73df;
}

.email-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.email-row:hover {
    background-color: #f8f9fa;
}

.email-row.email-unread {
    background-color: #fff8dc;
    font-weight: 500;
}

.email-row.email-unread:hover {
    background-color: #fff3cd;
}

.email-sender {
    max-width: 200px;
    overflow: hidden;
}

.email-subject {
    max-width: 300px;
    overflow: hidden;
}

.pagination-container {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #e3e6f0;
}

.badge-primary {
    background-color: #4e73df;
}

.badge-danger {
    background-color: #e74a3b;
}

.badge-warning {
    background-color: #f6c23e;
    color: #5a5c69;
}

.badge-secondary {
    background-color: #858796;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Filter Panel Animations */
.filters-panel {
    transition: all 0.3s ease;
}

/* Checkbox Styling */
.form-check-input:checked {
    background-color: #4e73df;
    border-color: #4e73df;
}

.form-check-input:focus {
    border-color: #4e73df;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Loading States */
.email-row.loading {
    opacity: 0.6;
    pointer-events: none;
}

.email-row.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid #4e73df;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* DataTable Child Row Styles */
td.details-control {
    cursor: pointer;
    text-align: center;
    width: 30px;
}

td.details-control i {
    transition: transform 0.3s ease;
}

tr.shown td.details-control i {
    transform: rotate(45deg);
}

.email-details {
    background: #f8f9fc;
    border-radius: 8px;
    margin: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.email-details .row {
    margin: 0 -5px;
}

.email-details .col {
    padding: 10px;
}

.email-details h5 {
    color: #4e73df;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.email-details p {
    color: #5a5c69;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.email-details .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-right: 5px;
}

.email-details .attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.email-details .attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.email-details .attachment-icon {
    color: #4e73df;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .email-table-container {
        border-radius: 0;
        margin: 0 -15px;
    }

    .table-controls {
        flex-direction: column;
        gap: 10px;
    }

    .email-sender,
    .email-subject {
        max-width: none;
    }

    #email-table th,
    #email-table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Home Page Styling */
.welcome-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: transform 0.3s ease;
}

.welcome-card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: transparent;
    border-bottom: none;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.stats-card {
    border-left: 4px solid #4e73df;
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}