/* * PSICOVÍA - CLEAN & COZY EDTECH UI 
 * Aísla el diseño para que el tema de WordPress no lo rompa
 */

.pv-app {
    /* Paleta de Marca PsicoVía */
    --pv-navy: #0F172A;
    --pv-navy-hover: #1E293B;
    --pv-gold: #fbbf24;
    --pv-gold-hover: #f59e0b;
    --pv-bg: #F8FAFC;
    --pv-card-bg: #FFFFFF;
    --pv-text: #334155;
    --pv-text-light: #64748b;
    --pv-border: #E2E8F0;
    
    /* Fuentes */
    --pv-font-heading: 'Outfit', sans-serif;
    --pv-font-body: 'Plus Jakarta Sans', sans-serif;
    --pv-font-accent: 'Caveat', cursive;

    font-family: var(--pv-font-body);
    color: var(--pv-text);
    max-width: 900px;
    margin: 20px auto;
    font-size: 16px;
    line-height: 1.5;
}

/* Reset básico dentro de la app */
.pv-app * { box-sizing: border-box; }
.pv-app h3, .pv-app p { margin: 0; padding: 0; }

/* Tipografía */
.pv-heading {
    font-family: var(--pv-font-heading);
    color: var(--pv-navy);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.pv-cozy-note {
    font-family: var(--pv-font-accent);
    color: var(--pv-text-light);
    font-size: 1.3rem;
    display: block;
    margin-bottom: 20px;
}

/* BENTO CARDS */
.pv-bento-card {
    background: var(--pv-card-bg);
    border: 1px solid var(--pv-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.pv-accent-top {
    border-top: 4px solid var(--pv-gold);
}

/* Formularios - Zero Friction */
.pv-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.pv-input, .pv-app input[type="text"], .pv-app input[type="number"], .pv-app input[type="date"], .pv-app select {
    font-family: var(--pv-font-body);
    padding: 12px 16px;
    border: 1px solid var(--pv-border);
    border-radius: 12px;
    background: var(--pv-bg);
    color: var(--pv-navy);
    font-size: 0.95rem;
    flex: 1;
    min-width: 150px;
    transition: all 0.2s;
}
.pv-input:focus {
    outline: none;
    border-color: var(--pv-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    background: #fff;
}

/* Custom File Upload */
.pv-file-dropzone {
    margin-bottom: 20px;
}
.pv-file-dropzone input[type="file"] {
    display: none;
}
.pv-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--pv-border);
    border-radius: 12px;
    background: var(--pv-bg);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.pv-file-label:hover {
    border-color: var(--pv-gold);
    background: #fffbeb; /* Light gold bg */
}
.pv-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.pv-file-label strong { color: var(--pv-navy); }
.pv-file-label small { color: var(--pv-text-light); margin-top: 4px; }

/* Botones */
.pv-btn {
    font-family: var(--pv-font-heading);
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.pv-btn:active { transform: scale(0.98); }
.pv-btn-primary {
    background: var(--pv-navy);
    color: white;
}
.pv-btn-primary:hover { background: var(--pv-navy-hover); color: white;}
.pv-btn-gold {
    background: var(--pv-gold);
    color: var(--pv-navy);
}
.pv-btn-gold:hover { background: var(--pv-gold-hover); }
.pv-full-width { width: 100%; }

/* Layouts específicos */
.pv-flex-row { display: flex; gap: 16px; align-items: flex-end; }
.pv-input-group { display: flex; flex-direction: column; gap: 6px; }
.pv-input-group label { font-size: 0.85rem; font-weight: 600; color: var(--pv-text-light); }

/* Grid de Asignaturas (Píldoras) */
.pv-subject-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pv-sub-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pv-bg);
    border: 1px solid var(--pv-border);
    padding: 12px 16px;
    border-radius: 12px;
}
.pv-sub-info strong { color: var(--pv-navy); display: block; }
.pv-sub-info small { color: var(--pv-text-light); }
.pv-btn-icon {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    width: 32px; height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.pv-btn-icon:hover { background: #fca5a5; }

/* Simulador Examen */
.pv-question-box {
    background: var(--pv-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.pv-question-text {
    font-family: var(--pv-font-heading);
    font-weight: 600;
    color: var(--pv-navy);
    margin-bottom: 16px;
}
.pv-option {
    display: block;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--pv-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.pv-option:hover { border-color: var(--pv-gold); }
.pv-option input { margin-right: 10px; }

/* Dashboard y Gráficos */
.pv-dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
}
@media (max-width: 768px) { .pv-dashboard-grid { grid-template-columns: 1fr; } .pv-form-row { flex-direction: column; } }
.pv-chart-container { position: relative; height: 250px; width: 100%; margin-top: 20px;}

.pv-goal-list { list-style: none; margin: 0; padding: 0; margin-top: 20px;}
.pv-goal-list li { margin-bottom: 20px; }
.pv-goal-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600;}
.pv-progress-bar { height: 8px; background: var(--pv-border); border-radius: 99px; overflow: hidden; }
.pv-progress-fill { height: 100%; background: var(--pv-navy); transition: width 0.5s ease;}
.pv-goal-footer { font-size: 0.85rem; color: var(--pv-text-light); margin-top: 6px;}

/* Alertas */
.pv-alert { padding: 16px; border-radius: 12px; margin-bottom: 20px; font-size: 0.95rem; }
.pv-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pv-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pv-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Loader */
.pv-loader-box { text-align: center; padding: 40px; }
.pv-spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--pv-border);
    border-top: 4px solid var(--pv-gold);
    border-radius: 50%;
    animation: pv-spin 1s linear infinite;
    margin: 0 auto 16px auto;
}
@keyframes pv-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }