/* Dashboard Page Styles */

.dashboard-nav-link {
    color: var(--primary-color, #c084fc);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dashboard-nav-link:hover {
    background: rgba(192, 132, 252, 0.1);
}

.dashboard-main {
    padding: 24px;
    min-height: calc(100vh - 70px);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 32px;
    text-align: center;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #1e1b4b);
    margin: 0 0 8px 0;
}

.dashboard-subtitle {
    color: var(--text-secondary, #64748b);
    font-size: 1rem;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e2e8f0);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #c084fc);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
}

/* Filters */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color, #c084fc);
    color: var(--primary-color, #c084fc);
}

.filter-btn.active {
    background: var(--primary-color, #c084fc);
    border-color: var(--primary-color, #c084fc);
    color: white;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: white;
    color: var(--text-primary, #1e1b4b);
    cursor: pointer;
    font-size: 0.9rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--text-secondary, #64748b);
}

.loading-spinner-small {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color, #e2e8f0);
    border-top-color: var(--primary-color, #c084fc);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.gallery-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gallery-item.is-favorite {
    border-color: #fbbf24;
}

.gallery-image-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-view-icon {
    font-size: 2rem;
    color: white;
}

.temp-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(251, 191, 36, 0.9);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: help;
}

.gallery-item-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-date {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.gallery-category {
    font-size: 0.8rem;
    color: var(--primary-color, #c084fc);
    font-weight: 500;
}

.gallery-item-actions {
    display: flex;
    gap: 8px;
}

.gallery-action-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.gallery-action-btn:hover {
    transform: scale(1.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: white;
    border-radius: 16px;
    border: 2px dashed var(--border-color, #e2e8f0);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary, #1e1b4b);
    margin: 0 0 8px 0;
}

.empty-state p {
    color: var(--text-secondary, #64748b);
    margin: 0 0 24px 0;
}

.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary-color, #c084fc);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark, #a855f7);
    transform: translateY(-2px);
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 32px;
}

.btn-load-more {
    padding: 12px 48px;
    background: white;
    border: 2px solid var(--primary-color, #c084fc);
    color: var(--primary-color, #c084fc);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: var(--primary-color, #c084fc);
    color: white;
}

/* Image Modal */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.image-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

#modalImage {
    max-width: 100%;
    max-height: 70vh;
    display: block;
}

.image-modal-actions {
    display: flex;
    gap: 16px;
    padding: 16px;
    justify-content: center;
    background: #f8fafc;
}

.modal-action-btn {
    padding: 10px 24px;
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-primary, #1e1b4b);
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    border-color: var(--primary-color, #c084fc);
    color: var(--primary-color, #c084fc);
}

.image-modal-info {
    padding: 12px 16px;
    background: white;
    text-align: center;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.image-modal-info p {
    margin: 4px 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
}

/* Error message */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--error-color, #f472b6);
    background: rgba(244, 114, 182, 0.1);
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-main {
        padding: 16px;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: center;
    }

    .sort-group {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
