/* Página pública /registro — compacta, una sola vista */
:root {
    --reg-primary: #3c4eb5;
    --reg-primary-soft: #eef2ff;
    --reg-text: #1f2937;
    --reg-muted: #6b7280;
    --reg-border: #e5e7eb;
    --reg-bg: #f8f9fc;
    --reg-input-h: 42px;
    --reg-radius: 10px;
}

* {
    box-sizing: border-box;
}

body.registro-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: var(--reg-text);
    font-size: 14px;
}

.registro-shell {
    display: flex;
    min-height: 100vh;
    max-height: 100vh;
    background: #fff;
}

.registro-form-panel {
    flex: 0 0 50%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: #fff;
    overflow-y: auto;
}

.registro-form-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.registro-logo {
    display: block;
    max-width: 120px;
    margin: 0 auto 0.75rem;
}

.registro-title {
    color: var(--reg-primary);
    font-size: 1.65rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.15rem;
    line-height: 1.2;
}

.registro-subtitle {
    text-align: center;
    color: var(--reg-muted);
    margin: 0 0 1rem;
    font-size: 0.85rem;
}

.registro-section-label {
    display: block;
    color: var(--reg-primary);
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}

/* Persona — pills compactas */
.registro-persona-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.registro-persona-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--reg-border);
    border-radius: var(--reg-radius);
    padding: 0.45rem 0.6rem;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: var(--reg-input-h);
}

.registro-persona-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.registro-persona-card__icon {
    font-size: 1rem;
    color: var(--reg-primary);
    flex-shrink: 0;
}

.registro-persona-card__text {
    min-width: 0;
    text-align: left;
}

.registro-persona-card__title {
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.2;
}

.registro-persona-card__hint {
    font-size: 0.65rem;
    color: var(--reg-muted);
    line-height: 1.2;
}

.registro-persona-card.is-active {
    border-color: var(--reg-primary);
    background: var(--reg-primary-soft);
}

/* Documento: select custom + número en línea */
.registro-doc-row {
    display: grid;
    grid-template-columns: minmax(9.25rem, 10.5rem) 1fr;
    gap: 0.5rem;
    align-items: start;
}

.registro-doc-number {
    min-width: 0;
}

.registro-doc-select {
    position: relative;
}

.registro-doc-select__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.registro-doc-select__trigger {
    width: 100%;
    height: var(--reg-input-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0 0.7rem;
    border: 2px solid var(--reg-border);
    border-radius: var(--reg-radius);
    background: #f8f9fa;
    color: var(--reg-text);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.registro-doc-select__trigger:hover {
    background: #fff;
    border-color: #d1d5db;
}

.registro-doc-select__trigger:focus {
    outline: none;
    border-color: var(--reg-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(60, 78, 181, 0.1);
}

.registro-doc-select.is-open .registro-doc-select__trigger {
    border-color: var(--reg-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(60, 78, 181, 0.1);
}

.registro-doc-select.is-static .registro-doc-select__trigger {
    cursor: default;
    pointer-events: none;
}

.registro-doc-select.is-static .registro-doc-select__caret {
    visibility: hidden;
}

.registro-doc-select__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.registro-doc-select__caret {
    flex-shrink: 0;
    font-size: 0.65rem;
    color: var(--reg-muted);
    transition: transform 0.2s;
}

.registro-doc-select.is-open .registro-doc-select__caret {
    transform: rotate(180deg);
    color: var(--reg-primary);
}

.registro-doc-select__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.3rem;
    list-style: none;
    background: #fff;
    border: 2px solid var(--reg-border);
    border-radius: var(--reg-radius);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.registro-doc-select__menu[hidden] {
    display: none;
}

.registro-doc-select__option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: none;
    border-radius: calc(var(--reg-radius) - 4px);
    background: transparent;
    color: var(--reg-text);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.registro-doc-select__option:hover,
.registro-doc-select__option:focus {
    outline: none;
    background: var(--reg-primary-soft);
    color: var(--reg-primary);
}

.registro-doc-select__option.is-selected {
    background: var(--reg-primary);
    color: #fff;
}

.registro-doc-select__option.is-selected:hover,
.registro-doc-select__option.is-selected:focus {
    background: var(--reg-primary);
    color: #fff;
}

.registro-field {
    margin-bottom: 0.7rem;
}

.registro-field--tight {
    margin-bottom: 0.55rem;
}

.registro-input {
    width: 100%;
    height: var(--reg-input-h);
    padding: 0 0.85rem;
    border: 2px solid var(--reg-border);
    border-radius: var(--reg-radius);
    font-size: 0.9rem;
    background: #f8f9fa;
    color: var(--reg-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
}

.registro-input:focus {
    border-color: var(--reg-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(60, 78, 181, 0.1);
}

.registro-input.is-invalid {
    border-color: #dc3545;
}

.registro-input[readonly] {
    background: #f3f4f6;
    color: #374151;
    cursor: default;
}

.registro-input-hint {
    display: block;
    font-size: 0.68rem;
    color: var(--reg-muted);
    margin-top: 0.2rem;
}

.registro-migo-status {
    display: block;
    font-size: 0.68rem;
    margin-top: 0.2rem;
    min-height: 0.9rem;
    color: var(--reg-muted);
}

.registro-migo-status.is-loading {
    color: var(--reg-primary);
}

.registro-migo-status.is-error {
    color: #dc3545;
}

.registro-migo-status.is-ok {
    color: #059669;
}

.registro-field-error {
    color: #dc3545;
    font-size: 0.68rem;
    margin-top: 0.2rem;
    min-height: 0;
}

.registro-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.registro-password-wrap {
    position: relative;
}

.registro-password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--reg-muted);
    cursor: pointer;
    padding: 0.2rem;
    font-size: 0.95rem;
}

.registro-password-wrap .registro-input {
    padding-right: 2.25rem;
}

/* Teléfono */
.registro-phone .cargo-consig-phone {
    border-radius: var(--reg-radius);
    border-width: 2px;
    min-height: var(--reg-input-h);
    height: var(--reg-input-h);
}

.registro-phone .cargo-consig-phone .select2-container .select2-selection--single {
    min-height: calc(var(--reg-input-h) - 4px);
    height: calc(var(--reg-input-h) - 4px);
}

.registro-phone .cargo-consig-phone__input {
    min-height: calc(var(--reg-input-h) - 4px);
    height: calc(var(--reg-input-h) - 4px);
    font-size: 0.9rem;
    background: #f8f9fa;
}

.registro-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.65rem 0 0.6rem;
}

.registro-terms input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
    accent-color: var(--reg-primary);
}

.registro-terms label {
    font-size: 0.75rem;
    color: var(--reg-muted);
    line-height: 1.4;
}

.registro-terms a {
    color: var(--reg-primary);
    text-decoration: none;
    font-weight: 500;
}

.registro-btn {
    width: 100%;
    border: none;
    border-radius: var(--reg-radius);
    height: var(--reg-input-h);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--reg-primary) 0%, #5a6bc7 100%);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.registro-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(60, 78, 181, 0.25);
}

.registro-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.registro-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: var(--reg-muted);
}

