/* =============================================
   PORTAL - Foro Internacional de Desarrollo Sostenible
   ============================================= */

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f0fdf4;
    color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- NAV --- */
.navbar {
    background: #fff;
    border-bottom: 2px solid #16a34a;
    padding: 0 2rem;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-logo { height: 48px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-links a {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.nav-active {
    color: #16a34a;
}
.nav-user {
    font-weight: 600;
    color: #16a34a;
}
.btn-nav-salir {
    background: none;
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-nav-salir:hover {
    background: #dc2626;
    color: #fff;
}

/* --- MAIN --- */
.portal-main {
    flex: 1;
    padding: 2rem 1rem;
}
.portal-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- HEADER --- */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}
.portal-header h1 {
    font-size: 1.8rem;
    color: #16a34a;
    margin-bottom: 0.25rem;
}
.portal-header p {
    color: #6b7280;
    font-size: 1rem;
}
.badge-estado {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    background: #fef3c7;
    color: #92400e;
}
.badge-estado.postulado { background: #d1fae5; color: #065f46; }
.badge-estado.en_evaluacion { background: #dbeafe; color: #1e40af; }
.badge-estado.preseleccionado { background: #ede9fe; color: #5b21b6; }
.badge-estado.verificado { background: #fef3c7; color: #92400e; }
.badge-estado.reconocido { background: #d1fae5; color: #065f46; }

/* --- PROGRESS --- */
.portal-progress {
    margin-bottom: 2rem;
}
.progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 8px;
    transition: width 0.5s ease;
}
.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6b7280;
}

/* --- SCORE CARDS --- */
.portal-scores {
    margin-bottom: 2rem;
}
.portal-scores h2 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.score-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.score-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}
.score-icon {
    margin-bottom: 0.5rem;
}
.score-name {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}
.score-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #16a34a;
}
.score-max {
    font-size: 0.8rem;
    color: #9ca3af;
}
.score-total {
    text-align: center;
    font-size: 1.1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #16a34a;
}
.score-total strong {
    color: #16a34a;
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

/* --- EVIDENCIAS --- */
.portal-evidencias {
    margin-bottom: 2rem;
}
.portal-evidencias h2 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}
.evidencias-list {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}
.evidencia-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.evidencia-item:last-child { border-bottom: none; }
.evidencia-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.evidencia-pregunta {
    background: #16a34a;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}
.evidencia-nombre {
    font-size: 0.9rem;
    color: #1a1a2e;
}
.evidencia-eliminar {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1.2rem;
}
.empty-text {
    color: #9ca3af;
    text-align: center;
    font-style: italic;
}

/* --- ACTIONS --- */
.portal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.btn-portal {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}
.btn-portal.btn-primary {
    background: #16a34a;
    color: #fff;
}
.btn-portal.btn-primary:hover {
    background: #15803d;
}
.btn-portal.btn-secondary {
    background: #fff;
    color: #dc2626;
    border: 1px solid #dc2626;
}
.btn-portal.btn-secondary:hover {
    background: #fef2f2;
}

/* --- FOOTER --- */
.portal-footer {
    background: #1a1a2e;
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    margin-top: auto;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .portal-header { flex-direction: column; gap: 1rem; text-align: center; }
    .scores-grid { grid-template-columns: repeat(3, 1fr); }
    .nav-links { gap: 0.75rem; font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .scores-grid { grid-template-columns: repeat(2, 1fr); }
    .portal-actions { flex-direction: column; }
    .btn-portal { width: 100%; text-align: center; }
}
