/* Projects sidebar redesigned by Figma reference */
.gvp-projects-sidebar {

    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
    transition: width 0.25s ease, left 0.25s ease, padding 0.25s ease;
    overflow: hidden;
    /* Не розтягуватись на всю висоту сторінки: обрізання по висоті вікна */
    align-self: flex-start;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 0;
    box-sizing: border-box;
}

.gvp-projects-sidebar--no-main-sidebar {
    left: 0;
}

.gvp-projects-sidebar--collapsed {
    width: 46px;
    padding-inline: 6px;
}

.gvp-projects-sidebar__header {
    padding: 0 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    font-size: 8px;
    color: rgba(161, 161, 161, 1);
}

.gvp-projects-sidebar__title {
    font-size: 41px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f2f4ff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-shadow: 0 1px 10px rgba(49, 72, 175, 0.2);
}

.gvp-projects-sidebar__title i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__title {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__header {
    justify-content: center;
    padding: 0;
}

.gvp-projects-sidebar__toggle {
    background: none;
    border: none;
    color: rgba(198, 206, 255, 0.6);
    cursor: pointer;
    width: 26px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.gvp-projects-sidebar__toggle:hover {
    color: #f0f4ff;
    background: rgba(132, 104, 255, 0.18);
}

.gvp-projects-sidebar__toggle i {
    width: 16px;
    height: 16px;
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__toggle {
    transform: rotate(180deg);
}

.gvp-projects-sidebar__toolbar-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 42px;
    padding: 0 2px 0 4px;
    box-sizing: border-box;
}

.gvp-projects-sidebar__toolbar-row .gvp-projects-sidebar__tabs {
    flex: 1 1 auto;
    min-width: 0;
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__toolbar-row {
    justify-content: center;
    padding: 0;
}

.gvp-projects-sidebar__search {
    position: relative;
    margin-left: 5px;
    margin-right: 5px;
    padding: 0;
    border: 1px solid rgba(112, 38, 201, 0.24);
    background: linear-gradient(135deg, rgba(44, 34, 57, 0.95) 0%, rgba(38, 16, 66, 0.58) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    height: fit-content;
    box-shadow:
        inset 0px 1px 0px 0px rgba(255, 255, 255, 0.06),
        0px 0px 24px 0px rgba(162, 34, 221, 0.18);
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__search {
    display: none;
}

.gvp-projects-sidebar__search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(140, 161, 255, 0.72);
    pointer-events: none;
}

.gvp-projects-sidebar__search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: transparent;
    border: 0;
    color: #e6ebff;
    font-size: 0.9rem;
    outline: none;
}

.gvp-projects-sidebar__search-input::placeholder {
    color: rgba(164, 177, 233, 0.65);
}

.gvp-projects-sidebar__tabs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-radius: 14px;
    border: none;
    background: unset;
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__tabs {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.gvp-projects-sidebar__tab {
    width: 42px;
    height: 42px;
    border: none;
    border-image: none;
    border-radius: 11px;
    background: unset;
    background-color: unset;
    color: rgba(202, 212, 255, 0.7);
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gvp-projects-sidebar__tab i {
    width: 20px;
    height: 20px;
}

.gvp-projects-sidebar__tab:hover {
    color: #f2f4ff;
    transform: translateY(-1px);
}

.gvp-projects-sidebar__tab--active {
    box-shadow: none;
}

.gvp-projects-sidebar__tab--active[data-filter="pending"] {
    color: rgba(156, 147, 165, 1);
}

.gvp-projects-sidebar__tab--active[data-filter="approved"] {
    color: #66d0ff;
}

.gvp-projects-sidebar__tab--active[data-filter="hold"] {
    color: #ceb2ff;
}

.gvp-projects-sidebar__tab--active[data-filter="archive"] {
    color: #f4d09b;
}

.gvp-projects-sidebar__tab--active[data-filter="trash"] {
    color: #ff9ea8;
}

.gvp-projects-sidebar__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.gvp-projects-sidebar--collapsed .gvp-projects-sidebar__list {
    opacity: 0;
    pointer-events: none;
}

.gvp-projects-sidebar__list::-webkit-scrollbar {
    width: 8px;
}

.gvp-projects-sidebar__list::-webkit-scrollbar-track {
    background: rgba(12, 18, 46, 0.74);
    border-radius: 99px;
}

.gvp-projects-sidebar__list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(127, 97, 255, 0.8), rgba(84, 120, 255, 0.66));
    border-radius: 99px;
}

.gvp-projects-sidebar__loader,
.gvp-projects-sidebar__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #a8b2de;
    font-size: 0.875rem;
}

.gvp-sidebar-project {
    padding: 14px 14px 12px;
    border-radius: 19px;
    background-color: rgba(40, 27, 70, 0.5);
    background-image: none;
    border: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 22px rgba(13, 13, 31, 0.45);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.gvp-sidebar-project:not(.gvp-sidebar-project--active):hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(206, 181, 255, 0.35),
        0 10px 26px rgba(20, 16, 42, 0.55);
}

.gvp-sidebar-project--active {
    background: radial-gradient(
        ellipse at 100% 50%,
        rgba(182, 120, 255, 0.12) 0%,
        rgba(89, 38, 151, 0) 50%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 1) 50%,
        rgba(70, 36, 116, 0.78) 50%,
        rgba(55, 37, 92, 0.74) 35%,
        rgba(37, 28, 69, 0.75) 100%
    );
    border: 1px solid rgba(58, 222, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(58, 222, 255, 0.2),
        0 10px 30px rgba(33, 124, 255, 0.24);
}

.gvp-sidebar-project--active:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(58, 222, 255, 0.28),
        0 12px 32px rgba(33, 124, 255, 0.3);
}

.gvp-sidebar-project__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gvp-sidebar-project__header--no-priority {
    grid-template-columns: 1fr auto;
}

.gvp-sidebar-project__priority-label {
    color: #ff486f;
    font-size: 23px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px rgba(255, 72, 111, 0.32);
}

.gvp-sidebar-project__name {
    min-width: 0;
    color: #dbdeed;
    font-size: 1.16rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.gvp-sidebar-project__type-badge {
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid #28ddff;
    color: #20d1ff;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
    box-shadow: 0 0 12px rgba(40, 221, 255, 0.16);
}

.gvp-sidebar-project__meta-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 8px;
}

.gvp-sidebar-project__platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f2ddff;
    font-size: 1.2rem;
    font-weight: 500;
}

