/* ============================================================
   Inline Photo Gallery (IPG) — Replicates project.html styles
   ============================================================ */

/* Outer wrapper (used in client.js template) */
.inline-photos-section {
    background: var(--bg-card, #fff);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Container-level variable overrides for project.html parity */
#inlinePhotosGallery {
    --ipg-radius: 12px;
    --ipg-radius-sm: 6px;
    --ipg-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --ipg-shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --ipg-bg-secondary: #f0f2f5;
}

/* --- Loading & Empty States --- */

.ipg-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}

.ipg-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ipgSpin 0.8s linear infinite;
}

.ipg-loading-small {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.ipg-spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ipgSpin 0.8s linear infinite;
}

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

.ipg-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Toolbar (Ver favoritas / Ver ocultos) --- */

.ipg-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ipg-toolbar-btn {
    padding: 6px 14px;
    border-radius: var(--ipg-radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card, #fff);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ipg-toolbar-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.ipg-toolbar-favs {
    color: #ef4444;
}

.ipg-toolbar-hidden {
    color: var(--text-secondary);
}

/* --- Director Banner --- */

.ipg-director-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--ipg-radius-sm);
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 16px;
    text-align: center;
}

/* --- Decorado Group --- */

.ipg-decorado-group {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border);
    border-radius: var(--ipg-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--ipg-shadow);
}

.ipg-decorado-none {
    border-style: dashed;
    border-color: var(--text-muted);
    opacity: 0.85;
    box-shadow: none;
}

/* Header — 9-column grid */
.ipg-decorado-header {
    display: grid;
    grid-template-columns: 32px 1fr auto 140px auto auto 24px auto 36px;
    align-items: center;
    column-gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf8ff 50%, #fff5f5 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.ipg-decorado-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, #a78bfa 100%);
    border-radius: 0 4px 4px 0;
}

.ipg-decorado-header-muted {
    background: var(--ipg-bg-secondary);
}

.ipg-decorado-header-muted::before {
    background: var(--text-muted);
}

/* Grid column assignments */
.ipg-decorado-header > .ipg-decorado-icon        { grid-column: 1; }
.ipg-decorado-header > .ipg-decorado-info        { grid-column: 2; }
.ipg-decorado-header > .ipg-deco-search-back     { grid-column: 3; }
.ipg-decorado-header > .ipg-deco-search-input    { grid-column: 4; width: 100%; box-sizing: border-box; }
.ipg-decorado-header > .ipg-deco-search-btn      { grid-column: 5; }
.ipg-decorado-header > .ipg-deco-search-favs     { grid-column: 6; }
.ipg-decorado-header > .ipg-deco-fav-indicator    { grid-column: 7; text-align: center; }
.ipg-decorado-header > .ipg-deco-count           { grid-column: 8; }
.ipg-decorado-header > .ipg-deco-collapse        { grid-column: 9; }

.ipg-decorado-icon {
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card, #fff);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    color: #ea4335;
}

.ipg-decorado-icon svg {
    width: 18px; height: 18px;
}

.ipg-decorado-info {
    min-width: 0;
    overflow: hidden;
}

.ipg-decorado-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.ipg-decorado-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ipg-deco-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.ipg-decorado-none .ipg-deco-count {
    color: var(--text-muted);
    background: var(--bg-hover);
}

/* Search */
.ipg-deco-search-input {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--ipg-radius-sm);
    font-size: 0.75rem;
    background: var(--bg-card, #fff);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ipg-deco-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79,110,247,0.12);
}

.ipg-deco-search-btn {
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--ipg-radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
}

.ipg-deco-search-btn:hover {
    background: var(--primary-hover);
}

.ipg-deco-search-btn svg {
    width: 14px; height: 14px;
}

.ipg-deco-search-favs {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.ipg-deco-search-favs input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
    width: 13px; height: 13px;
}

