/* Estilos personalizados - Cliente IMAP */

: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: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Navbar */
.navbar-brand {
    font-weight: 500;
    font-size: 1.25rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 500;
}

/* Email List */
.email-list {
    max-height: 600px;
    overflow-y: auto;
}

.email-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.email-item:hover {
    background-color: #f8f9fa;
}

.email-item.unread {
    background-color: #e7f3ff;
    font-weight: 500;
}

.email-item.unread:hover {
    background-color: #d0e7ff;
}

.email-item.selected {
    background-color: #cfe2ff;
}

.email-subject {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.email-from {
    color: #6c757d;
    font-size: 0.875rem;
}

.email-preview {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-date {
    color: #6c757d;
    font-size: 0.75rem;
    text-align: right;
}

/* Email View */
.email-view {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.email-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.email-body {
    line-height: 1.6;
}

.email-body img {
    max-width: 100%;
    height: auto;
}

/* Compose */
.compose-form {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
}

.folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.folder-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s;
}

.folder-item:hover {
    background-color: #f8f9fa;
}

.folder-item.active {
    background-color: #cfe2ff;
    font-weight: 500;
}

.account-selector {
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .email-view, .compose-form {
        padding: 1rem;
    }
    
    .sidebar {
        margin-bottom: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
