:root {
    --sidebar-right-bg: rgba(7, 19, 33, 0.85);
    --sidebar-right-card: rgba(0, 0, 0, 0.3);
    --sidebar-right-stroke: rgba(255, 255, 255, 0.08);
    --sidebar-right-text: #e6f4ff;
    --sidebar-right-muted: rgba(230, 244, 255, 0.75);
    --sidebar-right-accent: #10b981;
    --sidebar-right-accent-alt: #059669;
    --sidebar-right-shadow: 0 25px 55px rgba(4, 20, 40, 0.45);
    --sidebar-right-radius: 0;
}

.has-global-sidebars .sidebar-kanan {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    width: var(--sidebar-right-width);
    right: 0;
    top: 0;
    bottom: 0;
    margin-right: 0;
    padding: 16px;
    padding-top: 60px;
    overflow-y: auto;
    z-index: 900;
    background: var(--sidebar-right-bg);
    color: var(--sidebar-right-text);
    border-radius: var(--sidebar-right-radius);
    box-shadow: var(--sidebar-right-shadow);
    max-height: 100vh;
    border-left: 1px solid var(--sidebar-right-stroke);
    backdrop-filter: blur(10px);
}

.has-global-sidebars .sidebar-kanan::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/icon-hero.jpeg') center/cover;
    opacity: 0.03;
    mix-blend-mode: screen;
    pointer-events: none;
}

.sidebar-kanan__card {
    background: var(--sidebar-right-card);
    border-radius: var(--sidebar-right-radius);
    border: 1px solid var(--sidebar-right-stroke);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 16px;
    color: var(--sidebar-right-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    position: relative;
    overflow: hidden;
}

.sidebar-kanan__card:nth-child(1) {
    animation-delay: 0.1s;
}

.sidebar-kanan__card:nth-child(2) {
    animation-delay: 0.2s;
}

.sidebar-kanan__card:nth-child(3) {
    animation-delay: 0.3s;
}

.sidebar-kanan__card:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.3);
}

.sidebar-kanan__card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sidebar-right-stroke);
}

.sidebar-kanan__card header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sidebar-right-text);
    letter-spacing: 0.01em;
}

.sidebar-kanan__card header a {
    text-decoration: none;
    font-size: 0.8rem;
    color: var(--sidebar-right-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

.sidebar-kanan__card header a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sidebar-right-accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-kanan__card header a:hover {
    color: var(--sidebar-right-accent-alt);
    transform: translateX(2px);
}

.sidebar-kanan__card header a:hover::after {
    width: 100%;
}

.perangkat-slider {
    position: relative;
    min-height: 100px;
}

.perangkat-slide {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    opacity: 0;
    transform: translateX(20px);
}

.perangkat-slide.active {
    display: flex;
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.perangkat-slide.prev {
    animation: slideOutToLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.perangkat-slide .avatar {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--sidebar-right-stroke);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.perangkat-slide.active .avatar {
    animation: avatarScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

.perangkat-slide .avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
    border-color: var(--sidebar-right-accent);
}

.perangkat-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.perangkat-slide .avatar:hover img {
    transform: scale(1.1);
}

.perangkat-slide strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sidebar-right-text);
    display: block;
    margin-bottom: 4px;
}

.perangkat-slide p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--sidebar-right-muted);
    font-weight: 400;
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.slider-nav button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--sidebar-right-stroke);
    background: rgba(0, 0, 0, 0.3);
    color: var(--sidebar-right-text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.slider-nav button:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--sidebar-right-accent);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.slider-nav button:active {
    transform: scale(0.92);
}

.slider-nav button i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--sidebar-right-accent);
}

.slider-nav button:hover i {
    transform: scale(1.1);
}

.agenda-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agenda-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--sidebar-right-stroke);
    animation: agendaItemFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    transition: all 0.2s ease;
    border-radius: 0;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
}

.agenda-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.agenda-list li:nth-child(2) {
    animation-delay: 0.15s;
}

.agenda-list li:nth-child(3) {
    animation-delay: 0.2s;
}

.agenda-list li:nth-child(4) {
    animation-delay: 0.25s;
}

.agenda-list li:nth-child(5) {
    animation-delay: 0.3s;
}

.agenda-list li:hover {
    background-color: rgba(16, 185, 129, 0.1);
    transform: translateX(4px);
    border-radius: 4px;
}

.agenda-list li:last-child {
    border-bottom: none;
}

.date-badge {
    width: 48px;
    min-width: 48px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--sidebar-right-accent), var(--sidebar-right-accent-alt));
    color: #ffffff;
    text-align: center;
    padding: 8px 4px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dateBadgePulse 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.agenda-list li:nth-child(1) .date-badge {
    animation-delay: 0.15s;
}

.agenda-list li:nth-child(2) .date-badge {
    animation-delay: 0.2s;
}

.agenda-list li:nth-child(3) .date-badge {
    animation-delay: 0.25s;
}

