:root {
    /* Prism Brand Primary & Accents (Overrides Ecosystem Defaults) */
    --primary: #a855f7;
    --primary-hover: #9333ea;
    --primary-light: #c084fc;
    --primary-glow: rgba(168, 85, 247, 0.25);
    --prism-gradient: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #06b6d4 100%);
    --prism-gradient-subtle: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(168, 85, 247, 0.15) 50%, rgba(6, 182, 212, 0.15) 100%);
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-amber: #f59e0b;
    --border-hover: rgba(168, 85, 247, 0.4);
    --border-focus: rgba(168, 85, 247, 0.7);

    --sidebar-width: 260px;
}

[data-theme="light"] {
    --border-hover: rgba(168, 85, 247, 0.4);
    --border-focus: rgba(168, 85, 247, 0.6);
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* App Container */
.gallery-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Prism Brand Gradient Customization */
.brand-text h1 {
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-app-icon.sm {
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.25);
}

/* Topbar Center: Search & Quick Filters */
.top-bar-center {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 580px;
}

.search-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-faint);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 36px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0 36px 0 38px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    font-size: 0.85rem;
    display: none;
}

.search-clear-btn:hover {
    color: var(--text-main);
}

/* Topbar Right: Actions & User */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar-right-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Standard Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--prism-gradient);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
    border-radius: 7px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--text-main);
    background: var(--bg-surface-elevated);
    border-color: var(--border-hover);
}


/* ==========================================
   Main Layout: Sidebar + Content
   ========================================== */
.gallery-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar */
.gallery-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-section {
    padding: 1rem 0.85rem 0.5rem;
}

.sidebar-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.sidebar-nav-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav-item:hover {
    color: var(--text-main);
    background: var(--bg-surface-elevated);
}

.sidebar-nav-item.active {
    color: #ffffff;
    background: var(--prism-gradient);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.sidebar-nav-item.active .badge-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.badge-count {
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Albums List in Sidebar */
.albums-sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
}

.album-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.album-sidebar-item:hover {
    color: var(--text-main);
    background: var(--bg-surface-elevated);
}

.album-sidebar-item.active {
    color: var(--primary-light);
    background: rgba(168, 85, 247, 0.12);
    font-weight: 600;
}

/* Sidebar Footer: Storage Info */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.storage-widget {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.storage-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.storage-stats-text {
    font-size: 0.7rem;
    color: var(--text-faint);
    line-height: 1.4;
}

/* Main Content Area */
.gallery-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-base);
    position: relative;
}

/* Sub-header Bar (View Filter, Sorting, Actions) */
.gallery-sub-header {
    position: sticky;
    top: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    gap: 1rem;
}

.sub-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-title-wrap h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.view-title-wrap p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sub-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-pills-group {
    display: flex;
    align-items: center;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}

.filter-pill {
    background: transparent;
    border: none;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-pill:hover {
    color: var(--text-main);
}

.filter-pill.active {
    background: var(--prism-gradient);
    color: #ffffff;
}

.sort-select {
    height: 32px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.78rem;
    padding: 0 8px;
    outline: none;
    cursor: pointer;
}

/* ==========================================
   Masonry Grid Layout
   ========================================== */
.gallery-grid-container {
    padding: 1.5rem;
    min-height: 400px;
}

.masonry-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

/* Media Item Card */
.media-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    transform: translateZ(0);
    display: flex;
    flex-direction: column;
    height: 240px;
    max-height: 280px;
    max-width: 500px;
    min-width: 120px;
    aspect-ratio: var(--aspect-ratio, 1.333);
    width: auto;
    flex: 0 1 auto;
}

@media (max-width: 600px) {
    .media-card {
        height: 180px;
        max-height: 220px;
        max-width: 100%;
    }
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px var(--primary-glow);
    border-color: var(--border-hover);
}

.media-thumbnail-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

.media-img,
.media-video-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-card:hover .media-img,
.media-card:hover .media-video-preview {
    transform: scale(1.04);
}

/* Shimmer placeholder */
.media-img.loading {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Overlay Top Elements (Checkbox, Video duration, Star) */
.media-card-top-bar {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 5;
}

.media-card:hover .media-card-top-bar,
.media-card.selected .media-card-top-bar,
.media-card.starred .star-badge {
    opacity: 1;
}

.select-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    cursor: pointer;
    accent-color: var(--primary);
}