.registro-footer-links a {
    color: var(--reg-primary);
    font-weight: 600;
    text-decoration: none;
}

.registro-footer-links a:hover {
    text-decoration: underline;
}

/* Panel ilustración — fondo blanco; círculos decorativos con color */
.registro-art-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    padding: 1.5rem;
}

.registro-art-panel::before,
.registro-art-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.registro-art-panel::before {
    width: 220px;
    height: 220px;
    background: #93c5fd;
    opacity: 0.45;
    top: 12%;
    right: -50px;
}

.registro-art-panel::after {
    width: 160px;
    height: 160px;
    background: #a5b4fc;
    opacity: 0.45;
    bottom: 10%;
    left: -30px;
}

.registro-art-img {
    position: relative;
    z-index: 1;
    max-width: min(380px, 88%);
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 991px) {
    .registro-shell {
        flex-direction: column;
        max-height: none;
        min-height: 100dvh;
    }

    .registro-form-panel {
        flex: 1 1 auto;
        max-width: none;
        width: 100%;
        padding: 1rem 1.25rem 2rem;
        justify-content: flex-start;
    }

    .registro-form-inner {
        max-width: 520px;
    }

    .registro-art-panel {
        flex: 0 0 auto;
        min-height: clamp(100px, 22vw, 150px);
        order: -1;
        padding: 0.85rem 1rem 0.35rem;
    }

    .registro-art-panel::before {
        width: 120px;
        height: 120px;
        top: -28px;
        right: 8%;
        opacity: 0.5;
    }

    .registro-art-panel::after {
        width: 90px;
        height: 90px;
        bottom: -18px;
        left: 6%;
        opacity: 0.5;
    }

    .registro-art-img {
        max-width: clamp(96px, 28vw, 140px);
    }
}

@media (max-width: 640px) {
    .registro-title {
        font-size: 1.5rem;
    }

    .registro-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.85rem;
    }

    .registro-persona-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .registro-persona-card {
        padding: 0.55rem 0.7rem;
    }

    .registro-footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .registro-form-panel {
        padding: 0.85rem 1rem 1.75rem;
    }

    .registro-logo {
        max-width: 108px;
        margin-bottom: 0.6rem;
    }

    .registro-row-2 {
        grid-template-columns: 1fr;
    }

    .registro-doc-row {
        grid-template-columns: 1fr;
    }

    .registro-doc-select__menu {
        left: 0;
        right: auto;
        min-width: 100%;
    }
}

@media (max-width: 380px) {
    .registro-title {
        font-size: 1.35rem;
    }

    .registro-doc-select__trigger {
        font-size: 0.8rem;
        padding: 0 0.55rem;
    }

    .registro-input,
    .registro-phone .cargo-consig-phone__input {
        font-size: 16px;
    }
}
