:root {
    --md-primary: #1A73E8;
    --md-on-primary: #FFFFFF;
    --md-primary-container: #D2E3FC;
    --md-surface: #FFFFFF;
    --md-surface-variant: #F8F9FA;
    --md-on-surface: #1F1F1F;
    --md-on-surface-variant: #444746;
    --md-outline: #DADCE0;
    --md-error: #D93025;
    --md-shadow: rgba(0, 0, 0, 0.08);
    --md-radius: 12px;
    --md-radius-pill: 50px;
    --md-font: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--md-font);
    background: var(--md-surface-variant);
    color: var(--md-on-surface);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-container {
    background: var(--md-surface);
    border-radius: var(--md-radius);
    box-shadow: 0 1px 3px var(--md-shadow), 0 4px 16px rgba(0,0,0,0.06);
    max-width: 880px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    min-height: 500px;
}
.auth-brand {
    background: linear-gradient(145deg, var(--md-primary), #1557B0);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--md-on-primary);
}
.auth-brand .logo { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
.auth-brand .logo span { font-weight: 300; opacity: 0.85; }
.auth-brand .tagline { font-size: 16px; opacity: 0.9; line-height: 1.6; }
.auth-brand .brand-features { margin-top: 32px; list-style: none; }
.auth-brand .brand-features li {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; opacity: 0.85; margin-bottom: 12px;
}
.auth-brand .brand-features li::before {
    content: "✓";
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; background: rgba(255,255,255,0.2);
    border-radius: 50%; font-size: 14px; flex-shrink: 0;
}
.auth-form { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 24px; font-weight: 500; margin-bottom: 4px; }
.auth-form .subtitle { color: var(--md-on-surface-variant); font-size: 14px; margin-bottom: 28px; }
.m3-field { margin-bottom: 20px; position: relative; }
.m3-field label { display: block; font-size: 13px; font-weight: 500; color: var(--md-on-surface-variant); margin-bottom: 4px; }
.m3-field input {
    width: 100%; padding: 14px 16px; font-size: 16px;
    border: 1.5px solid var(--md-outline); border-radius: 8px;
    background: var(--md-surface); color: var(--md-on-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease; outline: none;
}
.m3-field input:focus { border-color: var(--md-primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.15); }
.m3-field input::placeholder { color: #9AA0A6; font-size: 15px; }
.m3-field .field-hint { font-size: 12px; color: var(--md-on-surface-variant); margin-top: 4px; }
.otp-group { display: flex; gap: 12px; }
.otp-group .m3-field { flex: 1; margin-bottom: 0; }
.otp-group .btn-otp { flex-shrink: 0; align-self: flex-end; margin-bottom: 4px; padding: 12px 20px; font-size: 14px; white-space: nowrap; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; font-size: 15px; font-weight: 500;
    border: none; border-radius: var(--md-radius-pill);
    cursor: pointer; transition: all 0.2s ease; text-decoration: none; gap: 8px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--md-primary); color: var(--md-on-primary); }
.btn-primary:hover { background: #1557B0; box-shadow: 0 2px 8px rgba(26,115,232,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--md-primary); border: 1.5px solid var(--md-outline); }
.btn-outline:hover { background: var(--md-primary-container); border-color: var(--md-primary); }
.btn-otp { background: var(--md-surface-variant); color: var(--md-on-surface-variant); border: 1.5px solid var(--md-outline); border-radius: 8px; padding: 12px 18px; }
.btn-otp:hover { background: var(--md-primary-container); border-color: var(--md-primary); color: var(--md-primary); }
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }
.auth-footer { margin-top: 24px; text-align: center; font-size: 14px; color: var(--md-on-surface-variant); }
.auth-footer a { color: var(--md-primary); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.message { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: none; }
.message.error { display: block; background: #FCE8E6; color: var(--md-error); border-left: 4px solid var(--md-error); }
.message.success { display: block; background: #E6F4EA; color: #1E7E34; border-left: 4px solid #1E7E34; }
.step-indicator { display: flex; gap: 8px; margin-bottom: 24px; }
.step-dot { flex: 1; height: 4px; border-radius: 4px; background: var(--md-outline); transition: background 0.3s ease; }
.step-dot.active { background: var(--md-primary); }
.step-dot.done { background: #34A853; }
@media (max-width:720px) {
    .auth-container { grid-template-columns: 1fr; max-width: 440px; }
    .auth-brand { padding: 32px 28px; text-align: center; }
    .auth-brand .brand-features { display: none; }
    .auth-form { padding: 32px 28px; }
    .otp-group { flex-direction: column; }
    .otp-group .btn-otp { align-self: stretch; }
}
@media (max-width:400px) { .auth-form { padding: 24px 16px; } .auth-brand { padding: 24px 16px; } .auth-brand .logo { font-size: 24px; } }