:root {
    --edp-primary: #4f7cff;
    --edp-primary-dark: #245edb;
    --edp-success: #138a4d;
    --edp-danger: #dc3545;
    --edp-info-bg: #d9f7ff;
    --edp-bg: #f4f7fb;
    --edp-card: #ffffff;
    --edp-border: #dce5f3;
    --edp-text: #1e2f50;
    --edp-muted: #66748a;
    --edp-radius: 16px;
    --edp-shadow: 0 10px 26px rgba(29, 45, 80, 0.08);
}

.edp-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.edp-page-head h1 {
    color: var(--edp-text);
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 .2rem;
}

.edp-page-head p {
    color: var(--edp-muted);
    margin: 0;
    font-size: .95rem;
}

.edp-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    flex-wrap: wrap;
}

.edp-card {
    background: var(--edp-card);
    border: 1px solid var(--edp-border);
    border-radius: var(--edp-radius);
    box-shadow: var(--edp-shadow);
    overflow: visible;
}

.edp-card-header {
    background: var(--edp-primary-dark);
    color: #fff;
    font-weight: 800;
    padding: .75rem 1rem;
    letter-spacing: .01em;
}

.edp-card-body {
    padding: 1rem;
}

.edp-mb {
    margin-bottom: 1rem;
}

.edp-mt {
    margin-top: 1rem;
}

.edp-verify-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, .9fr);
    gap: 1.25rem;
    align-items: start;
}

.edp-info-card h2 {
    font-size: 1.35rem;
    margin: 0 0 .8rem;
    color: var(--edp-text);
}

.edp-info-card p {
    color: var(--edp-muted);
    margin-bottom: .8rem;
}

.edp-help-box {
    background: var(--edp-info-bg);
    border-radius: 14px;
    padding: .9rem 1rem;
    display: grid;
    gap: .25rem;
    margin: .9rem 0;
    color: #063b4c;
}

.edp-instructions h3,
.edp-example-box strong,
.edp-checkbox-group h3,
.edp-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--edp-text);
    margin: 0 0 .55rem;
}

.edp-instructions p {
    margin: .4rem 0;
    color: #17233b;
}

.edp-example-box {
    background: #f7f9fd;
    border-radius: 14px;
    padding: .9rem 1rem;
    margin-top: 1rem;
}

.edp-nie-examples {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .7rem;
}

.edp-nie-examples span {
    background: #eef2f8;
    border-left: 4px solid var(--edp-primary-dark);
    border-radius: 999px;
    padding: .45rem 1rem;
    min-width: 3rem;
    text-align: center;
}

.edp-field {
    display: grid;
    gap: .4rem;
    margin-bottom: .75rem;
}

.edp-field label {
    color: #142441;
    font-weight: 700;
    font-size: .9rem;
}

.edp-field label span {
    color: var(--edp-danger);
}

.edp-field input,
.edp-field select,
.edp-field textarea {
    width: 100%;
    border: 1px solid #cdd8ea;
    border-radius: 10px;
    padding: .65rem .75rem;
    color: #17233b;
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.edp-field input:focus,
.edp-field select:focus,
.edp-field textarea:focus {
    border-color: var(--edp-primary);
    box-shadow: 0 0 0 .18rem rgba(79, 124, 255, .14);
}

.edp-field input[readonly] {
    background: #f7f9fd;
    color: #526075;
}

.edp-field small {
    color: var(--edp-muted);
    font-size: .8rem;
}

.edp-error {
    color: var(--edp-danger) !important;
    font-weight: 700;
}

.edp-radio-row,
.edp-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    align-items: center;
}

.edp-radio-pill {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    border: 1px solid var(--edp-border);
    border-radius: 999px;
    padding: .45rem .8rem;
    cursor: pointer;
}

.edp-radio-field {
    align-content: start;
}

.edp-radio-field label:not(:first-child),
.edp-checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-right: .9rem;
    font-weight: 500;
}

.edp-grid-1,
.edp-grid-2,
.edp-grid-3,
.edp-grid-4 {
    display: grid;
    gap: .75rem 1rem;
}

.edp-grid-1 { grid-template-columns: 1fr; }
.edp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.edp-col-span-2 {
    grid-column: span 2;
}

.edp-section-title {
    margin: .5rem 0 0;
    padding-top: .4rem;
}

.edp-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: 1rem;
}

