/* Modern SaaS Login Design - Inspired by Analytics/SEO Platforms */

/* Reset and base styles */
.onboaring-step-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    padding: 3.5rem 3rem;
    max-width: 640px;
    width: 100%;
    margin: 1rem;
}

.onboaring-step-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1;
}

.onboaring-step-container > * {
    position: relative;
    z-index: 2;
}

/* Modern Logo Styles */
.mobile-logo-container {
    display: block;
    margin: 0 0 40px 0;
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    margin-bottom: 32px;
}

.mobile-logo {
    height: 3rem;
    width: auto;
    max-width: 220px;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(21, 101, 216, 0.2));
}

/* Modern Typography */
.fs-3 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #1565D8 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px !important;
    letter-spacing: -0.02em;
}

/* Auth Title - Login Header Styling */
.auth-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #1565D8 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px !important;
    letter-spacing: -0.02em;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Modern Form Styling */
.form,
.auth-form {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 32px 24px;
    margin: 0 0 32px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-label {
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 0.875rem;
    margin-bottom: 8px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    height: 56px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 0 20px !important;
    font-size: 16px !important;
    font-weight: 500;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: #1565D8 !important;
    box-shadow: 0 0 0 4px rgba(21, 101, 216, 0.1), 0 4px 12px rgba(21, 101, 216, 0.15) !important;
    background: #fff;
    outline: none !important;
}

.form-control::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

/* Modern Button Design */
.form-button {
    background: linear-gradient(135deg, #1565D8 0%, #1e40af 100%) !important;
    border: none !important;
    border-radius: 14px !important;
    height: 56px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 14px rgba(21, 101, 216, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.form-button::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;
}

.form-button:hover::before {
    left: 100%;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(21, 101, 216, 0.4);
}

.form-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(21, 101, 216, 0.3);
}

/* Modern Error Styling - Professional & Polished */
.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%);
    backdrop-filter: blur(10px);
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    animation: slideInDown 0.3s ease-out;
}

.error-message::before {
    content: 'âš ';
    font-size: 20px;
    color: #ef4444;
    flex-shrink: 0;
    line-height: 1;
}

.error-message-text {
    color: #dc2626;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Signup Link */
.signup-container {
    text-align: center;
    margin-top: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.signup-text {
    color: #6b7280;
    font-weight: 500;
    font-size: 15px;
}

.signup-link {
    color: #1565D8 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
}

.signup-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #1565D8 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.signup-link:hover::after {
    width: 100%;
}

/* Mobile-First Responsive Design */
@media (max-width: 576px) {
    /* Mobile Container */
    .onboaring-step-container {
        margin: 10px;
        border-radius: 20px;
        padding: 24px 20px;
        min-height: calc(100vh - 40px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* Mobile Logo */
    .mobile-logo-container {
        margin: 0 0 24px 0;
        padding: 16px 0;
        background: linear-gradient(135deg, rgba(21, 101, 216, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
        border-radius: 16px;
    }
    
    .mobile-logo {
        height: 2.5rem;
        max-width: 180px;
    }
    
    /* Mobile Typography */
    .fs-3,
    .auth-title {
        font-size: 1.5rem !important;
        margin-bottom: 24px !important;
        line-height: 1.3;
    }
    
    /* Mobile Form */
    .form,
    .auth-form {
        padding: 24px 20px;
        border-radius: 16px;
        margin-bottom: 24px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px);
    }
    
    .form-control {
        height: 52px !important;
        border-radius: 10px !important;
        font-size: 16px !important;
    }
    
    /* Mobile Button */
    .form-button {
        height: 52px !important;
        border-radius: 12px !important;
        margin: 16px 0 !important;
        width: 100% !important;
        max-width: none !important;
        font-size: 16px !important;
    }
    
    /* Mobile Signup */
    .signup-container {
        margin-top: 20px;
        padding: 16px;
        border-radius: 12px;
    }
    
    .form-control:focus {
        border-color: #1565D8;
        box-shadow: 0 0 0 0.2rem rgba(21, 101, 216, 0.25);
    }
    
    /* Prevent iOS zoom on input focus */
    .form-control {
        font-size: 16px !important;
    }
    
    /* Better button spacing on mobile */
    #step-1--Button-login {
        margin: 20px auto !important;
        width: 100%;
        max-width: 320px;
    }
    
    /* Improved signup link for mobile */
    div[style*="margin-top: 26px"] {
        margin-top: 30px !important;
        padding: 0 15px;
        text-align: center !important;
    }
    
    /* Better error message positioning */
    .error-message {
        margin: 15px 0;
        text-align: center;
        font-size: 14px;
    }
    
    /* Mobile Error Handling */
    .error-message {
        margin: 16px 0;
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 14px;
    }
    
    /* Mobile Animation Improvements */
    .form-control:focus {
        transform: scale(1.02);
    }
    
    /* Mobile Touch Optimization */
    .form-button {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
}

/* Tablet Optimizations */
@media (min-width: 577px) and (max-width: 768px) {
    .onboaring-step-container {
        margin: 20px;
        padding: 40px 32px;
        border-radius: 24px;
    }
    
    .mobile-logo-container {
        display: block !important;
        margin: 0 0 32px 0;
        padding: 20px 0;
    }
    
    .mobile-logo {
        height: 2.8rem;
        max-width: 200px;
    }
    
    .fs-3 {
        font-size: 1.65rem !important;
    }
    
    .form {
        padding: 32px 28px;
    }
    
    .form-control {
        height: 54px !important;
    }
    
    .form-button {
        height: 54px !important;
        max-width: 400px;
    }
}

/* Desktop Hide Logo */
@media (min-width: 769px) {
    .mobile-logo-container {
        display: none !important;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Entrance Animations */
.mobile-logo-container {
    animation: fadeInUp 0.6s ease-out;
}

.fs-3 {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.form {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.form-button {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.signup-container {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Loading Spinner Improvements */
.spinner-border-sm {
    width: 1rem !important;
    height: 1rem !important;
    border-width: 2px;
}

/* Form Input Focus Animation */
.form-control:focus {
    animation: pulse 0.6s ease-in-out;
}

/* Button Loading State */
.form-button.loading {
    background: linear-gradient(135deg, #93c5fd 0%, #a5b4fc 100%) !important;
    pointer-events: none;
}

/* Success State */
.form-button.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* Error State */
.form-control.error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1) !important;
    animation: pulse 0.3s ease-in-out;
}

/* Enhanced button states */
#step-1--Button-login:hover {
    background-color: #1248A8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(21, 101, 216, 0.3);
}

#step-1--Button-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(21, 101, 216, 0.3);
}

/* Accessibility improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

/* Focus indicators */
.form-control:focus,
#step-1--Button-login:focus {
    outline: 2px solid #1565D8;
    outline-offset: 2px;
}
