* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, #0078d4 0%, #00bcf2 100%);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

.section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section h2 {
    font-size: 18px;
    color: #0078d4;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e1e1;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #0078d4;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: #0078d4;
    color: white;
}

.btn-primary:hover {
    background-color: #005a9e;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    font-size: 12px;
    padding: 5px 12px;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    padding: 5px 12px;
}

.btn-danger:hover {
    background-color: #c82333;
}

.topics-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    transition: all 0.3s;
}

.topic-item:hover {
    background-color: #e9ecef;
    border-color: #0078d4;
}

.topic-item.assigned {
    background-color: #d4edda;
    border-color: #28a745;
}

.topic-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
}

.topic-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.topic-name {
    font-weight: 500;
    color: #333;
}

.topic-actions {
    display: flex;
    gap: 8px;
}

.email-topics-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #0078d4;
    color: white;
    border-radius: 20px;
    font-size: 13px;
}

.topic-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.topic-tag button:hover {
    color: #ffcccc;
}

.info-text {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

#email-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

#email-info strong {
    color: #0078d4;
}

.topic-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.topic-select:focus {
    outline: none;
    border-color: #0078d4;
}

.emails-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.email-item {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0078d4;
}

.email-item-subject {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.email-item-from {
    font-size: 13px;
    color: #6c757d;
}

.email-item-date {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.topic-count {
    font-size: 12px;
    color: #6c757d;
    margin-left: 8px;
}
