/* Modern Auth Pages Styling - Brand Consistent */
:root {
    --primary-color: #1e6fff;
    --primary-gradient: linear-gradient(135deg, #1e6fff 0%, #3b82f6 100%);
    --secondary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(30, 111, 255, 0.1);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --shadow-soft: 0 8px 32px 0 rgba(30, 111, 255, 0.15);
    --shadow-hover: 0 15px 35px rgba(30, 111, 255, 0.25);
    --brand-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--brand-bg);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Professional Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(30, 111, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
    animation: backgroundShift 25s ease-in-out infinite;
    z-index: -1;
}

/* Subtle Grid Pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(30, 111, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 111, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.5;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    33% { transform: translateX(30px) translateY(-30px) rotate(1deg); }
    66% { transform: translateX(-20px) translateY(20px) rotate(-1deg); }
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Professional Floating Elements */
.auth-floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.auth-floating-icon {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(30, 111, 255, 0.08);
    animation: float 8s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 111, 255, 0.1);
}

.auth-floating-icon:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.auth-floating-icon:nth-child(2) {
    top: 25%;
    right: 12%;
    animation-delay: 2s;
}

.auth-floating-icon:nth-child(3) {
    bottom: 35%;
    left: 10%;
    animation-delay: 4s;
}

.auth-floating-icon:nth-child(4) {
    bottom: 25%;
    right: 15%;
    animation-delay: 6s;
}

.auth-floating-icon:nth-child(5) {
    top: 60%;
    left: 5%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Professional Auth Card */
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 20px 20px 0 0;
}

/* Add subtle inner shadow for depth */
.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Professional Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo-img {
    height: 48px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(30, 111, 255, 0.2));
    transition: all 0.3s ease;
}

.auth-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(30, 111, 255, 0.3));
}

.auth-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
}

/* Form Groups */
.auth-form-group {
    margin-bottom: 24px;
    position: relative;
}

.auth-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(30, 111, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-input::placeholder {
    color: var(--text-secondary);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.1);
    transform: translateY(-2px);
}

.auth-input:valid {
    border-color: rgba(16, 185, 129, 0.5);
}

/* Checkbox Group */
.auth-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.auth-checkbox-label {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Professional Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(30, 111, 255, 0.1);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-link:hover::after {
    width: 100%;
}

/* Error Messages */
.auth-error {
    display: block;
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Loading Animation */
.loaded {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #ff6b6b; width: 25%; }
.strength-fair { background: #ffa726; width: 50%; }
.strength-good { background: #66bb6a; width: 75%; }
.strength-strong { background: #4caf50; width: 100%; }

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 32px 24px;
        margin: 20px;
        border-radius: 20px;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .auth-floating-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .auth-title {
        font-size: 1.8rem;
    }
    
    .auth-input {
        padding: 14px 16px;
    }
    
    .auth-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Accessibility */
.auth-input:focus,
.auth-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Professional Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(30, 111, 255, 0.1);
}

.password-toggle:focus {
    outline: 2px solid rgba(30, 111, 255, 0.3);
    outline-offset: 2px;
}

/* Loading Animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button Loading State */
.auth-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced Form Validation */
.auth-input:invalid {
    border-color: rgba(255, 107, 107, 0.5);
}

.auth-input:valid {
    border-color: rgba(76, 175, 80, 0.5);
}

/* Success/Error States */
.auth-input.success {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.05);
}

.auth-input.error {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.05);
}

/* Hover Effects */
.auth-card:hover .auth-floating-icon {
    animation-play-state: paused;
}

/* Focus States */
.auth-input:focus + .password-toggle {
    color: var(--primary-color);
}

/* Professional Brand Integration */
.auth-card .auth-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--primary-gradient);
    margin-right: 12px;
    border-radius: 2px;
    vertical-align: middle;
}

/* Enhanced Visual Hierarchy */
.auth-form-group:focus-within .auth-label {
    color: var(--primary-color);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Professional Loading States */
.auth-btn:disabled .btn-text {
    opacity: 0.7;
}

.auth-btn:disabled .btn-loading {
    opacity: 1;
}

/* Subtle Success States */
.auth-input.success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.02);
}

.auth-input.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.02);
}

/* Error Alert Styling */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease-out;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-danger div {
    margin-bottom: 0.25rem;
}

.alert-danger div:last-child {
    margin-bottom: 0;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .auth-floating-elements,
    .auth-card::before {
        display: none;
    }
    
    .auth-card {
        background: white;
        color: black;
        box-shadow: none;
    }
}
