* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --success-color: #10b981;
    --error-color: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 12px 16px;
    /* Espacio bajo la barra fija: se ajusta con JS (--filters-bar-height); fallback seguro para 2 filas */
    padding-top: calc(var(--filters-bar-height, 120px) + 6px);
}

/* Header */
.header {
    background: var(--card-background);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

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

.casting-selector {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.casting-selector label {
    font-weight: 500;
    color: var(--text-secondary);
}

.casting-selector input {
    padding: 6px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.2s;
}

.casting-selector input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.stats {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* Botón actualizar: solo icono, sin formato de botón */
.btn.btn-refresh {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px !important;
    min-width: auto !important;
    min-height: auto !important;
    font-size: 1.2em !important;
    color: inherit !important;
}

.btn.btn-refresh:hover {
    background: transparent !important;
    transform: rotate(180deg);
}

.btn.btn-refresh:active {
    background: transparent !important;
    transform: rotate(180deg) scale(0.95);
}

.btn-refresh.loading {
    animation: spin 1s linear infinite;
    cursor: wait;
}

.last-update {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

.btn.btn-toggle-foto {
    background: rgba(228, 203, 160, 0.3) !important; /* #E4CBA0 al 30% de opacidad cuando no está activo */
    color: #333 !important;
    padding: 2px 8px !important; /* Mismo padding que filter-btn */
    font-size: 12px !important;
    font-weight: 400 !important;
    border: 1px solid rgba(212, 184, 144, 0.3) !important;
    border-radius: 4px !important;
    height: auto !important;
    min-height: auto !important;
    line-height: normal !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.btn.btn-toggle-foto:hover {
    background: rgba(228, 203, 160, 0.4) !important;
    border-color: rgba(212, 184, 144, 0.4) !important;
}

.btn.btn-toggle-foto.active {
    background: #9C0B32 !important; /* Color oscuro cuando está activo */
    border-color: #7d0928 !important;
    color: #fff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn.btn-toggle-foto.active:hover {
    background: #8a0a2c !important;
    border-color: #6e0822 !important;
}

.load-time {
    padding: 4px 12px;
    background: var(--background);
    border-radius: 6px;
    font-weight: 500;
}

/* Buttons - Estilo FileMaker */
.btn {
    padding: 8px 16px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn:hover:not(:disabled) {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.btn:active:not(:disabled) {
    background: #d0d0d0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #f5f5f5;
    color: #333;
    border-color: #c0c0c0;
}

.btn-primary:hover:not(:disabled) {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border-color: #c0c0c0;
}

.btn-secondary:hover:not(:disabled) {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

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

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-indicator p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 8px 0;
}

.loading-details {
    font-size: 14px;
    opacity: 0.7;
    font-style: italic;
}

/* Error message */
.error-message {
    background-color: #fee2e2;
    color: var(--error-color);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid var(--error-color);
}

/* Actors Grid - Diseño tipo galería compacto - Ensanchado para más contenido */
.actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); /* 80% de 280px */
    gap: 8px;
    margin-bottom: 12px;
}

.actor-card {
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

/* Foto del actor - altura máxima 145px, ancho automático */
.actor-photo-container {
    position: relative;
    width: 100%;
    max-height: 145px;
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
}

.actor-photo {
    width: auto;
    max-width: 100%;
    max-height: 145px;
    height: auto;
    object-fit: contain;
    display: block;
    background: var(--background);
}

.actor-photo-placeholder {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
    max-height: 145px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 48px;
}

.actor-photo-placeholder span {
    opacity: 0.5;
}

/* Badge con número del actor */
.actor-number-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Icono de Instagram dentro de la banda Bendita (encima de la B) */
.instagram-icon-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    padding: 2px;
    border-radius: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.instagram-icon-strip:hover {
    color: #E4405F;
    transform: scale(1.15);
}

.instagram-icon-strip svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Franjas laterales sobre la foto: una a la izquierda (Bendita) y otra a la derecha (Cliente); estrellas en columna */
.actor-strip {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
    z-index: 10;
}

.actor-strip-bendita {
    left: 0;
}

.actor-strip-cliente {
    right: 0;
}

.actor-strip .favorite-heart-overlay {
    display: flex;
    align-items: center;
}

.actor-strip .heart-icon {
    font-size: 16px;
}

.stars-vertical {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.stars-vertical.bendita-stars-container .bendita-stars-clickable {
    flex-direction: column;
}

.actor-favorite-stars-overlay .star,
.actor-strip .star {
    font-size: 16px;
    line-height: 1;
}

.actor-favorite-stars-overlay .star-filled,
.actor-strip .star-filled {
    color: #FFD700;
}

.actor-favorite-stars-overlay .star-empty,
.actor-strip .star-empty {
    color: rgba(255, 255, 255, 0.5);
}

.actor-favorite-stars-overlay .star-cliente,
.actor-strip .star-cliente {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actor-favorite-stars-overlay .star-svg-cliente,
.actor-strip .star-svg-cliente {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.bendita-stars-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bendita-stars-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-right: 2px;
}

.cliente-stars-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-right: 2px;
}

.cliente-stars-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cliente-stars-stars {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.bendita-stars-clickable {
    display: flex;
    gap: 2px;
    align-items: center;
    cursor: pointer;
}

.bendita-stars-clickable .star {
    user-select: none;
}

.bendita-stars-clickable .star:hover {
    opacity: 0.9;
}

.actor-favorite-stars-overlay .star {
    font-size: 16px;
    line-height: 1;
}

.actor-favorite-stars-overlay .star-filled {
    color: #FFD700; /* Dorado para estrellas llenas */
}

.actor-favorite-stars-overlay .star-empty {
    color: rgba(255, 255, 255, 0.5); /* Blanco semitransparente para estrellas vacías */
}

/* Estrella cliente: icono SVG (hereda color de .star-filled / .star-empty) */
.actor-favorite-stars-overlay .star-cliente {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actor-favorite-stars-overlay .star-svg-cliente {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.actor-favorite-stars-overlay .standby-text {
    color: white;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
    padding-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.actor-favorite-stars-overlay-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.actor-favorite-stars-overlay-right .favorite-heart-overlay {
    display: flex;
    align-items: center;
}

.actor-favorite-stars-overlay-right .heart-icon {
    font-size: 16px;
}

/* Cuerpo de la tarjeta */
.actor-card-body {
    padding: 4px 4px 2px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.actor-name-section {
    margin-bottom: 0;
}

.actor-name-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.actor-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

.btn-icon-ficha {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.btn-icon-ficha:hover:not(:disabled) {
    opacity: 0.7;
}

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

.actor-ficha-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Botón solo icono clipboard (copiar nombre y número) - mismo tamaño que iconos de abajo, sin borde */
.btn-icon-copy-numero {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    outline: none;
    box-shadow: none;
}
.btn-icon-copy-numero:hover:not(:disabled) {
    opacity: 0.85;
}
.btn-icon-copy-numero:focus {
    border: none;
    outline: none;
    box-shadow: none;
}
.btn-icon-copy-numero:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.icon-clipboard-gold {
    width: 12px;
    height: 12px;
    object-fit: contain;
    filter: invert(0.55) sepia(0.6) saturate(2.5) hue-rotate(5deg) brightness(1.05);
}

.actor-real-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.actor-artistic-name {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    font-style: italic;
    display: inline-block;
    line-height: 1.4;
}

/* Fila nombre artístico + icono callback en la misma línea */
.actor-artistic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 1.4em;
}
.actor-artistic-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.actor-artistic-left .actor-artistic-name {
    margin: 0;
}
.actor-artistic-left .actor-name-icons {
    margin-left: 4px;
}
.actor-callback-icon-inline {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.actor-callback-icon-inline .callback-icon {
    width: 20px;
    height: 20px;
    cursor: help;
}

.actor-name-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.instagram-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.instagram-link:hover {
    opacity: 1;
}

.actor-details {
    margin-bottom: 0;
}

.actor-detail-item {
    font-size: 11px;
    margin-bottom: 2px;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 2px;
}

.actor-callback-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.callback-icon {
    width: 24px;
    height: 24px;
    display: block;
    cursor: help;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.detail-icon {
    font-size: 12px;
    line-height: 1;
    opacity: 0.9;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 400;
    margin-left: 0;
}

.actor-detail-item-no-label .detail-value {
    margin-left: 0;
}

.actor-detail-item-hidden {
    display: none !important;
}

/* Cliente ratings y favoritos */
.actor-measurements {
    margin-top: 4px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.actor-measurements-text {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.35;
}

.actor-client-ratings {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    margin-top: 4px;
    border-top: 1px solid var(--border-color);
}

.client-rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.client-icon {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stars-container {
    display: flex;
    gap: 2px;
    align-items: center;
}

.star {
    font-size: 14px;
    line-height: 1;
}

.star-filled {
    color: #FFD700; /* Dorado para estrellas llenas */
}

.star-empty {
    color: #ddd; /* Gris para estrellas vacías */
}

.favorite-heart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-icon {
    font-size: 18px;
    color: #e91e63; /* Rojo para el corazón */
}


/* Botones de acciones removidos - ya no se usan */

/* Botón de editar en cada tarjeta (padding mínimo, igual que cámara y tick) */
.btn-edit {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #c0c0c0;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.1s ease-out;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
}

.btn-edit:hover:not(:disabled) {
    background-color: #e0e0e0;
    border-color: #a0a0a0;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

.btn-edit:active:not(:disabled) {
    background-color: #d0d0d0;
    border-color: #909090;
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.btn-edit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Estilos para todos los botones de acción (padding mínimo: cámara, lápiz, tick) */
.btn-action {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #c0c0c0;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.1s ease-out;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
}

.btn-action:hover:not(:disabled) {
    background-color: #e0e0e0;
    border-color: #a0a0a0;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

.btn-action:active:not(:disabled) {
    background-color: #d0d0d0;
    border-color: #909090;
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Iconos simples junto al nombre artístico (C + cámara: negro para buen contraste) */
.actor-name-icons .icon-copy-name,
.actor-name-icons .icon-copy-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s;
    vertical-align: middle;
    line-height: 1;
}

.actor-name-icons .icon-copy-name {
    font-size: 11px;
    font-weight: 600;
    color: #0a0a0a;
    height: 12px;
}

.actor-name-icons .icon-copy-video {
    width: 12px;
    height: 12px;
    color: #0a0a0a;
}

.icon-copy-video svg {
    display: block;
    width: 100%;
    height: 100%;
}

.actor-name-icons .icon-copy-name:hover,
.actor-name-icons .icon-copy-video:hover {
    opacity: 0.82;
}

.actor-name-icons .icon-copy-name:active,
.actor-name-icons .icon-copy-video:active {
    opacity: 0.65;
}

/* Botón Seleccionar - estado normal (hereda tamaño de .btn-action) */
.btn-select {
    font-size: 13px;
    font-weight: 600;
}

/* Botón Seleccionar - estado seleccionado (iluminado) */
.btn-select.selected {
    background-color: #4CAF50; /* Verde cuando está seleccionado */
    color: white;
    border-color: #45a049;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-select.selected:hover:not(:disabled) {
    background-color: #45a049;
    border-color: #3d8b40;
    box-shadow: 0 3px 6px rgba(76, 175, 80, 0.4);
}

.btn-select.selected:active:not(:disabled) {
    background-color: #3d8b40;
    border-color: #357a38;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Ajustar el contenedor de acciones para mostrar todos los botones (compacto, pegado a los detalles) */
.actor-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2px;
    border-top: 1px solid var(--border-color);
    margin-top: 2px;
    gap: 4px;
    flex-wrap: wrap;
}

.actor-card-actions-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.actor-card-actions-right {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

/* Botones de iconos de estado del actor */
.btn-icon-status {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.btn-icon-status:hover:not(:disabled) {
    opacity: 0.7;
}

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

.actor-icon-display-only {
    pointer-events: none;
    cursor: default;
}

/* Iconos de estado del actor (dentro de actor-card-actions) */
.actor-status-icon {
    width: 14px;
    height: 14px;
    color: #d4a574;
    transition: color 0.2s ease;
    flex-shrink: 0;
    display: block;
}

.actor-status-icon.active {
    color: #8b6f47;
}

.actor-status-icon-bomba {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: default;
}

.actor-status-icon-thumbs-down {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: default;
}

.actor-status-icon-thumbs-down.thumbs-down-black path {
    fill: #000;
}

.actor-status-icon-thumbs-down.thumbs-down-red path {
    fill: #9C0B32;
}

/* Load more container */
.load-more-container {
    text-align: center;
    padding: 24px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: var(--text-secondary);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
        /* padding-top sigue siendo calc(var(--filters-bar-height) + 12px) por JS */
    }

    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .casting-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .casting-selector input {
        width: 100%;
    }

    .actors-grid {
        grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); /* 80% de 180px */
        gap: 8px;
    }

    .title {
        font-size: 24px;
    }
}

/* ==================== FILTROS ==================== */
.filters-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 4px 12px;
    background: var(--card-background);
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.filters-left {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

.filter-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-group-hidden {
    display: none !important;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-select {
    padding: 2px 8px;
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-width: 160px;
}

.filter-select:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.filter-select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.2);
}

.filter-btn {
    padding: 2px 6px;
    background: rgba(228, 203, 160, 0.3); /* #E4CBA0 al 30% de opacidad cuando no hay filtro activo */
    border: 1px solid rgba(212, 184, 144, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    background: rgba(228, 203, 160, 0.4);
    border-color: rgba(212, 184, 144, 0.4);
}

.filter-btn.active {
    background: #9C0B32; /* Color oscuro cuando hay filtro activo */
    border-color: #7d0928;
    color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filter-btn.active:hover {
    background: #8a0a2c;
    border-color: #6e0822;
}

.filter-count {
    background: #666;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: #333;
}

.filter-btn .btn-actores-icon {
    flex-shrink: 0;
    display: block;
}
.filter-btn.active .btn-actores-icon {
    filter: brightness(0) invert(1);
}

.filter-btn.btn-icon-only {
    padding: 2px;
    min-width: auto;
}
.filter-btn .btn-icon-only-img {
    flex-shrink: 0;
    display: block;
}
.filter-btn.active .btn-icon-only-img {
    filter: brightness(0) invert(1);
}

/* Wrapper del botón de filtro + cruz para quitar filtro */
.filter-btn-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Cuando el wrap contiene un input (Nombre, Número, Edad), el input ocupa el espacio disponible */
.filter-btn-wrap .filter-text-input {
    flex: 1;
    min-width: 0;
}

.filter-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(156, 11, 50, 0.9);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.filter-clear-btn:hover {
    background: #7d0928;
    transform: scale(1.1);
}

.filter-clear-btn:focus {
    outline: 2px solid #9C0B32;
    outline-offset: 1px;
}

.filter-clear-btn.hidden {
    display: none !important;
}

.filter-popup {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 800px;
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
}

.filter-popup-narrow {
    min-width: 400px;
    max-width: 500px;
}

.filter-popup-narrow-sala {
    min-width: 640px; /* 80% de 800px */
    max-width: 960px; /* 80% de 1200px */
}

.filter-popup-narrow-fecha {
    min-width: 400px; /* 50% de 800px */
    max-width: 600px; /* 50% de 1200px */
}

.filter-popup-narrow-caracteristicas {
    min-width: 600px; /* 80% de 800px */
    max-width: 860px; /* 80% de 1200px */
}

.filter-tallas-hint {
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin-bottom: 12px;
}

.filter-tallas-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-tallas-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-tallas-label {
    min-width: 72px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.filter-tallas-input {
    flex: 1;
    max-width: 180px;
}

.filter-popup-narrow-simple {
    min-width: 400px; /* 50% de 800px */
    max-width: 600px; /* 50% de 1200px */
}

.filter-edad-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-edad-field .filter-group-title {
    margin: 0;
    min-width: 60px;
}

.filter-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.filter-popup-header-with-controls {
    flex-wrap: wrap;
    gap: 6px;
}

.filter-popup-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.filter-popup-header-left h3 {
    margin: 0;
}

.filter-popup-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-popup-header-right .btn {
    padding: 2px 8px;
    font-size: 12px;
}

.filter-popup-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-popup {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-popup:hover {
    background: var(--background);
    color: var(--text-primary);
}

.filter-popup-content {
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.filter-group-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    margin-top: 6px;
}

.filter-group-title:first-of-type {
    margin-top: 0;
}

.filter-checkboxes {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
}

/* Estado: 2 columnas */
#estadoCheckboxes {
    grid-template-columns: repeat(3, 1fr);
}
/* Sin 1fr: evita que las dos columnas ocupen todo el ancho del popup y se vean muy separadas */
#estado2Checkboxes {
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
    column-gap: 18px;
    row-gap: 4px;
}

/* Provincias: 9 columnas */
#provinciaCheckboxes {
    grid-template-columns: repeat(9, 1fr);
}

/* Agencias: 4 columnas */
#agenciaCheckboxes {
    grid-template-columns: repeat(4, 1fr);
}

/* País: 4 columnas */
#paisCheckboxes {
    grid-template-columns: repeat(4, 1fr);
}

/* Rol: 4 columnas */
#rolCheckboxes {
    grid-template-columns: repeat(4, 1fr);
}

/* Sala: 3 columnas */
.filter-checkboxes-3cols {
    grid-template-columns: repeat(3, 1fr);
}

.filter-checkboxes-4cols {
    grid-template-columns: repeat(4, 1fr);
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 2px 0;
}

.filter-checkboxes .loading-provinces,
.filter-checkboxes .loading-filter {
    color: var(--text-secondary);
    font-style: italic;
    padding: 4px 0;
    text-align: center;
}

.filter-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Opción Stand By en filtro Agencia: separada del listado */
.filter-agencia-standby-row {
    margin-bottom: 4px;
}
.filter-agencia-separator {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0 6px 0;
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 57px; /* Altura aproximada del header */
    background: white;
    z-index: 9;
    margin-top: 0;
}

.filter-actions-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.filter-actions-right {
    display: flex;
    gap: 4px;
    align-items: center;
}

.filter-action-btn {
    padding: 2px 6px;
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-action-btn:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.filter-action-btn:active {
    background: #d0d0d0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filter-inverse-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-inverse-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Filtros adicionales dentro del popup de Estado */
.filter-additional-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.filter-additional-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.filter-additional-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 80px;
}

.filter-additional-input {
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 120px;
    max-width: 150px;
    font-family: inherit;
}

.filter-additional-input:hover {
    border-color: #a0a0a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-additional-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.filter-additional-input::placeholder {
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* Estilos para botones dentro de filter-actions-right */
.filter-actions-right .btn {
    padding: 2px 8px;
    font-size: 12px;
}

.filter-actions-right .btn-primary {
    background: #f5f5f5;
    color: #333;
    border-color: #c0c0c0;
}

.filter-actions-right .btn-primary:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.filter-actions-right .btn-secondary {
    background: #f5f5f5;
    color: #333;
    border-color: #c0c0c0;
}

/* Estilos para filtro de fecha */
.filter-date-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.filter-date-fields-hora {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-end;
}

.filter-date-fields-hora:not(.hidden) {
    display: flex;
}

.filter-date-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-date-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.filter-date-select {
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 200px;
}

.filter-date-select:hover:not(:disabled) {
    border-color: #a0a0a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-date-select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.filter-date-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.filter-date-input {
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 200px;
    font-family: inherit;
}

.filter-date-input:hover:not(:disabled) {
    border-color: #a0a0a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-date-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.filter-date-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.filter-date-field-fechas .filter-date-label {
    margin-bottom: 4px;
}

.filter-checkboxes-fecha {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.filter-fecha-placeholder {
    font-size: 13px;
    color: var(--text-secondary, #666);
    font-style: italic;
    margin: 0;
}

/* Filtros de texto */
.filter-text-input {
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 150px;
    font-family: inherit;
}

#filterNumeroAct {
    min-width: 75px;
    max-width: 75px;
    width: 75px;
}

.filter-text-input-edad {
    min-width: 75px;
    max-width: 75px;
    width: 75px;
}

.filter-text-input:hover {
    border-color: #a0a0a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-text-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.filter-text-input::placeholder {
    color: #999;
    font-style: italic;
}

.filter-actions-right .btn-secondary:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

/* Estilos específicos para el filtro de Respuestas */
.filter-respuestas-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-respuestas-select {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
}

.filter-respuestas-input {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.filter-respuestas-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.filter-respuestas-buttons .btn {
    padding: 4px 10px;
    font-size: 12px;
}

@media (max-width: 480px) {
    .actors-grid {
        grid-template-columns: repeat(auto-fill, minmax(192px, 1fr)); /* 80% de 240px */
        gap: 6px;
    }
    
    .actor-card-body {
        padding: 4px 4px 2px 4px;
    }
    
    .actor-name {
        font-size: 14px;
    }
    
    .filter-popup {
        min-width: 280px;
        max-width: 90vw;
    }
    
    /* En móvil, volver a una columna */
    #estadoCheckboxes,
    #estado2Checkboxes,
    #provinciaCheckboxes {
        grid-template-columns: 1fr;
    }
    
    #filterProvinciaPopup {
        min-width: 280px;
        max-width: 90vw;
    }
}

/* Pantallas grandes: mismo cálculo por --filters-bar-height */

/* Modal Detalle Artista */
.actor-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.actor-detail-modal.hidden {
    display: none;
}

.actor-detail-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    height: 90%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.actor-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.actor-detail-modal-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.actor-detail-modal-title-container h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.actor-detail-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-edit-modal {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    color: inherit;
}

.btn-edit-modal:hover:not(:disabled) {
    transform: scale(1.1);
    opacity: 0.8;
}

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

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

.actor-detail-modal-nav-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.actor-detail-modal-nav-btn:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.actor-detail-modal-close {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
}

.actor-detail-modal-close:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.actor-detail-modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
}

.actor-detail-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.actor-detail-tab:hover {
    color: var(--text-primary);
    background: #f9f9f9;
}

.actor-detail-tab.active {
    color: var(--text-primary);
    border-bottom-color: #333;
    font-weight: 600;
}

.actor-detail-modal-main-container {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Zona Izquierda: Preview Grande (60%) */
.actor-detail-left-panel {
    width: 60%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    background: #f9f9f9;
}

.actor-detail-preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    background: #f5f5f5;
    min-height: 0;
}

.actor-detail-preview-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.actor-detail-preview-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.actor-detail-preview-image-wrapper img {
    max-width: 100%;
    max-height: calc(100% - 50px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.btn-edit-photo {
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(228, 203, 160, 0.3);
    border: 1px solid rgba(212, 184, 144, 0.3);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-edit-photo:hover {
    background: rgba(228, 203, 160, 0.4);
    border-color: rgba(212, 184, 144, 0.4);
}

.btn-edit-photo:active {
    background: rgba(228, 203, 160, 0.5);
    transform: scale(0.95);
}

.actor-detail-preview-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    border-radius: 8px;
}

.actor-detail-preview-container .no-preview {
    color: #999;
    text-align: center;
    padding: 40px;
    font-size: 14px;
}

/* Zona Derecha: Pestañas y Contenido (40%) */
.actor-detail-right-panel {
    width: 40%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.actor-detail-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Permite que el flex funcione correctamente */
}

.actor-detail-tab-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* Permite que el flex funcione correctamente */
}

.actor-detail-tab-content.hidden {
    display: none;
}

/* Pestaña Imágenes */
.actor-detail-images-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.actor-detail-images-header .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.actor-detail-images-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.actor-detail-thumbnails {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow-y: auto;
    padding: 8px 0;
}

.actor-detail-thumbnail-wrapper {
    width: calc((100% - 24px) / 4); /* 4 thumbnails por fila con gaps de 8px */
    min-width: 100px;
    max-width: 150px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    background: #f5f5f5; /* Fondo para que se vea mejor cuando la imagen no llena el espacio */
    overflow: hidden;
}

.actor-detail-thumbnail-wrapper:hover {
    border-color: #666;
    transform: scale(1.05);
}

.actor-detail-thumbnail-wrapper.active {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.actor-detail-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain; /* Cambiar a contain para que no recorte */
    background: #fff;
}

.actor-detail-thumbnail-label-select {
    width: 100%;
    padding: 4px 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: center;
    transition: all 0.2s;
}

.actor-detail-photo-type-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 6px;
}

.actor-detail-photo-type-btn {
    appearance: none;
    border: 1px solid #c8c8c8;
    border-radius: 6px;
    background: #f7f7f7;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    padding: 4px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.actor-detail-photo-type-btn:hover:not(:disabled) {
    background: #ececec;
    border-color: #b0b0b0;
}

.actor-detail-photo-type-btn.active {
    background: #8b6f47;
    color: #fff;
    border-color: #7a613e;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

.actor-detail-photo-type-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.actor-detail-thumbnail-label-select:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.actor-detail-thumbnail-label-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.actor-detail-thumbnail-label-select option {
    padding: 4px;
    font-size: 11px;
}

.actor-detail-thumbnail-label {
    width: 100%;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Checkbox para selección múltiple de imágenes */
.actor-detail-image-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
    accent-color: #e74c3c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.actor-detail-thumbnail-wrapper {
    position: relative;
}

/* Metadatos por foto (CastingTipo, medidas, tamaño) en modal detalle */
.actor-detail-photo-meta {
    width: 100%;
    padding: 6px 6px 4px;
    font-size: 10px;
    line-height: 1.35;
    color: #444;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
    text-align: left;
}

.actor-detail-photo-meta-line {
    margin: 0 0 2px;
    word-break: break-word;
}

.actor-detail-photo-meta-k {
    font-weight: 600;
    color: #333;
}

.actor-detail-photo-meta-empty {
    color: #999;
    font-style: italic;
}

.actor-detail-btn-duplicar-foto {
    width: 100%;
    margin: 0;
    padding: 5px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 0 0 2px 2px;
    cursor: pointer;
}

.actor-detail-btn-duplicar-foto:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Botón de eliminar imágenes seleccionadas */
.delete-images-button-container {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #ddd;
}

.delete-images-button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.delete-images-button:hover {
    background: #c0392b;
}

.delete-images-button:active {
    background: #a93226;
}

/* Pestaña Vídeos */
.actor-detail-videos-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow-y: auto;
    padding: 8px 0;
}

.actor-detail-video-thumbnail-wrapper {
    width: calc((100% - 24px) / 4); /* 4 thumbnails por fila con gaps de 8px */
    min-width: 100px;
    max-width: 150px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    background: #f5f5f5;
    overflow: hidden;
}

.actor-detail-video-thumbnail-wrapper:hover {
    border-color: #666;
    transform: scale(1.05);
}

.actor-detail-video-thumbnail-wrapper.active {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.actor-detail-video-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.actor-detail-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actor-detail-video-thumbnail iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Evitar interacción con iframes pequeños */
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s;
}

.actor-detail-video-thumbnail-wrapper:hover .video-play-icon {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.actor-detail-video-thumbnail-label {
    width: 100%;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Contenedor de preview de vídeo */
.actor-detail-preview-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

.actor-detail-preview-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
}

.actor-detail-preview-video-label {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Pestaña Detalles */
.actor-detail-info-container {
    max-width: 800px;
    margin: 0 auto;
}

.actor-detail-info-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.actor-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

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

.actor-detail-info-item .info-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
}

.actor-detail-info-item .info-value {
    font-size: 14px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .actor-detail-images-container {
        flex-direction: column;
    }
    
    .actor-detail-thumbnails {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .actor-detail-thumbnail {
        min-width: 100px;
    }
    
    .actor-detail-videos-container {
        grid-template-columns: 1fr;
    }
}
