/**
 * SpeedShot Lightbox / Sammlungen Styles
 * Light Theme — passend zum Media Hub / Shop Cart Design
 */

/* ========================================================================
   LIGHTBOX ICON (Header) — passend zum Shop Cart Icon
   ======================================================================== */

.speedshot-lightbox-icon {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.speedshot-lightbox-icon .lightbox-button {
    position: relative;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speedshot-lightbox-icon .lightbox-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.lightbox-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #d63638;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: lightboxPulse 0.3s;
}

@keyframes lightboxPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ========================================================================
   LIGHTBOX BUTTON on Image Cards
   ======================================================================== */

.card-btn.btn-lightbox,
.grid-card-btn.btn-lightbox {
    background: rgba(99, 102, 241, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.card-btn.btn-lightbox:hover,
.grid-card-btn.btn-lightbox:hover {
    background: rgba(99, 102, 241, 1);
    transform: scale(1.05);
}

.card-btn.btn-lightbox.is-saved,
.grid-card-btn.btn-lightbox.is-saved {
    background: rgba(157, 211, 55, 0.95);
}

.card-btn.btn-lightbox.is-saved:hover,
.grid-card-btn.btn-lightbox.is-saved:hover {
    background: rgba(157, 211, 55, 1);
}

/* ========================================================================
   SLIDE-IN PANEL — passend zum Shop Cart Panel (helles Theme)
   ======================================================================== */

.speedshot-lightbox-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    color: #333;
    z-index: 100000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

.speedshot-lightbox-panel.open {
    right: 0;
}

.lightbox-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    cursor: pointer;
}

.lightbox-panel-open .lightbox-panel-overlay {
    display: block;
}

/* Panel Header */
.lightbox-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.lightbox-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.lightbox-panel-header h3 svg {
    color: #2271b1;
}

.lightbox-panel-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-panel-close:hover {
    color: #333;
}

/* Collection Tabs */
.lightbox-panel-tabs {
    display: flex;
    gap: 6px;
    padding: 14px 20px;
    overflow-x: auto;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    background: #fafafa;
}

.lightbox-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.lightbox-tab:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.lightbox-tab.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.tab-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.lightbox-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* New Collection */
.lightbox-panel-new {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.lightbox-panel-new input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 13px;
}

.lightbox-panel-new input::placeholder {
    color: #999;
}

.lightbox-panel-new input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.lightbox-panel-new button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #2271b1;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.lightbox-panel-new button:hover {
    background: #135e96;
}

/* Panel Items */
.lightbox-panel-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.lightbox-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.lightbox-panel-item:last-child {
    border-bottom: none;
}

.lightbox-panel-item .item-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.lightbox-panel-item .item-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 10px;
    color: #999;
    width: 60px;
    height: 45px;
    border-radius: 4px;
}

.lightbox-panel-item .item-info {
    flex: 1;
    min-width: 0;
}