.gvp-sidebar-project__platform i {
    color: #af55ff;
    font-size: 16px;
}

.gvp-sidebar-project__date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.gvp-sidebar-project__date--start {
    color: #cfef78;
    border: 1px solid rgba(145, 215, 42, 0.55);
    background: rgba(95, 131, 23, 0.32);
}

.gvp-sidebar-project__date--end {
    color: #c588ff;
    border: 1px solid rgba(168, 96, 255, 0.56);
    background: rgba(113, 57, 172, 0.26);
}

.gvp-sidebar-project__date-arrow {
    color: rgba(191, 160, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.gvp-sidebar-project__direction-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gvp-sidebar-project__direction-logo .gvp-direction-logo,
.gvp-sidebar-project__direction-logo .gvp-direction-initials {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(199, 122, 255, 0.65);
    box-shadow: 0 0 12px rgba(139, 84, 255, 0.25);
}

.gvp-sidebar-project__direction-logo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(199, 122, 255, 0.65);
    box-shadow: 0 0 12px rgba(139, 84, 255, 0.25);
}

.gvp-sidebar-project__tasks-count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #b6c1f2;
    font-size: 0.78rem;
}

.gvp-sidebar-project__tasks-completed {
    color: #9cf19f;
    font-weight: 700;
}

.gvp-sidebar-project__tasks-overdue {
    color: #ff9494;
    font-weight: 700;
}

.gvp-sidebar-project__tasks-separator,
.gvp-sidebar-project__tasks-total,
.gvp-sidebar-project__tasks-empty {
    color: rgba(192, 203, 244, 0.85);
}

.gvp-sidebar-project__tasks-error {
    color: #fca5a5;
}

.gvp-sidebar-project__stages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Етапи: ті ж токени, що й .gp-project-detail-progress-bar__step-box (картка «наповнення» проєкту) */
.gvp-sidebar-project__stage-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-size: 6px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
    transition: box-shadow 0.35s ease, border-color 0.25s ease, color 0.2s ease, background 0.25s ease, filter 0.2s ease;
}

.gvp-sidebar-project__stage-pill--pending,
.gvp-sidebar-project__stage-pill--ghost {
    background-color: rgba(42, 40, 52, 0.92);
    border: 1px solid rgba(100, 100, 112, 0.55);
    color: #9ca3af;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gvp-sidebar-project__stage-pill--active {
    background: linear-gradient(165deg, rgba(88, 45, 140, 0.55) 0%, rgba(45, 28, 78, 0.9) 100%);
    border: 2px solid rgba(192, 132, 252, 0.75);
    color: #f3e8ff;
    box-shadow:
        0 0 0 1px rgba(167, 139, 250, 0.35),
        0 0 18px rgba(139, 92, 246, 0.45),
        0 0 36px rgba(91, 33, 182, 0.25);
    animation: gvp-sidebar-stage-pill-in-progress 2.4s ease-in-out infinite;
}

.gvp-sidebar-project__stage-pill--completed {
    background: linear-gradient(165deg, rgba(45, 200, 148, 0.5) 0%, rgba(39, 196, 178, 0.85) 100%);
    border: 2px solid rgba(196, 181, 253, 0.85);
    color: #ede9fe;
    box-shadow:
        0 0 0 1px rgba(40, 195, 164, 0.45),
        0 0 22px 0 rgba(29, 134, 89, 0.55),
        0 0 42px 0 rgba(44, 206, 152, 0.3);
    animation: gvp-sidebar-stage-pill-completed 2.8s ease-in-out infinite;
}

@keyframes gvp-sidebar-stage-pill-in-progress {
    0%, 100% {
        filter: brightness(1);
        box-shadow:
            0 0 0 1px rgba(167, 139, 250, 0.35),
            0 0 16px rgba(139, 92, 246, 0.4),
            0 0 32px rgba(91, 33, 182, 0.22);
    }
    50% {
        filter: brightness(1.12);
        box-shadow:
            0 0 0 2px rgba(216, 180, 254, 0.5),
            0 0 26px rgba(167, 139, 250, 0.65),
            0 0 48px rgba(124, 58, 237, 0.4);
    }
}

@keyframes gvp-sidebar-stage-pill-completed {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.08);
    }
}

@media (max-width: 1400px) {
    .gvp-projects-sidebar {
        width: 332px;
    }
}
