/* Mail Server System - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 12px 20px;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 8px;
    width: 20px;
}

/* Email List Styles */
.list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.list-group-item:hover {
    border-left-color: var(--primary-color);
    background-color: #f8f9fa;
}

.list-group-item.fw-bold {
    background-color: #e7f3ff;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 20px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 15px 20px;
}

/* Button Styles */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 4px;
}

/* Table Styles */
.table {
    font-size: 14px;
}

.table thead th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Alert Styles */
.alert {
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Email Body Styles */
#email-body {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    min-height: 200px;
    font-size: 14px;
    line-height: 1.6;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Statistics Cards */
.card.text-white {
    border: none;
}

.card.text-white h2 {
    font-size: 2.5rem;
    font-weight: bold;
}

.card.text-white .card-title {
    font-size: 1rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
    }
    
    main {
        padding: 15px !important;
    }
}

/* Login Page */
.min-vh-100 {
    min-height: 100vh;
}

/* Search Box */
.search-box {
    max-width: 400px;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Attachment Badge */
.attachment-badge {
    display: inline-block;
    padding: 8px 12px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin: 5px;
}

/* Modal */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.input-group-text {
    border-radius: 6px 0 0 6px;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.page-link {
    border-radius: 4px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Email Preview */
.email-preview {
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background-color: var(--success-color);
}

.status-dot.offline {
    background-color: var(--danger-color);
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}
