/* ============================================================
   Versión 3 - Declaración de Conflicto de Interés
   Estilo corporativo limpio según mockups
   ============================================================ */

:root {
    --primary: #2c5aa0;
    --primary-dark: #1e3f73;
    --primary-light: #e8f0fe;
    --success: #2e7d32;
    --success-bg: #e8f5e9;
    --warning: #e65100;
    --warning-bg: #fff3e0;
    --danger: #c62828;
    --text: #333;
    --text-muted: #666;
    --border: #dde3ea;
    --bg: #f7f9fc;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ----- Header ----- */
.app-header {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ----- Main container ----- */
.app-main {
    flex: 1;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* ----- Logo + User bar ----- */
.top-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.logo-box {
    min-width: 120px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--white);
    padding: 0 1rem;
}

.logo-box img {
    max-height: 40px;
    max-width: 140px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius);
    padding: 0.4rem 0.9rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--white);
}

.user-chip i { font-size: 1.1rem; }

/* ----- Cards ----- */
.card-v3 {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
}

.card-v3 h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.card-v3 p {
    margin: 0 0 0.75rem;
    line-height: 1.55;
    color: var(--text-muted);
}

/* ----- Concept cards (pantalla 2) ----- */
.concepts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.25rem 0;
}

@media (max-width: 600px) {
    .concepts-grid { grid-template-columns: 1fr; }
}

.concept-card {
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.concept-card.green {
    background: var(--success-bg);
    border-left: 4px solid var(--success);
}

.concept-card.orange {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning);
}

.concept-card strong {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    font-size: 0.98rem;
}

/* ----- Classification list ----- */
.class-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
}

.class-list li {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.class-list li:last-child { border-bottom: none; }

.class-list .icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.class-list strong { display: block; margin-bottom: 0.2rem; }

/* ------ Class Grid ----------- */
.class-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.class-item {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.class-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.class-item-header .icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
}

.class-item-header strong {
    font-size: 0.95rem;
    line-height: 1.25;
    margin: 0;
}

.class-item-body {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: justify;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .class-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- Forms ----- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.form-group label .req { color: var(--danger); }

.form-control-v3 {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-control-v3:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44,90,160,0.15);
}

.form-control-v3.is-invalid {
    border-color: var(--danger);
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Radio cards */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--white);
}

.radio-option:hover { border-color: var(--primary); }

.radio-option input { accent-color: var(--primary); width: 18px; height: 18px; }

.radio-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Conditional textareas */
.conditional-block {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fafbfd;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.conditional-block.visible { display: block; }

/* Checkbox */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    margin: 1.25rem 0;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ----- Buttons ----- */
.btn-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-v3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.6rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-v3:active { transform: scale(0.98); }

.btn-primary-v3 {
    background: var(--primary);
    color: white;
}

.btn-primary-v3:hover { background: var(--primary-dark); }

.btn-primary-v3:disabled {
    background: #a0b4d0;
    cursor: not-allowed;
}

.btn-secondary-v3 {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-secondary-v3:hover { background: var(--primary-light); }

.btn-back {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover { border-color: var(--primary); color: var(--primary); }

/* Centered button (pantalla 1) */
.btn-center-wrap {
    text-align: center;
    margin-top: 2rem;
}

/* ----- Steps indicator ----- */
.steps-dot {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.steps-dot span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c5d0e0;
}

.steps-dot span.active { background: var(--primary); }
.steps-dot span.done { background: var(--success); }

/* ----- Success screen ----- */
.success-box {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.success-box .icon-ok {
    font-size: 3.5rem;
    color: var(--success);
    margin-bottom: 1rem;
}


/* ----- Wizard visibility ----- */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

/* ----- Responsive ----- */
@media (max-width: 576px) {
    .app-header { font-size: 1.05rem; padding: 0.85rem 1rem; }
    .card-v3 { padding: 1.25rem 1rem; }
    .btn-bar { flex-direction: column-reverse; }
    .btn-v3 { width: 100%; }
}

/* ----- Radios ----- */
/* Tipo de declaración: fila en desktop, columna en móvil */
.radio-group.horizontal {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.6rem;
}

.radio-group.horizontal .radio-option {
    flex: 1 1 calc(33.333% - 0.6rem);
    width: auto !important;
    max-width: none;
    margin: 0;
    min-height: 0 !important;
    height: auto !important;
    padding: 0.65rem 0.85rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .radio-group.horizontal {
        flex-direction: column !important;
    }
    .radio-group.horizontal .radio-option {
        flex: 1 1 auto;
        width: 100% !important;
    }
}