/* Enhanced Auth Styles - Consistent with Landing Page */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Consistent with landing page variables */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary-color: #ec4899;
    --secondary-light: #f472b6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-hero: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 35%, var(--secondary-color) 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Consistent particle background with landing page */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    33% { 
        transform: translateY(-20px) rotate(2deg);
        opacity: 0.8;
    }
    66% { 
        transform: translateY(10px) rotate(-1deg);
        opacity: 0.9;
    }
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    margin: 2rem auto;
}

/* Enhanced auth card with consistent branding */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-2xl);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08);
}

/* Consistent header styling */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}

/* Brand logo integration */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.brand-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.brand-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Modern Social Login Buttons */
.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.social-btn.google {
    border-color: #4285f4;
    color: #4285f4;
}

.social-btn.google:hover {
    background: #4285f4;
    color: white;
}

.social-btn.facebook {
    border-color: #4267B2;
    color: #4267B2;
}

.social-btn.facebook:hover {
    background: #4267B2;
    color: white;
}

/* Modern Divider */
.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    z-index: 1;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
    color: #718096;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.form-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-input.valid {
    border-color: #38a169;
    background: #f0fff4;
}

.form-input.invalid {
    border-color: #e53e3e;
    background: #fef5e7;
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.password-requirements small {
    color: #2d3748;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.requirements-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.requirements-list li {
    color: #4a5568;
    font-size: 0.85rem;
    margin: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 500;
}

.requirements-list li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #e53e3e;
    font-weight: bold;
}

.requirements-list li.valid {
    color: #38a169;
    font-weight: 600;
}

.requirements-list li.valid::before {
    content: '✓';
    color: #38a169;
}

/* Validation Messages */
.validation-message {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: block;
}

.validation-message.error {
    color: #c53030;
    background: rgba(254, 226, 226, 0.8);
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.validation-message.success {
    color: #38a169;
    background: rgba(240, 253, 244, 0.8);
    border: 1px solid rgba(104, 211, 145, 0.3);
}

/* Enhanced Primary Button */
.btn-primary {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced Demo Account Box */
.demo-account {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.demo-account::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.demo-account h4 {
    color: #92400e;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-account h4::before {
    content: '🎯';
    font-size: 1.2rem;
}

.demo-account p {
    color: #92400e;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    font-weight: 600;
}

.demo-account strong {
    color: #78350f;
    font-weight: 700;
}

/* Enhanced Links */
.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    color: #764ba2;
}

.forgot-password {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Enhanced Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    position: relative;
}

.auth-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.auth-footer p {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.back-link {
    color: #718096;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(-2px);
}

/* Messages */
.error-message, .success-message {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.error-message {
    background: rgba(254, 226, 226, 0.9);
    color: #c53030;
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.success-message {
    background: rgba(240, 253, 244, 0.9);
    color: #38a169;
    border: 1px solid rgba(104, 211, 145, 0.3);
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
}
/* Enhanced Form Design - Reduced Friction */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group:last-of-type {
    margin-bottom: 2rem;
}

/* Floating label design */
.form-group.floating-label {
    position: relative;
}

.form-group.floating-label label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-lighter);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: transparent;
    z-index: 2;
}

.form-group.floating-label .form-input:focus + label,
.form-group.floating-label .form-input:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-white);
    padding: 0 0.5rem;
}

/* Enhanced form inputs */
.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: inherit;
}

.form-input::placeholder {
    color: var(--text-lighter);
    font-weight: 400;
    opacity: 0.8;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
    background: var(--bg-white);
}

.form-input:hover:not(:focus) {
    border-color: var(--text-light);
}

/* Input states with better visual feedback */
.form-input.valid {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.02);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.form-input.invalid {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.02);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.form-input.loading {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z' fill='%236366f1'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
}

/* Enhanced label styling */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

/* Input icons */
.form-group.with-icon {
    position: relative;
}

.form-group.with-icon .form-input {
    padding-left: 3rem;
}

.form-group.with-icon .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    font-size: 1.25rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-group.with-icon .form-input:focus + .input-icon {
    color: var(--primary-color);
}

/* Password visibility toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-lighter);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Enhanced checkbox styling */
.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    cursor: pointer;
    padding: 0.5rem 0;
    color: var(--text-medium);
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    margin-top: 0.125rem;
    flex-shrink: 0;
    appearance: none;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Select dropdown styling */
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
    cursor: pointer;
}