.lightbox-panel-item .item-title {
    display: block;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-panel-item .item-id {
    display: block;
    font-size: 11px;
    color: #999;
}

.lightbox-panel-item .item-remove {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.lightbox-panel-item .item-remove:hover {
    color: #d63638;
}

.lightbox-panel-item .item-cart-btn {
    background: none;
    border: none;
    color: #2271b1;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.lightbox-panel-item .item-cart-btn:hover {
    color: #135e96;
}

.lightbox-panel-item .item-cart-btn.in-cart {
    color: #d63638;
}

.lightbox-panel-item .item-cart-btn.in-cart:hover {
    color: #b32d2e;
}

.lightbox-panel-item.deleted {
    opacity: 0.4;
}

.lightbox-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* Panel Footer */
.lightbox-panel-footer {
    display: flex;
    gap: 8px;
    padding: 20px;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.lightbox-panel-footer .btn-panel {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-panel.btn-cart-all {
    background: #2271b1;
    color: #fff;
}

.btn-panel.btn-cart-all:hover {
    background: #135e96;
}

.btn-panel.btn-manage {
    background: #f0f0f0;
    color: #333;
}

.btn-panel.btn-manage:hover {
    background: #e0e0e0;
}

/* ========================================================================
   ADD MODAL (Collection Selector)
   ======================================================================== */

.lightbox-add-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100001;
    align-items: center;
    justify-content: center;
}

.lightbox-add-modal.open {
    display: flex;
}

.lightbox-add-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.lightbox-add-modal-content {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 24px;
    width: 360px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.lightbox-add-modal-content h4 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
}

.lightbox-add-modal-content h4 svg {
    color: #2271b1;
}

.modal-collection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.modal-collection-item:last-child {
    border-bottom: none;
}

.modal-collection-item input[type="checkbox"] {
    accent-color: #2271b1;
    width: 18px;
    height: 18px;
}

.modal-collection-item .collection-name {
    flex: 1;
}

.modal-new-collection {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.modal-new-collection input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 13px;
}

.modal-new-collection input::placeholder {
    color: #999;
}

.modal-new-collection input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.modal-new-collection button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #2271b1;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.modal-new-collection button:hover {
    background: #135e96;
}

.lightbox-add-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.lightbox-add-modal-close:hover {
    color: #333;
}

.modal-empty {
    padding: 12px 0;
    color: #999;
    font-size: 13px;
}

/* ========================================================================
   MANAGEMENT PAGE
   ======================================================================== */

.lightbox-management {
    min-height: 100vh;
    background: #f5f5f5;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.management-header {
    padding: 24px 32px;
    background: #fff;
    border-bottom: 2px solid #eee;
}

.management-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.management-header .back-link {
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.management-header .back-link:hover {
    color: #135e96;
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px;
    background: #eee;
    margin: 8px 20px;
}

/* ========================================================================
   OVERVIEW (Uebersicht)
   ======================================================================== */

.management-overview {
    padding: 0;
}

.overview-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.overview-section {
    margin-bottom: 40px;
}

.overview-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.overview-section-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-section-header h2 .bi {
    color: #2271b1;
    font-size: 18px;
}

.overview-section-header .section-count {
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

.overview-section-actions {
    display: flex;
    gap: 8px;
}

/* Unsorted Images Grid */
.unsorted-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.unsorted-image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
    aspect-ratio: 4/3;
}

.unsorted-image-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.unsorted-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.unsorted-image-card .unsorted-card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.unsorted-image-card:hover .unsorted-card-actions {
    opacity: 1;
}

.unsorted-card-actions .unsorted-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #555;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.unsorted-card-actions .unsorted-action-btn:hover {
    background: #fff;
    color: #2271b1;
    transform: scale(1.1);
}

.unsorted-card-actions .unsorted-action-btn.btn-remove:hover {
    color: #d63638;
}

/* Collection Cards Grid */
.collection-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.collection-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
}

.collection-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.12);
    transform: translateY(-3px);
}

.collection-card-cover {
    width: 100%;
    aspect-ratio: 16/10;
    background: #f0f0f5;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.collection-card:hover .collection-card-cover img {
    transform: scale(1.05);
}

.collection-card-cover .cover-placeholder {
    color: #ccc;
    font-size: 36px;
}

.collection-card-info {
    padding: 14px 16px;
}

.collection-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-card-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* New Collection Card (Dashed) */
.collection-card-new {
    background: transparent;
    border: 2px dashed #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    gap: 8px;
    color: #999;
}

.collection-card-new:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: rgba(34, 113, 177, 0.02);
}

.collection-card-new .new-card-icon {
    font-size: 32px;
}

.collection-card-new .new-card-label {
    font-size: 14px;
    font-weight: 500;
}

/* Overview Empty States */
.overview-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.overview-empty a {
    color: #2271b1;
}

.overview-empty .bi {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    color: #ddd;
}

/* Filter Bar */
.overview-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: rgba(34, 113, 177, 0.04);
}

.filter-tab.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.filter-search {
    position: relative;
    flex: 0 1 280px;
    min-width: 180px;
}

.filter-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

.filter-search-input {
    width: 100%;
    padding: 7px 32px 7px 32px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.filter-search-input:focus {
    border-color: #2271b1;
}

.filter-search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
}

.filter-search-clear:hover {
    color: #d63638;
}

/* Filtered Images Grid */
.filtered-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.filtered-image-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    cursor: grab;
    transition: all 0.2s;
}

.filtered-image-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.filtered-image-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.filtered-card-info {
    padding: 8px 10px;
}

.filtered-card-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filtered-card-collection {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filtered-card-collection .bi {
    font-size: 11px;
}

.filtered-card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.filtered-image-card:hover .filtered-card-actions {
    opacity: 1;
}

.filtered-card-actions .unsorted-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #555;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.filtered-card-actions .unsorted-action-btn:hover {
    background: #fff;
    color: #2271b1;
    transform: scale(1.1);
}

.filtered-card-actions .unsorted-action-btn.btn-remove:hover {
    color: #d63638;
}

/* Dragging states for image cards */
.unsorted-image-card.dragging,
.filtered-image-card.dragging {
    opacity: 0.4;
}

/* Collection Card Drag-Over */
.collection-card.drag-over {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.25);
    transform: scale(1.03);
}

/* Assign Modal */
.modal-collection-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    color: #333;
}

.modal-collection-check:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.modal-collection-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2271b1;
    cursor: pointer;
}

