/* Modern Authentication Pages Styling */
:root {
    /* Color System */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --background-light: #f8fafc;
    --background-dark: #1e293b;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Dimensions */
    --container-width: 480px;
    --input-height: 48px;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

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

.auth-body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Container Styles */
.auth-container {
    width: 100%;
    max-width: var(--container-width);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    position: relative;
    overflow: visible;
    animation: fadeIn 0.5s var(--transition-normal);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    animation: shimmer 2s infinite linear;
    background-size: 1000px 100%;
}

/* Logo and Header Styles */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-logo {
    height: 2.5rem;
    width: auto;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.beta-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary-light);
    color: white;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

/* Main Content Area */
.auth-main {
    margin: 2rem 0;
}

/* Input Wrapper and Icons */
.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input {
    width: 100%;
    height: var(--input-height);
    padding: 0 2.75rem 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition-fast);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
    z-index: 2;
}

.auth-input-icon:hover {
    color: var(--text-primary);
}

.auth-input-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2;
}

.auth-input-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Form Elements */
.auth-form-group {
    margin-bottom: 1.5rem;
    animation: slideIn 0.5s var(--transition-normal);
}

.auth-label {
    display: block;
    font-weight: 500;
    font-size: 0.975rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

/* Company Info Section */
.auth-company-info {
    background: var(--background-light);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    margin: 2rem 0;
    border: 2px solid var(--border-color);
    position: relative;
    animation: fadeIn 0.6s var(--transition-normal);
}

.auth-company-info::before {
    content: '🏢';
    position: absolute;
    top: -12px;
    left: 1rem;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.25rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.auth-company-info h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.auth-company-info p {
    color: var(--text-secondary);
    font-size: 0.975rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.6;
}

/* Button Styles */
.auth-button {
    width: 100%;
    height: var(--input-height);
    padding: 0 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.auth-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-button:active {
    transform: translateY(0);
    animation: pulse 0.2s ease;
}

.auth-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.auth-button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* Social Login Buttons */
.auth-social-button {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.auth-social-button:hover {
    background: var(--background-light);
    border-color: var(--primary-light);
}

/* Error Messages */
.auth-error-message {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-left: 4px solid var(--danger-color);
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.975rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s var(--transition-normal);
}

.auth-error-message::before {
    content: '⚠️';
    font-size: 1.25rem;
}

/* Password Requirements */
.auth-password-requirements {
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.auth-password-requirements ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.auth-password-requirements li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    transition: color var(--transition-normal);
}

.auth-password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    transition: all var(--transition-normal);
}

.auth-password-requirements li.valid {
    color: var(--success-color);
}

.auth-password-requirements li.valid::before {
    content: '●';
    color: var(--success-color);
}

/* Links and Dividers */
.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
}

.auth-link:hover {
    color: var(--primary-dark);
}

.auth-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform var(--transition-normal);
}

.auth-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.auth-social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-social-divider::before,
.auth-social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
    margin: 0 1rem;
}

/* Footer Styles */
.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 640px) {
    :root {
        --container-width: 100%;
        --input-height: 44px;
    }

    .auth-body {
        padding: 1rem;
        background: white;
    }

    .auth-container {
        padding: 1.5rem;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-company-info {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .auth-button {
        height: var(--input-height);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-light: #64748b;
        --border-color: #334155;
        --background-light: #1e293b;
    }

    .auth-body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    .auth-container {
        background: var(--background-dark);
    }

    .auth-input {
        background-color: var(--background-dark);
        color: var(--text-primary);
    }

    .auth-error-message {
        background: #450a0a;
        border-color: #991b1b;
    }

    .auth-company-info::before {
        background: var(--background-dark);
    }
}