/* ============================================================
   THEME.CSS - Test de Dones Espirituales
   Tema Dark/Purple compartido por todas las páginas
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #12121e;
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.06);
    --border-color: rgba(255,255,255,0.08);
    --border-glow: rgba(168,85,247,0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.6);
    --text-muted: rgba(255,255,255,0.4);
    --accent-purple: #a855f7;
    --accent-violet: #7c3aed;
    --gradient-purple: linear-gradient(135deg, #a855f7, #7c3aed);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ============ COMMON ELEMENTS ============ */
a { color: var(--accent-purple); text-decoration: none; transition: color 0.3s; }
a:hover { color: #c084fc; }

h1, h2, h3 { color: var(--text-primary); }
h4 { color: var(--text-secondary); }
p { color: var(--text-secondary); }

/* ============ FORM INPUTS ============ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
    background: rgba(255,255,255,0.07);
}

label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.92em;
}

.form-group { margin-bottom: 20px; }

/* ============ BUTTONS ============ */
.btn-primary, .btn-login {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-purple);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(168,85,247,0.3);
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover, .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168,85,247,0.45);
    color: white;
}

/* ============ CARDS ============ */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.4);
}

/* ============ CONTAINER (centered page card) ============ */
.container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.4);
    max-width: 900px;
    width: 100%;
    padding: 44px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ PROGRESS BAR ============ */
.progress-bar {
    background: rgba(255,255,255,0.06);
    height: 8px;
    border-radius: 10px;
    margin-bottom: 28px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ============ BADGES ============ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-complete {
    background: rgba(34,197,94,0.12);
    color: var(--green);
}

.status-pending {
    background: rgba(234,179,8,0.12);
    color: var(--yellow);
}

/* ============ ALERTS ============ */
.error-message, .error-msg {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions, .warning-box {
    background: rgba(234,179,8,0.06);
    border-left: 4px solid rgba(234,179,8,0.5);
    padding: 20px 24px;
    border-radius: 0 14px 14px 0;
    margin-bottom: 28px;
}

.instructions h4 { color: #fbbf24; margin-bottom: 12px; font-weight: 600; }
.instructions ul { margin-left: 20px; color: var(--text-muted); }
.instructions li { margin-bottom: 4px; }
.instructions p { color: var(--text-muted); }

/* ============ INFO BOX ============ */
.intro, .info-box, .user-info, .evaluando-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 18px;
    margin-bottom: 24px;
    border-left: 4px solid var(--accent-purple);
}

.intro h2, .info-box h3, .evaluando-info h2 { color: var(--accent-purple); margin-bottom: 12px; }
.intro p strong { color: var(--text-primary); }

/* ============ TABLES ============ */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(168,85,247,0.12);
}

th {
    padding: 14px 16px;
    text-align: left;
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr { transition: background 0.2s; }
tbody tr:hover { background: var(--bg-card-hover); }

td strong { color: var(--text-primary); }

.puntuacion-alta { color: var(--green) !important; font-weight: 600; }
.puntuacion-media { color: var(--yellow) !important; font-weight: 600; }
.puntuacion-baja { color: var(--text-muted); }

/* ============ QUESTION VIEW ============ */
.question-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 32px;
    border-radius: 18px;
    margin-bottom: 24px;
}

.question-number {
    display: inline-block;
    background: var(--gradient-purple);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 0.85em;
}

.question-text {
    font-size: 1.15em;
    color: var(--text-primary);
    margin-bottom: 28px;
    line-height: 1.7;
}

.options { display: flex; flex-direction: column; gap: 12px; }

.option {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateX(4px);
}

.option.selected {
    background: rgba(168,85,247,0.08);
    border-color: var(--accent-purple);
}

.option input[type="radio"] {
    width: 20px; height: 20px; margin-right: 14px;
    accent-color: var(--accent-purple); flex-shrink: 0;
}

.option label { cursor: pointer; margin: 0; color: var(--text-primary); font-weight: 500; font-size: 0.95em; }

.option-value {
    margin-left: auto;
    background: rgba(168,85,247,0.15);
    color: var(--accent-purple);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

/* ============ SECTION INFO ============ */
.section-info {
    background: var(--gradient-purple);
    color: white;
    padding: 22px 28px;
    border-radius: 16px;
    margin-bottom: 28px;
    text-align: center;
}
.section-info h3 { color: white; margin-bottom: 6px; font-size: 1.3em; }
.section-info p { color: rgba(255,255,255,0.9); }

/* ============ NAVIGATION ============ */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    gap: 16px;
}

.nav-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 14px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-prev {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-prev:hover:not(:disabled) { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.btn-next {
    background: var(--gradient-purple);
    color: white;
    box-shadow: 0 4px 20px rgba(168,85,247,0.3);
}
.btn-next:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(168,85,247,0.45); }

.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ RESULTS CARDS ============ */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px;
    transition: all 0.3s ease;
}

.result-card:hover { transform: translateY(-4px); border-color: var(--border-glow); }

.result-card h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.manifiestos h3 { color: var(--green); border-color: rgba(34,197,94,0.3); }
.latentes h3 { color: var(--yellow); border-color: rgba(234,179,8,0.3); }

.don-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}
.don-item:hover { background: var(--bg-card-hover); border-color: var(--border-glow); }

