* {
    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: 20px;
    padding-top: 140px; /* Espacio para la barra de filtros fija (aumentado por más filtros) */
}

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

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

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

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

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

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

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

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

.btn-refresh {
    background: #f5f5f5;
    color: #333;
    padding: 8px 12px;
    font-size: 18px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.btn-refresh:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
    transform: rotate(180deg);
}

.btn-refresh:active {
    background: #d0d0d0;
    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-toggle-foto {
    background: #f5f5f5;
    color: #333;
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-toggle-foto:hover {
    background: #e8e8e8;
    border-color: #a0a0a0;
}

.btn-toggle-foto.active {
    background: #d0d0d0;
    border-color: #808080;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-toggle-foto.active:hover {
    background: #c0c0c0;
}

.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(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.actor-card {
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-in;
    opacity: 0;
    animation-fill-mode: forwards;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

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

.actor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Foto del actor - diseño horizontal */
.actor-photo-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 200px;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.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 sobre la foto */
.instagram-icon-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #E4405F;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.instagram-icon-overlay:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.instagram-icon-overlay svg {
    width: 20px;
    height: 20px;
}

/* Estrellas de favorito sobre la foto (parte inferior) */
.actor-favorite-stars-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.4); /* Fondo negro al 40% */
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

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

.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 */
}

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

.actor-name-section {
    margin-bottom: 8px;
}

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

.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;
}

.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: 12px;
    flex: 1;
}

.actor-detail-item {
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.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;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    margin-left: 4px;
}

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

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

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

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

.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 */
.btn-edit {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #c0c0c0;
    border-radius: 3px;
    padding: 6px 10px;
    font-size: 16px;
    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: 32px;
    height: 32px;
}

.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 */
.btn-action {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #c0c0c0;
    border-radius: 3px;
    padding: 6px 10px;
    font-size: 16px;
    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: 32px;
    height: 32px;
    margin-left: 4px;
}

.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 */
.actor-name-icons .icon-copy-name,
.actor-name-icons .icon-copy-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    vertical-align: middle;
    line-height: 1;
}

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

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

.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: 1;
}

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

/* Botón Seleccionar - estado normal */
.btn-select {
    font-size: 18px;
    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 */
.actor-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    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: 4px;
    margin-left: auto;
}

/* 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: 160px; /* Más espacio en móviles por el wrap de filtros */
    }

    .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(180px, 1fr));
        gap: 12px;
    }

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

/* ==================== FILTROS ==================== */
.filters-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 16px 20px;
    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: 12px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

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

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

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

.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: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

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

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

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

.filter-popup {
    position: absolute;
    top: calc(100% + 8px);
    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-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

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

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    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: 16px;
    display: flex;
    flex-direction: column;
}

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

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

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

/* Estado: 2 columnas */
#estadoCheckboxes,
#estado2Checkboxes {
    grid-template-columns: repeat(2, 1fr);
}

/* 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);
}

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

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

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

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 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;
    gap: 8px;
    align-items: center;
    flex: 1;
}

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

.filter-action-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 13px;
    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: 8px 16px;
    font-size: 14px;
}

.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-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;
}

/* Filtros de texto */
.filter-text-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: 150px;
    font-family: inherit;
}

.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;
}

@media (max-width: 480px) {
    .actors-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }
    
    .actor-card-body {
        padding: 10px;
    }
    
    .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;
    }
}

/* 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-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.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-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-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-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;
}

/* 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;
    }
}