.modal-collection-check input[type="checkbox"]:disabled {
    opacity: 0.5;
}

.modal-collection-check .tab-count {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

/* Image Status Badges (Warenkorb / Gekauft) */
.image-status-badges {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.image-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.badge-in-cart {
    background: #2271b1;
    color: #fff;
}

.badge-purchased {
    background: #00a32a;
    color: #fff;
}

.unsorted-image-card.is-purchased,
.filtered-image-card.is-purchased {
    border-color: #00a32a;
}

.unsorted-image-card.in-cart,
.filtered-image-card.in-cart {
    border-color: #2271b1;
}

/* Cart Count Badge in Header */
.cart-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d63638;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    padding: 0 5px;
    margin-left: 6px;
}

/* Delete Collection Modal */
.delete-modal-options {
    margin-top: 12px;
}

.delete-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.delete-option:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.delete-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #2271b1;
}

.delete-option-label {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delete-modal-target {
    margin: 0 0 12px 28px;
    padding: 8px 0;
}

.delete-target-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: background 0.15s;
}

.delete-target-option:hover {
    background: #f0f5fa;
}

.delete-target-option input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #2271b1;
}

.delete-target-option .tab-count {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

.btn-danger {
    background: #d63638 !important;
    color: #fff !important;
    border-color: #d63638 !important;
}

.btn-danger:hover {
    background: #b32d2e !important;
}

/* ========================================================================
   DETAIL VIEW
   ======================================================================== */

.management-detail {
    padding: 0;
}

/* Legacy Layout (kept for compatibility) */
.management-layout {
    display: flex;
    min-height: calc(100vh - 100px);
}

/* Sidebar */
.management-sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 20px 0;
    flex-shrink: 0;
}

.management-tab {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 12px 10px 20px;
    cursor: pointer;
    background: transparent;
    color: #666;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    user-select: none;
}

.management-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.management-tab.active {
    background: rgba(34, 113, 177, 0.05);
    color: #2271b1;
    border-left-color: #2271b1;
    font-weight: 600;
}

.management-tab .tab-actions {
    display: flex;
    gap: 2px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.management-tab:hover .tab-actions {
    opacity: 1;
}

.management-tab .tab-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #999;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.management-tab .tab-action-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.management-tab .tab-action-btn .bi {
    font-size: 13px;
    margin: 0;
}

.sidebar-new-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s;
}

.sidebar-new-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

/* Content */
.management-content {
    flex: 1;
    padding: 24px 32px;
}

.management-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.management-content-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.management-content-actions {
    display: flex;
    gap: 8px;
}

.management-content-actions button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.management-content-actions button:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.management-content-actions .btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.management-content-actions .btn-primary:hover {
    background: #135e96;
}

/* Items List */
.management-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.management-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.2s;
}

.management-item:hover {
    border-color: #ddd;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.management-item.selected {
    background: rgba(34, 113, 177, 0.05);
    border-color: rgba(34, 113, 177, 0.3);
}

.management-item.deleted {
    opacity: 0.4;
}

.management-item .item-checkbox {
    accent-color: #2271b1;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.management-item .item-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.management-item .item-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 11px;
    color: #999;
    width: 80px;
    height: 60px;
    border-radius: 4px;
}

.management-item .item-details {
    flex: 1;
    min-width: 0;
}