.don-nombre { font-weight: 600; color: var(--text-primary); font-size: 1em; }
.don-descripcion { color: var(--text-muted); font-size: 0.85em; margin-top: 4px; }

.don-puntuacion {
    background: var(--gradient-purple);
    color: white;
    padding: 4px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
}

.don-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    background: var(--gradient-purple);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.8em;
    margin-right: 10px;
    flex-shrink: 0;
}

/* ============ CHART ============ */
.grafico-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 28px;
}
.grafico-container h3 { color: var(--accent-purple); text-align: center; margin-bottom: 20px; }

.grafico-barras {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.barra {
    width: 30px;
    background: var(--gradient-purple);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: all 0.3s ease;
}
.barra:hover { opacity: 0.85; }

.barra-label {
    position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%);
    font-size: 0.75em; color: var(--text-muted); white-space: nowrap;
}
.barra-valor {
    position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    font-weight: 600; color: var(--accent-purple); font-size: 0.85em;
}

/* ============ INTERPRETATION ============ */
.interpretacion {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 28px;
    border-radius: 18px;
    margin-top: 28px;
    border-left: 4px solid var(--accent-purple);
}
.interpretacion h3 { color: var(--accent-purple); margin-bottom: 16px; }
.interpretacion h4 { color: var(--text-primary); margin-top: 16px; margin-bottom: 8px; }
.interpretacion p { color: var(--text-secondary); margin-bottom: 8px; }
.interpretacion ul { margin-left: 20px; color: var(--text-muted); }
.interpretacion li { margin-bottom: 4px; }

/* ============ ACTIONS BAR ============ */
.acciones {
    text-align: center;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.btn-pdf { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.btn-pdf:hover { background: rgba(34,197,94,0.25); transform: translateY(-2px); color: var(--green); }

.btn-email { background: var(--gradient-purple); color: white; box-shadow: 0 4px 20px rgba(168,85,247,0.3); }
.btn-email:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(168,85,247,0.45); color: white; }

.btn-nuevo { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-nuevo:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ============ ADMIN HEADER ============ */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 { font-size: 1.4em; font-weight: 600; }

.logout-btn {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    font-size: 0.9em;
}
.logout-btn:hover { background: rgba(239,68,68,0.1); color: #fca5a5; border-color: rgba(239,68,68,0.3); }

/* ============ ADMIN STATS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 22px;
    border-radius: 16px;
    transition: all 0.3s ease;
}
.stat-card:hover { border-color: var(--border-glow); transform: translateY(-3px); }

.stat-number { font-size: 2.2em; font-weight: 700; color: var(--accent-purple); }
.stat-label { color: var(--text-muted); margin-top: 4px; font-size: 0.88em; }
.stat-icon { float: right; font-size: 1.8em; opacity: 0.3; }

/* ============ ADMIN MAIN CONTENT ============ */
.main-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px;
}

.section-title {
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2em;
}

/* ============ ADMIN FILTERS ============ */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input, .filter-select {
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}
.filter-input:focus, .filter-select:focus { border-color: var(--accent-purple); }

.filter-select option { background: var(--bg-secondary); color: var(--text-primary); }

.export-btn {
    margin-left: auto;
    background: var(--gradient-purple);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9em;
}
.export-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(168,85,247,0.4); }

/* ============ ADMIN ACTION BUTTONS ============ */
.action-buttons { display: flex; gap: 6px; }

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-view { background: rgba(168,85,247,0.12); color: var(--accent-purple); }
.btn-view:hover { background: rgba(168,85,247,0.25); }

.btn-email-action { background: rgba(34,197,94,0.12); color: var(--green); }
.btn-email-action:hover { background: rgba(34,197,94,0.25); }

.btn-delete { background: rgba(239,68,68,0.12); color: #f87171; }
.btn-delete:hover { background: rgba(239,68,68,0.25); }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 3.5em; opacity: 0.3; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }

/* ============ EVALUADORES SECTION ============ */
.evaluadores-section {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 18px;
    margin-top: 28px;
    border: 1px dashed var(--border-glow);
}
.evaluadores-section h3 { color: var(--accent-purple); margin-bottom: 16px; }

.evaluador-group {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 16px;
}

/* ============ SUCCESS/COMPLETE ============ */
.success-icon { font-size: 80px; margin-bottom: 20px; }

.completion-details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 14px;
    margin: 20px 0;
}

