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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ff6b35;
    text-decoration: none;
}

/* Main Login Section */
.login-section {
    padding-top: 70px;
    height: 100vh;
    display: flex;
    align-items: center;
}

.auth-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 520px;
    max-height: 85vh;
    overflow: hidden;
    position: relative; /* Added for better positioning */
}

/* Decorative Panel - Left Side */
.auth-decorative {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-decorative::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.decorative-content {
    position: relative;
    z-index: 2;
}

.decorative-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.decorative-content p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.decorative-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Form Panel - Right Side - REDUCED SPACING */
.auth-form {
    padding: 15px 20px; /* Reduced vertical padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center to flex-start */
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.auth-form::-webkit-scrollbar {
    width: 8px; /* Slightly wider for better visibility */
}

.auth-form::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.5);
    border-radius: 4px;
    margin: 10px 0; /* Add margin to track */
}

.auth-form::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-form::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e55a2b, #e8851e);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1px; /* Further reduced */
    color: #333;
    font-size: 1.5rem; /* Reduced from 1.6rem */
    font-weight: 600;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 8px; /* Reduced from 12px */
    font-size: 0.8rem; /* Slightly smaller */
}

/* Form Elements - REDUCED SPACING */
.input-group {
    margin-bottom: 6px; /* Further reduced from 8px */
}

.input-group label {
    display: block;
    margin-bottom: 2px; /* Reduced from 3px */
    color: #333;
    font-weight: 500;
    font-size: 0.75rem; /* Slightly smaller */
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 7px 10px; /* Further reduced padding */
    border: 2px solid #e1e5e9;
    border-radius: 6px; /* Slightly smaller border radius */
    font-size: 0.8rem; /* Slightly smaller font */
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    transform: translateY(-1px);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px; /* Reduced from 12px */
    font-size: 0.7rem; /* Smaller font */
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
    font-size: 0.7rem; /* Smaller font */
    margin-bottom: 6px; /* Reduced from 8px */
    line-height: 1.2;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
    transform: scale(0.9);
}

.forgot-password {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.75rem;
}

.forgot-password:hover {
    color: #e55a2b;
    text-decoration: underline;
}

.auth-button {
    width: 100%;
    padding: 8px; /* Further reduced */
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 6px; /* Smaller border radius */
    font-size: 0.9rem; /* Smaller font */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px; /* Reduced */
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-loader {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

.auth-divider {
    text-align: center;
    margin: 6px 0; /* Further reduced */
    position: relative;
    color: #999;
    font-size: 0.75rem; /* Smaller font */
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 12px;
    position: relative;
    z-index: 2;
}

.social-button {
    width: 100%;
    padding: 6px 10px; /* Further reduced */
    border: 2px solid #e1e5e9;
    border-radius: 6px; /* Smaller border radius */
    background: white;
    color: #333;
    font-size: 0.8rem; /* Smaller font */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px; /* Further reduced */
}

.social-button:hover {
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.switch-auth {
    text-align: center;
    color: #666;
    margin-top: 4px; /* Further reduced */
    font-size: 0.75rem; /* Smaller font */
    line-height: 1.3; /* Improved line height for better readability */
    padding-bottom: 10px; /* Add bottom padding to ensure visibility */
}

.switch-auth a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
}

.switch-auth a:hover {
    text-decoration: underline;
}

.link {
    color: #ff6b35;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    max-width: 400px;
    width: 90%;
}

.message {
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

.message.success {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.message.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.message.info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    animation: slideIn 0.5s ease-out;
}

/* Loading States */
.loading .button-text {
    opacity: 0;
}

.loading .button-loader {
    display: inline-block !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        max-width: 800px;
        min-height: 480px;
    }
    
    .auth-form {
        padding: 15px 20px; /* Further reduced padding */
    }
    
    .decorative-content h3 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .input-group input,
    .input-group select {
        font-size: 1.2rem;
        padding: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .auth-button {
        font-size: 1.25rem;
        padding: 1.2rem 0;
        margin-top: 2rem;
        border-radius: 10px;
    }
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .login-section {
        padding: 80px 0 20px;
        height: auto;
        min-height: calc(100vh - 100px);
    }
    
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 450px;
        min-height: auto;
        max-height: none;
    }
    
    .auth-decorative {
        display: none;
    }
    
    .auth-form {
        padding: 1.2rem 1rem;
        max-width: 95vw;
        border-radius: 10px;
    }
    .input-group input,
    .input-group select {
        font-size: 1rem;
        padding: 0.5rem;
        margin-bottom: 0.4rem;
    }

    .auth-button {
        font-size: 1rem;
        padding: 0.6rem 0;
        margin-top: 0.7rem;
        border-radius: 7px;
    }
    
    .auth-form h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin: 0 10px;
    }
    
    .auth-form {
        padding: 20px 15px; /* Reduced padding */
    }
    
    .input-group input,
    .input-group select {
        padding: 7px 8px; /* Further reduced padding for mobile */
        font-size: 0.85rem;
    }
    
    .auth-button {
        padding: 9px; /* Slightly more padding for mobile touch targets */
        font-size: 0.9rem;
    }
}

@media (max-height: 600px) {
    .auth-container {
        min-height: 450px;
        max-height: 90vh;
    }
    
    .auth-form {
        padding: 15px; /* Further reduced */
    }
    
    .input-group {
        margin-bottom: 6px; /* Further reduced from 10px */
    }
    
    .auth-form h2 {
        font-size: 1.4rem; /* Further reduced from 1.5rem */
        margin-bottom: 2px;
    }
    
    .auth-subtitle {
        margin-bottom: 8px; /* Further reduced from 12px */
    }
}