/* ==================== MODERN DESIGN SYSTEM ==================== */

/* General Body & Font Styling */
html {
    scroll-behavior: auto; /* Disable smooth scroll for instant scrolling */
}

body {
    font-family: 'Inter', sans-serif;
    /* GPU acceleration for smooth performance */
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Background Gradient */
.modern-bg {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3f 50%, #0f0f23 100%);
    background-attachment: fixed;
}

/* Modern Glass Effect */
.modern-glass {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
}

.modern-glass-dark {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Modern Header */
.modern-header {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
}

/* Modern Sidebar */
.modern-sidebar {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
}

/* Modern Card */
.modern-card {
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Admin Section Card */
.admin-section {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 16px;
}

.admin-section:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(99, 102, 241, 0.4);
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #818cf8, #a78bfa);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
}

/* Accent Colors */
.accent-yellow {
    color: #fbbf24;
}

.accent-cyan {
    color: #22d3ee;
}

/* ==================== BUTTONS ==================== */

.modern-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.modern-btn-primary:active {
    transform: translateY(0);
}

.modern-btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.modern-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.modern-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.modern-btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.modern-btn-purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.3);
}

.modern-btn-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.3);
}

.modern-btn-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.3);
}

.modern-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

/* ==================== INPUT STYLES ==================== */

.modern-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #e5e7eb;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.modern-input:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modern-input::placeholder {
    color: #6b7280;
}

/* ==================== ANIMATIONS ==================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes spin {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.5; 
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3), 0 0 20px rgba(167, 139, 250, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 0 0 30px rgba(167, 139, 250, 0.2);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-in {
    animation: slideInUp 0.5s ease-out;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ==================== MODALS ==================== */

.modal {
    transition: opacity 0.3s ease-in-out;
}

.modal.hidden {
    display: none !important;
}

.modal.opacity-0 {
    opacity: 0;
    pointer-events: none;
}

/* ==================== TABS ==================== */

.tab-btn {
    border: none;
    cursor: pointer;
    background: transparent;
    white-space: nowrap;
}

.tab-button {
    border: none;
    cursor: pointer;
    background: transparent;
    transition: all 0.3s ease;
    color: #9ca3af;
    border-bottom: 2px solid transparent;
}

.tab-button[data-active="true"] {
    color: #ffffff;
    border-bottom-color: #6366f1;
}

.tab-button:hover {
    color: #ffffff;
}

/* ==================== NOTIFICATION STYLES ==================== */

.notification {
    transition: all 0.5s ease-in-out;
    transform: translateX(110%);
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(167, 139, 250, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

/* ==================== TICKET CARD ==================== */

.ticket-card {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
}

.ticket-card .ticket-body {
    /* Remove slow transitions for instant expand/collapse */
    opacity: 1;
    cursor: default;
    will-change: auto;
}

.ticket-card .ticket-body.hidden {
    display: none; /* Use display:none for instant toggle instead of slow animations */
    margin-top: 0;
}

.ticket-card.reminded-yellow {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(167, 139, 250, 0.05) 100%);
    border-left: 3px solid #f59e0b;
}

/* ==================== NOTE STYLES ==================== */

.note-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
}