.management-item .item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.management-item .item-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.management-item .item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-small {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-small:hover {
    background: #f0f0f0;
}

.btn-small.btn-remove:hover {
    background: rgba(214, 54, 56, 0.1);
    border-color: rgba(214, 54, 56, 0.3);
    color: #d63638;
}

.btn-small.btn-cart:hover {
    background: rgba(34, 113, 177, 0.1);
    border-color: rgba(34, 113, 177, 0.3);
    color: #2271b1;
}

/* Bulk Action Bar */
.management-bulk-bar {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px 20px;
    gap: 16px;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.management-bulk-bar .selected-count {
    font-size: 14px;
    font-weight: 600;
    color: #2271b1;
}

.management-bulk-bar button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.management-bulk-bar .btn-bulk-cart {
    background: #2271b1;
    color: #fff;
}

.management-bulk-bar .btn-bulk-cart:hover {
    background: #135e96;
}

.management-bulk-bar .btn-bulk-remove {
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
    border: 1px solid rgba(214, 54, 56, 0.2);
}

.management-bulk-bar .btn-bulk-remove:hover {
    background: rgba(214, 54, 56, 0.2);
}

.management-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.management-empty a {
    color: #2271b1;
}

/* ========================================================================
   TOAST NOTIFICATIONS
   ======================================================================== */

.lightbox-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100002;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
}

.lightbox-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.lightbox-toast-success {
    background: #fff;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lightbox-toast-error {
    background: #fff;
    color: #d63638;
    border: 1px solid #ffcdd2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========================================================================
   IMAGE VIEWER SAVE BUTTON
   ======================================================================== */

.lightbox-action-btn.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: transparent;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.lightbox-action-btn.btn-save:hover {
    background: rgba(34, 113, 177, 0.6);
    border-color: rgba(34, 113, 177, 0.8);
}

.lightbox-action-btn.btn-save.is-saved {
    background: rgba(157, 211, 55, 0.3);
    border-color: #9dd337;
    color: #9dd337;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 768px) {
    .speedshot-lightbox-panel {
        width: 100%;
        right: -100%;
    }

    .speedshot-lightbox-icon .lightbox-button {
        padding: 6px 10px;
        font-size: 14px;
    }

    .lightbox-badge {
        width: 18px;
        height: 18px;
        font-size: 11px;
        top: -4px;
        right: -4px;
    }

    .management-overview {
        padding: 0;
    }

    .management-detail {
        padding: 0;
    }

    .unsorted-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

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

    .management-layout {
        flex-direction: column;
    }

    .management-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 12px 0;
    }

    .management-sidebar .management-tab {
        display: inline-flex;
        width: auto;
        padding: 6px 16px;
        margin: 4px;
        border-radius: 20px;
        border: 1px solid #ddd;
        border-left: 1px solid #ddd;
    }

    .management-sidebar .management-tab.active {
        border-left-width: 1px;
        border-color: #2271b1;
        background: rgba(34, 113, 177, 0.05);
    }

    .management-content {
        padding: 16px;
    }

    .management-item .item-thumb {
        width: 60px;
        height: 45px;
    }

    .management-bulk-bar {
        left: 16px;
        right: 16px;
        transform: none;
    }

    .lightbox-panel-footer {
        flex-direction: column;
    }
}

/* ========================================================================
   MANAGEMENT HEADER EXTENDED
   ======================================================================== */

.management-header-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.management-header-right h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.management-header-right h1 .bi {
    color: #2271b1;
    font-size: 22px;
}

.header-count {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

.management-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.management-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.management-cart-btn:hover {
    background: #135e96;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* ========================================================================
   SIDEBAR TREE HIERARCHY
   ======================================================================== */

.tree-node {
    position: relative;
}

.tree-spacer {
    display: inline-block;
    width: 16px;
    flex-shrink: 0;
}

.tree-toggle {
    cursor: pointer;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.tree-children {
    overflow: hidden;
}

.tree-children.collapsed {
    display: none;
}

.management-tab .tab-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin: 0 8px 0 4px;
}

.management-tab .tab-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.management-tab .tab-name .tab-count {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    flex-shrink: 0;
}

.management-tab.active .tab-name .tab-count {
    color: rgba(34, 113, 177, 0.6);
}

.management-tab .tab-action-btn.btn-delete:hover {
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
}

.sidebar-empty {
    padding: 24px 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.sidebar-empty a {
    color: #2271b1;
    text-decoration: none;
}

.sidebar-empty a:hover {
    text-decoration: underline;
}

/* ========================================================================
   DRAG & DROP
   ======================================================================== */

.management-item[draggable="true"] {
    cursor: grab;
}

.management-item[draggable="true"]:active {
    cursor: grabbing;
}

.management-item.dragging {
    opacity: 0.4;
    border-style: dashed;
}

.management-tab.drag-over {
    background: rgba(34, 113, 177, 0.1) !important;
    border-left-color: #2271b1 !important;
    box-shadow: inset 0 0 0 2px rgba(34, 113, 177, 0.3);
}

/* ========================================================================
   ITEM STATUS BADGES
   ======================================================================== */

.management-item.in-cart {
    border-left: 3px solid #2271b1;
}

.item-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.in-cart-badge {
    background: rgba(34, 113, 177, 0.08);
    color: #2271b1;
}

.purchased-badge {
    background: #e6f7e6;
    color: #00a32a;
    border: 1px solid #b8e6b8;
}

.management-item.is-purchased {
    border-left: 3px solid #00a32a;
}

.btn-cart-remove {
    color: #d63638 !important;
}

.btn-cart-remove:hover {
    background: #d63638 !important;
    color: #fff !important;
}

/* ========================================================================
   EVENT LINK / NAME
   ======================================================================== */

.item-event-link {
    color: #2271b1;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s;
}

.item-event-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.item-event-name {
    color: #666;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ========================================================================
   BTN-MGMT (Management Buttons)
   ======================================================================== */

.btn-mgmt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-mgmt:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.btn-mgmt.btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.btn-mgmt.btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.btn-mgmt.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-mgmt.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Btn-move on items */
.btn-small.btn-move:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

/* Bulk bar move button */
.management-bulk-bar .btn-bulk-move {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.management-bulk-bar .btn-bulk-move:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* ========================================================================
   MANAGEMENT MODALS
   ======================================================================== */

.management-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100010;
    align-items: center;
    justify-content: center;
}

.management-modal-overlay.open {
    display: flex;
}

.management-modal {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    width: 420px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideIn 0.2s ease-out;
}

.management-modal-sm {
    width: 360px;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.management-modal h3 {
    margin: 0;
    padding: 20px 24px 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.management-modal h3 .bi {
    color: #2271b1;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #999;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 16px 24px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    margin-top: 12px;
}

.modal-body label:first-child {
    margin-top: 0;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.12);
}

.modal-input::placeholder {
    color: #aaa;
}

select.modal-input {
    appearance: auto;
}

.modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #eee;
}

/* Modal collection list (move modal) */
.modal-collection-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.modal-collection-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.modal-collection-btn:hover {
    background: rgba(34, 113, 177, 0.05);
    border-color: #2271b1;
    color: #2271b1;
}

.modal-collection-btn .bi {
    font-size: 16px;
    flex-shrink: 0;
}

.modal-collection-btn .tab-count {
    margin-left: auto;
    color: #999;
    font-size: 12px;
}

/* ========================================================================
   MANAGEMENT LIGHTBOX (Fullscreen Image Viewer)
   ======================================================================== */

.management-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100020;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.management-lightbox-overlay.open {
    display: flex;
}

.management-lightbox-overlay .lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.management-lightbox-overlay .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.management-lightbox-overlay .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.management-lightbox-overlay .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
}

.management-lightbox-overlay .lightbox-prev {
    left: 16px;
}

.management-lightbox-overlay .lightbox-next {
    right: 16px;
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 60px 80px 0;
    box-sizing: border-box;
    overflow: hidden;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox-info-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    box-sizing: border-box;
    flex-shrink: 0;
}

.lightbox-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.lightbox-info-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-info-event {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.lightbox-info-event:hover {
    color: #fff;
    text-decoration: underline;
}

.lightbox-info-right {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ========================================================================
   CART CONFIRM MODAL — slight overrides
   ======================================================================== */

#cartConfirmModal .modal-body p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

#cartConfirmModal .modal-footer a {
    text-decoration: none;
}

/* ========================================================================
   RESPONSIVE — MANAGEMENT EXTENDED
   ======================================================================== */

@media (max-width: 768px) {
    .management-header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .management-header-right h1 {
        font-size: 20px;
    }

    .management-content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .management-content-actions {
        flex-wrap: wrap;
    }

    .lightbox-image-container {
        padding: 60px 16px 0;
    }

    .management-lightbox-overlay .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .lightbox-info-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }

    .lightbox-info-left,
    .lightbox-info-right {
        width: 100%;
        justify-content: center;
    }

    .management-modal {
        width: calc(100vw - 32px);
    }

    .overview-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-search {
        flex: 1 1 100%;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }

    .filtered-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    /* Tree hierarchy on mobile - horizontal scrollable */
    .management-sidebar .tree-node {
        display: inline-block;
    }

    .management-sidebar .tree-children {
        display: flex;
        flex-wrap: wrap;
    }

    .management-sidebar .tree-children.collapsed {
        display: none;
    }

    .management-sidebar .management-tab {
        padding-left: 12px !important;
    }
}

@media (max-width: 480px) {
    .management-header {
        padding: 16px;
    }

    .management-overview {
        padding: 0;
    }

    .management-detail {
        padding: 0;
    }

    .unsorted-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .collection-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .collection-card-info {
        padding: 10px 12px;
    }

    .collection-card-name {
        font-size: 13px;
    }

    .management-content {
        padding: 12px;
    }

    .management-item {
        padding: 8px;
        gap: 8px;
    }

    .management-item .item-thumb {
        width: 50px;
        height: 38px;
    }

    .btn-mgmt {
        padding: 6px 10px;
        font-size: 12px;
    }

    .filter-tab {
        padding: 5px 10px;
        font-size: 12px;
    }

    .filtered-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
    }

    .filtered-card-info {
        padding: 6px 8px;
    }

    .filtered-card-title {
        font-size: 11px;
    }
}

/* ========================================================================
   SHARE MODAL
   ======================================================================== */

.speedshot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100015;
    align-items: center;
    justify-content: center;
}

.speedshot-modal.open {
    display: flex;
}

.speedshot-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.speedshot-modal .modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 460px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.2s ease-out;
}

.speedshot-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.speedshot-modal .modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speedshot-modal .modal-header h3 .bi {
    color: #2271b1;
}

.speedshot-modal .modal-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.speedshot-modal .modal-close-btn:hover {
    color: #333;
}

.speedshot-modal .modal-body {
    padding: 20px 24px 24px;
}

.speedshot-modal .modal-loading {
    text-align: center;
    padding: 32px 0;
    color: #999;
    font-size: 14px;
}

/* Share-Modal spezifisch */
.share-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-status.share-active {
    background: #edf7ed;
    color: #1e7e34;
}

.share-status.share-inactive {
    background: #f0f0f0;
    color: #666;
}

.share-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
}