select.form-input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Form section grouping */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title::before {
    content: '';
    width: 4px;
    height: 1rem;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Progressive disclosure for optional fields */
.optional-fields {
    margin-top: 1rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.optional-fields.expanded {
    opacity: 1;
    max-height: 500px;
}

.show-optional-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.show-optional-btn:hover {
    color: var(--primary-dark);
}

.show-optional-btn svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.show-optional-btn.expanded svg {
    transform: rotate(180deg);
}
/* Enhanced CTA Hierarchy & Button System */

/* Primary CTA - Main action */
.btn-primary {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 2rem 0 1.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 56px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    background: var(--text-lighter);
}

.btn-primary:disabled:hover {
    box-shadow: none;
}

/* Loading state for primary button */
.btn-primary.loading {
    color: transparent;
    pointer-events: none;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Secondary CTA - Alternative actions */
.btn-secondary {
    width: 100%;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0.75rem 0;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Tertiary CTA - Subtle actions */
.btn-tertiary {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-tertiary:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

/* Enhanced Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.social-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-white);
    color: var(--text-medium);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    min-height: 48px;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    border-color: var(--text-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.social-btn.google {
    border-color: #4285f4;
    color: #4285f4;
}

.social-btn.google:hover {
    background: #4285f4;
    color: white;
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

.social-btn.facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.social-btn.facebook:hover {
    background: #1877f2;
    color: white;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
}

.social-btn.apple {
    border-color: #000000;
    color: #000000;
}

.social-btn.apple:hover {
    background: #000000;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Social button icons */
.social-btn .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Button groups */
.button-group {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.button-group .btn-secondary {
    flex: 1;
    margin: 0;
}

/* Quick action buttons */
.quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
}

.forgot-password {
    margin: 0;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.forgot-password a:hover {
    color: var(--primary-dark);
    background: rgba(99, 102, 241, 0.1);
}

/* Demo account CTA */
.demo-cta {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--warning-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.demo-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning-color), #d97706);
}

.demo-cta h4 {
    color: #92400e;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.demo-cta .demo-credentials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.demo-credential {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.demo-credential label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    display: block;
    margin-bottom: 0.25rem;
}

.demo-credential .value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #78350f;
    font-family: 'Monaco', 'Menlo', monospace;
}

.demo-fill-btn {
    background: var(--warning-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
}

.demo-fill-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
/* Trust, Security & Reassurance Elements */

/* Security badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.security-badge .icon {
    font-size: 1rem;
}

/* Trust indicators */
.trust-indicators {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.trust-indicators h4 {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.trust-stat {
    text-align: center;
}

.trust-stat .number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.trust-stat .label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Privacy notice */
.privacy-notice {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.privacy-notice .icon {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.privacy-notice strong {
    color: var(--text-dark);
    font-weight: 600;
}

.privacy-notice a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

/* Security features list */
.security-features {
    margin: 1.5rem 0;
}

.security-features h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.security-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.security-features li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: 700;
    font-size: 0.9rem;
    width: 16px;
    height: 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Testimonial/social proof */
.social-proof {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.social-proof .quote {
    font-style: italic;
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.social-proof .author {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}

.social-proof .rating {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.social-proof .star {
    color: #fbbf24;
    font-size: 1rem;
}

/* Help and support */
.help-section {
    text-align: center;
    margin: 2rem 0 1rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.help-section h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.help-section p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.help-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.help-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.help-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    text-decoration: none;
}

/* Loading states with reassurance */
.loading-message {
    display: none;
    text-align: center;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}

.loading-message.show {
    display: block;
}

.loading-message .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.75rem;
}

.loading-message .text {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

.loading-message .subtext {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Success confirmation */
.success-confirmation {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 2px solid var(--success-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.success-confirmation .icon {
    width: 48px;
    height: 48px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.success-confirmation h3 {
    color: var(--success-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.success-confirmation p {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.success-confirmation .next-steps {
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
}

.success-confirmation .next-steps h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.success-confirmation .next-steps ol {
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.5;
    padding-left: 1.25rem;
}

.success-confirmation .next-steps li {
    margin: 0.25rem 0;
}
/* Enhanced Mobile-First Responsive Design */

/* Base mobile styles (already mobile-first) */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .auth-container {
        margin: 1rem auto;
        max-width: 100%;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0;
        border-radius: var(--radius-xl);
        min-height: calc(100vh - 1rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .auth-header p {
        font-size: 1rem;
    }
    
    /* Optimized form spacing for mobile */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: var(--radius-lg);
    }
    
    /* Touch-friendly buttons */
    .btn-primary {
        padding: 1.25rem;
        font-size: 1rem;
        min-height: 52px;
    }
    
    .social-btn {
        padding: 1rem;
        min-height: 48px;
        font-size: 0.9rem;
    }
    
    /* Simplified social login for mobile */
    .social-login {
        gap: 0.5rem;
    }
    
    /* Mobile-optimized trust indicators */
    .trust-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .trust-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.8);
        border-radius: var(--radius-lg);
    }
    
    .trust-stat .number {
        font-size: 1.1rem;
    }
    
    .trust-stat .label {
        font-size: 0.8rem;
    }
    
    /* Mobile demo credentials */
    .demo-cta .demo-credentials {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Simplified security badges for mobile */
    .security-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .security-badge {
        justify-content: center;
        padding: 0.75rem;
    }
    
    /* Mobile help section */
    .help-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .help-link {
        padding: 0.75rem;
        text-align: center;
    }
}

/* Tablet portrait (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .auth-container {
        max-width: 420px;
    }
    
    .auth-card {
        padding: 2.5rem 2rem;
    }
    
    .social-login {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .trust-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .demo-cta .demo-credentials {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet landscape and small desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .auth-container {
        max-width: 480px;
    }
    
    .auth-card {
        padding: 3rem 2.5rem;
    }
}

/* Large screens (1025px+) */
@media (min-width: 1025px) {
    .auth-container {
        max-width: 520px;
    }
    
    .auth-card {
        padding: 3.5rem 3rem;
    }
    
    /* Enhanced hover effects for desktop */
    .form-input:hover:not(:focus) {
        border-color: var(--text-medium);
        transform: translateY(-1px);
    }
    
    .social-btn:hover {
        transform: translateY(-2px);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .auth-header h1 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .form-input {
        -webkit-font-smoothing: antialiased;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-card {
        min-height: auto;
        margin: 0.5rem auto;
        padding: 1.5rem;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .btn-primary {
        margin: 1rem 0;
    }
    
    .trust-indicators,
    .social-proof {
        display: none; /* Hide non-essential elements in landscape */
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .form-input {
        min-height: 48px;
    }
    
    .btn-primary,
    .btn-secondary,
    .social-btn {
        min-height: 48px;
    }
    
    .checkbox-label input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
    
    /* Remove hover effects on touch devices */
    .form-input:hover:not(:focus) {
        transform: none;
        border-color: var(--border-color);
    }
    
    .social-btn:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .auth-card:hover {
        transform: none;
    }
    
    .btn-primary:hover,
    .btn-secondary:hover,
    .social-btn:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2a2a2a;
        --bg-lighter: #3a3a3a;
        --text-dark: #ffffff;
        --text-medium: #e0e0e0;
        --text-light: #b0b0b0;
        --text-lighter: #808080;
        --border-color: #404040;
        --border-light: #505050;
    }
    
    .auth-card {
        background: rgba(26, 26, 26, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .form-input {
        background: var(--bg-lighter);
        border-color: var(--border-color);
        color: var(--text-dark);
    }
    
    .form-input:focus {
        background: var(--bg-white);
    }
    
    .social-btn {
        background: var(--bg-lighter);
        border-color: var(--border-color);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
    
    .btn-secondary {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .form-input {
        border-width: 3px;
    }
    
    .form-input:focus {
        border-width: 4px;
    }
}
/* Enhanced Validation, Error States & Loading Feedback */

/* Validation message system */
.validation-message {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    display: none;
    position: relative;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.validation-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
}

.validation-message.error {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--error-color);
}

.validation-message.success {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--success-color);
}

.validation-message.warning {
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 4px solid var(--warning-color);
}

.validation-message.info {
    color: var(--accent-color);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-left: 4px solid var(--accent-color);
}

/* Validation icons */
.validation-message::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    vertical-align: text-top;
    background-size: contain;
    background-repeat: no-repeat;
}

.validation-message.error::before {
    content: '⚠️';
}

.validation-message.success::before {
    content: '✅';
}

.validation-message.warning::before {
    content: '⚠️';
}

.validation-message.info::before {
    content: 'ℹ️';
}

/* Enhanced password requirements */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.password-requirements.active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.password-requirements small {
    color: var(--text-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.requirements-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.requirements-list li {
    color: var(--text-medium);
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.requirements-list li::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.requirements-list li.valid {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    font-weight: 600;
}

.requirements-list li.valid::before {
    background: var(--success-color);
    content: '✓';
}

.requirements-list li.invalid {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.requirements-list li.invalid::before {
    background: var(--error-color);
    content: '✗';
}

/* Real-time validation indicators */
.form-group.validating .form-input {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z' fill='%236366f1'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
}

.form-input.valid {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
}

.form-input.invalid {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ef4444'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
}

/* Form-level error messages */
.error-message, .success-message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
    position: relative;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-message.show, .success-message.show {
    display: block;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--error-color);
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--success-color);
}

.error-message::before {
    content: '⚠️';
    margin-right: 0.5rem;
}

.success-message::before {
    content: '✅';
    margin-right: 0.5rem;
}

/* Loading states */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    text-align: center;
    box-shadow: var(--shadow-2xl);
    max-width: 320px;
    margin: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-content h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Progress indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* Step indicators for multi-step forms */
.form-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.form-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.form-step.active {
    background: var(--primary-color);
    color: white;
}

.form-step.completed {
    background: var(--success-color);
    color: white;
}

.form-step.completed::after {
    content: '✓';
}

.form-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1rem;
    height: 2px;
    background: var(--border-light);
    transform: translateY(-50%);
}

.form-step.completed:not(:last-child)::before {
    background: var(--success-color);
}

/* Inline help and tooltips */
.field-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.help-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    position: relative;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    margin-bottom: 0.5rem;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-dark);
}

.help-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Mobile validation adjustments */
@media (max-width: 480px) {
    .requirements-list {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .requirements-list li {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .validation-message {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .loading-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .form-steps {
        gap: 0.5rem;
    }
    
    .form-step {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}