
/* Sidebar Collapsed State */
.app-container.sidebar-collapsed {
    grid-template-columns: 80px 1fr;
}

.app-container.sidebar-collapsed .sidebar-toggle-btn {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}

.app-container.sidebar-collapsed .logo-text,
.app-container.sidebar-collapsed .nav-item span,
.app-container.sidebar-collapsed .user-info {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    width: 0;
    transition: opacity 0.2s;
}

.app-container.sidebar-collapsed .logo-container {
    justify-content: center;
}

.app-container.sidebar-collapsed .nav-item {
    justify-content: center;
}

.app-container.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

.app-container.sidebar-collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.2rem;
}

.sidebar-toggle-btn {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-green);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.sidebar:hover .sidebar-toggle-btn {
    opacity: 1;
}


/* Gamification Animations */
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.gamify-pop {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.foir-progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.foir-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out, background-color 0.5s ease;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-stripes 1s linear infinite;
}
@keyframes progress-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}
@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}
.savings-amount-gamified {
    position: relative;
    overflow: hidden;
    display: inline-block;
    color: var(--brand-green);
    font-size: 32px;
    font-weight: 800;
}
.savings-amount-gamified::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}
.table-responsive table {
    min-width: 600px; /* Ensures tables don't get squeezed too much on mobile */
}

/* Dashboard Empty States (Blur) */
.placeholder-blur > *:not(.lock-overlay) {
    filter: blur(4px);
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s ease;
}

.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.placeholder-blur:hover .lock-overlay {
    transform: translate(-50%, -50%) scale(1.05);
    transition: transform 0.2s ease;
}

/* Mobile Friendly Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table {
    min-width: 600px; /* Forces horizontal scroll on mobile */
}

@keyframes radarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
