:root {
    --login-blue: #1778f3;
    --login-brand-blue: #00469e;
    --login-green: #14be9c;
    --login-bg: #f6f8fb;
    --login-border: #e3e8f0;
    --login-muted: #6b7a8f;
    --login-text: #0e1a2c;
}

* { box-sizing: border-box; }

body.login-phoenix-page {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--login-bg);
    color: var(--login-text);
    font-family: 'Montserrat', sans-serif;
}

body.login-phoenix-page > main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1 0 auto;
}

.login-shell {
    width: 100%;
    max-width: 980px;
    min-height: 640px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 27, 45, .12);
}

.login-brand {
    position: relative;
    min-height: 220px;
    background:
        linear-gradient(135deg, rgba(20, 190, 156, .85), rgba(0, 70, 158, .92)),
        repeating-linear-gradient(45deg, #123a56 0 18px, #0e2f47 18px 36px);
}

.login-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 480px 340px at 85% 15%, rgba(0, 0, 0, .28), transparent 60%),
        radial-gradient(ellipse 420px 300px at 10% 90%, rgba(0, 0, 0, .22), transparent 60%);
}

.login-form-wrap {
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.login-logo { height: 38px; width: auto; }
.login-form-header h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.login-form-header p { margin: 0; color: var(--login-muted); font-size: 13px; }

.login-language .dropdown-toggle {
    padding: 6px 12px;
    border: 1px solid var(--login-border);
    color: #324358;
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
}

.login-field { position: relative; margin-bottom: 16px; }
.login-field > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    color: var(--login-blue);
    transform: translateY(-50%);
}

.login-field .form-control {
    height: 54px;
    padding: 1rem 44px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: var(--login-bg);
    font-size: 14px;
}

.login-field .form-control:focus {
    border-color: var(--login-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 120, 243, .12);
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 2;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    color: #8d9aac;
    background: transparent;
    transform: translateY(-50%);
}

.field-validation-error { display: block; margin: -10px 0 14px; color: #b42318; font-size: 12px; }
.validation-summary-errors { margin-bottom: 18px; color: #b42318; font-size: 13px; }
.validation-summary-errors ul { margin-bottom: 0; padding-left: 18px; }

.login-item { margin-bottom: 16px; }
.login-input,
.login-form-wrap .form-control,
.login-form-wrap select {
    width: 100%;
    min-height: 48px;
    padding: 10px 40px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: var(--login-bg);
}
.login-form-wrap .form-group { margin-bottom: 16px; }
.login-form-wrap label { margin-bottom: 6px; color: #324358; font-size: 13px; font-weight: 600; }
.login-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border: 0;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(135deg, var(--login-blue), var(--login-brand-blue));
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}
.forgot-password { margin: 16px 0; color: var(--login-muted); font-size: 13px; }
.login-form-wrap .panel { border: 1px solid var(--login-border); border-radius: 8px; }
.login-form-wrap .panel-heading,
.login-form-wrap .panel-body,
.login-form-wrap .panel-footer { padding: 12px 14px; }
.login-form-wrap .panel-heading { border-bottom: 1px solid var(--login-border); font-weight: 600; }
.login-form-wrap .panel-footer { border-top: 1px solid var(--login-border); }

.login-actions { margin-bottom: 22px; text-align: right; }
.login-actions a { color: var(--login-blue); font-size: 13px; font-weight: 600; text-decoration: none; }
.login-actions a:hover { text-decoration: underline; }

.btn-login-primary,
.btn-login-secondary {
    width: 100%;
    padding: 13px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.btn-login-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--login-blue), var(--login-brand-blue));
}