.star-btn {
    background: rgba(13, 18, 31, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.star-btn:hover {
    transform: scale(1.15);
    color: var(--accent-amber);
}

.star-btn.starred {
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}

.video-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(13, 18, 31, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 2px 7px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    z-index: 4;
}

/* Card Caption Overlay */
.media-card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.85rem 0.75rem;
    background: linear-gradient(to top, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.7) 60%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.media-card:hover .media-card-caption {
    opacity: 1;
}

.media-caption-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-caption-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Timeline Grouping */
.timeline-section {
    margin-bottom: 2rem;
}

.timeline-sticky-header {
    position: sticky;
    top: 50px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.timeline-sticky-header h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

/* ==========================================
   Albums View Grid
   ========================================== */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.album-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.album-cover-container {
    height: 180px;
    background: var(--bg-surface-elevated);
    position: relative;
    overflow: hidden;
    display: flex;
}

.album-cover-single {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.album-card:hover .album-cover-single {
    transform: scale(1.05);
}

/* Multi-photo collage cover */
.album-collage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 100%;
    gap: 2px;
    background: var(--bg-base);
}

.album-collage-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-card-body {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.album-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.album-card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-card-footer {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-faint);
}

/* Album Banner (Inside Album View) */
.album-header-banner {
    background: var(--prism-gradient-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.album-banner-info h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.album-banner-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ==========================================
   SkyDrive Pictures Bridge View
   ========================================== */
.pictures-bridge-banner {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bridge-banner-text h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #38bdf8;
}

.bridge-banner-text p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================
   Fullscreen Lightbox Modal
   ========================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 12, 0.96);
    backdrop-filter: blur(24px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

.lightbox-modal.active {
    display: flex;
}

/* Lightbox Top Toolbar */
.lightbox-toolbar {
    height: 58px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 18, 31, 0.6);
    z-index: 20;
    flex-shrink: 0;
}

.lightbox-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lightbox-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-item-counter {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.lightbox-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lightbox Stage */
.lightbox-stage-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.lightbox-media-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.15s ease-out;
    cursor: grab;
}

.lightbox-media-wrap:active {
    cursor: grabbing;
}

.lightbox-main-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.lightbox-video-player {
    max-width: 85vw;
    max-height: 80vh;
    border-radius: var(--radius-md);
    outline: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* Lightbox Nav Arrows */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(13, 18, 31, 0.6);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-nav-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev-btn { left: 20px; }
.lightbox-next-btn { right: 20px; }

/* Lightbox Bottom Filmstrip */
.lightbox-filmstrip {
    height: 72px;
    padding: 8px 1.5rem;
    background: rgba(13, 18, 31, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    z-index: 20;
    flex-shrink: 0;
}

.filmstrip-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    flex-shrink: 0;
}

.filmstrip-thumb:hover {
    opacity: 0.9;
}

.filmstrip-thumb.active {
    opacity: 1;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* ==========================================
   EXIF & Metadata Inspector Drawer
   ========================================== */
.exif-inspector-drawer {
    position: absolute;
    top: 58px;
    bottom: 72px;
    right: 0;
    width: 360px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    padding: 1.25rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.exif-inspector-drawer.open {
    transform: translateX(0);
}

.exif-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.exif-drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.exif-meta-block {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.exif-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.exif-meta-label {
    color: var(--text-faint);
    font-weight: 500;
}

.exif-meta-value {
    color: var(--text-main);
    font-weight: 600;
    font-family: var(--font-mono);
}

.exif-camera-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.camera-badge-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
}

.camera-badge-item span:first-child {
    font-size: 0.65rem;
    color: var(--text-faint);
    text-transform: uppercase;
}

.camera-badge-item span:last-child {
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary-light);
}

/* Leaflet Map Preview */
#exifMapContainer {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    margin-top: 4px;
}

/* ==========================================
   Floating Batch Action Bar
   ========================================== */
.floating-batch-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px var(--primary-glow);
    border-radius: var(--radius-full);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    transition: transform var(--transition-bounce);
}

.floating-batch-bar.active {
    transform: translateX(-50%) translateY(0);
}

.batch-count-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-right: 4px;
}

/* ==========================================
   Modals
   ========================================== */
.gallery-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-modal-backdrop.active {
    display: flex;
}

.gallery-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    background: var(--bg-surface-elevated);
}

/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-surface-elevated);
    gap: 8px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.08);
}

.upload-dropzone svg {
    color: var(--primary-light);
}

/* Empty State */
.empty-gallery-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem;
    gap: 1rem;
}

.empty-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    background: var(--prism-gradient-subtle);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
}

.empty-gallery-state h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.empty-gallery-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 380px;
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
/* Universal Nav Tabs shrink to icon-only at 1500px */
@media (max-width: 1500px) {
    .universal-nav-tabs .nav-tab span {
        display: none !important;
    }

    .universal-nav-tabs .nav-tab {
        padding: 5px 9px !important;
        gap: 0 !important;
        justify-content: center !important;
    }

    .universal-nav-tabs .nav-tab-icon {
        width: 15px !important;
        height: 15px !important;
    }
}

@media (max-width: 820px) {
    .gallery-sidebar {
        position: fixed;
        left: -260px;
        top: var(--header-height);
        bottom: 0;
        z-index: 60;
        transition: transform 0.2s ease;
    }

    .gallery-sidebar.open {
        transform: translateX(260px);
    }

    .mobile-toggle-btn {
        display: flex;
    }

    .universal-nav-tabs {
        display: none !important;
    }
}
