:root {
    --primary-color: #bd2528;
    --secondary-color: #530000;
    --success-color: #4fae30;
    --light-bg: #f8f9fa;
    --border-radius: 12px;
}

body {
    background:#f5f7fa;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1rem;
}
#alertContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* прижать к правому краю */
    gap: 10px;            /* расстояние между алертами */
    width: min(420px, calc(100vw - 40px));
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(189, 37, 40, 0.4);
}

.form-control, .form-select {
    border-radius: 4px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(189, 37, 40, 0.15);
}

.ticket-item {
    background: white;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.ticket-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

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

.ticket-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.ticket-key {
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(189, 37, 40, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.ticket-summary {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-open { background: #d1e7dd; color: #0f5132; }
.status-in-progress { background: #cff4fc; color: #055160; }
.status-resolved { background: #d4edda; color: #155724; }
.status-closed { background: #f8d7da; color: #721c24; }

.section-title {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.loading-spinner {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.floating-alert {
    position: static;
    margin: 0;
    animation: slideIn 0.3s ease;
}

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

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

.comment-item {
    border-left: 3px solid #e9ecef;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.comment-body {
    border-radius: 8px;
    word-break: break-word;
}

.user-comment {
    border-left-color: var(--primary-color);
}

.developer-comment {
    border-left-color: #28a745;
}

.summary-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa !important;
    padding: 1.5rem;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.no-tickets {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.no-tickets-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.ticket-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.opacity-50 {
    opacity: 0.5;
}

.summary-line {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.summary-line strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}