.share-link-group {
    margin-bottom: 16px;
}

.share-link-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.share-link-row {
    display: flex;
    gap: 8px;
}

.share-link-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #f9f9f9;
    color: #333;
    min-width: 0;
}

.share-password-group {
    margin-bottom: 16px;
}

.share-password-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.share-pw-status {
    margin-bottom: 8px;
    font-size: 13px;
}

.share-pw-status .pw-active {
    color: #1e7e34;
}

.share-pw-status .pw-inactive {
    color: #999;
}

.share-pw-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.share-pw-input {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #333;
}

.share-comments-group {
    margin-bottom: 16px;
}

.share-comments-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.share-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    cursor: pointer;
}

.share-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.share-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}

.share-toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.share-toggle input:checked + .share-toggle-slider {
    background: #2271b1;
}

.share-toggle input:checked + .share-toggle-slider::before {
    transform: translateX(20px);
}

.share-toggle-label {
    font-size: 13px;
    color: #555;
}

.share-actions-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.share-error {
    color: #d63638;
    text-align: center;
    padding: 20px 0;
}

/* btn-mgmt innerhalb Share-Modal */
.speedshot-modal .btn-mgmt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.speedshot-modal .btn-mgmt:hover {
    background: #eee;
}

.speedshot-modal .btn-mgmt.btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.speedshot-modal .btn-mgmt.btn-primary:hover {
    background: #135e96;
}

