.eg-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

html,
body.eg-login {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #172033;
    font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.login-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    background-color: #dbeaf6;
    background-image: url("../images/eruslu-login-background.png?v=1");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.login-layout {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px clamp(24px, 4vw, 72px);
    box-sizing: border-box;
}

.login-card {
    width: min(100%, 390px);
    max-width: 390px;
    margin-right: clamp(148px, calc(4vw + 100px), 180px);
    padding: 24px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.13);
    box-sizing: border-box;
}

.eg-card {
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.eg-lock {
    width: 38px;
    height: 38px;
    margin: 0 auto 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    background: linear-gradient(160deg, #e30613, #b8000b);
    box-shadow: 0 8px 16px rgba(227, 6, 19, 0.28);
    flex: none;
}

.eg-card h1 {
    margin: 0;
    text-align: center;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #172033;
}

.eg-card .eg-lead {
    margin: 4px 0 14px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
}

.eg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 12px;
}

.eg-error ul {
    margin: 0;
    padding-left: 16px;
}

.eg-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.eg-types {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.eg-type {
    position: relative;
    flex: 1;
    min-width: 0;
}

.eg-type input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.eg-type label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 82px;
    margin: 0;
    padding: 8px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.eg-type label:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(23, 32, 51, 0.1);
}

.eg-type-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
}

.eg-type-seller .eg-type-icon { background: #0284c7; }
.eg-type-customer .eg-type-icon { background: #16a34a; }
.eg-type-personnel .eg-type-icon { background: #f97316; }

.eg-type span.eg-type-name {
    font-size: 13px;
    font-weight: 600;
}

.eg-type .eg-check {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

#userTypeSeller:checked + label {
    border: 2px solid #0284c7;
    background: #e0f2fe;
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.16);
}

#userTypeSeller:checked + label .eg-check {
    display: flex;
    background: #0284c7;
}

#userTypeCustomer:checked + label {
    border: 2px solid #16a34a;
    background: #dcfce7;
    box-shadow: 0 8px 16px rgba(22, 163, 74, 0.16);
}

#userTypeCustomer:checked + label .eg-check {
    display: flex;
    background: #16a34a;
}

#userTypePersonnel:checked + label {
    border: 2px solid #f97316;
    background: #ffedd5;
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.16);
}

#userTypePersonnel:checked + label .eg-check {
    display: flex;
    background: #f97316;
}

.eg-type input:focus-visible + label {
    outline: 2px solid #e30613;
    outline-offset: 2px;
}

.eg-field + .eg-field {
    margin-top: 12px;
}

.eg-input {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.eg-input i {
    color: #94a3b8;
    width: 14px;
    text-align: center;
    font-size: 13px;
}

.eg-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #172033;
    font-size: 14px;
    font-weight: 400;
}

.eg-input:focus-within {
    border-color: #e30613;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.eg-eye {
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 4px;
    cursor: pointer;
}

.eg-eye:focus-visible {
    outline: 2px solid #e30613;
    border-radius: 6px;
}

.eg-field .field-validation-error,
.eg-card > form > .field-validation-error {
    display: block;
    margin-top: 4px;
    color: #b8000b;
    font-size: 11px;
}

.eg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.eg-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.eg-row input {
    width: 16px;
    height: 16px;
    accent-color: #e30613;
}

.eg-forgot {
    color: #e30613;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.eg-forgot:hover {
    color: #b8000b;
    text-decoration: underline;
}

.eg-forgot:focus-visible {
    outline: 2px solid #e30613;
    outline-offset: 2px;
    border-radius: 4px;
}

.eg-submit {
    width: 100%;
    height: 48px;
    margin-top: 0;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(90deg, #e30613, #c10510);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter 200ms ease, box-shadow 200ms ease;
}

.eg-submit:hover:not(:disabled) {
    filter: brightness(0.94);
    box-shadow: 0 8px 16px rgba(184, 0, 11, 0.28);
}

.eg-submit:focus-visible {
    outline: 2px solid #172033;
    outline-offset: 2px;
}

.eg-submit:disabled {
    cursor: wait;
    filter: saturate(0.85);
}

.eg-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: eg-spin 0.7s linear infinite;
}

@keyframes eg-spin {
    to { transform: rotate(360deg); }
}

@media (min-aspect-ratio: 1672 / 941) {
    .login-page {
        background-position: center top;
    }
}

@media (max-aspect-ratio: 1672 / 941) {
    .login-page {
        background-position: left center;
    }
}

@media (min-width: 1200px) {
    .login-layout {
        padding-right: calc(clamp(24px, 4vw, 72px) + 120px);
    }
}

@media (max-width: 900px) {
    html,
    body.eg-login {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-page {
        min-height: 100dvh;
        background-position: left top;
        background-color: #dbeaf6;
    }

    .login-layout {
        justify-content: center;
        align-items: flex-start;
        min-height: 100dvh;
        padding: 180px 16px 32px;
    }

    .login-card,
    .eg-card {
        width: min(100%, 390px);
        max-width: 390px;
        margin: 0 auto;
    }

    .eg-card h1 {
        font-size: 23px;
    }

    .eg-type label {
        min-height: 82px;
    }

    .eg-input {
        height: 44px;
    }

    .eg-submit {
        height: 48px;
        margin-top: 0;
    }
}
