* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --brand: #00b97a;
    --brand-dark: #009764;
    --text: #0f172a;
    --muted: #334155;
    --bg: #edf2f7;
    --card-bg: #ffffff;
    --border: #d6dde6;
    --focus: rgba(0, 185, 122, 0.2);
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background-color: #0f172a;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    position: relative;
}

body.auth-login {
    background-image: url("./estates.jpg");
}

body.auth-register {
    background-image: url("./estates.jpg");
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.auth-login::before {
    background: linear-gradient(160deg, rgba(2, 6, 23, 0.84), rgba(0, 0, 0, 0.68));
}

body.auth-register::before {
    background: linear-gradient(160deg, rgba(3, 18, 38, 0.52), rgba(0, 0, 0, 0.38));
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
    padding: 28px 24px;
}

body.auth-withdrawal-password .auth-shell {
    padding-top: 18px;
    padding-bottom: 18px;
}

body.auth-withdrawal-password .auth-card {
    max-width: 500px;
    padding: 20px 20px;
}

body.auth-withdrawal-password .brand {
    margin-bottom: 8px;
}

body.auth-withdrawal-password .auth-title-section {
    margin-bottom: 10px;
}

body.auth-withdrawal-password .auth-form {
    margin: 10px 0 8px;
}

body.auth-withdrawal-password .form-group {
    margin-bottom: 10px;
}

body.auth-withdrawal-password .auth-switch {
    margin-top: 10px;
}

.brand {
    text-align: center;
    margin-bottom: 14px;
}

.brand a {
    text-decoration: none;
    color: var(--brand);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand span {
    color: #0f172a;
    font-weight: 500;
}

.auth-title-section {
    text-align: center;
    margin-bottom: 16px;
}

.auth-title-section h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-title-section p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.auth-form {
    margin: 18px 0 10px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    height: 44px;
    border: 1px solid #b9c6d4;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder {
    color: #475569;
    opacity: 1;
}

.form-control:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 4px var(--focus);
}

.form-note {
    display: block;
    margin-top: 6px;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
}

.password-wrap {
    position: relative;
}

.password-wrap .form-control {
    padding-right: 46px;
}

.eye-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eye-toggle:hover {
    background: #f3f5f8;
    color: #374151;
}

.eye-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.eye-toggle svg {
    width: 18px;
    height: 18px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 2px 0 12px;
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #0f172a;
    font-weight: 500;
}

.form-check input {
    accent-color: var(--brand);
}

.form-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.form-link:hover {
    color: var(--brand);
}

.btn-primary {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.12s;
}

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-primary:active {
    transform: translateY(1px);
}

.auth-feedback {
    margin-top: 10px;
    min-height: 18px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.auth-feedback.success {
    color: #0f8a61;
}

.auth-feedback.error {
    color: #b42340;
}

.auth-switch {
    text-align: center;
    margin-top: 14px;
    color: #1e293b;
    font-weight: 500;
    font-size: 14px;
}

.auth-switch a {
    text-decoration: none;
    color: var(--brand);
    font-weight: 700;
    margin-left: 4px;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1200;
    width: min(92vw, 380px);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.auth-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.auth-toast.success {
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.98), rgba(15, 118, 110, 0.98));
}

.auth-toast.error {
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.98), rgba(185, 28, 28, 0.98));
}

.auth-toast__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.18);
}

.auth-toast__content {
    flex: 1;
    min-width: 0;
}

.auth-toast__title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.auth-toast__message {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.auth-toast__close {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.88;
}

.auth-toast__close:hover {
    opacity: 1;
}

@media (max-width: 520px) {
    body {
        background-attachment: scroll;
    }

    .auth-card {
        padding: 22px 16px;
        border-radius: 14px;
    }

    .brand a {
        font-size: 25px;
    }

    .auth-title-section h3 {
        font-size: 22px;
    }

    .auth-toast {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    body.auth-withdrawal-password .auth-shell {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    body.auth-withdrawal-password .auth-card {
        padding: 16px 14px;
    }
}