.driver-popover {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    color: #1d1d1f !important;
    padding: 20px !important;
    min-width: 280px !important;
}

.driver-popover .driver-popover-title {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
}

.driver-popover .driver-popover-description {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #1d1d1f !important;
    opacity: 0.8 !important;
    margin-bottom: 20px !important;
}

.driver-popover button {
    background-color: #007aff !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    transition: all 0.2s !important;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3) !important;
}

.driver-popover button:hover {
    background-color: #0062cc !important;
    transform: scale(1.02);
}

.driver-popover button.driver-popover-prev-btn {
    background-color: transparent !important;
    color: #86868b !important;
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.driver-popover button.driver-popover-prev-btn:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #000 !important;
}

.driver-popover-arrow {
    display: none !important;
}

html.dark .driver-popover {
    background-color: rgba(30, 30, 30, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f5f5f7 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

html.dark .driver-popover .driver-popover-description {
    color: #f5f5f7 !important;
}

html.dark .driver-popover button.driver-popover-prev-btn {
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .driver-popover button.driver-popover-prev-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.driver-popover button.driver-popover-close-btn {
    background-color: transparent !important;
    color: #9ca3af !important;
    box-shadow: none !important;
    border: none !important;
    font-size: 20px !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    top: 10px !important;
    right: 10px !important;
}

.driver-popover button.driver-popover-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #1d1d1f !important;
}

html.dark .driver-popover button.driver-popover-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.drag-item {
    cursor: grab;
}

.drag-item:active {
    cursor: grabbing;
    transform: scale(1.02);
}

.stat-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    border-left-width: 5px;
}

html.dark .stat-card {
    background: rgba(60, 60, 60, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #eee;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

html.dark .stat-card:hover {
    background: rgba(80, 80, 80, 0.8);
}

.task-block {
    position: absolute;
    left: 4px;
    right: 2px;
    background: #fafafa !important;
    border-left: 4px solid var(--task-border, #007aff) !important;
    border-radius: 6px;
    color: #000 !important;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 4px 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark .task-block {
    background: rgba(45, 45, 48, 0.95) !important;
    color: #f5f5f7 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.task-block .secondary-text {
    color: #6e6e73 !important;
    font-size: 11px;
}

html.dark .task-block .secondary-text {
    color: #a1a1a6 !important;
}

.task-block.is-selected {
    box-shadow: 0 0 0 2px #0A84FF, 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 100 !important;
    transform: scale(1.02);
}

html.dark .task-block.is-selected {
    box-shadow: 0 0 0 2px #ffffff, 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 100 !important;
    transform: scale(1.02);
}

.resize-handle {
    height: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
    cursor: ns-resize;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.task-block:hover .resize-handle {
    opacity: 1;
}

@keyframes flash-highlight {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.6);
    }
}

.is-flashing {
    animation: flash-highlight 1.2s ease-in-out infinite;
    z-index: 110 !important;
}

.task-block.is-ghost {
    background: repeating-linear-gradient(
            45deg,
            rgba(200, 200, 200, 0.3),
            rgba(200, 200, 200, 0.3) 10px,
            rgba(180, 180, 180, 0.3) 10px,
            rgba(180, 180, 180, 0.3) 20px
    ) !important;
    border-left-color: #9ca3af !important;
    color: #6b7280 !important;
    opacity: 0.6;
    pointer-events: auto !important;
    filter: grayscale(100%);
    z-index: 0 !important;
}

.grid-cols-7 .text-\[11px\].is-ghost {
    background: repeating-linear-gradient(
            45deg,
            rgba(200, 200, 200, 0.3),
            rgba(200, 200, 200, 0.3) 10px,
            rgba(180, 180, 180, 0.3) 10px,
            rgba(180, 180, 180, 0.3) 20px
    ) !important;
    color: #6b7280 !important;
    opacity: 0.6;
    box-shadow: none !important;
    border: 1px solid rgba(180, 180, 180, 0.3);
    pointer-events: auto;
}

html.dark .grid-cols-7 .text-\[11px\].is-ghost {
    background: repeating-linear-gradient(
            45deg,
            rgba(60, 60, 60, 0.3),
            rgba(60, 60, 60, 0.3) 10px,
            rgba(80, 80, 80, 0.3) 10px,
            rgba(80, 80, 80, 0.3) 20px
    ) !important;
    color: #9ca3af !important;
    border-color: rgba(80, 80, 80, 0.3);
}

.grid-cols-7 .text-\[11px\].is-ghost .w-1\.5.h-1\.5 {
    background-color: #9ca3af !important;
}

html.dark .task-block.is-ghost {
    background: repeating-linear-gradient(
            45deg,
            rgba(60, 60, 60, 0.3),
            rgba(60, 60, 60, 0.3) 10px,
            rgba(80, 80, 80, 0.3) 10px,
            rgba(80, 80, 80, 0.3) 20px
    ) !important;
    border-left-color: #4b5563 !important;
    color: #9ca3af !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-window {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(40px) saturate(200%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

html.dark .modal-window {
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cursor-ns-resize {
    will-change: transform;
}

.segmented-control {
    background: rgba(118, 118, 128, 0.12);
    border-radius: 8px;
    padding: 3px;
    display: flex;
}

html.dark .segmented-control {
    background: rgba(118, 118, 128, 0.24);
}

.segment-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: default;
    transition: all 0.2s;
}

html.dark .segment-btn {
    color: #f5f5f7;
}

.segment-btn.active {
    background: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
    color: #000;
}

html.dark .segment-btn.active {
    background: #636366;
    color: #fff;
}

.glass-input {
    background: rgba(255, 255, 255, 0.8);
    color: #111;
    caret-color: #007aff;
    -webkit-user-select: text !important;
    user-select: text !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    transition: all 0.2s;
}

.glass-input:focus {
    background: #fff;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

html.dark .glass-input {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border-color: transparent;
    caret-color: #fff;
}

html.dark .glass-input:focus {
    background: rgba(255, 255, 255, 0.15);
}

@keyframes menu-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%),
    #121212;
    background-size: cover;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.loader-glass-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #007aff;
    border-right-color: #a855f7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.loader-text {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

#global-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.05);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

input[type="time"]::-webkit-calendar-picker-indicator {
    background: transparent !important;
    display: none !important;
    -webkit-appearance: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.bubble-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
}

.bubble-picker-box {
    position: fixed;
    width: 280px;
    height: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: visible;
    animation: bubblePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .bubble-picker-box {
    background: rgba(40, 40, 40, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 50px rgba(0, 0, 0, 0.5);
}

html.dark .bubble-picker-box::after {
    border-color: rgba(40, 40, 40, 0.95) transparent transparent transparent;
}

.bubble-columns {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    margin-top: 20px;
    border-radius: 32px 32px 0 0;
}

.bubble-col {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100%;
    padding: 88px 0;
    z-index: 1;
}

.bubble-col::-webkit-scrollbar {
    display: none;
}

.bubble-item {
    height: 44px;
    line-height: 44px;
    text-align: center;
    font-size: 26px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    scroll-snap-align: center;
    color: #000;
    opacity: 0.3;
    transition: opacity 0.2s, transform 0.2s;
}

html.dark .bubble-item {
    color: #fff;
}

.bubble-item.active-item {
    opacity: 1;
    font-weight: 600;
}

.bubble-footer {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.btn-reset {
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    font-size: 16px;
    font-weight: 600;
    border-radius: 999px;
    transition: background 0.2s;
}

html.dark .btn-reset {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-reset:active {
    opacity: 0.7;
}

.btn-confirm {
    width: 56px;
    height: 56px;
    background: #007aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    transition: transform 0.1s;
}

.btn-confirm:active {
    transform: scale(0.95);
}

@keyframes bubblePop {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ease-spring {
    transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.settings-item-input {
    -webkit-user-select: text !important;
    user-select: text !important;
    cursor: text !important;
    caret-color: #007aff;
}

html.dark .settings-item-input {
    caret-color: #fff;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 4px 4px 0 4px !important;
    background-color: rgba(255, 255, 255, 0.99) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 9999 !important;
    animation: menu-slide-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translate3d(0, 0, 0);
}

html.dark .custom-dropdown-menu {
    background-color: rgba(30, 30, 30, 0.99) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

html.dark .custom-dropdown-menu .sticky {
    background-color: rgba(30, 30, 30, 0.99) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.zoom-in-enter-active,
.zoom-in-leave-active,
.zoom-out-enter-active,
.zoom-out-leave-active {
    transition: all 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    transform-origin: center center;
}

.zoom-in-enter-from {
    opacity: 0;
    transform: scale(0.85);
}

.zoom-in-enter-active {
    z-index: 20;
}

.zoom-in-leave-to {
    opacity: 0;
    transform: scale(1.15);
}

.zoom-in-leave-active {
    z-index: 10;
}

.zoom-out-enter-from {
    opacity: 0;
    transform: scale(1.15);
}

.zoom-out-enter-active {
    z-index: 10;
}

.zoom-out-leave-to {
    opacity: 0;
    transform: scale(0.85);
}

.zoom-out-leave-active {
    z-index: 20;
}

.view-slide-left-enter-active,
.view-slide-left-leave-active,
.view-slide-right-enter-active,
.view-slide-right-leave-active {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
    flex: 1;
}

.view-slide-left-enter-from {
    opacity: 0;
    transform: translateX(30px);
}

.view-slide-left-leave-to {
    opacity: 0;
    transform: translateX(-30px);
}

.view-slide-right-enter-from {
    opacity: 0;
    transform: translateX(-30px);
}

.view-slide-right-leave-to {
    opacity: 0;
    transform: translateX(30px);
}

.slide-next-enter-active,
.slide-next-leave-active,
.slide-prev-enter-active,
.slide-prev-leave-active {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    overflow: hidden;
    z-index: 1;
}

.slide-next-enter-from {
    transform: translate3d(100%, 0, 0);
}

.slide-next-enter-active {
    z-index: 20;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.05);
}

.slide-next-leave-to {
    transform: translate3d(-25%, 0, 0);
    opacity: 0;
}

.slide-next-leave-active {
    z-index: 10;
}

.slide-prev-enter-from {
    transform: translate3d(-100%, 0, 0);
}

.slide-prev-enter-active {
    z-index: 20;
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.05);
}

.slide-prev-leave-to {
    transform: translate3d(25%, 0, 0);
    opacity: 0;
}

.slide-prev-leave-active {
    z-index: 10;
}

.settings-group-container {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

html.dark .settings-group-container {
    background: rgba(255, 255, 255, 0.03);
}

.settings-group-container.drag-over {
    background: rgba(0, 122, 255, 0.1);
    border-color: #007aff;
}

.settings-group-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
}

.settings-group-input {
    background: transparent;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    width: 100%;
}

.settings-group-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: #007aff;
    color: #000;
}

html.dark .settings-group-input:focus {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

input[type=range].custom-slider {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    opacity: 1 !important;
    height: 30px;
    position: relative;
    z-index: 10;
}

input[type=range].custom-slider:focus {
    outline: none;
}

input[type=range].custom-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    cursor: pointer;
    background: #f3f4f6;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark input[type=range].custom-slider::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

input[type=range].custom-slider::-webkit-slider-thumb {
    height: 28px;
    width: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ef4444;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -9px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
