* {
    font-family: 'Inter', sans-serif
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 99px
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155
}

.glass {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px)
}

.glow-primary {
    box-shadow: 0 0 25px rgba(99, 102, 241, .35)
}

.glow-rose {
    box-shadow: 0 0 20px rgba(244, 63, 94, .3)
}

.gradient-primary {
    background: linear-gradient(135deg, #6366F1, #8B5CF6)
}

.gradient-rose {
    background: linear-gradient(135deg, #F43F5E, #FB7185)
}

.gradient-success {
    background: linear-gradient(135deg, #10B981, #34D399)
}

.gradient-warning {
    background: linear-gradient(135deg, #F59E0B, #FBBF24)
}

.gradient-info {
    background: linear-gradient(135deg, #3B82F6, #60A5FA)
}

.gradient-cyan {
    background: linear-gradient(135deg, #06B6D4, #22D3EE)
}

.gradient-teal {
    background: linear-gradient(135deg, #14B8A6, #2DD4BF)
}

.gradient-orange {
    background: linear-gradient(135deg, #F97316, #FB923C)
}

.gradient-violet {
    background: linear-gradient(135deg, #7C3AED, #A78BFA)
}

.gradient-pink {
    background: linear-gradient(135deg, #EC4899, #F472B6)
}

.gradient-chat {
    background: linear-gradient(135deg, #F43F5E, #7C3AED, #3B82F6)
}

.sidebar-link {
    transition: all .25s cubic-bezier(.4, 0, .2, 1)
}

.sidebar-link:hover {
    transform: translateX(6px)
}

.sidebar-link.active {
    background: linear-gradient(135deg, #FFF1F2, #FFE4E6)
}

.dark .sidebar-link.active {
    background: linear-gradient(135deg, #4C0519, #881337)
}

.sidebar-mobile {
    transform: translateX(-100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1)
}

.sidebar-mobile.open {
    transform: translateX(0)
}

.modal-overlay {
    transition: opacity .3s ease, visibility .3s ease
}

.modal-content {
    transition: all .45s cubic-bezier(.4, 0, .2, 1)
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1
}

.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: sk 1.5s infinite
}

.dark .skeleton {
    background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%);
    background-size: 200% 100%
}

@keyframes sk {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-8px)
    }
}

.float-anim {
    animation: float 3s ease-in-out infinite
}

@keyframes pulse-ring {
    0% {
        transform: scale(.8);
        opacity: 1
    }

    100% {
        transform: scale(2.5);
        opacity: 0
    }
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-ring 2s infinite
}

.dark .notification-badge::after {
    border-color: #0B1120
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    transform: scale(0);
    animation: rp .6s linear;
    pointer-events: none
}

@keyframes rp {
    to {
        transform: scale(4);
        opacity: 0
    }
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, .18);
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    transform: translateY(100px);
    opacity: 0;
    transition: all .4s cubic-bezier(.4, 0, .2, 1);
    min-width: 280px
}

.dark .toast {
    background: #1E293B;
    color: #F1F5F9
}

.toast.show {
    transform: translateY(0);
    opacity: 1
}

/* Chat bubbles */
.bubble-agent {
    background: #F1F5F9;
    border-radius: 18px 18px 18px 4px;
    color: #1E293B
}

.dark .bubble-agent {
    background: #1E293B;
    color: #F1F5F9
}

.bubble-user {
    background: linear-gradient(135deg, #F43F5E, #7C3AED);
    border-radius: 18px 18px 4px 18px;
    color: white
}

.bubble-system {
    background: transparent;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    color: #94A3B8
}

.dark .bubble-system {
    border-color: #334155
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.96)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.bubble-anim {
    animation: bubbleIn .28s cubic-bezier(.4, 0, .2, 1) forwards
}

/* Session list */
.session-item {
    transition: all .2s ease;
    cursor: pointer;
    border-left: 3px solid transparent
}

.session-item:hover {
    background: rgba(244, 63, 94, .04);
    border-left-color: rgba(244, 63, 94, .3)
}

.dark .session-item:hover {
    background: rgba(244, 63, 94, .08)
}

.session-item.active {
    background: linear-gradient(135deg, rgba(244, 63, 94, .07), rgba(124, 58, 237, .05));
    border-left-color: #F43F5E
}

.dark .session-item.active {
    background: linear-gradient(135deg, rgba(244, 63, 94, .12), rgba(124, 58, 237, .08))
}

/* Status badges */
.status-online {
    background: #DCFCE7;
    color: #15803D
}

.status-away {
    background: #FEF9C3;
    color: #A16207
}

.status-busy {
    background: #FEE2E2;
    color: #DC2626
}

.status-offline {
    background: #F1F5F9;
    color: #64748B
}

.dark .status-online {
    background: rgba(16, 185, 129, .15);
    color: #34D399
}

.dark .status-away {
    background: rgba(234, 179, 8, .15);
    color: #FBBF24
}

.dark .status-busy {
    background: rgba(239, 68, 68, .15);
    color: #F87171
}

.dark .status-offline {
    background: rgba(71, 85, 105, .2);
    color: #94A3B8
}

/* Priority */
.priority-urgent {
    background: #FEE2E2;
    color: #DC2626
}

.priority-high {
    background: #FFEDD5;
    color: #C2410C
}

.priority-normal {
    background: #EFF6FF;
    color: #1D4ED8
}

.dark .priority-urgent {
    background: rgba(239, 68, 68, .15);
    color: #F87171
}

.dark .priority-high {
    background: rgba(249, 115, 22, .15);
    color: #FB923C
}

.dark .priority-normal {
    background: rgba(59, 130, 246, .15);
    color: #60A5FA
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94A3B8;
    display: inline-block
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: translateY(0)
    }

    40% {
        transform: translateY(-5px)
    }
}

/* Agent cards */
.agent-card {
    transition: all .3s cubic-bezier(.4, 0, .2, 1)
}

.agent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .12)
}

.dark .agent-card:hover {
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .4)
}

/* Queue pulse */
@keyframes queuePulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .5
    }
}

.queue-pulse {
    animation: queuePulse 1.5s ease-in-out infinite
}

/* Incoming chat animation */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.slide-in-bottom {
    animation: slideInBottom .4s ease forwards
}

/* Canned response */
.canned-item {
    transition: all .15s ease;
    cursor: pointer
}

.canned-item:hover {
    background: rgba(244, 63, 94, .06);
    color: #F43F5E
}

.dark .canned-item:hover {
    background: rgba(244, 63, 94, .1)
}

/* Emoji */
.emoji-btn {
    transition: transform .2s;
    display: inline-block;
    cursor: pointer
}

.emoji-btn:hover {
    transform: scale(1.3)
}

/* Live indicator */
@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, .5)
    }

    70% {
        box-shadow: 0 0 0 8px rgba(244, 63, 94, 0)
    }
}

.live-dot {
    animation: livePulse 1.8s infinite
}

/* Rating stars */
.star-btn {
    transition: transform .15s, color .15s
}

.star-btn:hover,
.star-btn.active {
    transform: scale(1.2);
    color: #F59E0B
}

/* Satisfaction ring */
.sat-ring {
    transition: stroke-dashoffset 1.5s cubic-bezier(.4, 0, .2, 1)
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.count-anim {
    animation: countUp .5s ease forwards
}

#chatInput:empty:before {
    content: attr(data-placeholder);
    color: #94A3B8;
    pointer-events: none
}

#chatInput:focus {
    outline: none
}