/* Tickets Page Styles */

.container {
    margin-top: 80px; /* Add space for fixed navbar */
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 0;
}

.page-header h1 {
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9, #b3e0ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: marbleShift 8s ease infinite;
    margin: 0;
}

@keyframes marbleShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Filters */
.filters-section {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: #ccc;
    font-size: 14px;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 12px;
    background: #0e0e0e;
    color: #f2f2f2;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.filter-group select:hover {
    border-color: #ffb3d9;
}

.filter-group input[type="checkbox"] {
    cursor: pointer;
}

/* Tickets List */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.no-tickets {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 18px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 2px dashed #333;
}

/* Ticket Card */
.ticket-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-card:hover {
    border-color: #ffb3d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 217, 0.1);
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ticket-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-id {
    color: #888;
    font-size: 14px;
    font-weight: bold;
}

.ticket-card-time {
    color: #666;
    font-size: 13px;
}

.ticket-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #f2f2f2;
}

.ticket-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-card-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
}

/* Badges */
.ticket-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.ticket-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Status Badges */
.status-badge {
    background: linear-gradient(135deg, #444, #333);
    color: #fff;
}

.status-badge.status-open {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: rgba(40, 167, 69, 0.3);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.status-badge.status-in_progress {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

.status-badge.status-waiting_response {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #000;
    border-color: rgba(255, 193, 7, 0.3);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.status-badge.status-resolved {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border-color: rgba(108, 117, 125, 0.3);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.4);
}

.status-badge.status-closed {
    background: linear-gradient(135deg, #343a40, #23272b);
    color: #aaa;
    border-color: rgba(52, 58, 64, 0.3);
    box-shadow: 0 2px 8px rgba(52, 58, 64, 0.4);
}

/* Priority Badges */
.priority-badge {
    background: linear-gradient(135deg, #444, #333);
    color: #fff;
}

.priority-badge.priority-urgent {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    color: white;
    border-color: rgba(220, 53, 69, 0.3);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(220, 53, 69, 0.5); }
    50% { box-shadow: 0 4px 16px rgba(220, 53, 69, 0.8); }
}

.priority-badge.priority-high {
    background: linear-gradient(135deg, #fd7e14, #e8590c);
    color: white;
    border-color: rgba(253, 126, 20, 0.3);
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.4);
}

.priority-badge.priority-medium {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border-color: rgba(23, 162, 184, 0.3);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.4);
}

.priority-badge.priority-low {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
    border-color: rgba(108, 117, 125, 0.3);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Type Badges */
.type-badge {
    background: linear-gradient(135deg, #444, #333);
    color: #fff;
}

.type-badge.type-bug {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-color: rgba(220, 53, 69, 0.3);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.type-badge.type-feature {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border-color: rgba(40, 167, 69, 0.3);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.type-badge.type-question {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
    color: white;
    border-color: rgba(23, 162, 184, 0.3);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.4);
}

.type-badge.type-todo {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000;
    border-color: rgba(255, 193, 7, 0.3);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.type-badge.type-other {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border-color: rgba(108, 117, 125, 0.3);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Ticket Detail Modal */
.modal-large {
    max-width: 900px;
    max-height: 90vh;
}

.ticket-detail-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ticket-info-section {
    border-bottom: 1px solid rgba(224, 179, 255, 0.2);
    padding-bottom: 20px;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ticket-info-section h3 {
    font-size: 24px;
    margin: 10px 0;
    color: #f2f2f2;
}

.ticket-description {
    background: #0e0e0e;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
    margin: 15px 0;
    white-space: pre-wrap;
    color: #ccc;
}

.ticket-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.metadata-item {
    font-size: 14px;
    color: #aaa;
}

.metadata-item strong {
    color: #f2f2f2;
}

.admin-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Comments Section */
.comments-section h4 {
    margin-bottom: 15px;
    color: #f2f2f2;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.comment-card {
    background: #0e0e0e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
}

.comment-card.internal-comment {
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #ffb3d9;
}

.comment-time {
    color: #666;
    font-size: 12px;
}

.internal-badge {
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.comment-text {
    color: #ccc;
    white-space: pre-wrap;
}

.btn-delete-comment {
    margin-top: 10px;
    padding: 4px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-delete-comment:hover {
    background: #c82333;
}

/* Add Comment Section */
.add-comment-section {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
}

.add-comment-section textarea {
    width: 100%;
    padding: 10px;
    background: #0e0e0e;
    color: #f2f2f2;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    resize: vertical;
    margin-bottom: 10px;
}

.add-comment-section textarea:focus {
    outline: none;
    border-color: #ffb3d9;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-actions label {
    color: #ccc;
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #e0b3ff, #ffb3d9);
    color: #000;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffb3d9, #e0b3ff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 217, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 10px;
    background: #0e0e0e;
    color: #f2f2f2;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #ffb3d9;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 25px;
    background: #28a745;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    display: none;
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-large {
        max-width: 95%;
    }

    .ticket-card-info {
        flex-direction: column;
        gap: 8px;
    }
}