.ipg-deco-search-back {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: var(--ipg-radius-sm);
    background: var(--primary-light);
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.ipg-deco-search-back:hover {
    background: #e0e7ff;
    border-color: var(--primary);
}

.ipg-deco-search-back svg {
    width: 12px; height: 12px; flex-shrink: 0;
}

.ipg-deco-search-back.visible {
    display: flex;
}

/* Fav indicator */
.ipg-deco-fav-indicator {
    font-size: 1.1rem;
    color: #9ca3af;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.ipg-deco-fav-indicator.has-favs {
    color: #ef4444;
}

/* Collapse */
.ipg-deco-collapse {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.ipg-deco-collapse:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.ipg-deco-collapse svg {
    width: 18px; height: 18px;
    transition: transform 0.3s ease;
}

.ipg-deco-collapse.collapsed svg {
    transform: rotate(-90deg);
}

/* Content & Sections */
.ipg-decorado-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 8000px;
    opacity: 1;
}

.ipg-decorado-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.ipg-decorado-sections {
    padding: 24px 28px 28px;
    background: var(--ipg-bg-secondary);
}

.ipg-decorado-none .ipg-decorado-sections {
    background: transparent;
}

.ipg-deco-search-results {
    padding: 16px 20px;
    background: var(--ipg-bg-secondary);
}

/* --- Folders Grid --- */

.ipg-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 20px;
}

.ipg-folder-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border);
    border-radius: var(--ipg-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--ipg-shadow);
}

.ipg-folder-card:hover {
    border-color: var(--primary);
    box-shadow: var(--ipg-shadow-lg);
    transform: translateY(-3px);
}

.ipg-folder-cover {
    width: 100%;
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ipg-folder-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.06) 100%);
    pointer-events: none;
}

.ipg-folder-cover-ph {
    font-size: 3rem;
    opacity: 0.3;
}

.ipg-folder-info {
    padding: 16px;
}

.ipg-folder-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ipg-folder-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Folder fav button */
.ipg-folder-fav-btn {
    position: absolute;
    top: 8px; right: 8px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
    padding: 0;
    line-height: 1;
    opacity: 0;
}

.ipg-folder-card:hover .ipg-folder-fav-btn,
.ipg-folder-fav-btn.has-favs,
.ipg-folder-fav-btn.partial-favs {
    opacity: 1;
}

.ipg-folder-fav-btn:hover {
    background: rgba(0,0,0,0.65);
    transform: scale(1.15);
}

.ipg-folder-fav-btn .heart {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    transition: color 0.2s;
    pointer-events: none;
}

.ipg-folder-fav-btn.has-favs .heart {
    color: #ef4444;
}

.ipg-folder-fav-btn.has-favs {
    background: rgba(255,255,255,0.9);
}

.ipg-folder-fav-btn.partial-favs .heart {
    color: #f6ad55;
}

.ipg-folder-fav-btn.partial-favs {
    background: rgba(255,255,255,0.9);
}

/* Folder hide button */
.ipg-folder-hide-btn {
    position: absolute;
    bottom: 8px; right: 8px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
    padding: 0;
    opacity: 0;
}

.ipg-folder-card:hover .ipg-folder-hide-btn {
    opacity: 1;
}

.ipg-folder-hide-btn:hover {
    background: rgba(239,68,68,0.8);
    transform: scale(1.15);
}

.ipg-folder-hide-btn svg {
    width: 16px; height: 16px;
    stroke: rgba(255,255,255,0.85);
    fill: none; stroke-width: 2;
    pointer-events: none;
}

.ipg-folder-hide-btn.is-hidden {
    opacity: 1;
    background: rgba(239,68,68,0.7);
}

.ipg-folder-hide-btn.is-hidden svg {
    stroke: #fff;
}

/* --- Photos Grid --- */

.ipg-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 16px;
}

.ipg-photo-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border);
    border-radius: var(--ipg-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--ipg-shadow);
    position: relative;
}

.ipg-photo-card:hover {
    border-color: var(--primary);
    box-shadow: var(--ipg-shadow-lg);
    transform: translateY(-3px);
}

