* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: #06060a;
    color: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-alt: #06b6d4;
    --accent-shadow: rgba(16, 185, 129, 0.3);
    --accent-glow: rgba(16, 185, 129, 0.15);
}

#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
}

.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 60px 60px 80px;
    position: relative;
}

.auth-left::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16,185,129,0.08), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 50px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.auth-left h2 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: rgba(255,255,255,0.45);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
}

.feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

/* Right side - auth card */
.auth-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 36px 32px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.auth-form.hidden {
    display: none;
}

.field.hidden {
    display: none;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.field input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.field input::placeholder {
    color: rgba(255,255,255,0.2);
}

.field input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.04);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 4px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-shadow);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-error {
    color: #ef4444;
    font-size: 0.82rem;
    margin-top: 12px;
    min-height: 20px;
}

/* Password visibility toggle */
.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-pw:hover {
    color: rgba(255,255,255,0.6);
}

.toggle-pw .eye-closed {
    display: none;
}

.toggle-pw.showing .eye-open {
    display: none;
}

.toggle-pw.showing .eye-closed {
    display: block;
}

/* Forgot password */
.forgot-link {
    text-align: center;
    margin-top: 14px;
    font-size: 0.82rem;
}

.forgot-link a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link a:hover {
    color: var(--accent);
}

.forgot-desc {
    color: rgba(255,255,255,0.45);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

.divider span {
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
}

.btn-google {
    width: 100%;
    padding: 13px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-google:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-left {
        padding: 40px 24px 20px;
        text-align: center;
        align-items: center;
    }

    .auth-left h2 {
        font-size: 2.2rem;
    }

    .hero-sub {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .features-list {
        display: none;
    }

    .auth-right {
        width: 100%;
        padding: 0 24px 40px;
    }

    .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-left {
        padding: 30px 16px 16px;
    }

    .brand {
        margin-bottom: 24px;
    }

    .auth-left h2 {
        font-size: 1.8rem;
    }

    .hero-sub {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .auth-right {
        padding: 0 16px 30px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .field input {
        padding: 11px 14px;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .btn-primary {
        padding: 13px;
        font-size: 0.9rem;
    }

    .btn-google {
        padding: 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 390px) {
    .auth-left {
        padding: 24px 14px 12px;
    }

    .brand {
        margin-bottom: 18px;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .brand h1 {
        font-size: 1.2rem;
    }

    .auth-left h2 {
        font-size: 1.5rem;
        letter-spacing: -1px;
    }

    .hero-sub {
        font-size: 0.78rem;
        margin-bottom: 8px;
    }

    .auth-right {
        padding: 0 12px 24px;
    }

    .auth-card {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .auth-tabs {
        margin-bottom: 22px;
    }

    .tab-btn {
        padding: 9px;
        font-size: 0.82rem;
    }

    .field {
        margin-bottom: 14px;
    }

    .divider {
        margin: 18px 0;
    }

    .account-type-toggle {
        flex-direction: column;
        border-radius: 10px;
    }

    .type-btn {
        padding: 12px 16px;
        font-size: 0.82rem;
    }
}

@media (max-width: 320px) {
    .auth-left h2 {
        font-size: 1.3rem;
    }

    .auth-card {
        padding: 20px 14px;
    }

    .type-btn {
        font-size: 0.78rem;
        padding: 10px 14px;
    }
}

/* Account Type Toggle */
.account-type-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 4px;
}

.type-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-top: 8px;
    line-height: 1.5;
    transition: color 0.3s;
}

.type-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    white-space: nowrap;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
}

.type-btn:hover {
    color: rgba(255,255,255,0.6);
}

.pro-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.type-btn.active[data-type="personal"] {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.type-btn.active[data-type="business"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.type-btn.active[data-type="family"] {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.type-btn svg {
    flex-shrink: 0;
}
