.ef-app {
    --ef-border: #d9e1ea;
    --ef-text: #1e293b;
    --ef-muted: #64748b;
    --ef-green: #138a45;
    --ef-green-bg: #e9f8ef;
    --ef-red: #b42318;
    --ef-red-bg: #fff1f0;
    --ef-yellow-bg: #fff8df;
    --ef-blue: #155eef;

    color: var(--ef-text);
    font-family: inherit;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.ef-app * {
    box-sizing: border-box;
}

.ef-header,
.ef-player-card,
.ef-exams-panel,
.ef-current-exam,
.ef-message-box {
    border: 1px solid var(--ef-border);
    border-radius: 10px;
    background: #fff;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.ef-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.ef-header h2,
.ef-section-title h3,
.ef-level-heading h4 {
    margin: 0;
    line-height: 1.2;
}

.ef-header h2{
    font-size: 2rem;
}

.ef-header p,
.ef-level-heading p,
.ef-exam-card span {
    color: var(--ef-muted);
    margin-top: 6px;
}

.ef-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.ef-pill,
.ef-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.ef-pill {
    background: #edf4ff;
    color: #174ea6;
}

/* FORMULARIO */

.ef-player-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 18px;
    align-items: end;
}

.ef-player-form label,
.ef-question label {
    display: grid;
    gap: 6px;
}

.ef-player-form span {
    font-weight: 700;
}

.ef-player-form input,
.ef-player-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--ef-border);
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ef-text);
}

.ef-button,
.ef-open-exam {
    min-height: 46px;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    background: var(--ef-blue);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: .2s;
}

.ef-button:hover,
.ef-open-exam:hover {
    filter: brightness(.95);
}

.ef-button-secondary {
    background: #475569;
}

.ef-button:disabled,
.ef-open-exam:disabled,
.ef-loading {
    opacity: .65;
    cursor: wait;
}

.ef-notice,
.ef-inline-message,
.ef-result {
    border-radius: 6px;
    padding: 14px;
    background: #f8fafc;
}

.ef-notice {
    margin-bottom: 20px;
}

.ef-notice-warning {
    background: var(--ef-yellow-bg);
}

.ef-notice-error,
.ef-inline-error,
.ef-result-fail {
    background: var(--ef-red-bg);
    color: var(--ef-red);
}

.ef-inline-message {
    margin-top: 12px;
}

.ef-level {
    border-top: 1px solid var(--ef-border);
    padding-top: 24px;
    margin-top: 24px;
}

.ef-level:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.ef-level-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

/* TARJETAS */

.ef-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 18px;
}

.ef-exam-card {
    min-height: 130px;
    border: 1px solid var(--ef-border);
    border-radius: 8px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.ef-exam-card strong,
.ef-exam-card span {
    display: block;
}

.ef-exam-card strong{
    font-size: 18px;
}

.ef-exam-aprobado {
    border-color: #a7e3bd;
    background: var(--ef-green-bg);
}

.ef-exam-bloqueado {
    background: #f8fafc;
}

.ef-status-approved {
    background: var(--ef-green);
    color: #fff;
}

.ef-status-locked {
    background: #e2e8f0;
    color: #475569;
}

/* EXAMEN */

.ef-current-exam {
    scroll-margin-top: 32px;
}

.ef-question {
    border: 1px solid var(--ef-border);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 18px;
}

.ef-question legend {
    font-weight: 800;
    padding: 0 6px;
}

.ef-options {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.ef-options label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--ef-border);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
}

.ef-options label:has(input:checked) {
    border-color: var(--ef-blue);
    background: #edf4ff;
}

.ef-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.ef-result {
    display: grid;
    gap: 4px;
    margin-top: 18px;
}

.ef-result-pass {
    background: var(--ef-green-bg);
    color: var(--ef-green);
}

/* TABLETS */

@media (max-width: 1024px){

    .ef-app{
        max-width:100%;
        padding:16px;
    }

    .ef-player-form{
        grid-template-columns:1fr 1fr;
    }

}

/* MÓVIL */

@media (max-width:760px){

    .ef-header,
    .ef-section-title,
    .ef-level-heading{
        flex-direction:column;
        align-items:flex-start;
    }

    .ef-player-form{
        grid-template-columns:1fr;
    }

    .ef-exam-grid{
        grid-template-columns:1fr;
    }

    .ef-exam-card{
        min-height:auto;
    }

    .ef-button,
    .ef-open-exam{
        width:100%;
    }

    .ef-actions{
        flex-direction:column;
    }

}


.ef-status-approved {
    background: var(--ef-green);
    color: #fff !important;
}

.ef-status-approved,
.ef-status-approved * {
    color: #fff !important;
}

.ef-header h2 {
    text-align: center;
    color: #0b3d91;
    width: 100%;
}

.ef-header p {
    text-align: center;
    color: #0b3d91;
    width: 100%;
}