/* ============================================ */
/* SISTEMA ESTILOS UNIFICADO - QSORTEOS */
/* Archivo central para evitar duplicación */
/* ============================================ */

/* ===== BASE COMÚN ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    padding-top: 140px;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px;
}

/* ===== HISTORIAL UNIFICADO ===== */
.historial-section {
    background: white;
    border-radius: 25px;
    padding: 35px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.historial-title {
    font-size: 1.6rem;
    color: #2d3748;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.historial-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-historial {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-historial:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-recuperar {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    box-shadow: 0 4px 15px rgba(246, 173, 85, 0.3);
}

.historial-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.historial-loading.show {
    display: block;
}

.historial-list {
    display: none;
}

.historial-list.show {
    display: block;
}

.historial-item {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.historial-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

/* ===== BOTONES UNIFICADOS ===== */
.btn-primary {
    padding: 16px 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 14px 32px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* ===== CARDS UNIFICADAS ===== */
.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon {
    font-size: 2rem;
}

.card-title {
    font-size: 1.5rem;
    color: #2d3748;
    font-weight: 700;
    margin: 0;
}

/* ===== INPUTS UNIFICADOS ===== */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.input-field {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* ===== NOTIFICACIONES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}

.notification.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.notification.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.notification.info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* ===== ANIMACIONES ===== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ===== RESPONSIVE MÓVIL ===== */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .historial-section {
        padding: 25px 20px;
    }
    
    .historial-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .historial-buttons {
        width: 100%;
    }
    
    .btn-historial,
    .btn-recuperar {
        width: 100%;
        justify-content: center;
    }
    
    .btn-primary {
        width: 100%;
        padding: 14px 24px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ===== MODO OSCURO (OPCIONAL) ===== */
@media (prefers-color-scheme: dark) {
    /* Aquí puedes añadir estilos para modo oscuro si lo necesitas */
}
/* ===== PARTICIPANTES TAGS ===== */
.participante-tag {
    display: inline-flex;
    align-items: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 8px 16px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #2d3748;
}

.participante-tag:hover {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.participante-tag.selected {  /* Para el highlight amarillo */
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    border-color: transparent;
}

.remove-btn {
    margin-left: 10px;
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.remove-btn:hover {
    color: #c53030;
    transform: scale(1.1);
}
/* ===== TAGS DE PARTICIPANTES ===== */
#lista-participantes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 15px;
    min-height: 60px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #e2e8f0;
}

.participante-tag {
    display: inline-flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 8px 16px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.participante-tag:hover {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.participante-tag.selected {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    border-color: transparent;
    font-weight: 600;
}

.participante-nombre {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-btn {
    margin-left: 10px;
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #fee2e2;
    color: #c53030;
    transform: scale(1.1);
}
