/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000000;
    background: #FFFFFF;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: #000000;
    background: #FFFFFF;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #000000;
}

.header p {
    font-size: 1.1rem;
    color: #333333;
}

/* Contenido principal */
.main-content {
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid #E31837;
}

/* Formulario */
.form-container {
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #FFFFFF;
    border-radius: 10px;
    border-left: 4px solid #E31837;
    border: 1px solid #E5E5E5;
}

.form-section h2 {
    color: #E31837;
    margin-bottom: 25px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h2 i {
    font-size: 1.1rem;
    color: #E31837;
}

/* Grid de formulario */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #FFFFFF;
    color: #000000;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #E31837;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Upload de archivo */
.file-upload {
    text-align: center;
    margin-bottom: 30px;
}

.file-label {
    display: inline-block;
    padding: 30px;
    border: 3px dashed #E31837;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(227, 24, 55, 0.05);
}

.file-label:hover {
    border-color: #C41230;
    background: rgba(227, 24, 55, 0.1);
    transform: translateY(-2px);
}

.file-label i {
    font-size: 3rem;
    color: #E31837;
    margin-bottom: 15px;
    display: block;
}

.file-label span {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #E31837;
    margin-bottom: 5px;
}

.file-label small {
    color: #666666;
    font-size: 0.9rem;
}

.file-upload input[type="file"] {
    display: none;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: #E8F5E8;
    border: 1px solid #4CAF50;
    border-radius: 8px;
    color: #2E7D32;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-info.hidden {
    display: none;
}

/* Información de plantilla por defecto */
.default-template-info {
    margin-top: 15px;
    padding: 15px;
    background: #E3F2FD;
    border: 1px solid #2196F3;
    border-radius: 8px;
    color: #1565C0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.default-template-info i {
    color: #2196F3;
    font-size: 1.1rem;
}

/* Botones */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #E5E5E5;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: #E31837;
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #C41230;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(227, 24, 55, 0.3);
}

.btn-secondary {
    background: #6C757D;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #5A6268;
    transform: translateY(-2px);
}

.btn-info {
    background: #17A2B8;
    color: #FFFFFF;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 2px solid #E31837;
}

.modal-header {
    padding: 20px 30px;
    background: #F8F9FA;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #E31837;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666666;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #E5E5E5;
    color: #000000;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    background: #F8F9FA;
    border-top: 1px solid #E5E5E5;
    text-align: right;
}

/* JSON Preview */
#jsonPreview {
    background: #F8F9FA;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #E5E5E5;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #F3F3F3;
    border-top: 4px solid #E31837;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #E31837;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .footer {
        margin-top: 30px;
        padding: 15px 0;
    }
    
    .footer-content {
        padding: 0 15px;
    }
}

/* Estados de éxito y error */
.success {
    background: #D4EDDA;
    border-color: #C3E6CB;
    color: #155724;
}

.error {
    background: #F8D7DA;
    border-color: #F5C6CB;
    color: #721C24;
}

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

.form-section {
    animation: fadeIn 0.5s ease-out;
}

/* Hover effects */
.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Pie de página */
.footer {
    background: #000000;
    color: #FFFFFF;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 2px solid #E31837;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.footer .author {
    color: #E31837;
    font-weight: 500;
}

.footer .author strong {
    color: #FFFFFF;
}

/* Sección de fotos */
.photos-container {
    margin-top: 20px;
}

.photos-info {
    background: #E3F2FD;
    border: 1px solid #2196F3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #1565C0;
}

.photos-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border: 2px dashed #E5E5E5;
    border-radius: 8px;
    background: #FAFAFA;
}

.photo-item {
    position: relative;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.photo-item:hover {
    border-color: #E31837;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.photo-item .photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-item .photo-overlay button {
    background: #E31837;
    color: #FFFFFF;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin: 2px;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.photo-item .photo-overlay button:hover {
    background: #C41230;
}

.photo-item .photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: #FFFFFF;
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
}

.photo-item .photo-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #E31837;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.photo-item .photo-status {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #27AE60;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.photo-item.uploading {
    border-color: #F39C12;
    background: #FFF3CD;
}

.photo-item.uploading .photo-overlay {
    opacity: 1;
    background: rgba(243, 156, 18, 0.8);
}

.photo-item.uploading .photo-overlay::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #FFFFFF;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.photos-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.photos-actions .btn {
    min-width: 150px;
}

/* Input de archivo oculto para fotos */
.photo-file-input {
    display: none;
}

/* Comboboxes de estado */
.status-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    font-size: 1rem;
    background: #FFFFFF;
    color: #000000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.status-select:focus {
    outline: none;
    border-color: #E31837;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.status-select:hover {
    border-color: #C41230;
}

/* Estilos para las opciones */
.status-select option {
    padding: 10px;
    font-size: 1rem;
}

.status-select option[value="OK"] {
    color: #27AE60;
    font-weight: 600;
}

.status-select option[value="NOK"] {
    color: #E31837;
    font-weight: 600;
}

