* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1f2933;
    -webkit-font-smoothing: antialiased;
}
body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 800px at 10% -10%, rgba(235, 114, 84, .22), transparent 60%),
        radial-gradient(900px 600px at 110% 10%, rgba(245, 166, 35, .22), transparent 60%),
        linear-gradient(160deg, #fff6ec 0%, #ffffff 60%, #fdf0e4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-backdrop {
    width: 100%;
    max-width: 560px;
}
.auth-card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(235, 114, 84, 0.12);
    border-radius: 22px;
    padding: 38px 44px 40px;
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.10),
        0 10px 30px rgba(235, 114, 84, 0.08);
    backdrop-filter: blur(6px);
}
.auth-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #8a94a6;
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    border-radius: 50%;
    transition: background .15s ease, color .15s ease;
}
.auth-close:hover { background: #f6f7fb; color: #1f2933; }

.auth-card h1 {
    margin: 0 0 20px;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    color: #111827;
}

.tabs {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    gap: 6px;
    background: #f6f7fb;
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 22px;
}
.tab-btn {
    flex: 1;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: #52606d;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
.tab-btn.is-active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: #f1f3f4;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: .2px;
    transition: background .15s ease, box-shadow .15s ease, transform .05s;
}
.google-btn:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(60,64,67,.15);
}
.google-btn:active { transform: translateY(1px); }
.g-logo { width: 28px; height: 28px; }

.or-divider {
    position: relative;
    margin: 26px 0 20px;
    text-align: center;
    color: #7a869a;
    font-weight: 500;
    font-size: 15px;
}
.or-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d7dbe4 15%, #d7dbe4 85%, transparent);
    z-index: 0;
}
.or-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 14px;
    z-index: 1;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form.is-hidden { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
    font-weight: 600;
    font-size: 13px;
    color: #4b5563;
    margin-left: 2px;
}
.field input {
    padding: 16px 16px;
    border: 1px solid #d6dae3;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    background: #ffffff;
    transition: border-color .15s, box-shadow .15s, background .15s;
    color: #111827;
}
.field input::placeholder { color: #9aa4b2; }
.field input:focus {
    border-color: #eb7254;
    box-shadow: 0 0 0 4px rgba(235, 114, 84, .12);
    background: #ffffff;
}
.field .err {
    color: #c0392b;
    font-size: 12px;
    font-weight: 500;
    margin-top: -2px;
}

.forgot-row {
    text-align: right;
    margin-top: -6px;
}
.forgot-link {
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color .15s;
}
.forgot-link:hover { color: #d32f2f; text-decoration: underline; }

.btn-login {
    margin-top: 8px;
    width: 100%;
    padding: 15px 16px;
    border: 0;
    border-radius: 10px;
    background: #d32f2f;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(211, 47, 47, .28);
    transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn-login:hover { background: #c62828; box-shadow: 0 10px 26px rgba(211, 47, 47, .34); }
.btn-login:active { transform: translateY(1px); }

.form-alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}
.form-alert-error {
    background: #ffe7e6;
    color: #9b2c2c;
    border: 1px solid #ffc9c6;
}
.form-alert-success {
    background: #e4f7e6;
    color: #1e6b26;
    border: 1px solid #bbefc0;
}

@media (max-width: 540px) {
    body { padding: 14px 10px; }
    .auth-card { padding: 28px 22px 28px; border-radius: 18px; }
    .auth-card h1 { font-size: 32px; }
    .google-btn { font-size: 15px; padding: 12px 14px; }
    .btn-login { font-size: 16px; padding: 13px; }
    .field input { padding: 13px 14px; font-size: 15px; }
}
