/* Support Tickets Styles */

:root {
    --priority-urgent: #ef4444;
    --priority-high: #f97316;
    --priority-medium: #eab308;
    --priority-low: #10b981;
    
    --status-open: #3b82f6;
    --status-progress: #8b5cf6;
    --status-resolved: #10b981;
    --status-closed: #6b7280;
}

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

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--border);
    transform: translateX(-5px);
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select {
    padding: 10px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--border);
}

/* Tickets Grid */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.ticket-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ticket-id {
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 600;
}

.ticket-priority {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: var(--priority-urgent);
}

.priority-high {
    background: rgba(249, 115, 22, 0.2);
    color: var(--priority-high);
}

.priority-medium {
    background: rgba(234, 179, 8, 0.2);
    color: var(--priority-medium);
}

.priority-low {
    background: rgba(16, 185, 129, 0.2);
    color: var(--priority-low);
}

.ticket-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}

.ticket-description {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.ticket-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-open {
    background: rgba(59, 130, 246, 0.2);
    color: var(--status-open);
}

.status-in_progress {
    background: rgba(139, 92, 246, 0.2);
    color: var(--status-progress);
}

.status-resolved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-resolved);
}

.status-closed {
    background: rgba(107, 114, 128, 0.2);
    color: var(--status-closed);
}

.ticket-date {
    font-size: 12px;
    color: var(--text-sub);
}

.ticket-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-sub);
}

.loading-state i,
.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: var(--text-main);
}

.empty-state p {
    margin: 0 0 20px 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tickets-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}
