/* =========================================================
   Psicométrico Pro — Candidate Frontend Styles
   ========================================================= */

body.psico-page { background-color: #f8fafc; }

.psico-app {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0,0,0,0.05);
    padding: 30px 40px;
}

/* HEADER */
.psico-header { text-align: center; margin-bottom: 40px; }
.psico-header h2 { font-size: 28px; margin: 0 0 10px; font-weight: 700; color: #1e293b; letter-spacing: -0.5px; }
.psico-header p  { color: #64748b; margin: 0; font-size: 16px; }

/* EXAM CARDS GRID */
.psico-exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.psico-exam-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .2s;
}
.psico-exam-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.psico-exam-card h3 { margin: 0; font-size: 17px; }
.psico-exam-card p  { margin: 0; color: #64748b; font-size: 14px; }
.psico-exam-meta-row { display: flex; gap: 12px; font-size: 13px; color: #94a3b8; }

/* BUTTONS */
.psico-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: 0.3px;
}
.psico-btn:active { transform: scale(0.97); }
.psico-btn-primary   { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); }
.psico-btn-primary:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4); transform: translateY(-1px); }
.psico-btn-secondary { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.psico-btn-secondary:hover { background: #e2e8f0; color: #0f172a; }
.psico-btn-success   { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.psico-btn-success:hover { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4); }
.psico-btn-full { width: 100%; }

/* INFO FORM */
.psico-info-form { max-width: 500px; margin: 0 auto; background: #f8fafc; padding: 30px; border-radius: 16px; border: 1px solid #f1f5f9; }
.psico-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.psico-field label { font-weight: 600; font-size: 14px; color: #334155; }
.psico-field input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all .2s;
    background: #fff;
    color: #0f172a;
}
.psico-field input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.psico-rules-box {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
}
.psico-rules-box h4 { margin: 0 0 10px; font-size: 15px; }
.psico-rules-box ul { margin: 0; padding-left: 18px; line-height: 1.9; }
.psico-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* EXAM TOP BAR */
.psico-exam-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #0f172a;
    border-radius: 14px;
    margin-bottom: 24px;
    color: #f8fafc;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
}
.psico-exam-name { font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.psico-exam-timer-wrap { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 8px; }
.psico-timer {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 1px;
}
.psico-timer.warning { color: #f59e0b; }
.psico-timer.danger  { color: #ef4444; animation: blink .8s step-start infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* VIOLATION ALERT */
.psico-violation-alert {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #7f1d1d;
}
.psico-viol-badge {
    background: #ef4444;
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
}

/* PROGRESS */
.psico-progress-wrap { margin-bottom: 20px; }
.psico-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}
.psico-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 99px;
    transition: width .3s ease;
}
.psico-progress-label { font-size: 13px; color: #64748b; }

/* QUESTION */
.psico-question-wrap {
    background: #fff;
    border: 0;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    min-height: 250px;
}
.psico-question-text {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px;
    line-height: 1.5;
    color: #1e293b;
}
.psico-options { display: flex; flex-direction: column; gap: 12px; }
.psico-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    user-select: none;
    color: #475569;
}
.psico-option:hover { border-color: #818cf8; background: #eef2ff; transform: translateX(2px); }
.psico-option.selected { border-color: #4f46e5; background: #e0e7ff; font-weight: 600; color: #1e293b; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1); }
.psico-option-radio {
    width: 22px; height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}
.psico-option:hover .psico-option-radio { border-color: #818cf8; }
.psico-option.selected .psico-option-radio {
    border-color: #4f46e5;
    background: #4f46e5;
}
.psico-option.selected .psico-option-radio::after {
    content: '';
    display: block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* NAV */
.psico-nav-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* RESULTS */
.psico-results-header { text-align: center; margin-bottom: 24px; }
.psico-score-circle {
    width: 150px; height: 150px;
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid #4f46e5;
    gap: 4px;
}
.psico-score-circle.excellent { border-color: #16a34a; }
.psico-score-circle.good      { border-color: #d97706; }
.psico-score-circle.poor      { border-color: #dc2626; }
#psico-score-number { font-size: 36px; font-weight: 800; }
.psico-score-label  { font-size: 13px; color: #64748b; }

.psico-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.psico-result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.psico-result-value { font-size: 26px; font-weight: 700; }
.psico-result-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }

.psico-expelled-msg {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 16px 20px;
    color: #7f1d1d;
    font-weight: 500;
    margin-bottom: 12px;
}
.psico-result-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 16px 20px;
    color: #14532d;
    font-weight: 500;
}
.psico-result-message.poor {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #7c2d12;
}

/* LOADING */
.psico-loading { text-align: center; color: #94a3b8; padding: 40px 0; }

/* EXPELLED SCREEN */
.psico-expelled-screen {
    text-align: center;
    padding: 48px 20px;
}
.psico-expelled-screen h2 { color: #dc2626; }

/* CONFIRM SCREEN */
.psico-confirm-wrap {
    text-align: center;
    padding: 40px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.psico-confirm-wrap h2 {
    font-size: 22px;
    margin: 12px 0 8px;
    color: #1e293b;
}
.psico-confirm-wrap p {
    color: #64748b;
    font-size: 15px;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}
.psico-confirm-icon {
    font-size: 52px;
    line-height: 1;
}
#psico-confirm-msg {
    background: #f0fdf4;
    border: 1px solid #86efac;
}
#psico-confirm-msg h2 { color: #14532d; }
#psico-expelled-msg.psico-confirm-wrap {
    background: #fff1f2;
    border: 1px solid #fca5a5;
}
#psico-expelled-msg.psico-confirm-wrap h2 { color: #7f1d1d; }
