*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --error: #ef4444;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

body { font-family: 'Inter', system-ui, sans-serif; background: #f0f4ff; color: var(--text); }

.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 24px;
}

.auth-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.auth-container { width: 100%; max-width: 480px; position: relative; z-index: 1; }

.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.auth-logo h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.auth-logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-form-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 11px 42px 11px 40px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-wrapper select { padding-left: 40px; }

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    opacity: 0.6;
}

.toggle-pw:hover { opacity: 1; }

.terms-check { margin-bottom: 20px; }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input { margin-top: 2px; accent-color: var(--primary); }
.checkbox-label a { color: var(--primary); text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }

.btn-auth {
    width: 100%;
    padding: 13px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.btn-auth:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-auth:active { transform: translateY(0); }
.btn-arrow { font-size: 18px; }

.auth-links {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-links a { color: var(--primary); font-weight: 500; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-footer {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin-top: 20px;
}

@media (max-width: 520px) {
    .auth-card { padding: 32px 24px; }
    .form-row { grid-template-columns: 1fr; }
}