.ipg-photo-thumb {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hover);
}

.ipg-photo-info {
    padding: 10px;
}

.ipg-photo-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Photo fav button */
.ipg-photo-fav-btn {
    position: absolute;
    top: 8px; right: 8px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.2s, background 0.2s;
    padding: 0; line-height: 1;
}

.ipg-photo-fav-btn:hover {
    background: rgba(0,0,0,0.65);
    transform: scale(1.15);
}

.ipg-photo-fav-btn .heart {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    transition: color 0.2s, transform 0.2s;
    pointer-events: none;
}

.ipg-photo-fav-btn.favorited .heart {
    color: #ef4444;
}

.ipg-photo-fav-btn.favorited {
    background: rgba(255,255,255,0.9);
}

@keyframes ipgHeartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.ipg-photo-fav-btn.pop .heart {
    animation: ipgHeartPop 0.35s ease;
}

/* Photo hide button */
.ipg-photo-hide-btn {
    position: absolute;
    bottom: 8px; right: 8px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.2s, background 0.2s;
    padding: 0;
    opacity: 0;
}

.ipg-photo-card:hover .ipg-photo-hide-btn {
    opacity: 1;
}

.ipg-photo-hide-btn:hover {
    background: rgba(239,68,68,0.8);
    transform: scale(1.15);
}

.ipg-photo-hide-btn svg {
    width: 16px; height: 16px;
    stroke: rgba(255,255,255,0.85);
    fill: none; stroke-width: 2;
    pointer-events: none;
}

.ipg-photo-hide-btn.is-hidden {
    opacity: 1;
    background: rgba(239,68,68,0.7);
}

.ipg-photo-hide-btn.is-hidden svg {
    stroke: #fff;
}

/* --- Breadcrumb --- */

.ipg-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    padding: 8px 0;
}

.ipg-breadcrumb-item {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}

.ipg-breadcrumb-item:hover {
    text-decoration: underline;
}

.ipg-breadcrumb-sep {
    color: var(--text-muted);
}

.ipg-breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

.ipg-breadcrumb-count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* --- Lightbox --- */

.ipg-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.ipg-lightbox.show {
    display: flex;
}

.ipg-lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
}

.ipg-lightbox-img-wrap {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    max-width: 95vw;
    max-height: 90vh;
}

.ipg-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.15s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.ipg-lightbox-close {
    position: fixed;
    top: 16px; right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 8px;
    z-index: 10010;
    line-height: 1;
}

.ipg-lightbox-close:hover {
    color: var(--primary);
}

.ipg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 3rem;
    padding: 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 8px;
    z-index: 2;
    line-height: 1;
}

.ipg-lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}

.ipg-lightbox-prev {
    left: 20px;
}

.ipg-lightbox-next {
    right: 20px;
}

.ipg-lightbox-info {
    margin-top: 16px;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.ipg-lightbox-caption {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.ipg-lightbox-counter {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* Lightbox fav button */
.ipg-lightbox-fav-btn {
    position: fixed;
    top: 20px; left: 20px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010;
    transition: background 0.2s, transform 0.2s;
}

.ipg-lightbox-fav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.ipg-lightbox-fav-btn .heart {
    font-size: 1.6rem;
    color: rgba(255,255,255,0.8);
    transition: color 0.2s;
    pointer-events: none;
}

.ipg-lightbox-fav-btn.favorited .heart {
    color: #ef4444;
}

/* Lightbox hide button */
.ipg-lightbox-hide-btn {
    position: fixed;
    top: 20px; left: 80px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010;
    transition: background 0.2s, transform 0.2s;
}

.ipg-lightbox-hide-btn:hover {
    background: rgba(239,68,68,0.5);
    transform: scale(1.1);
}

.ipg-lightbox-hide-btn svg {
    width: 22px; height: 22px;
    stroke: rgba(255,255,255,0.8);
    fill: none; stroke-width: 2;
}

.ipg-lightbox-hide-btn.is-hidden svg {
    stroke: #ef4444;
}

/* Zoom hint */
.ipg-lightbox-zoom-hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: rgba(255,255,255,0.7);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 10010;
}

/* --- Section title within decorado --- */

.ipg-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ipg-section-title .ipg-section-fav-indicator {
    font-size: 0.9rem;
    color: #9ca3af;
}

.ipg-section-title .ipg-section-fav-indicator.has-favs {
    color: #ef4444;
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .ipg-decorado-group {
        border-radius: var(--radius, 6px);
    }
    .ipg-decorado-header {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px;
    }
    .ipg-decorado-header > .ipg-deco-search-input {
        width: 80px;
    }
    .ipg-decorado-sections {
        padding: 16px;
    }
    .ipg-deco-search-favs span {
        display: none;
    }
    .ipg-folders-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    }
    .ipg-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
    }
    .ipg-lightbox-prev { left: 4px; }
    .ipg-lightbox-next { right: 4px; }
    .ipg-lightbox-nav { font-size: 2rem; padding: 12px; }
    .ipg-lightbox-fav-btn,
    .ipg-lightbox-hide-btn {
        width: 40px; height: 40px;
    }
    .ipg-lightbox-hide-btn { left: 68px; }
}

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