/* Estado seleccionado */
.status-select.status-ok {
    border-color: #27AE60;
    background-color: #F8FFF9;
}

.status-select.status-nok {
    border-color: #E31837;
    background-color: #FFF8F8;
}

/* Botones de estado masivo */
.status-actions {
    margin-top: 30px;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.status-actions h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.status-buttons .btn {
    min-width: 120px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-success {
    background: #28A745;
    border-color: #28A745;
}

.btn-success:hover {
    background: #218838;
    border-color: #1E7E34;
}

.btn-danger {
    background: #E31837;
    border-color: #E31837;
}

.btn-danger:hover {
    background: #C41230;
    border-color: #A80F28;
}

/* Responsive para fotos */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .photos-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .photos-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Nuevos estilos para el sistema de fotos organizado */
.photo-categories {
    margin-top: 20px;
}

.photo-category {
    margin-bottom: 30px;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.photo-category h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    border-bottom: 2px solid #E31837;
    padding-bottom: 8px;
}

.photo-item {
    position: relative;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    padding: 15px;
    background: #FFFFFF;
    transition: all 0.3s ease;
    text-align: center;
}

.photo-item:hover {
    border-color: #E31837;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.photo-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #E31837;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.photo-label {
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.photo-description {
    color: #666666;
    font-size: 0.8rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.photo-upload-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
}

.photo-item.photo-loaded {
    border-color: #28A745;
    background: #F8FFF9;
}

.photo-item.photo-loaded .photo-upload-btn {
    background: #28A745;
    border-color: #28A745;
}

.photo-item.photo-loaded .photo-upload-btn:hover {
    background: #218838;
    border-color: #1E7E34;
}

.photo-file-input {
    display: none;
}

.section-description {
    background: #E3F2FD;
    border: 1px solid #2196F3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #1565C0;
    font-style: italic;
    text-align: center;
}

/* Estilos para el formulario dinámico */
.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #E9ECEF;
}

.form-section h2 {
    color: #000000;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #E31837;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-section h2 i {
    color: #E31837;
    font-size: 1.2em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #FFFFFF;
    color: #000000;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #E31837;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Responsive para el formulario */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .form-section h2 {
        font-size: 1.3rem;
    }
}

/* Sección de datos de ejemplo */
.example-data-section {
    text-align: center;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.example-data-section h3 {
    color: #495057;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.example-data-section p {
    color: #6C757D;
    margin-bottom: 20px;
    font-style: italic;
}

.example-data-section .btn {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Celebración Konami */
.konami-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInCelebration 0.5s ease-in;
}

.konami-celebration.hidden {
    display: none;
}

.celebration-content {
    text-align: center;
    background: #E31837;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10001;
    animation: bounceIn 0.8s ease-out;
}

.celebration-image {
    margin-bottom: 20px;
}

.celebration-image img {
    width: 200px;
    height: 200px;
    border-radius: 15px;
    border: 3px solid #FFFFFF;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.celebration-text h1 {
    color: #FFFFFF;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.celebration-text p {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-celebration {
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-celebration:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Confeti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #E31837;
    animation: confettiFall 3s linear infinite;
}

.confetti:nth-child(2n) {
    background: #000000;
    animation-delay: 0.5s;
}

.confetti:nth-child(3n) {
    background: #FFFFFF;
    animation-delay: 1s;
}

.confetti:nth-child(4n) {
    background: #E31837;
    animation-delay: 1.5s;
}

.confetti:nth-child(5n) {
    background: #000000;
    animation-delay: 2s;
}

/* Animaciones */
@keyframes fadeInCelebration {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
    to { text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.6); }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Estilos para información de fotos procesadas */
.photo-info {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.photo-info div {
    margin-bottom: 4px;
}

.photo-info div:last-child {
    margin-bottom: 0;
}

.photo-info strong {
    color: #495057;
    font-weight: 600;
}

/* Indicador de procesamiento */
.photo-item.processing .photo-upload-btn {
    background-color: #6C757D;
    border-color: #6C757D;
    cursor: not-allowed;
}

.photo-item.processing .photo-upload-btn:hover {
    background-color: #6C757D;
    border-color: #6C757D;
}

/* Mejoras en el grid de fotos */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.photo-item {
    background: #FFFFFF;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.photo-item:hover {
    border-color: #E31837;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.15);
}

.photo-item.photo-loaded {
    border-color: #28A745;
    background: linear-gradient(135deg, #F8FFF9 0%, #FFFFFF 100%);
}

.photo-item.photo-loaded::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28A745;
    color: #FFFFFF;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Número de foto */
.photo-number {
    background: #E31837;
    color: #FFFFFF;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Etiqueta de foto */
.photo-label {
    font-weight: 600;
    font-size: 16px;
    color: #000000;
    margin-bottom: 8px;
}

/* Descripción de foto */
.photo-description {
    color: #6C757D;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
    min-height: 40px;
}

/* Botón de carga */
.photo-upload-btn {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.photo-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Input de archivo oculto */
.photo-file-input {
    display: none;
}

/* Contenedor de categorías */
.photo-categories {
    margin-top: 20px;
}

.photo-category {
    margin-bottom: 30px;
}

.photo-category h3 {
    color: #495057;
    border-bottom: 2px solid #E9ECEF;
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

/* Botones de acción para fotos */
.photos-actions {
    margin-top: 25px;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #DEE2E6;
}

.photos-actions .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-item {
        padding: 12px;
    }
    
    .photos-actions .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Animaciones para carga */
@keyframes photoLoad {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-item.photo-loaded {
    animation: photoLoad 0.3s ease-out;
}

/* Estilos para el indicador de procesamiento */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras en la información de la imagen */
.photo-info {
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border-left: 4px solid #E31837;
}

.photo-info div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.photo-info div:not(:last-child) {
    border-bottom: 1px solid #DEE2E6;
}

/* Tooltip para información adicional */
.photo-item {
    position: relative;
}

.photo-item .photo-info {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.photo-item:hover .photo-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Estilos para el estado de carga */
.photo-item.loading {
    border-color: #FFC107;
    background: linear-gradient(135deg, #FFFBF0 0%, #FFFFFF 100%);
}

.photo-item.loading::before {
    content: '⏳';
    background: #FFC107;
    color: #000000;
}

/* Estilos para orientación de imágenes */
.orientation-vertical {
    color: #28A745;
    font-weight: bold;
    background: #D4EDDA;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.orientation-horizontal {
    color: #E31837;
    font-weight: bold;
    background: #F8D7DA;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.orientation-cuadrada {
    color: #6F42C1;
    font-weight: bold;
    background: #E2D9F3;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Mejoras en la información de la imagen */
.photo-info {
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border-left: 4px solid #E31837;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-info div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #DEE2E6;
}

.photo-info div:last-child {
    border-bottom: none;
}

.photo-info strong {
    color: #495057;
    font-weight: 600;
    min-width: 80px;
}

/* Indicadores visuales de orientación en el item de foto */
.photo-item.photo-loaded.orientation-vertical {
    border-left: 4px solid #28A745;
}

.photo-item.photo-loaded.orientation-horizontal {
    border-left: 4px solid #E31837;
}

.photo-item.photo-loaded.orientation-cuadrada {
    border-left: 4px solid #6F42C1;
}

/* Mejoras en el grid para diferentes orientaciones */
.photo-item.orientation-vertical {
    background: linear-gradient(135deg, #F8FFF9 0%, #FFFFFF 100%);
}

.photo-item.orientation-horizontal {
    background: linear-gradient(135deg, #FFF8F8 0%, #FFFFFF 100%);
}

.photo-item.orientation-cuadrada {
    background: linear-gradient(135deg, #F8F0FF 0%, #FFFFFF 100%);
}

/* Tooltip mejorado para información de orientación */
.photo-item .photo-info {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.photo-item:hover .photo-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Indicador de orientación en el número de foto */
.photo-number.orientation-vertical {
    background: #28A745;
}

.photo-number.orientation-horizontal {
    background: #E31837;
}

.photo-number.orientation-cuadrada {
    background: #6F42C1;
}

/* Animaciones para diferentes orientaciones */
@keyframes photoLoadVertical {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes photoLoadHorizontal {
    0% {
        opacity: 0;
        transform: scale(0.95) translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes photoLoadCuadrada {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.photo-item.photo-loaded.orientation-vertical {
    animation: photoLoadVertical 0.4s ease-out;
}

.photo-item.photo-loaded.orientation-horizontal {
    animation: photoLoadHorizontal 0.4s ease-out;
}

.photo-item.photo-loaded.orientation-cuadrada {
    animation: photoLoadCuadrada 0.4s ease-out;
}

/* Información sobre formato */
.format-info {
    margin-top: 20px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.format-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.format-info-item.docx-info {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28A745;
    color: #155724;
}

.format-info-item.docx-info i {
    color: #28A745;
}

.format-info-item span {
    line-height: 1.4;
}

.format-info-item strong {
    font-weight: 600;
}
/* Estilos para el toggle de interfaz */
.interface-toggle-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    background: rgba(227, 24, 55, 0.05);
    padding: 10px;
    border-radius: 30px;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.toggle-status-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #E31837;
    min-width: 150px;
    text-align: left;
}

/* El switch (el contenedor) */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

/* Ocultar el checkbox original */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* El slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #E31837;
}

input:focus + .slider {
    box-shadow: 0 0 1px #E31837;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* Slider redondeado */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Toast notifications */
.ui-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    z-index: 10000;
    transition: bottom 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

/* Ajustes para fotos inline */
.inline-photos-grid {
    margin-top: 20px;
    padding: 15px;
    background: #fdfdfd !important;
    border: 1px solid #eee !important;
}

.inline-photos-grid h3 {
    font-size: 1rem !important;
    color: #666 !important;
}
