/* Mobile Sidebar Menu (NOT dashboard sidebar) */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 10000;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar .sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.sidebar .close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.sidebar .close-btn:hover {
    color: #1f2937;
}

.mobile-sidebar-nav {
    padding: 1rem 0;
}

.mobile-sidebar-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-sidebar-link:hover,
.mobile-sidebar-link.active {
    background: #f3f4f6;
    color: #005ab7;
}

/* User menu dropdown */
.user-menu {
    position: relative;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    transition: color 0.2s;
}

/* Show menu toggle only on mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .logout-link {
        background: linear-gradient(135deg, #dc2626, #ef4444);
        color: white !important;
        padding: 0.625rem 1rem;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .logout-link:hover {
        background: linear-gradient(135deg, #b91c1c, #dc2626);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    }

    .logout-link .nav-icon {
        filter: brightness(0) invert(1);
    }

    .logout-text {
        font-size: 0.9rem;
    }

    .user-name-desktop {
        display: none;
    }

    .user-name-mobile {
        display: inline;
    }
}

@media (min-width: 769px) {
    .user-name-desktop {
        display: inline;
    }

    .user-name-mobile {
        display: none;
    }

    .logout-text {
        display: inline;
    }
}

.menu-toggle:hover {
    color: #005ab7;
}

.menu-toggle svg {
    display: block;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 1000;
}

.user-menu.active .user-dropdown {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-icon {
    margin-left: 0.5rem;
}

/* Spinning animation for loading */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Image Upload Styling */
.image-upload-container {
    width: 100%;
}

.image-preview-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.image-preview-wrapper:hover {
    border-color: #005ab7;
    background: #f3f4f6;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    color: #6b7280;
    text-align: center;
}

.upload-placeholder svg {
    margin-bottom: 0.75rem;
    color: #555555;
}

.upload-placeholder p {
    margin: 0.5rem 0 0.25rem;
    font-weight: 500;
    color: #374151;
}

.upload-placeholder small {
    font-size: 0.875rem;
    color: #555555;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hidden-file-input {
    display: none;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.remove-image:hover {
    background: rgb(220, 38, 38);
    transform: scale(1.1);
}

.remove-image svg {
    width: 20px;
    height: 20px;
}
