.helpdesk-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.helpdesk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.helpdesk-header h2 {
    margin: 0;
    color: #333;
}

.helpdesk-header button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.helpdesk-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.tickets-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.tickets-list h3 {
    margin-top: 0;
    color: #333;
}

.ticket-item {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ticket-item:hover {
    background-color: #f8f9fa;
}

.ticket-subject {
    font-weight: bold;
    margin-bottom: 5px;
}

.ticket-meta {
    font-size: 12px;
    color: #666;
}

.ticket-detail {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.messages-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
}

.message.customer {
    background-color: #e3f2fd;
    margin-left: 20%;
}

.message.agent, .message.ai {
    background-color: #f5f5f5;
    margin-right: 20%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.message-body {
    line-height: 1.4;
}

.reply-form {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.reply-form textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    resize: vertical;
}

.reply-form button {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.new-ticket-form {
    grid-column: 1 / -1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.new-ticket-form input,
.new-ticket-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.new-ticket-form textarea {
    height: 150px;
    resize: vertical;
}

.new-ticket-form button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.login-prompt {
    text-align: center;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-prompt a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .helpdesk-content {
        grid-template-columns: 1fr;
    }
    
    .ticket-item {
        margin-left: 0;
        margin-right: 0;
    }
    
    .message.customer,
    .message.agent,
    .message.ai {
        margin-left: 0;
        margin-right: 0;
    }
}