.speedshot-modal .btn-mgmt.btn-danger {
    color: #d63638;
    border-color: #d63638;
}

.speedshot-modal .btn-mgmt.btn-danger:hover {
    background: #d63638;
    color: #fff;
}

/* ========================================================================
   SHARED COLLECTION (Oeffentliche Ansicht)
   ======================================================================== */

.shared-collection-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 60vh;
}

.shared-error {
    text-align: center;
    padding: 80px 20px;
}

.shared-error .bi {
    font-size: 48px;
    color: #ccc;
    display: block;
    margin-bottom: 16px;
}

.shared-error h2 {
    color: #333;
    margin-bottom: 8px;
}

.shared-error p {
    color: #666;
    margin-bottom: 24px;
}

.btn-shared-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-shared-primary:hover {
    background: #135e96;
    color: #fff;
}

.btn-shared-primary.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Passwort-Formular */
.shared-password-form {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.password-form-card {
    text-align: center;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 100%;
}

.password-icon {
    font-size: 40px;
    color: #2271b1;
    display: block;
    margin-bottom: 16px;
}

.password-form-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333;
}

.password-form-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.password-error {
    background: #fce4e4;
    color: #d63638;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.password-form {
    display: flex;
    gap: 8px;
}

.password-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Header */
.shared-header {
    margin-bottom: 24px;
}

.shared-header-info h1 {
    font-size: 24px;
    color: #333;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shared-header-info h1 .bi {
    color: #2271b1;
}

.shared-count {
    font-size: 14px;
    color: #666;
}

.shared-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.shared-empty .bi {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

/* Bilder-Grid */
.shared-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.shared-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
    position: relative;
}

.shared-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.shared-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

.shared-card-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
    cursor: pointer;
}

.shared-card-info {
    padding: 10px 12px;
}

.shared-card-title {
    display: block;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shared-card-event {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.shared-card-added-by {
    display: block;
    font-size: 11px;
    color: #7c3aed;
    margin-top: 2px;
}

.shared-card-added-by i {
    font-size: 10px;
    margin-right: 2px;
}

.shared-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.btn-shared-cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #2271b1;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-shared-cart:hover {
    background: #2271b1;
    color: #fff;
}

.btn-shared-cart.in-cart {
    background: #4CAF50;
    color: #fff;
}

/* Shared Lightbox */
.shared-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100020;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.shared-lightbox-overlay.open {
    display: flex;
}

.shared-lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.shared-lb-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.shared-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.shared-lb-nav:hover {
    background: rgba(255, 255, 255, 0.18);
}

.shared-lb-prev { left: 16px; }
.shared-lb-next { right: 16px; }

.shared-lb-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 60px 80px 0;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.shared-lb-image-container img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    transition: opacity 0.3s;
}