.note-text {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

.note-text-display, .note-text-display p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.note-text-collapsible.collapsed {
    max-height: 3.5rem;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.toggle-note-btn {
    color: #93c5fd;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.75rem;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.toggle-note-btn:hover {
    text-decoration: underline;
    color: #bfdbfe;
}

/* ==================== QUILL EDITOR STYLES ==================== */

.note-editor {
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.note-editor:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.note-editor .ql-toolbar {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(167, 139, 250, 0.05));
    border: none !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
    padding: 10px;
}

.note-editor .ql-container {
    background: rgba(0, 0, 0, 0.2);
    border: none !important;
    color: #d1d5db;
    min-height: 100px;
    font-size: 0.875rem;
}

.note-editor .ql-editor::before {
    color: #6b7280 !important;
    font-style: normal !important;
    padding-left: 12px;
}

.note-editor .ql-editor {
    padding: 12px;
}

.note-editor .ql-snow .ql-stroke {
    stroke: #9ca3af;
}

.note-editor .ql-snow .ql-fill {
    fill: #9ca3af;
}

.note-editor .ql-snow .ql-picker-label {
    color: #9ca3af;
}

.note-editor .ql-snow .ql-active .ql-stroke {
    stroke: #818cf8;
}

.note-editor .ql-snow .ql-active .ql-fill {
    fill: #818cf8;
}

.note-editor .ql-snow.ql-toolbar button:hover .ql-stroke {
    stroke: #c7d2fe;
}

.note-editor .ql-snow.ql-toolbar button:hover .ql-fill {
    fill: #c7d2fe;
}

.ql-snow .ql-editor pre.ql-syntax {
    background-color: #111827;
    color: #e5e7eb;
    padding: 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ==================== ATTACHMENTS ==================== */

.attachment-thumbnail {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.attachment-thumbnail:hover {
    transform: scale(1.05);
    border-color: #6366f1;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.attachment-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #1f2937;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.group:hover .attachment-delete-btn {
    opacity: 1;
    transform: scale(1);
}

/* ==================== CHAR COUNTER ==================== */

.char-counter {
    transition: color 0.2s ease;
    font-size: 0.75rem;
    color: #9ca3af;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.danger {
    color: #ef4444;
}

/* ==================== MENTIONED NOTE ==================== */

.mentioned-note {
    border-left: 4px solid #818cf8 !important;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(99, 102, 241, 0.05)) !important;
}

.mentioned-note .note-text {
    color: #e0e7ff !important;
    font-weight: 500;
}

/* ==================== MENTION DROPDOWN ==================== */

.mention-dropdown {
    display: none;
    position: absolute;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
}

.mention-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #d1d5db;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.mention-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mention-name {
    flex-grow: 1;
}

/* ==================== MENTION NOTIFICATIONS ==================== */

.mention-notification {
    animation: slideInRight 0.3s ease-out, mentionPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%) !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
}

.mention-notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
    animation: slideInRight 0.3s ease-out; /* Stop pulse on hover */
}

/* Pulse animation for mention notifications */
@keyframes mentionPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6);
    }
}

/* ==================== MILESTONE NOTIFICATIONS ==================== */

.milestone-notification {
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #78350f 0%, #a16207 100%) !important;
    backdrop-filter: none !important;
}

.milestone-notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.3);
    background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%) !important;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== UTILITY CLASSES ==================== */

.hidden {
    display: none !important;
}

.unread-activity p {
    color: #a5b4fc !important;
}

.kudos-given {
    color: #4ade80 !important;
    transform: scale(1.1);
}

.kudos-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.slide-in {
    animation: slideInUp 0.3s ease-out;
}

#tickets-footer.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .modern-btn-primary,
    .modern-btn-secondary,
    .modern-btn-success,
    .modern-btn-danger,
    .modern-btn-info,
    .modern-btn-purple,
    .modern-btn-cyan,
    .modern-btn-teal,
    .modern-btn-warning {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ==================== MODAL CONSISTENCY ==================== */

.modal .glassmorphism {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.modal input[type="text"],
.modal input[type="number"],
.modal input[type="date"],
.modal input[type="time"],
.modal select,
.modal textarea {
    background: rgba(55, 65, 81, 0.7) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #e5e7eb !important;
}

.modal input[type="text"]:focus,
.modal input[type="number"]:focus,
.modal input[type="date"]:focus,
.modal input[type="time"]:focus,
.modal select:focus,
.modal textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* ==================== THREADED NOTES ==================== */

.note-container.ml-6 {
    background: rgba(67, 56, 202, 0.05);
    border-left: 3px solid rgba(99, 102, 241, 0.5);
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.note-container.ml-6 .ql-editor {
    font-size: 0.85rem;
}

.reply-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #a5b4fc;
}

/* ==================== PRESENCE INDICATORS ==================== */

.presence-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.presence-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #e5e7eb;
}

.presence-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
    margin-right: 0.25rem;
}

/* ==================== RELATIONSHIP CHIPS ==================== */

.relationship-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: #a5b4fc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.relationship-chip:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
}

.relationship-chip.duplicate {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.relationship-chip.duplicate:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
}

/* ==================== STARRED TAB ==================== */

#tab-starred {
    font-size: 1.2rem;
}

.starred-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
}

.starred-empty-state svg {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}
.pinned-ticket {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.pinned-ticket:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}
/* Add highlight effect for navigated tickets */
.ticket-card {
    transition: all 0.3s ease;
}

.ticket-card.ring-2 {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}
/* Note action buttons hover effects */
.note-container button {
    transition: all 0.2s ease;
}

