/* Sidebar Styles */
.sidebar-toggle {
    position: fixed;
    left: calc(var(--safe-area-left) + 20px);
    top: calc(var(--safe-area-top) + 20px);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
}

.sidebar-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-strong);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
}

.sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.sidebar-close:hover {
    background: #f5f5f5;
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    stroke-width: 2;
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.sidebar-button {
    width: 100%;
    padding: 15px;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.sidebar-button:hover {
    border-color: var(--primary);
    background: #FFF5F8;
}

.sidebar-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    stroke-width: 2;
    flex-shrink: 0;
}

.sidebar-button.danger {
    border-color: #ffebee;
}

.sidebar-button.danger:hover {
    border-color: #ff5252;
    background: #ffebee;
}

.sidebar-button.danger svg {
    stroke: #ff5252;
}

/* Hidden File Input */
.hidden-input {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }
    
    .sidebar-toggle {
        left: calc(var(--safe-area-left) + 15px);
        top: calc(var(--safe-area-top) + 15px);
        width: 44px;
        height: 44px;
    }
}