.shared-lb-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.shared-lb-loader.active {
    display: block;
}

.shared-lb-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sharedLbSpin 0.7s linear infinite;
}

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

.shared-lb-info {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    box-sizing: border-box;
    flex-shrink: 0;
}

.shared-lb-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .shared-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .shared-lb-image-container {
        padding: 60px 16px 0;
    }

    .shared-lb-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .shared-lb-info {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }

    .speedshot-modal .modal-box {
        width: 95vw;
    }

    .share-link-row {
        flex-direction: column;
    }

    .share-pw-actions {
        flex-direction: column;
    }
}

/* ========================================================================
   FAVORITEN / VOTES (Shared View)
   ======================================================================== */

/* Voter Name Banner */
.shared-voter-bar {
    background: linear-gradient(135deg, #fce4ec 0%, #fff3e0 100%);
    border: 1px solid #f8bbd0;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.voter-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.voter-bar-icon {
    color: #e91e63;
    font-size: 20px;
}

.voter-bar-text {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.voter-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.voter-name-group label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.voter-name-input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    width: 160px;
    background: #fff;
}

/* Favorit-Button auf Cards */
.btn-shared-fav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #999;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.btn-shared-fav:hover {
    color: #e91e63;
    transform: scale(1.1);
}

.btn-shared-fav.is-active {
    background: #e91e63;
    color: #fff;
}

.btn-shared-fav.is-active:hover {
    background: #c2185b;
}

.btn-shared-fav .fav-count {
    font-size: 10px;
    font-weight: 700;
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e91e63;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-shared-fav.is-active .fav-count {
    background: #fff;
    color: #e91e63;
}

/* Card mit Favorit hervorheben */
.shared-card.is-favorite {
    box-shadow: 0 0 0 2px #e91e63, 0 4px 16px rgba(233, 30, 99, 0.2);
}

/* Card Actions: nebeneinander */
.shared-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Lightbox Favorit-Button */
.btn-shared-lb-fav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-shared-lb-fav:hover {
    background: rgba(233, 30, 99, 0.3);
    border-color: #e91e63;
}

.btn-shared-lb-fav.is-active {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
}

/* Lightbox Kommentar-Leiste */
.shared-lb-comment {
    width: 100%;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    background: rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    flex-shrink: 0;
}

.shared-lb-comment.visible {
    display: flex;
}

.shared-lb-comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
}

.shared-lb-comment-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-shared-comment-save {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-shared-comment-save:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Shared-Info-Bar (Lightbox) mit Flex-Layout */
.shared-lb-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shared-lb-info-left {
    flex: 1;
    min-width: 0;
}

.shared-lb-info-right {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Toast */
.shared-toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 200000;
    transition: bottom 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.shared-toast.show {
    bottom: 30px;
}

/* ========================================================================
   SHARED: "BILDER HINZUFUEGEN" BUTTON + GALERIE-BROWSER
   ======================================================================== */

.btn-shared-add-images {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-shared-add-images:hover {
    background: #1a5a8e;
}

.shared-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Gallery Browser Overlay */
.gallery-browser-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-browser-overlay.open {
    display: flex;
}

.gallery-browser-modal {
    background: #fff;
    border-radius: 12px;
    width: 90vw;
    max-width: 1100px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.gallery-browser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    flex-shrink: 0;
}

.gallery-browser-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-back-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.gallery-browser-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-browser-close:hover {
    background: #f0f0f0;
    color: #333;
}

.gallery-browser-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.gallery-browser-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.gallery-browser-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.gallery-browser-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.gallery-browser-empty p {
    margin: 8px 0;
}

/* Event-Liste */
.gallery-browser-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-event-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    width: 100%;
}

.gallery-event-btn:hover {
    background: #f5f8ff;
    border-color: #2271b1;
}

.gallery-event-btn i {
    color: #2271b1;
    font-size: 18px;
    flex-shrink: 0;
}

.gallery-event-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.gallery-event-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* Bilder-Grid im Browser */
.gallery-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.gallery-browse-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f0f0;
    cursor: default;
}

.gallery-browse-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-browse-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
}

.gallery-browse-card.is-added {
    opacity: 0.5;
}

.gallery-browse-actions {
    position: absolute;
    bottom: 6px;
    right: 6px;
}

.btn-gallery-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-gallery-add:hover {
    background: #1a5a8e;
    transform: scale(1.1);
}

.btn-gallery-add.is-added {
    background: #28a745;
    cursor: default;
}

.gallery-browser-loadmore {
    text-align: center;
    padding: 20px 0 10px;
}