.agenda-list li:nth-child(4) .date-badge {
    animation-delay: 0.3s;
}

.agenda-list li:nth-child(5) .date-badge {
    animation-delay: 0.35s;
}

.agenda-list li:hover .date-badge {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.date-badge .day {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.date-badge .month {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-top: 2px;
}

.agenda-list li strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sidebar-right-text);
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

.agenda-list li p {
    font-size: 0.8rem;
    color: var(--sidebar-right-muted);
    margin: 0;
    line-height: 1.4;
}

.apbdes-progress {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.apbdes-row {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sidebar-right-stroke);
    animation: apbdesRowFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    transition: all 0.2s ease;
    border-radius: 0;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
}

.apbdes-row:nth-child(1) {
    animation-delay: 0.1s;
}

.apbdes-row:nth-child(2) {
    animation-delay: 0.15s;
}

.apbdes-row:nth-child(3) {
    animation-delay: 0.2s;
}

.apbdes-row:nth-child(4) {
    animation-delay: 0.25s;
}

.apbdes-row:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
}

.apbdes-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.apbdes-row .label {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.85rem;
    margin-bottom: 8px;
    gap: 8px;
}

.apbdes-row .label strong {
    font-weight: 600;
    color: var(--sidebar-right-text);
    flex: 1;
    line-height: 1.4;
}

.apbdes-row .label span {
    font-size: 0.75rem;
    color: var(--sidebar-right-muted);
    white-space: nowrap;
    font-weight: 400;
}

.apbdes-row .progress {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    overflow: hidden;
    height: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.apbdes-row .progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--sidebar-right-accent), var(--sidebar-right-accent-alt));
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.apbdes-row .progress span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

.apbdes-row:nth-child(1) .progress span {
    animation-delay: 0.3s;
}

.apbdes-row:nth-child(2) .progress span {
    animation-delay: 0.4s;
}

.apbdes-row:nth-child(3) .progress span {
    animation-delay: 0.5s;
}

.apbdes-row:nth-child(4) .progress span {
    animation-delay: 0.6s;
}

.dots {
    display: inline-flex;
    gap: 4px;
}

.dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sidebar-right-accent);
    animation: dotPulse 1.5s ease-in-out infinite;
    opacity: 0.6;
}

.dots span:nth-child(1) {
    animation-delay: 0s;
}

.dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.empty-state {
    color: var(--sidebar-right-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 16px 0;
    font-style: italic;
}

/* Keyframe Animations */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes avatarScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes agendaItemFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes dateBadgePulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes apbdesRowFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Tablet & zoomed desktop (<=1500px) */
@media (min-width: 768px) and (max-width: 1500px) {
    .has-global-sidebars .sidebar-kanan {
        position: static !important;
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        padding: 20px !important;
        background: var(--sidebar-right-bg) !important;
        color: var(--sidebar-right-text);
        box-shadow: 0 4px 12px rgba(4, 20, 40, 0.3);
        margin: 0 0 24px;
        top: auto !important;
        bottom: auto !important;
        right: auto !important;
        max-height: none !important;
    }
    .sidebar-kanan__card {
        border-radius: var(--sidebar-right-radius);
        background: var(--sidebar-right-card);
        color: var(--sidebar-right-text);
        margin-bottom: 12px;
    }
}

/* Sembunyikan sidebar di mobile */
@media (max-width: 768px) {
    .has-global-sidebars .sidebar-kanan {
        display: none !important;
    }
}

/* Mobile specific optimizations */
@media (max-width: 768px) {
    .has-global-sidebars .sidebar-kanan {
        margin: 0 0 16px;
    }
    
    .sidebar-kanan__card {
        padding: 14px;
        border-radius: var(--sidebar-right-radius);
        margin-bottom: 10px;
    }
    
    .sidebar-kanan__card header h3 {
        font-size: 0.95rem;
    }
    
    .sidebar-kanan__card header a {
        font-size: 0.8rem;
    }
    
    .perangkat-slide {
        gap: 12px;
    }
    
    .perangkat-slide .avatar {
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }
    
    .perangkat-slide strong {
        font-size: 0.9rem;
    }
    
    .perangkat-slide p {
        font-size: 0.8rem;
    }
    
    .slider-nav button {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .agenda-list li {
        gap: 10px;
    }
    
    .date-badge {
        width: 44px;
        padding: 4px 0;
    }
    
    .date-badge .day {
        font-size: 1.1rem;
    }
    
    .date-badge .month {
        font-size: 0.7rem;
    }
    
    .apbdes-row .label {
        font-size: 0.8rem;
    }
}

.has-global-sidebars .sidebar-kanan::-webkit-scrollbar {
    width: 6px;
}

.has-global-sidebars .sidebar-kanan::-webkit-scrollbar-track {
    background: transparent;
}

.has-global-sidebars .sidebar-kanan::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.has-global-sidebars .sidebar-kanan::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
