:root {
    color-scheme: light;
    font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
    color: #162b25;
    background: #eaf5eb;
}

* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sign-in {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(1rem, 3vw, 2.5rem);
    background: radial-gradient(ellipse at 84% 18%, #f5fbf4, transparent 63%), #eaf5eb;
}

.sign-in-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 940px);
    overflow: hidden;
    border: 1px solid #d2e1d7;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 24px 55px -24px #19523865, 0 3px 12px #153f2f0c;
}

.portal-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    min-height: clamp(445px, 64svh, 510px);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    color: #fff;
    background: radial-gradient(ellipse at 85% 35%, #caeccd, transparent 70%), #f7fcf6;
}

.portal-logo {
    display: block;
    width: min(82%, 260px);
    height: auto;
}

.portal-art,
.portal-art::before,
.portal-art::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.portal-art { z-index: -1; }
.portal-art::before,
.portal-art::after { content: ""; }

.portal-art::before {
    background: #9cd586;
    clip-path: ellipse(135% 68% at 0% 98%);
}

.portal-art::after {
    background: linear-gradient(90deg, #075235 4%, #075235e8 27%, #075235ad 58%, #07523542 100%),
        linear-gradient(180deg, #1b794a 18%, #1b794a00 63%),
        url("../asserts/images/5feast-meal-service.png") center bottom / 100% auto no-repeat,
        #166640;
    clip-path: ellipse(135% 61% at 0% 100%);
}

.intro-copy { align-self: stretch; margin-bottom: clamp(1rem, 5svh, 2.5rem); }
.intro-copy h2 {
    max-width: 12ch;
    margin-bottom: .8rem;
    font-size: clamp(1.85rem, 3.5vw, 2.65rem);
    font-weight: 780;
    line-height: 1.04;
    letter-spacing: -.045em;
}
.intro-copy p { max-width: 28ch; color: #effaf3; font-size: clamp(.95rem, 1.5vw, 1.08rem); }

.sign-in-panel {
    position: relative;
    align-self: center;
    padding: clamp(1.75rem, 4vw, 3rem);
}

.sign-in-heading { margin-bottom: 1.45rem; }
.sign-in-heading h1 {
    color: #07543d;
    font-size: clamp(2.05rem, 4vw, 2.85rem);
    font-weight: 780;
    line-height: 1.05;
    letter-spacing: -.05em;
}
.sign-in-heading p { margin-top: .65rem; color: #4e5d57; font-size: 1rem; }

.sign-in-form, .sign-in-field { display: grid; }
.sign-in-form { gap: 1.05rem; }
.sign-in-field { gap: .45rem; }
.sign-in-field label { display: flex; align-items: center; gap: .55rem; font-weight: 700; }
.sign-in-field label .ui-icon,
.sign-in-submit .ui-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.sign-in-field input {
    min-height: 47px;
    min-width: 0;
    width: 100%;
    border: 1px solid #b5c4bb;
    border-radius: 10px;
    padding: .75rem .95rem;
    color: #162b25;
    background: #fdfefd;
}
.sign-in-field input::placeholder { color: #626e67; }
.sign-in-field input[aria-invalid="true"] { border-color: #a3483f; }
.sign-in-field input:focus-visible, button:focus-visible {
    outline: 2px solid #228058;
    outline-offset: 2px;
}

.password-input { position: relative; }
.password-input:has(.password-toggle:not([hidden])) input { padding-right: 4.65rem; }
.password-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    border: 0;
    border-radius: 7px;
    padding: 0 .85rem;
    background: transparent;
    color: #285a46;
    font-size: .9rem;
    font-weight: 650;
}
.password-toggle:hover { background: #e9f3ed; }

.sign-in-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 48px;
    margin-top: .2rem;
    border: 1px solid #07543a;
    border-radius: 10px;
    padding: .7rem 1rem;
    background: #07543a;
    color: #fff;
    font-weight: 730;
}
.sign-in-submit:hover { background: #063d2b; }

.sign-in-errors {
    margin-bottom: 1.15rem;
    border: 1px solid #edc4be;
    border-radius: 8px;
    padding: .65rem .85rem;
    background: #fff3f1;
    color: #862e29;
    font-size: .9rem;
}
.sign-in-errors ul { margin: 0; padding-left: 1.15rem; }

@media (max-width: 740px) {
    .sign-in-card { grid-template-columns: minmax(0, 1fr); max-width: 400px; border-radius: 18px; }
    .portal-intro { min-height: 0; padding: 1.35rem 1.25rem 1.15rem; border-bottom: 1px solid #e6f0e7; }
    .portal-logo { width: min(72%, 215px); }
    .portal-art, .intro-copy { display: none; }
    .sign-in-panel { padding: 1.5rem clamp(1.2rem, 6vw, 2rem) 1.65rem; }
}
