/* ============================================
   KOMMUNIKATIONS-SEITE (E-MAIL CENTER)
   ============================================ */

.communications-layout {
    display: grid;
    grid-template-columns: 260px 400px 1fr;
    gap: 0;
    height: calc(100vh - 80px);
    background: white;
}

/* Email Sidebar (Folders) */
.email-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    padding: 24px;
    overflow-y: auto;
}

.email-folders {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #1e3c3c;
    font-size: 14px;
}

.folder-item:hover {
    background: rgba(30, 60, 60, 0.05);
}

.folder-item.active {
    background: rgba(255, 97, 1, 0.1);
    color: #ff6101;
    font-weight: 500;
}

.folder-count {
    margin-left: auto;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.folder-item.active .folder-count {
    background: #ff6101;
    color: white;
}

.email-filters select {
    width: 100%;
}

/* Email List */
.email-list {
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    background: white;
}

.email-list-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.email-list-content {
    flex: 1;
    overflow-y: auto;
}

.email-item {
    padding: 16px 24px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
}

.email-item:hover {
    background: #f9fafb;
}

.email-item.active {
    background: rgba(255, 97, 1, 0.05);
    border-left: 3px solid #ff6101;
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.email-to {
    font-weight: 500;
    color: #1e3c3c;
    font-size: 14px;
}

.email-date {
    font-size: 12px;
    color: #6b7280;
}

.email-subject {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 13px;
}

.email-preview {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-tag {
    display: inline-block;
    background: #e5e7eb;
    color: #4b5563;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 6px;
    margin-right: 4px;
}

/* Email Detail */
.email-detail {
    background: white;
    overflow-y: auto;
    padding: 32px;
}

.email-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
}

.email-detail-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.email-detail-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-icon {
    background: transparent;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #1e3c3c;
}

.email-detail-subject {
    font-size: 24px;
    font-weight: 600;
    color: #1e3c3c;
    margin-bottom: 16px;
}

.email-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.email-detail-meta strong {
    color: #1e3c3c;
    font-weight: 500;
}

.email-detail-body {
    line-height: 1.7;
    color: #374151;
    font-size: 15px;
    padding: 24px 0;
}

.email-detail-context {
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid #ff6101;
    margin-top: 16px;
    font-size: 14px;
    color: #6b7280;
}

.email-detail-context strong {
    color: #1e3c3c;
}

/* Responsive */
@media (max-width: 1200px) {
    .communications-layout {
        grid-template-columns: 220px 350px 1fr;
    }
}

@media (max-width: 992px) {
    .communications-layout {
        grid-template-columns: 200px 1fr;
    }
    
    .email-detail {
        display: none;
    }
}
