﻿/* ============================================================
   inregistrare.css — pagina de înregistrare instituție
   ============================================================ */

.er-reg-page {
    min-height: calc(100vh - 200px);
    background: linear-gradient(180deg, #F8FAFC 0%, #EFF4FA 100%);
    padding: 48px 24px 64px;
}

.er-reg-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--er-bg-surface);
    border: 1px solid var(--er-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    padding: 40px 48px 36px;
}

/* HEADER */
.er-reg-head {
    text-align: center;
    margin-bottom: 32px;
}

.er-reg-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .er-reg-icon .material-icons {
        font-size: 32px;
        color: var(--er-color-primary);
    }

.er-reg-head h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--er-color-primary);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.er-reg-head p {
    font-size: 0.95rem;
    color: var(--er-text-soft);
    line-height: 1.55;
    margin: 0;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}


/* SECȚIUNI */
.er-reg-section {
    margin-bottom: 28px;
}

.er-reg-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--er-border);
}

.er-reg-section-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--er-color-primary);
    color: var(--er-text-on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
}

.er-reg-section-head h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--er-text-main);
    margin: 0;
    letter-spacing: -0.01em;
}


/* CÂMPURI */
.er-reg-field {
    margin-bottom: 16px;
}

.er-reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.er-reg-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--er-text-soft);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.er-reg-field input,
.er-reg-field select {
    width: 100%;
    height: 44px;
    background: var(--er-bg-surface);
    color: var(--er-text-main);
    border: 1.5px solid var(--er-border);
    border-radius: 10px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 0.94rem;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

    .er-reg-field input:focus,
    .er-reg-field select:focus {
        border-color: var(--er-color-secondary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    .er-reg-field input::placeholder {
        color: #94A3B8;
    }

    .er-reg-field input.er-reg-invalid,
    .er-reg-field select.er-reg-invalid {
        border-color: var(--er-color-danger);
        background: #FEF2F2;
    }

/* Wrap pentru select cu chevron custom */
.er-reg-input-wrap {
    position: relative;
}

.er-reg-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    cursor: pointer;
}

.er-reg-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--er-text-muted);
    font-size: 20px;
    pointer-events: none;
}

/* Erori per câmp */
.er-reg-error {
    display: none;
    margin-top: 5px;
    font-size: 0.78rem;
    color: var(--er-color-danger);
    font-weight: 600;
}

    .er-reg-error.er-show {
        display: block;
    }

/* Hint informativ (icon + text) */
.er-reg-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--er-text-muted);
}

    .er-reg-hint .material-icons {
        font-size: 16px;
        color: var(--er-color-secondary);
        margin-top: 1px;
        flex-shrink: 0;
    }


/* EROARE GLOBALĂ (sub formular, înainte de buton) */
.er-reg-global-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

    .er-reg-global-error .material-icons {
        font-size: 20px;
        color: var(--er-color-danger);
    }


/* BUTON SUBMIT */
.er-reg-btn-submit {
    width: 100%;
    height: 50px;
    background: var(--er-color-secondary);
    color: var(--er-text-on-dark);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

    .er-reg-btn-submit:hover:not(:disabled) {
        background: var(--er-color-secondary-hover);
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.30);
    }

    .er-reg-btn-submit:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.er-reg-btn-loader {
    align-items: center;
    gap: 8px;
}

.er-reg-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: er-reg-spin 0.8s linear infinite;
}

@keyframes er-reg-spin {
    to {
        transform: rotate(360deg);
    }
}


/* TOS */
.er-reg-tos {
    text-align: center;
    margin: 16px 0 0;
    font-size: 0.8rem;
    color: var(--er-text-muted);
    line-height: 1.55;
}

    .er-reg-tos a {
        color: var(--er-color-secondary);
        text-decoration: none;
        font-weight: 600;
    }

        .er-reg-tos a:hover {
            text-decoration: underline;
        }


/* ============================================================
   MODAL SUCCESS
   ============================================================ */

.er-reg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

    .er-reg-overlay.er-show {
        opacity: 1;
        visibility: visible;
    }

.er-reg-modal {
    background: var(--er-bg-surface);
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
    padding: 40px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
    text-align: center;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.er-reg-overlay.er-show .er-reg-modal {
    transform: translateY(0) scale(1);
}

.er-reg-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: er-reg-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

    .er-reg-modal-icon .material-icons {
        font-size: 44px;
        color: #047857;
    }

@keyframes er-reg-pop {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.er-reg-modal h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--er-color-primary);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.er-reg-modal p {
    font-size: 0.95rem;
    color: var(--er-text-soft);
    line-height: 1.55;
    margin: 0 0 24px;
}

.er-reg-modal-btn {
    width: 100%;
    height: 46px;
    background: var(--er-color-success);
    color: var(--er-text-on-dark);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

    .er-reg-modal-btn:hover {
        background: #059669;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
    }

    .er-reg-modal-btn .material-icons {
        font-size: 18px;
        transition: transform 0.2s ease;
    }

    .er-reg-modal-btn:hover .material-icons {
        transform: translateX(3px);
    }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 720px) {

    .er-reg-page {
        padding: 24px 16px 48px;
    }

    .er-reg-card {
        padding: 32px 24px 28px;
    }

    .er-reg-head h1 {
        font-size: 1.4rem;
    }

    .er-reg-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .er-reg-modal {
        padding: 32px 24px 24px;
    }

        .er-reg-modal h2 {
            font-size: 1.2rem;
        }
}