.btn-login-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(23, 120, 243, .28); }
.btn-login-secondary { display: block; border: 1.5px solid var(--login-brand-blue); color: var(--login-brand-blue); background: #fff; }
.btn-login-secondary:hover { color: #fff; background: var(--login-brand-blue); }

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: #8d9aac;
    font-size: 12px;
}

.login-divider::before,
.login-divider::after { content: ''; flex: 1; height: 1px; background: var(--login-border); }

.login-footer { display: flex; justify-content: space-between; margin-top: 28px; font-size: 12px; }
.login-footer a { color: var(--login-muted); text-decoration: none; }
.login-footer a:hover { color: var(--login-blue); }
.login-legal { position: static; width: 100%; margin-top: 16px; padding: 0 20px; color: var(--login-muted); font-size: 11px; text-align: center; }

/* ==========================================================================
   Account flow pages (Register / RecoverPassword / ChoseOrganization / etc.)
   Centered single-card shell, per "Registro - Propuesta Phoenix.html" mockup.
   ========================================================================== */

body.flow-phoenix-page {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--login-bg);
    color: var(--login-text);
    font-family: 'Montserrat', sans-serif;
}

body.flow-phoenix-page > main.flow-shell {
    flex: 0 0 auto;
}

.flow-shell {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 27, 45, .12);
    overflow: hidden;
}

.flow-header {
    background:
        linear-gradient(135deg, rgba(20, 190, 156, .85) 0%, rgba(0, 70, 158, .92) 100%),
        repeating-linear-gradient(45deg, #123a56 0 18px, #0e2f47 18px 36px);
    padding: 30px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-header .plate {
    background: #fff;
    border-radius: 10px;
    padding: 10px 18px;
    display: inline-flex;
}

.flow-header .plate img { height: 40px; }

.flow-body { padding: 32px 32px 28px; }

.flow-body h1 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .02em;
    margin: 0 0 14px;
    color: var(--login-text);
    text-align: center;
}

.flow-body > p.intro {
    font-size: 13px;
    line-height: 1.6;
    color: var(--login-muted);
    margin: 0 0 24px;
    text-align: center;
}

.flow-field { margin-bottom: 14px; }

.flow-field .field-validation-error {
    margin: 6px 0 0;
}

.flow-field-input-wrap { position: relative; }

.flow-field-input-wrap i.leading {
    position: absolute;
    left: 15px;
    top: 27px;
    transform: translateY(-50%);
    color: var(--login-blue);
    font-size: 15px;
    z-index: 2;
}

.flow-field-input-wrap .form-control,
.flow-field-input-wrap select.form-control {
    width: 100%;
    height: 50px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: var(--login-bg);
    padding: 0 44px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--login-text);
    transition: border-color .15s, background .15s;
}

.flow-field-input-wrap .form-control::placeholder { color: var(--login-muted); }

.flow-field-input-wrap .form-control:focus {
    outline: none;
    border-color: var(--login-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 120, 243, .12);
}

.flow-toggle-pass {
    position: absolute;
    right: 14px;
    top: 25px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    color: #8d9aac;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
}

.flow-pass-requirements {
    margin: -4px 0 14px;
    padding-left: 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--login-muted);
    list-style: none;
}

.flow-pass-requirements li[data-req] {
    color: #dc3545;
    transition: color .15s ease;
}

.flow-pass-requirements li[data-req].valid {
    color: var(--login-blue);
}

.flow-add-institution {
    position: relative;
    margin-bottom: 18px;
}

.flow-add-institution i.leading {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--login-blue);
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
}

.flow-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 12.5px;
    color: #324358;
    line-height: 1.5;
}

.flow-terms-row input { margin-top: 3px; }

.flow-terms-row a { color: var(--login-blue); text-decoration: none; font-weight: 600; }
.flow-terms-row a:hover { text-decoration: underline; }

.btn-flow-submit {
    background: linear-gradient(135deg, var(--login-blue) 0%, var(--login-brand-blue) 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    border-radius: 999px;
    padding: 13px;
    width: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-flow-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(23, 120, 243, .28);
    color: #fff;
}

.flow-footer {
    border-top: 1px solid var(--login-border);
    background: var(--login-bg);
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.flow-footer a { color: var(--login-muted); text-decoration: none; }
.flow-footer a:hover { color: var(--login-blue); }

@media (max-width: 860px) {
    body.login-phoenix-page { align-items: flex-start; padding: 0; }
    .login-shell { grid-template-columns: 1fr; min-height: 100vh; border-radius: 0; }
    .login-brand { min-height: 180px; }
    .login-form-wrap { padding: 36px 28px 64px; }
    .login-legal { padding: 14px 20px; background: #fff; }
}