:root {
    --ink: #232323;
    --muted: #6b7280;
    --card-border: #f0e8de;
    --input-border: #e7e1d8;
    --orange: #ff6a1f;
    --red: #e8351a;
    --red-dark: #c81c12;
}

* { box-sizing: border-box; }
html { background: #ececec; }
body { margin: 0; color: var(--ink); background: #ececec; font-family: "Mandali", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.auth-shell { width: 100%; max-width: 480px; min-height: 100vh; margin: 0 auto; overflow: hidden; background: #fdf3e7; }
.auth-page { position: relative; z-index: 1; padding: 0 30px 14px; }
.auth-hero { position: relative; margin: 0 -30px; aspect-ratio: 768 / 1060; overflow: hidden; background: url("/public/images/login-hero-bg.webp") bottom center / cover no-repeat; }
.auth-hero__text { position: absolute; top: 2%; right: 0; left: 0; padding: 0 28px; text-align: center; }
.auth-hero__text a { display: inline-block; }
.auth-hero__text img { display: block; width: auto; height: 92px; margin: 0 auto 4px; object-fit: contain; }
.auth-hero h1 { margin: 0 0 8px; color: var(--ink); font-size: 21px; font-weight: 800; line-height: 1.3; }
.auth-hero p { max-width: 390px; margin: 0 auto; padding: 0 8px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.auth-card { position: relative; z-index: 2; margin-top: -78%; padding: 18px 16px; border: 1px solid var(--card-border); border-radius: 24px; background: #fff; box-shadow: 0 10px 30px rgba(200, 90, 30, .12); }
.social-button { display: flex; width: 100%; height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border-radius: 16px; font-size: 14.5px; font-weight: 700; line-height: 1.2; cursor: default; }
.social-button + .social-button { margin-top: 10px; }
.social-button--google { border: 1.5px solid var(--input-border); background: #fff; }
.social-button--google img { width: 22px; height: 22px; object-fit: contain; }
.social-button--microsoft { border: 0; color: #fff; background: linear-gradient(180deg, #23232b 0%, #121218 100%); }
.microsoft-logo { display: grid; width: 18px; height: 18px; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.microsoft-logo i { display: block; width: 8px; height: 8px; }
.microsoft-logo i:nth-child(1) { background: #f25022; }
.microsoft-logo i:nth-child(2) { background: #7fba00; }
.microsoft-logo i:nth-child(3) { background: #00a4ef; }
.microsoft-logo i:nth-child(4) { background: #ffb900; }

.auth-divider { display: flex; align-items: center; margin: 18px 0 17px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--input-border); }
.auth-divider span { padding: 0 12px; color: var(--muted); font-size: 12px; line-height: 20px; white-space: nowrap; }
.alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: 12px; line-height: 1.4; }
.alert--error { color: #9d241b; border: 1px solid #ffd2cc; background: #fff0ee; }
.alert--success { color: #176b42; border: 1px solid #bdebd2; background: #ecfbf3; }

.input-group { position: relative; margin-bottom: 14px; }
.field-icon { position: absolute; z-index: 1; top: 0; bottom: 0; left: 16px; display: flex; align-items: center; color: var(--muted); font-size: 16px; pointer-events: none; }
.auth-input { width: 100%; height: 52px; padding: 0 16px 0 44px; border: 1.5px solid var(--input-border); border-radius: 16px; outline: 0; color: var(--ink); background: #fbfaf8; font-size: 14.5px; line-height: 1.2; transition: border-color .2s, box-shadow .2s, background .2s; }
.auth-input::placeholder { color: #9aa0a8; }
.auth-input:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(255, 106, 31, .12); }
.input-group--password .auth-input { padding-right: 46px; }
.eye-button { position: absolute; top: 0; right: 4px; bottom: 0; display: flex; width: 40px; align-items: center; justify-content: center; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.eye-button i { font-size: 19px; }
.forgot-row { margin: -1px 1px 18px; color: var(--orange); font-size: 12.5px; font-weight: 600; line-height: 20px; text-align: right; }
.submit-button { display: flex; width: 100%; height: 52px; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border: 0; border-radius: 16px; color: #fff; background: linear-gradient(90deg, var(--orange), var(--red-dark)); box-shadow: 0 10px 20px rgba(200, 40, 20, .28); font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.submit-button i { font-size: 15px; }
.auth-switch { margin: 18px 0 0; color: var(--muted); font-size: 13.5px; line-height: 20px; text-align: center; }
.auth-switch a, .terms a { color: var(--red); font-weight: 700; text-decoration: underline; }

.benefit-row { display: flex; gap: 8px; margin-top: 18px; }
.benefit-row > div { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.benefit-icon { display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1px solid rgba(232, 53, 26, .10); border-radius: 16px; color: var(--orange); background: linear-gradient(180deg, #fff2e2, #ffe4c6); font-size: 19px; }
.benefit-row small { color: var(--ink); font-size: 10.5px; font-weight: 700; line-height: 1.3; }

.auth-card--register { margin-bottom: 8px; }
.referral-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px 4px; padding: 0; border: 0; color: var(--orange); background: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.uppercase { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.terms { display: flex; align-items: flex-start; gap: 10px; margin: 4px 4px 16px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.terms input { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px; accent-color: var(--orange); }

.auth-footer { margin-top: 22px; padding: 30px 15px 28px; color: #fff; background: linear-gradient(160deg, #ffb877 0%, #f2792f 55%, #e8622a 100%); text-align: center; }
.auth-footer nav { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; line-height: 1.7; white-space: nowrap; }
.auth-footer a { font-weight: 700; text-decoration: none; }
.auth-footer nav + nav { font-size: 10.5px; font-weight: 400; }

@media (max-width: 360px) {
    .auth-page { padding-right: 24px; padding-left: 24px; }
    .auth-hero { margin-right: -24px; margin-left: -24px; }
    .benefit-row small { font-size: 9.5px; }
    .auth-footer nav { font-size: 10px; }
}