.ipg-drag-hint {
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    background: var(--bg-hover, #f5f5f5);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    user-select: none;
}

.ipg-drag-enabled .ipg-photo-card {
    cursor: grab;
}

.ipg-drag-enabled .ipg-photo-card:active {
    cursor: grabbing;
}

.ipg-photo-card.ipg-dragging {
    opacity: 0.4;
    transform: scale(0.95);
    border: 2px dashed var(--primary, #6366f1);
}

.ipg-photo-card.ipg-drag-before {
    border-left: 3px solid var(--primary, #6366f1);
}

.ipg-photo-card.ipg-drag-after {
    border-right: 3px solid var(--primary, #6366f1);
}

/* ===================== DIRECTOR SHARED GALLERY (DSG) ===================== */

.dsg-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 0;
}

.dsg-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted, #888);
    font-size: 1rem;
    background: var(--bg-hover, #f8f9fa);
    border-radius: 12px;
    margin: 8px 0;
}

.dsg-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #f1f5f9;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.dsg-banner-icon { font-size: 1.3rem; }
.dsg-banner-text { flex: 1; font-weight: 500; }
.dsg-banner-count {
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.dsg-section {
    margin-bottom: 20px;
}

.dsg-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.dsg-section-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text, #1e293b);
}

.dsg-section-count {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

.dsg-section-view-all {
    margin-left: auto;
    font-size: 0.78rem;
}

.dsg-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.dsg-location-card {
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e2e8f0);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dsg-location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dsg-location-cover {
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hover, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsg-location-cover-ph {
    font-size: 2rem;
    opacity: 0.3;
}

.dsg-location-info {
    padding: 8px 10px;
}

.dsg-location-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dsg-location-count {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    margin-top: 2px;
}

/* Breadcrumb */
.dsg-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    font-size: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.dsg-breadcrumb-item {
    color: var(--primary, #6366f1);
    cursor: pointer;
    font-weight: 500;
}

.dsg-breadcrumb-item:hover { text-decoration: underline; }

.dsg-breadcrumb-sep { color: var(--text-muted, #94a3b8); }

.dsg-breadcrumb-current {
    color: var(--text, #1e293b);
    font-weight: 600;
}

.dsg-breadcrumb-count {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    background: var(--bg-hover, #f1f5f9);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Photo grid */
.dsg-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
    gap: 10px;
}

.dsg-photo-card {
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e2e8f0);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.dsg-photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dsg-photo-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hover, #f1f5f9);
}

.dsg-photo-info { padding: 6px 8px; }

.dsg-photo-name {
    font-size: 0.75rem;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dsg-photo-caption {
    font-size: 0.7rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Lightbox */
.dsg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsg-lb-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dsg-lb-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 10px;
}

.dsg-lb-close:hover { color: #e2e8f0; }

.dsg-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    background: rgba(0,0,0,0.3);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 16px 12px;
    border-radius: 8px;
    z-index: 10;
    line-height: 1;
    transition: background 0.2s;
}

.dsg-lb-nav:hover { background: rgba(0,0,0,0.6); }
.dsg-lb-prev { left: 12px; }
.dsg-lb-next { right: 12px; }

.dsg-lb-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    padding: 48px 60px;
}

.dsg-lb-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.dsg-lb-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    width: 100%;
    flex-wrap: wrap;
    color: #e2e8f0;
    font-size: 0.85rem;
}

.dsg-lb-name { font-weight: 500; }
.dsg-lb-caption { color: #94a3b8; }
.dsg-lb-date { color: #94a3b8; }
.dsg-lb-counter { margin-left: auto; color: #94a3b8; font-size: 0.8rem; }

/* Responsive */
@media (max-width: 600px) {
    .dsg-locations-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .dsg-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr));
    }
    .dsg-lb-nav { font-size: 2rem; padding: 10px 8px; }
    .dsg-lb-prev { left: 4px; }
    .dsg-lb-next { right: 4px; }
    .dsg-lb-image-wrap { padding: 40px 8px; }
    .dsg-toolbar { flex-direction: column; align-items: stretch; }
    .dsg-send-btn { width: 100%; }
}

/* Director toolbar */
.dsg-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.dsg-toolbar-favs {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    min-height: 1.2em;
}

.dsg-send-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    white-space: nowrap;
}

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

/* Photo card favorite button */
.dsg-photo-card {
    position: relative;
}

.dsg-photo-fav-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    background: rgba(0,0,0,0.4);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.15s;
    color: #fff;
    font-size: 0.85rem;
}

.dsg-photo-card:hover .dsg-photo-fav-btn,
.dsg-photo-fav-btn.favorited {
    opacity: 1;
}

.dsg-photo-fav-btn.favorited {
    background: rgba(239,68,68,0.85);
    color: #fff;
}

.dsg-photo-fav-btn:hover {
    transform: scale(1.15);
}

.dsg-photo-fav-btn .heart {
    line-height: 1;
}

/* Lightbox favorite button */
.dsg-lb-fav-btn {
    position: absolute;
    top: 12px;
    left: 16px;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 1.2rem;
    transition: background 0.2s, transform 0.15s;
}

.dsg-lb-fav-btn.favorited {
    background: rgba(239,68,68,0.85);
    color: #fff;
}

.dsg-lb-fav-btn:hover {
    transform: scale(1.1);
    background: rgba(239,68,68,0.7);
}

/* Director drag & drop reordering */
.dsg-photos-grid.dsg-drag-enabled .dsg-photo-card {
    cursor: grab;
}
.dsg-photos-grid.dsg-drag-enabled .dsg-photo-card:active {
    cursor: grabbing;
}
.dsg-photo-card.dsg-dragging {
    opacity: 0.4;
    outline: 2px dashed #6366f1;
}
.dsg-photo-card.dsg-drag-before {
    box-shadow: -3px 0 0 0 #6366f1;
}
.dsg-photo-card.dsg-drag-after {
    box-shadow: 3px 0 0 0 #6366f1;
}

/* Director "He terminado" button */
.dsg-finished-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.dsg-finished-btn:hover:not(:disabled) {
    background: #15803d;
}
.dsg-finished-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Director sent confirmation banner */
.dsg-sent-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 0.9rem;
    color: #065f46;
    line-height: 1.5;
}
.dsg-sent-banner-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Director welcome banner (shown to director on entry) */
.dsg-welcome-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #1e40af;
    line-height: 1.5;
}
.dsg-welcome-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Productora: director selection alert */
.dsg-director-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fefce8;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.5;
}
.dsg-director-alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Director selection card highlight */
.dsg-director-selection-card.dsg-has-selection {
    border-left: 4px solid #f59e0b;
}

/* Director favorites badge */
.dsg-director-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}
