:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tracking-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    margin: 20px;
}

.tracking-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px;
    text-align: center;
}

.tracking-header h1 {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.tracking-header p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.tracking-body {
    padding: 40px;
}

.search-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.ticket-details {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: none;
}

.ticket-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px 30px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.ticket-content {
    padding: 30px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-open {
    background-color: #e9f7ef;
    color: #28a745;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-resolved {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-closed {
    background-color: #f8d7da;
    color: #721c24;
}

.priority-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.priority-high {
    background-color: #f8d7da;
    color: #721c24;
}

.priority-medium {
    background-color: #fff3cd;
    color: #856404;
}

.priority-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-outline-secondary{
    padding: 12px 30px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.ticket-message {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #dee2e6;
}

.ticket-message.agent {
    background-color: #e7f1ff;
    border-left-color: var(--primary-color);
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.message-sender {
    font-weight: 600;
    margin-right: 15px;
    font-size: 1.1rem;
}

.message-time {
    color: #6c757d;
    font-size: 0.9rem;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f72585, #b5179e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
}

.assignee-info {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.conversation-timeline {
    position: relative;
    padding-left: 30px;
}

.conversation-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card h6 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f3f4;
}

.info-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    color: #6c757d;
    text-align: right;
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 20px;
    margin-bottom: 25px;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .tracking-header {
        padding: 30px 20px;
    }

    .tracking-body {
        padding: 20px;
    }

    .search-section {
        padding: 20px;
    }

    .ticket-content {
        padding: 20px;
    }

    .message-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .message-sender {
        margin-bottom: 5px;
    }
}