/* =========================================================================
   SIDEBAR STYLES - FRAMEO
   Estilos centralizados do menu lateral
   ========================================================================= */

.sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-nav {
    margin-top: auto;
    margin-bottom: 0;
    padding-bottom: 16px;
}

.sidebar-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.sidebar-logo img {
    height: 28px;
    width: auto;
    margin-bottom: 8px;
}

.sidebar-logo p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin-top: 4px;
}

/* User Profile Section */
.sidebar-user-profile {
    padding: 12px 16px;
    margin: 0 12px 16px;
    background: rgba(0, 82, 204, 0.08);
    border: 1px solid rgba(0, 82, 204, 0.2);
    border-radius: 12px;
    transition: all 0.3s;
}

.sidebar-user-profile:hover {
    background: rgba(0, 82, 204, 0.12);
    border-color: rgba(0, 82, 204, 0.3);
}

.user-profile-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0052cc, #0EA5E9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.user-profile-info {
    flex: 1;
    min-width: 0;
}

.user-profile-name {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-email {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-logout {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.user-profile-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.user-profile-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #0052cc, #0EA5E9);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.user-profile-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 82, 204, 0.4);
}

/* Progress Card - Modern Card Style with Border */
.sidebar-progress {
    position: relative;
    margin: 20px 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: fadeInCard 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* SVG Border ao redor do Card */
.card-border-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.card-border-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 2;
}

.card-border-fill {
    fill: none;
    stroke: url(#cardBorderGradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 776; /* Perímetro: 2*(172+216) */
    stroke-dashoffset: 776;
    transition: stroke-dashoffset 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 0 8px rgba(0, 122, 255, 0.4));
}

/* Card Inner Content */
.card-inner {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* Efeito de conclusão (quando 100%) */
.sidebar-progress.completed .card-border-fill {
    filter: drop-shadow(0 0 12px rgba(0, 122, 255, 0.6));
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 122, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(0, 122, 255, 0.8));
    }
}

/* Image Area */
.progress-image-area {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.8), rgba(20, 25, 35, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.progress-image-area.has-image {
    background: transparent;
}

/* Main Image */
.progress-image-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeInImage 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Spinner Container */
.progress-spinner-container {
    position: relative;
    z-index: 2;
}

/* Spinner Modern */
.progress-spinner-modern {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #007AFF;
    border-radius: 50%;
    animation: spinModern 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

/* Info Card Section */
.progress-info-card {
    padding: 16px 18px 18px;
}

/* Header (Título + Porcentagem) */
.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-title-card {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.1px;
}

.progress-percentage-card {
    font-size: 16px;
    font-weight: 700;
    color: #007AFF;
    letter-spacing: -0.3px;
    text-shadow: 0 0 8px rgba(0, 122, 255, 0.3);
}

/* Status Text */
.progress-status-card {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    letter-spacing: 0.1px;
}

/* Progress Bar */
.progress-bar-card {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill-card {
    height: 100%;
    background: linear-gradient(90deg, #007AFF 0%, #0051D5 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 8px rgba(0, 122, 255, 0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.25);
    padding: 14px 16px;
    margin: 4px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
}

.nav-item svg {
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.3s ease;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.02);
}

.nav-item:hover svg {
    opacity: 0.8;
}

.nav-item:hover::before {
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
}

.nav-item.active {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 82, 204, 0.05);
}

.nav-item.active svg {
    opacity: 0.9;
}

.nav-item.active::before {
    background: linear-gradient(270deg, #0052cc 0%, rgba(0, 82, 204, 0) 100%);
}

.nav-item.active:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-item.active:hover svg {
    opacity: 1;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer .version {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-footer .beta-badge {
    background: linear-gradient(135deg, #0052cc 0%, #0052cc 100%);
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.sidebar-footer .copyright {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
}

.sidebar-action-buttons {
    display: flex;
    gap: 8px;
    padding: 0 10px;
    margin-bottom: 16px;
    justify-content: center;
}

.action-btn {
    width: 56px;
    height: 56px;
    background: #0052cc;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #0066ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.4);
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