/* Mobile */
@media (max-width: 600px) {
    .gallery-browser-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

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

    .btn-shared-add-images {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* ========================================================================
   FAVORITEN / VOTES (Management View)
   ======================================================================== */

.management-item .item-votes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.management-item .item-votes-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.management-item .item-votes-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #fce4ec;
    color: #e91e63;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.btn-votes-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #888;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.btn-votes-toggle:hover {
    background: #f0f0f0;
    color: #333;
}

.item-voters-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
}

.item-voters-list.collapsed {
    display: none;
}

.management-item .item-voter {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 8px;
    border-left: 2px solid #e91e63;
}

.management-item .item-voter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.management-item .item-voter-name {
    font-weight: 600;
    color: #333;
    font-size: 12px;
}

.btn-vote-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-vote-delete:hover {
    background: #fee2e2;
    color: #dc3545;
}

.management-item .item-voter-comment {
    color: #555;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 2px;
    word-break: break-word;
}

/* ========================================================================
   VOTE BADGES (Sidebar + Header)
   ======================================================================== */

.votes-badge-new {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    background: #e91e63;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    animation: voteBadgePulse 0.4s ease;
    line-height: 1.4;
}

.votes-badge-new i {
    font-size: 10px;
}

@keyframes voteBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* header-votes-badge entfernt */

/* ========================================================================
   VOTES OVERVIEW PAGE
   ======================================================================== */

.management-votes-overview {
    padding: 20px;
}

.votes-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.votes-overview-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.votes-overview-header h2 i {
    color: #e91e63;
}

.votes-total {
    font-size: 14px;
    color: #666;
}

.votes-filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.votes-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.votes-filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.votes-filter-group select {
    padding: 6px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    min-width: 160px;
}

.votes-filter-group select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.votes-overview-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.votes-overview-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    color: #ddd;
}

.votes-overview-empty p {
    margin: 4px 0;
    font-size: 14px;
}

.votes-overview-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* Votes List */
.votes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vote-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    transition: all 0.2s;
}

.vote-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.vote-item.vote-new {
    border-left: 3px solid #e91e63;
    background: #fef7f9;
}

.vote-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.vote-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f0f0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 20px;
    flex-shrink: 0;
}

.vote-info {
    flex: 1;
    min-width: 0;
}

.vote-info-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.vote-voter {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vote-voter i {
    color: #2271b1;
}

.vote-collection {
    font-size: 12px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 3px;
}

.vote-new-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #e91e63;
    color: #fff;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.vote-image-title {
    font-size: 13px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vote-comment {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    word-break: break-word;
    max-width: 100%;
}

.vote-comment i {
    color: #999;
    margin-top: 1px;
    flex-shrink: 0;
}

.vote-date {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.vote-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.votes-mark-all {
    margin-top: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .voter-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .voter-name-group {
        margin-left: 0;
        width: 100%;
    }

    .voter-name-input {
        flex: 1;
        width: auto;
    }

    .shared-lb-comment {
        padding: 8px 16px;
    }

    .shared-lb-info-right {
        gap: 6px;
    }

    .votes-filter-bar {
        flex-direction: column;
        gap: 10px;
    }

    .votes-filter-group select {
        min-width: 0;
        flex: 1;
    }

    .vote-item {
        flex-wrap: wrap;
    }

    .vote-info-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .shared-lb-comments-list {
        max-height: 80px;
    }
}

/* ========================================================================
   SHARED VIEW: Kommentare auf Karten + Lightbox
   ======================================================================== */

/* Card-Kommentare */
.shared-card-comments {
    padding: 6px 10px;
    border-top: 1px solid #f0f0f0;
    max-height: 80px;
    overflow-y: auto;
}

.shared-card-comment {
    font-size: 12px;
    color: #555;
    padding: 3px 0;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f5f5f5;
}

.shared-card-comment:last-child {
    border-bottom: none;
}

.shared-card-comment strong {
    color: #333;
    font-weight: 600;
    font-size: 11px;
}

.shared-card-comment span {
    color: #555;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox-Kommentarliste */
.shared-lb-comments-list {
    padding: 8px 20px;
    max-height: 120px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.7);
}

.shared-lb-comments-list:empty {
    display: none;
}

.shared-lb-comment-item {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    padding: 5px 0;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shared-lb-comment-item:last-child {
    border-bottom: none;
}

.shared-lb-comment-item strong {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.shared-lb-comment-item span {
    color: rgba(255, 255, 255, 0.85);
    word-break: break-word;
}

.shared-lb-voters-only {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    padding: 3px 0;
}

.shared-lb-voters-only i {
    color: #e91e63;
    margin-right: 4px;
}
