/* ── Ithaca font scope ── */
.login-pixel {
    font-family: 'Ithaca', serif;
}

/* ── Validation errors ── */
.login-errors {
    background: rgba(120, 20, 20, 0.6);
    border: 1px solid rgba(244, 120, 100, 0.5);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.3em;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
}
.login-errors:empty { display: none; }

/* ── Inputs ── */
.login-input {
    display: block;
    width: 100%;
    min-width: 200px;
    box-sizing: border-box;
    border-style: solid;
    border-color: transparent;
    border-image: url('/images/WebUI/Input_Field.png') 6 6 6 6 fill / 12px 12px 12px 12px;
    padding: 6px 20px;
    background: transparent;
    color: #ffff96;
    font-family: 'Ithaca', serif;
    font-size: 1.3em;
    outline: none;
    image-rendering: pixelated;
    margin-bottom: 0.75rem;
}
.login-input:focus {
    border-image: url('/images/WebUI/Input_Field_Active.png') 6 6 6 6 fill / 12px 12px 12px 12px;
}
.login-input::placeholder {
    color: #c8a06e;
    opacity: 1;
}
/* Autofill override */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffff96 !important;
    -webkit-box-shadow: none !important;
    border: none !important;
    border-style: solid !important;
    border-color: transparent !important;
    border-image: url('/images/WebUI/Input_Field.png') 6 6 6 6 fill / 12px 12px 12px 12px !important;
    caret-color: #ffff96;
    transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}
.login-input:-webkit-autofill:focus {
    border-image: url('/images/WebUI/Input_Field_Active.png') 6 6 6 6 fill / 12px 12px 12px 12px !important;
}
.input-error-msg {
    color: #FFFF95 !important;
    font-size: 1.3em;
    padding-left: 1rem;
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

/* ── Remember me ── */
.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.remember-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}
.remember-row .custom-cb {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url('/images/WebUI/Checkbox.png') center/contain no-repeat;
    image-rendering: pixelated;
    cursor: pointer;
    flex-shrink: 0;
}
.remember-row:hover .custom-cb {
    background-image: url('/images/WebUI/Checkbox_Hover.png');
}
input[type="checkbox"]:checked + .custom-cb {
    background-image: url('/images/WebUI/Checkbox_Checked.png');
}
.remember-row label {
    font-family: 'Ithaca', serif;
    font-size: 1.3em;
    color: #ffff96;
    cursor: pointer;
    margin: 0;
    width: auto;
}

/* ── Login button ── */
.btn-login-pixel {
    display: block;
    width: 100%;
    min-width: 200px;
    box-sizing: border-box;
    border-style: solid;
    border-color: transparent;
    border-image: url('/images/WebUI/Primary_Button.png') 10 9 10 9 fill / 20px 18px 20px 18px;
    padding: 10px 9px 10px 9px;
    background: transparent;
    color: #ffff96;
    font-family: 'Ithaca', serif;
    font-size: 1.4em;
    text-align: center;
    cursor: pointer;
    image-rendering: pixelated;
    margin-bottom: 1.25rem;
    letter-spacing: 1px;
    transition: filter 0.15s;
}
.btn-login-pixel::before { content: ''; }
.btn-login-pixel::after  { content: ''; }
.btn-login-pixel:hover {
    filter: brightness(1.15);
}

/* ── Password toggle ── */
.pw-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}
.pw-wrap .login-input {
    margin-bottom: 0;
    padding-right: 46px;
}
.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    line-height: 0;
}
.pw-toggle img {
    image-rendering: pixelated;
    display: block;
}
.pw-toggle.pw-open {
    background: transparent;
}

/* ── Bottom links ── */
.login-links {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.login-links a {
    display: inline-block;
    font-family: 'Ithaca', serif;
    font-size: 1.3em;
    color: #c8a96e;
    text-decoration: none;
    margin-bottom: 0.6rem;
    transition: color 0.2s;
}
.login-links a:hover {
    color: #ffff96;
}