.note-container button:hover {
    transform: translateY(-1px);
}

.note-container button:active {
    transform: translateY(0);
}

/* Remove default padding from Quill editor in notes */
.note-text-display.ql-editor {
    padding: 0 !important;
}
/* Kudos button animation when liked */
@keyframes kudos-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.kudos-animation {
    animation: kudos-pop 0.3s ease;
}

/* Thumbs up scale transition */
.note-container button span.text-base {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Button hover effects */
.note-container button:hover span.text-base {
    transform: scale(1.1);
}

/* Smooth transitions for all button states */
.note-container button {
    transition: all 0.2s ease;
}
/* Custom scrollbar for notes section */
.max-h-96.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

.max-h-96.overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.3);
    border-radius: 4px;
}

.max-h-96.overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

.max-h-96.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* Firefox scrollbar */
.max-h-96.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) rgba(55, 65, 81, 0.3);
}

/* Smooth scroll behavior */
.max-h-96.overflow-y-auto {
    scroll-behavior: smooth;
}
/* Solid glassmorphism for popups that need better readability */
.glassmorphism-solid {
    background: rgba(31, 41, 55, 0.98); /* Much less transparent - almost solid */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

/* Activity log specific styles */
#activity-log {
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Activity items styling */
#activity-list {
    overflow-y: scroll;
}

#activity-list > div {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#activity-list > div:hover {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Activity text contrast */
#activity-list .activity-username {
    color: #a5b4fc; /* Indigo 300 */
    font-weight: 600;
}

#activity-list .activity-action {
    color: #e5e7eb; /* Gray 200 */
}

#activity-list .activity-time {
    color: #9ca3af; /* Gray 400 */
    font-size: 0.75rem;
}

/* Custom scrollbar for activity log */
#activity-log::-webkit-scrollbar {
    width: 6px;
}

#activity-log::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.3);
    border-radius: 3px;
}

#activity-log::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 3px;
}

#activity-log::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}
/* Glassmorphism for modals */
.glassmorphism-solid {
    background: rgba(31, 41, 55, 0.98);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

/* ==================== TYPING INDICATORS ==================== */

#typing-indicator-container {
    padding: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.5rem;
    animation: fadeIn 0.3s ease-in-out;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #6366f1;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== STATUS/BREAK SYSTEM ==================== */

.status-option-card.selected {
    border-color: currentColor;
    background: rgba(99, 102, 241, 0.1);
}

.duration-option {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    background: rgba(55, 65, 81, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 600;
}

.duration-option:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.1);
}

.duration-option.selected {
    border-color: rgb(99, 102, 241);
    background: rgba(99, 102, 241, 0.2);
    color: rgb(167, 139, 250);
}

