/* --- WEBMAIL --- */
.webmail-container {
    display: flex;
    gap: 15px;
    height: calc(100vh - 160px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.webmail-sidebar {
    width: 220px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 15px 0;
    display: flex;
    flex-direction: column;
}
.webmail-folder {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.2s;
    position: relative;
}
.webmail-folder:hover {
    background: rgba(0,0,0,0.03);
}
.webmail-folder.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: bold;
    border-right: 3px solid #2563eb;
}
.webmail-folder .badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
}
.webmail-list {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--card);
}
.webmail-item {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.webmail-item:hover {
    background: #f8fafc;
}
.webmail-item.unread {
    background: #f0fdfa;
}
.webmail-item.active {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
}
.wm-item-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.8rem;
}
.wm-item-sender {
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
.webmail-item.unread .wm-item-sender {
    color: #0f172a;
    font-weight: 800;
}
.wm-item-date {
    color: var(--muted);
    font-size: 0.7rem;
}
.wm-item-subject {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.webmail-item.unread .wm-item-subject {
    font-weight: bold;
}
.wm-item-snippet {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.webmail-reader {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
}
.webmail-reader-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--muted);
    font-size: 1.1rem;
}
.wm-reader-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.wm-reader-subject {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}
.wm-reader-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wm-reader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}
.wm-reader-info {
    flex: 1;
}
.wm-reader-sender {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-color);
}
.wm-reader-email {
    font-size: 0.8rem;
    color: var(--muted);
}
.wm-reader-date {
    font-size: 0.8rem;
    color: var(--muted);
}
.wm-reader-actions {
    display: flex;
    gap: 8px;
}
.wm-btn-action {
    background: none;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-color);
    transition: all 0.2s;
    background: white;
}
.wm-btn-action:hover {
    background: #f1f5f9;
}
.wm-reader-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
}
.wm-reader-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.wm-attachments {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.wm-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}
.wm-attachment-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