.edp-steps button {
    border: 1px solid var(--edp-border);
    background: #fff;
    color: #2b3c5c;
    padding: .65rem .55rem;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.edp-steps button.active {
    background: var(--edp-primary-dark);
    color: #fff;
    border-color: var(--edp-primary-dark);
}

.edp-step-card {
    display: none;
}

.edp-step-card.active {
    display: block;
}

.edp-wizard-actions,
.edp-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.edp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    border-radius: 12px;
    padding: .65rem 1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.edp-btn:hover {
    transform: translateY(-1px);
}

.edp-btn-primary {
    background: var(--edp-primary-dark);
    color: #fff;
}

.edp-btn-success {
    background: var(--edp-success);
    color: #fff;
}

.edp-btn-light {
    background: #eef3fb;
    color: #1c3157;
}

.edp-btn-block {
    width: 100%;
}

.edp-alert {
    border-radius: 14px;
    padding: .8rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.edp-alert-success {
    background: #e7f8ee;
    color: #095b32;
    border: 1px solid #bde9cf;
}

.edp-alert-danger {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.edp-alert-info {
    background: var(--edp-info-bg);
    color: #073b4c;
    border: 1px solid #b4ecf8;
}

.edp-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

.edp-summary-grid div {
    background: #f7f9fd;
    border-radius: 12px;
    padding: .8rem;
    text-align: center;
}

.edp-summary-grid strong {
    display: block;
    font-size: 1.3rem;
    color: var(--edp-primary-dark);
}

.edp-summary-grid span {
    color: var(--edp-muted);
    font-size: .85rem;
}

.edp-upload-area {
    display: grid;
    place-items: center;
    gap: .45rem;
    border: 2px dashed #a9b9d4;
    border-radius: 18px;
    padding: 2rem 1rem;
    background: #f8fbff;
    cursor: pointer;
    text-align: center;
}

.edp-upload-area input {
    margin-top: .5rem;
}

.edp-upload-area em {
    color: var(--edp-muted);
    font-style: normal;
    font-size: .9rem;
}

.edp-table-preview-wrap {
    margin-top: 1rem;
}

.edp-table-responsive {
    overflow-x: auto;
}

.edp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.edp-table th,
.edp-table td {
    border: 1px solid var(--edp-border);
    padding: .5rem;
    white-space: nowrap;
}

.edp-table th {
    background: var(--edp-primary-dark);
    color: #fff;
}

.edp-import-details {
    border-top: 1px solid var(--edp-border);
    color: #516078;
    font-size: .9rem;
    max-height: 260px;
    overflow: auto;
}

@media (max-width: 1180px) {
    .edp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .edp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .edp-verify-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .edp-page-head,
    .edp-wizard-actions,
    .edp-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .edp-grid-2,
    .edp-grid-3,
    .edp-grid-4,
    .edp-summary-grid {
        grid-template-columns: 1fr;
    }

    .edp-col-span-2 {
        grid-column: span 1;
    }

    .edp-steps {
        grid-template-columns: 1fr;
    }
}

/* SIGE v1.0.11 - matrícula Centro Psicopedagógico La Paz / El Salvador */
.edp-field-label {
    color: #142441;
    font-weight: 700;
    font-size: .9rem;
}

.edp-radio-field {
    display: grid;
    gap: .55rem;
    align-content: start;
}

.edp-radio-options {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-height: 2.35rem;
    flex-wrap: wrap;
}

.edp-radio-options label,
.edp-radio-field label:not(:first-child) {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .45rem;
    min-width: 4.6rem;
    margin: 0;
    color: #17233b;
    font-weight: 600;
    line-height: 1.2;
}

.edp-radio-options input[type="radio"],
.edp-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    padding: 0;
    margin: 0;
}

.edp-invalid,
.edp-field input:invalid,
.edp-field select:invalid,
.edp-field textarea:invalid {
    border-color: #dc3545;
}

.edp-field input[data-edp-sv-phone],
.edp-field input[data-edp-sv-dui] {
    letter-spacing: .02em;
}


/* SIGE v1.0.11 - Centro Psicopedagógico La Paz: ocultar selector de idioma hasta tener EN/ES completo */
[data-language-switcher],
[data-lang-switcher],
.language-switcher,
.language-toggle,
.lang-switcher,
.lang-toggle,
.edp-language-switcher,
.topbar-language,
.app-language-switcher {
    display: none !important;
}

/* Ajuste final para radios/checkboxes compactos y alineados */
.edp-radio-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(72px, 1fr));
    gap: .35rem .85rem;
    align-items: center;
}

.edp-radio-options label {
    min-height: 1.55rem;
}

.edp-field input[data-edp-sv-phone],
.edp-field input[data-edp-sv-dui],
.edp-field input[data-edp-email] {
    font-variant-numeric: tabular-nums;
}

/* SIGE v1.0.98 - importación Excel institucional */
.edp-import-help {
    display: grid;
    gap: .25rem;
    line-height: 1.45;
}

.edp-import-help strong {
    color: #062f45;
}

.edp-import-help span {
    font-weight: 500;
}

.edp-import-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.edp-import-legend > div {
    border: 1px solid var(--edp-border);
    border-radius: 14px;
    padding: .75rem .85rem;
    background: #f8fbff;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .1rem .55rem;
    align-items: center;
}

.edp-import-legend strong {
    color: var(--edp-text);
    font-size: .92rem;
}

.edp-import-legend small {
    grid-column: 2;
    color: var(--edp-muted);
    line-height: 1.35;
}

.edp-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.edp-legend-required { background: #245edb; }
.edp-legend-recommended { background: #9eeaff; border: 1px solid #56cde8; }
.edp-legend-optional { background: #d8dee8; border: 1px solid #b8c2d0; }

.edp-summary-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.edp-import-warnings {
    border-top: 1px solid var(--edp-border);
    background: #fffaf0;
    color: #7a4a00;
    font-size: .9rem;
    display: grid;
    gap: .35rem;
}

.edp-preview-note {
    margin: -.15rem 0 .7rem;
    color: var(--edp-muted);
    font-size: .88rem;
}

@media (max-width: 900px) {
    .edp-import-legend,
    .edp-summary-grid-5 {
        grid-template-columns: 1fr;
    }
}


/* SIGE v1.0.170 - edición estudiante/admin: terapias en una sola línea en escritorio */
.edp-checkbox-inline-row {
    display: flex;
    align-items: center;
    gap: .65rem 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .15rem;
}

.edp-checkbox-inline-row h3 {
    margin: 0 .25rem 0 0;
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: .98rem;
}

.edp-checkbox-inline-row label {
    margin: 0 !important;
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 1180px) {
    .edp-checkbox-inline-row {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}