.status-notification-toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-notification-toast.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Status indicator colors */
.status-coffee { color: #F59E0B; border-color: #F59E0B; }
.status-lunch { color: #F97316; border-color: #F97316; }
.status-meeting { color: #3B82F6; border-color: #3B82F6; }
.status-away { color: #A855F7; border-color: #A855F7; }
.status-personal { color: #10B981; border-color: #10B981; }
.status-other { color: #6B7280; border-color: #6B7280; }

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* User on break distinctive styles */
.user-on-break {
    position: relative;
    border-width: 2px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    animation: break-pulse 2s ease-in-out infinite;
}

.user-on-break.status-coffee_break {
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.user-on-break.status-lunch {
    border-color: rgba(249, 115, 22, 0.6) !important;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

.user-on-break.status-meeting {
    border-color: rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.user-on-break.status-away {
    border-color: rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.user-on-break.status-personal {
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.user-on-break.status-other {
    border-color: rgba(107, 114, 128, 0.6) !important;
    box-shadow: 0 0 20px rgba(107, 114, 128, 0.3);
}

@keyframes break-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        opacity: 0.85;
        box-shadow: 0 0 30px currentColor;
    }
}

/* Break status badge overlay */
.user-on-break::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, transparent 0%, currentColor 100%);
    opacity: 0.05;
    pointer-events: none;
    border-radius: inherit;
}

/* ==================== EMOJI REACTIONS ==================== */

.reaction-btn {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    transform: scale(1.1);
}

.reaction-btn.reaction-active {
    box-shadow: 0 0 0 2px currentColor;
}

.reaction-picker {
    animation: slideUpReaction 0.2s ease-out;
}

@keyframes slideUpReaction {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reaction-picker-btn {
    transition: all 0.2s ease;
}

.reaction-picker-btn:hover {
    transform: scale(1.25);
}

.reaction-add-btn {
    position: relative;
}

.reaction-add-btn:hover span {
    transform: scale(1.2);
    display: inline-block;
}

.reaction-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -100%);
    transition: opacity 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.reaction-tooltip.show {
    opacity: 1;
}

.reaction-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Reaction animations */
@keyframes reactionPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.reaction-btn.just-added {
    animation: reactionPop 0.3s ease;
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

/* Content visibility for tickets - browser only renders visible items */
.ticket-item,
[id^="ticket-"],
.ticket-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
}

/* GPU acceleration for animations */
.modern-card,
.ticket-item,
.modal,
.notification {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Optimize font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Reduce paint on scroll */
.ticket-list,
.notes-container,
.activity-list {
    will-change: scroll-position;
    transform: translateZ(0);
}

/* Optimize backdrop filters on lower-end devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Contain layout changes */
.ticket-item,
.ticket-card {
    contain: layout style paint;
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

/* Enable hardware acceleration for scrollable containers */
main,
.overflow-y-auto,
[style*="overflow-y"] {
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    will-change: scroll-position;
}

/* Optimize ticket cards for fast rendering - removed content-visibility as it causes issues on mobile */

/* Fast click response - remove tap delay on mobile */
a, button, .ticket-card, [onclick] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Optimize animations for 60fps */
@media (prefers-reduced-motion: no-preference) {
    * {
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Force GPU compositing for smooth transforms - REMOVED for ticket-card to prevent text blur */
.badge-card,
.badge-holder {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Keep ticket cards crisp without GPU acceleration */
.ticket-card {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

/* Phase 3: Professional ticket separators */
.ticket-card {
    border-bottom: 1px solid rgba(107, 114, 128, 0.15);
}

.ticket-card:last-child {
    border-bottom: none;
}

/* Phase 5: Sidebar section backgrounds for better visual separation */
#sidebar > div[class*="bg-"] {
    background-color: rgba(31, 41, 55, 0.25) !important;
    border-color: rgba(75, 85, 99, 0.3) !important;
}

/* Enhanced background for Team Stats section */
#sidebar > div:has(#stats-container) {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.4) 0%, rgba(17, 24, 39, 0.3) 100%) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

/* Enhanced background for Leaderboard section */
#sidebar > div:has(#leaderboard-container) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(99, 102, 241, 0.06) 100%) !important;
    border-color: rgba(147, 51, 234, 0.25) !important;
}

/* Phase 6: Professional typography adjustments */

/* Improved ticket subject readability */
.ticket-header p.text-white.text-sm {
    font-size: 0.875rem !important; /* 14px - slightly reduced */
    line-height: 1.5 !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important; /* Slight tightening for modern look */
}

/* Refined ticket metadata text */
.ticket-header .text-xs {
    font-size: 0.6875rem !important; /* 11px instead of 12px */
    letter-spacing: 0.01em !important;
    font-weight: 500 !important;
}

/* Badge text refinement - slightly smaller, more consistent */
.ticket-header .text-\[10px\] {
    font-size: 0.625rem !important; /* Keep at 10px but ensure consistency */
    font-weight: 600 !important;
    letter-spacing: 0.02em !important; /* Better readability at small size */
}

/* Priority badge specific adjustments */
.priority-badge {
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

/* Ticket ID styling - more prominent */
.ticket-header .font-bold.text-indigo-400 {
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

/* Note text refinement */
.note-text-display p {
    line-height: 1.6 !important;
    letter-spacing: -0.005em !important;
}

/* Sidebar section headings */
#sidebar h3.text-sm {
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    font-size: 0.8125rem !important; /* 13px */
}

/* Modal headings refinement */
.text-2xl.font-bold {
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.3 !important;
}

/* Button text consistency */
button.font-bold,
button.font-semibold {
    letter-spacing: -0.005em !important;
}

/* KB Tab Glow Effect - Special notification when new KB entry is added */
.kb-new-entry-glow {
    position: relative;
    animation: kb-glow-pulse 2s ease-in-out infinite !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6), 0 0 30px rgba(139, 92, 246, 0.4) !important;
}

.kb-new-entry-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    animation: kb-dot-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

@keyframes kb-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.6), 0 0 30px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.8), 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

@keyframes kb-dot-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}
