/* Ticket System Styles */

.tickets-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tickets List */
.tickets-list h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: right;
}

.create-ticket-btn {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 20px;
}

.create-ticket-btn:hover {
    background-color: #005a87;
    color: white;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tickets-table th,
.tickets-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.tickets-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.tickets-table tr:hover {
    background-color: #f5f5f5;
}

/* New Ticket Form */
.new-ticket-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.new-ticket-form h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: right;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    text-align: right;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Ticket View */
.ticket-view {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ticket-view h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: right;
}

.ticket-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.ticket-info p {
    margin: 5px 0;
    text-align: right;
}

.ticket-messages {
    margin-bottom: 30px;
}

.ticket-messages h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: right;
}

.message {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.message.admin {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.message-content {
    line-height: 1.6;
    text-align: right;
}

.message-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.attachment {
    display: inline-block;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px;
}

/* Reply Form */
.reply-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.reply-form h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: right;
}

/* Ticket Actions */
.ticket-actions {
    margin-top: 20px;
    text-align: center;
}

.ticket-actions .button {
    margin: 0 5px;
}

/* Buttons */
.button {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.button:hover {
    background-color: #005a87;
    color: white;
}

.button.secondary {
    background-color: #6c757d;
}

.button.secondary:hover {
    background-color: #545b62;
}

.close-ticket {
    background-color: #dc3545;
}

.close-ticket:hover {
    background-color: #c82333;
}

/* File Preview */
.file-preview {
    margin-top: 10px;
}

.file-preview img {
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Status Colors */
.status-open {
    color: #28a745;
    font-weight: 600;
}

.status-in_progress {
    color: #ffc107;
    font-weight: 600;
}

.status-waiting {
    color: #17a2b8;
    font-weight: 600;
}

.status-closed {
    color: #6c757d;
    font-weight: 600;
}

/* Priority Colors */
.priority-low {
    color: #28a745;
}

.priority-medium {
    color: #ffc107;
}

.priority-high {
    color: #fd7e14;
}

.priority-urgent {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .tickets-table {
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 8px;
    }
    
    .new-ticket-form,
    .ticket-view {
        padding: 20px;
    }
    
    .message-header {
        flex-direction: column;
        text-align: right;
    }
}
