/* ============================================
   Test de Perfil de Trauma - Master Stylesheet
   ============================================ */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #0a0a12;
    --bg-card: #161625;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d0;
    --text-muted: #6b6b8d;
    --accent-color: #8e24aa;
    --accent-hover: #ab47bc;
    --primary-color: #4a0072;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --font-main: 'Inter', system-ui, sans-serif;
    --transition: 0.3s ease;
    --success-color: #4caf50;
    --error-color: #f44336;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   LAYOUT: HERO SPLIT (Index.php)
   ============================================ */
.hero-split {
    display: flex;
    min-height: 100vh;
    flex-wrap: wrap;
}

.hero-left {
    flex: 1;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: radial-gradient(circle at top left, #1a1a2e, #0f0f1a);
    min-width: 400px;
}

.hero-right {
    width: 500px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

/* LEFT PANEL COMPONENTS */
.brand {
    margin-bottom: 40px;
}

.brand-sub {
    display: block;
    font-size: 0.9em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.brand-main {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    letter-spacing: -1px;
}

.badge-new {
    display: inline-block;
    background: rgba(142, 36, 170, 0.2);
    color: #ba68c8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(142, 36, 170, 0.3);
}

h1 {
    font-size: 3.5em;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.lead {
    font-size: 1.2em;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
}

.features-list {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    background: rgba(255, 255, 255, 0.05);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.feature-text strong {
    display: block;
    color: white;
    font-size: 0.95em;
}

.feature-text small {
    color: var(--text-muted);
    font-size: 0.85em;
}

/* RIGHT PANEL / AUTH COMPONENTS */
.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-muted);
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--bg-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    font-size: 1em;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(142, 36, 170, 0.05);
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1em;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* ============================================
   LAYOUT: TEST INTERFACE (test.php)
   ============================================ */
.test-header {
    background: var(--bg-secondary);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.test-logo {
    font-weight: 700;
    font-size: 1.2em;
    color: white;
    margin-right: 30px;
}

.test-logo span {
    color: var(--accent-color);
    font-weight: 300;
}

.test-progress-container {
    flex: 1;
    margin: 0 20px;
}

.test-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transition: width 0.3s ease;
}

.test-progress-text {
    font-size: 0.9em;
    color: var(--text-muted);
    white-space: nowrap;
}

.test-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.question-card.exit {
    opacity: 0;
    transform: translateY(-10px);
}

.question-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    opacity: 0.5;
}

.question-brand-icon {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
}

.question-context {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.question-number {
    font-size: 1em;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.8em;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 40px;
    color: white;
}

.answer-options {
    display: grid;
    gap: 15px;
    margin-bottom: 40px;
}

.answer-option {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.answer-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.answer-option.selected {
    background: rgba(142, 36, 170, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(142, 36, 170, 0.2);
}

.answer-number {
    background: rgba(255, 255, 255, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: 600;
    color: var(--text-muted);
}

.answer-option.selected .answer-number {
    background: var(--accent-color);
    color: white;
}

.answer-text {
    font-size: 1.1em;
    font-weight: 500;
}

.question-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    color: var(--text-muted);
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

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

.nav-btn-next {
    background: var(--accent-color);
    color: white;
}

.nav-btn-next:hover {
    background: var(--accent-hover);
    box-shadow: 0 5px 15px rgba(142, 36, 170, 0.3);
}

/* ============================================
   LAYOUT: ADMIN (admin.php)
   ============================================ */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-title {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: white;
}

.table-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table th {
    text-align: left;
    padding: 15px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.estado {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.estado-pendiente {
    background: rgba(255, 193, 7, 0.2);
    color: #ffd54f;
}

.estado-aprobada {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.estado-rechazada {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
}

.actions-panel {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.actions-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero-split {
        flex-direction: column;
    }

    .hero-right {
        width: 100%;
        padding: 40px 20px;
    }

    .hero-left {
        padding: 40px 20px;
        min-width: auto;
    }

    h1 {
        font-size: 2.5em;
    }

    .test-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .question-card {
        padding: 25px;
    }

    .question-text {
        font-size: 1.4em;
    }
}