/* ==========================================================================
   Estilos Premium para el Módulo de Acreditaciones
   ========================================================================== */

:root {
    --acred-primary: #ff3b30;
    --acred-secondary: #007bff;
    --acred-dark: #1a1d23;
    --acred-light: #f8f9fa;
    --acred-border: rgba(255, 255, 255, 0.15);
    --acred-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

/* --- VISTA DE BLOQUEO (LOCK SCREEN) --- */
.acred-lock-wrapper {
    min-height: calc(100vh - 150px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #2c3e50 0%, #1a1d23 100%);
    padding: 20px;
    box-sizing: border-box;
}

.acred-lock-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--acred-border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--acred-shadow);
    text-align: center;
    color: #ffffff;
    box-sizing: border-box;
    animation: acredFadeIn 0.6s ease-out;
}

.acred-lock-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    color: #ffcc00;
    font-size: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
}

.acred-lock-card h2 {
    font-size: 26px;
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #fff;
}

.acred-lock-card p {
    font-size: 14px;
    color: #cbd5e1;
    margin: 0 0 30px;
    line-height: 1.6;
}

.acred-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.acred-form-group label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.acred-input-text {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 16px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.acred-input-text:focus {
    outline: none;
    border-color: var(--acred-secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}

.acred-btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--acred-secondary) 0%, #0056b3 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.acred-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.acred-btn-submit:active {
    transform: translateY(0);
}

.acred-error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 24px;
    text-align: center;
    animation: acredShake 0.4s ease-in-out;
}

/* --- DASHBOARD PÚBLICO DE ACREDITACIONES --- */
.acred-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.acred-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.acred-header-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--acred-dark);
    margin: 0;
}

.acred-btn-lock {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.acred-btn-lock:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

.acred-section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--acred-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Rejilla de magnitudes */
.acred-grid-magnitudes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.acred-magnitude-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.acred-magnitude-card:hover {
    transform: translateY(-5px);
    border-color: var(--acred-secondary);
    box-shadow: 0 12px 20px -8px rgba(0, 123, 255, 0.2);
}

.acred-magnitude-icon {
    font-size: 40px;
    margin-bottom: 16px;
    width: 80px;
    height: 80px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--acred-secondary);
    transition: all 0.3s ease;
}

.acred-magnitude-card:hover .acred-magnitude-icon {
    background: var(--acred-secondary);
    color: #fff;
    transform: rotate(5deg) scale(1.05);
}

.acred-magnitude-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--acred-dark);
    margin: 0 0 8px;
}

.acred-magnitude-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.5;
}

.acred-magnitude-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--acred-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.acred-magnitude-link svg {
    transition: transform 0.3s ease;
}

.acred-magnitude-card:hover .acred-magnitude-link svg {
    transform: translateX(4px);
}

/* Documentos generales / ISO 9001 */
.acred-general-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 60px;
}

/* Rejilla de archivos PDF en detalle */
.acred-pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.acred-pdf-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.acred-pdf-poster {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 18px;
    overflow: hidden;
}

.acred-pdf-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.acred-pdf-poster-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff 0%, #fee2e2 100%);
    color: var(--acred-primary);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.acred-pdf-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.acred-pdf-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.acred-pdf-icon {
    font-size: 32px;
    color: var(--acred-primary);
    width: 56px;
    height: 56px;
    background: #fee2e2;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.acred-pdf-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--acred-dark);
    margin: 0 0 6px;
    line-height: 1.4;
}

.acred-pdf-info p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.acred-pdf-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 18px;
}

.acred-pdf-meta span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
}

.acred-pdf-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--acred-primary);
    color: var(--acred-primary);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.acred-pdf-btn:hover {
    background: var(--acred-primary);
    color: #ffffff;
}

.acred-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

.acred-back-link:hover {
    color: var(--acred-dark);
}

/* --- ANIMACIONES --- */
@keyframes acredFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes acredShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 768px) {
    .acred-lock-card {
        padding: 30px 20px;
    }
    .acred-header-section h1 {
        font-size: 26px;
    }
    .acred-grid-magnitudes {
        grid-template-columns: 1fr;
    }
    .acred-pdf-grid {
        grid-template-columns: 1fr;
    }
}