.completion-details .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.completion-details .detail-item:last-child { border-bottom: none; }

.detail-label { color: var(--text-muted); font-weight: 600; }
.detail-value { color: var(--accent-purple); font-weight: 600; }

.thank-you-note {
    background: rgba(234,179,8,0.06);
    border-left: 4px solid rgba(234,179,8,0.5);
    padding: 20px;
    border-radius: 0 14px 14px 0;
    margin: 24px 0;
}
.thank-you-note h4 { color: #fbbf24; margin-bottom: 8px; }
.thank-you-note p { color: var(--text-muted); }

/* ============ SOCIAL SHARE ============ */
.social-share {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
.social-share h4 { color: var(--text-muted); margin-bottom: 12px; }

.share-buttons { display: flex; justify-content: center; gap: 12px; }

.share-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
}
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; color: white; }

.share-facebook { background: rgba(59,89,152,0.8); }
.share-twitter { background: rgba(29,161,242,0.8); }
.share-whatsapp { background: rgba(37,211,102,0.8); }

/* ============ LOGIN PAGE ============ */
.login-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.4);
    max-width: 420px;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.4s ease;
}

.login-header { text-align: center; margin-bottom: 32px; }
.lock-icon { font-size: 56px; margin-bottom: 16px; }
.login-header h1 { font-size: 1.6em; margin-bottom: 8px; }
.subtitle { color: var(--text-muted); font-size: 0.9em; }

.remember-me { display: flex; align-items: center; margin-bottom: 20px; }
.remember-me input[type="checkbox"] { margin-right: 8px; accent-color: var(--accent-purple); }
.remember-me label { margin-bottom: 0; font-weight: normal; color: var(--text-muted); font-size: 0.9em; }

.back-link { text-align: center; margin-top: 20px; }
.back-link a { color: var(--text-muted); font-size: 0.88em; }
.back-link a:hover { color: var(--accent-purple); }

/* ============ ERROR PAGE ============ */
.error-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 80px rgba(0,0,0,0.4);
    animation: fadeIn 0.4s ease;
}

.error-code { font-size: 100px; font-weight: 800; color: var(--accent-purple); line-height: 1; margin-bottom: 8px; }
.error-title { font-size: 1.6em; color: var(--text-primary); margin-bottom: 16px; font-weight: 600; }
.error-description { color: var(--text-secondary); margin-bottom: 36px; line-height: 1.6; }

.error-icon {
    width: 90px; height: 90px;
    margin: 0 auto 24px;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.error-icon svg { width: 44px; height: 44px; fill: white; }

.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.support-info {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.82em;
    color: var(--text-muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .container { padding: 24px 18px; border-radius: 18px; }
    .results-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .navigation { flex-direction: column; }
    .nav-btn { width: 100%; text-align: center; }
    .filters { flex-direction: column; align-items: stretch; }
    .export-btn { margin-left: 0; width: 100%; }
    .action-buttons { flex-direction: column; }
    .acciones { flex-direction: column; }
    .btn { width: 100%; }
    .error-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .login-container { padding: 30px 20px; }
    .stats-grid { grid-template-columns: 1fr; }
}

@media print {
    body { background: white; color: black; }
    .container { box-shadow: none; border: none; background: white; }
    .acciones { display: none; }
    th, td { color: black; border-bottom: 1px solid #ddd; }
    .don-nombre, .question-text, h1, h2, h3, h4, p, strong { color: black !important; }
}
