/* My GENYSIS login — from design/Connexion.html */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap');

.page-login {
    --mg-teal: #0081e5;
    --mg-teal-soft: #7ec8f5;
    --mg-ink: #0f1f2b;
    --mg-ink-soft: #3d4757;
    --mg-muted: #6b7683;
    --mg-muted-soft: #8a95a3;
    --mg-border: #d6dee2;
    --mg-border-btn: #cdd8d5;
    --mg-panel: #0f1f2b;
    --mg-panel-mid: #0f2a3b;
    --mg-panel-text: #bfd0d6;
    --mg-panel-muted: #8fa3b3;
    --mg-panel-list: #dbe4ea;
    --mg-font: 'Space Grotesk', 'Instrument Sans', system-ui, sans-serif;
    --mg-body-font: 'Instrument Sans', 'Space Grotesk', system-ui, sans-serif;
    font-family: var(--mg-body-font);
    background: #fff !important;
    color: var(--mg-ink);
}

.page-login .theme-nav,
.page-login .theme-footer {
    display: none !important;
}

.page-login main {
    padding-top: 0 !important;
    min-height: 100vh;
    background: #fff !important;
}

.page-login .login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    color: var(--mg-ink);
}

/* —— Left brand panel —— */
.login__brand {
    position: relative;
    background: linear-gradient(160deg, var(--mg-panel-mid), var(--mg-panel));
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login__brand-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 20% 10%, rgba(45, 212, 191, 0.18), transparent 65%);
    pointer-events: none;
}

.login__logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: inherit;
    width: fit-content;
}

.login__logo-text {
    font-family: var(--mg-font);
    font-weight: 700;
    font-size: 24px;
    color: var(--mg-teal-soft);
    line-height: 1;
}

.login__logo-image {
    height: 21px;
    width: auto;
}

.login__brand-body {
    position: relative;
}

.login__brand-title {
    font-family: var(--mg-font);
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    font-weight: 700;
    color: #fff;
}

.login__brand-lead {
    font-size: 17px;
    color: var(--mg-panel-text);
    line-height: 1.6;
    margin: 0 0 32px;
    max-width: 420px;
}

.login__benefits {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 15px;
    color: var(--mg-panel-list);
    margin: 0;
    padding: 0;
    list-style: none;
}

.login__benefits li {
    display: flex;
    gap: 12px;
    align-items: center;
}

.login__benefits li::before {
    content: '✓';
    color: var(--mg-teal-soft);
    font-weight: 700;
}

.login__cert {
    position: relative;
    font-size: 13px;
    color: var(--mg-panel-muted);
}

/* —— Right form panel —— */
.login__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 32px;
    background: #fff;
}

.login__form-wrap {
    width: 100%;
    max-width: 400px;
}

.login__title {
    font-family: var(--mg-font);
    font-size: 32px;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--mg-ink);
}

.login__subtitle {
    color: var(--mg-muted);
    margin: 0 0 30px;
    font-size: 15px;
}

.login__alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
}

.login__alert-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #ffedd5;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login__alert-title {
    font-size: 14px;
    font-weight: 700;
    color: #c2410c;
    margin: 0 0 4px;
}

.login__alert-text {
    font-size: 13px;
    color: #9a3412;
    margin: 0;
    line-height: 1.45;
}

.login__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--mg-ink-soft);
    margin-bottom: 7px;
}

.login__label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 7px;
}

.login__forgot {
    font-size: 13px;
    color: var(--mg-teal);
    font-weight: 600;
    text-decoration: none;
}

.login__forgot:hover {
    text-decoration: underline;
}

.login__field {
    position: relative;
    margin-bottom: 18px;
}

.login__input {
    width: 100%;
    border: 1px solid var(--mg-border);
    border-radius: 11px;
    padding: 14px 16px;
    font-size: 15px;
    outline: 0;
    font-family: var(--mg-body-font);
    color: var(--mg-ink);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login__input--password {
    padding-right: 48px;
}

.login__input::placeholder {
    color: #9aa7b2;
}

.login__input:focus {
    border-color: var(--mg-teal);
    box-shadow: 0 0 0 3px rgba(0, 129, 229, 0.15);
}

.login__input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.login__toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 48px;
    border: 0;
    background: transparent;
    color: #9aa7b2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login__toggle:hover {
    color: var(--mg-ink-soft);
}

.login__remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--mg-ink-soft);
    margin-bottom: 24px;
    cursor: pointer;
    user-select: none;
}

.login__remember input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.login__check {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 1.5px solid var(--mg-border-btn);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.login__remember input:checked + .login__check {
    background: var(--mg-teal);
    border-color: var(--mg-teal);
}

.login__remember input:checked + .login__check::after {
    content: '';
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.login__remember input:focus-visible + .login__check {
    box-shadow: 0 0 0 3px rgba(0, 129, 229, 0.2);
}

.login__submit {
    width: 100%;
    border: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--mg-teal);
    padding: 15px;
    border-radius: 11px;
    cursor: pointer;
    font-family: var(--mg-body-font);
    transition: background 0.15s ease, transform 0.15s ease;
}

.login__submit:hover {
    background: #0066b3;
}

.login__submit:active {
    transform: translateY(1px);
}

.login__register {
    text-align: center;
    font-size: 14px;
    color: var(--mg-muted);
    margin: 24px 0 0;
}

.login__register a {
    color: var(--mg-teal);
    font-weight: 600;
    text-decoration: none;
}

.login__register a:hover {
    text-decoration: underline;
}

.login__legal {
    text-align: center;
    font-size: 12px;
    color: var(--mg-muted-soft);
    margin: 16px 0 0;
    line-height: 1.5;
}

.login .field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* Fixed flash toasts on light login page */
.page-login main > .fixed .alert {
    background: #fff !important;
    color: var(--mg-ink) !important;
    border: 1px solid var(--mg-border);
    box-shadow: 0 8px 24px rgba(15, 43, 40, 0.12);
}

@media (max-width: 900px) {
    .page-login .login {
        grid-template-columns: 1fr;
    }

    .login__brand {
        min-height: auto;
        padding: 32px 28px 40px;
        gap: 40px;
    }

    .login__brand-title {
        font-size: 28px;
    }

    .login__panel {
        padding: 40px 24px 56px;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .page-login .login__brand {
        padding: 24px 16px 28px;
        gap: 24px;
    }

    .page-login .login__brand-title {
        font-size: 24px;
    }

    .page-login .login__panel {
        padding: 28px 16px 48px;
    }

    .page-login .login__title {
        font-size: 1.55rem;
    }
}
