* {
    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)
}

/* Gradients */
.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-cal {
    background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899)
}

/* Sidebar */
.sidebar-link {
    transition: all .25s cubic-bezier(.4, 0, .2, 1)
}

.sidebar-link:hover {
    transform: translateX(6px)
}

.sidebar-link.active {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF)
}

.dark .sidebar-link.active {
    background: linear-gradient(135deg, #312E81, #3730A3)
}

.sidebar-mobile {
    transform: translateX(-100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1)
}

.sidebar-mobile.open {
    transform: translateX(0)
}

/* Modal */
.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) !important;
    opacity: 1 !important
}

/* Loader */
.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
}

/* Ripple */
.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
    }
}

/* Notification badge */
@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
}

/* Toast */
.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
}

/* Calendar grid */
.cal-day {
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    cursor: pointer;
    position: relative;
    min-height: 110px
}

.cal-day:hover {
    background: rgba(99, 102, 241, .04);
    border-radius: 12px
}

.dark .cal-day:hover {
    background: rgba(99, 102, 241, .08)
}

.cal-day.today .day-num {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white;
    border-radius: 50%
}

.cal-day.selected .day-num {
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: white;
    border-radius: 50%
}

.cal-day.other-month {
    opacity: .35
}

.cal-day.weekend .day-num {
    color: #F43F5E
}

.dark .cal-day.weekend .day-num {
    color: #FB7185
}

.day-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s
}

/* Event chips */
.ev-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all .15s;
    max-width: 100%
}

.ev-chip:hover {
    filter: brightness(.93);
    transform: scale(1.01)
}

/* Week view */
.wk-slot {
    border-bottom: 1px solid;
    transition: background .15s;
    cursor: pointer;
    min-height: 48px;
    position: relative
}

.wk-slot:hover {
    background: rgba(99, 102, 241, .04)
}

.dark .wk-slot:hover {
    background: rgba(99, 102, 241, .08)
}

.wk-event {
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    position: absolute;
    left: 4px;
    right: 4px;
    overflow: hidden;
    transition: all .2s;
    border-left: 3px solid rgba(255, 255, 255, .5)
}

.wk-event:hover {
    filter: brightness(.92);
    transform: scale(1.01);
    z-index: 10
}

/* Day view timeline */
.timeline-hour {
    border-bottom: 1px solid;
    position: relative;
    min-height: 64px
}

.timeline-event {
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    position: absolute;
    left: 72px;
    right: 8px;
    overflow: hidden;
    transition: all .2s;
    border-left: 4px solid rgba(255, 255, 255, .6)
}

.timeline-event:hover {
    filter: brightness(.92);
    transform: scale(1.005);
    z-index: 10
}

/* Mini calendar */
.mini-day {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s
}

.mini-day:hover {
    background: rgba(99, 102, 241, .12)
}

.mini-day.today {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white
}

.mini-day.selected {
    background: rgba(99, 102, 241, .15);
    color: #6366F1;
    font-weight: 800
}

.dark .mini-day.selected {
    color: #A5B4FC
}

.mini-day.other {
    color: #CBD5E1
}

.dark .mini-day.other {
    color: #475569
}

/* Upcoming events */
.upcoming-item {
    transition: all .2s;
    cursor: pointer
}

.upcoming-item:hover {
    transform: translateX(4px)
}

/* Drag ghost */
.dragging {
    opacity: .5;
    transform: scale(.97)
}

/* View toggle */
.view-btn {
    transition: all .2s
}

.view-btn.active {
    background: white;
    color: #6366F1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08)
}

.dark .view-btn.active {
    background: #1E293B;
    color: #A5B4FC
}

/* Agenda */
.agenda-day-hdr {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px)
}

/* Progress bar */
.prog-bar {
    transition: width 1.2s cubic-bezier(.4, 0, .2, 1)
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.slide-up {
    animation: slideUp .35s ease forwards
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(.92)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

.pop-in {
    animation: popIn .3s cubic-bezier(.4, 0, .2, 1) forwards
}

/* Color picker */
.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .15s;
    border: 2px solid transparent
}

.color-swatch:hover {
    transform: scale(1.2)
}

.color-swatch.selected {
    border-color: white;
    box-shadow: 0 0 0 2px currentColor
}

/* Recurrence badge */
.rec-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px
}