/* RunSync Inventory - Authentication Styles */

/* Main Layout */
.main-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Left Panel - Branding & Information */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(1rem, 3vw, 3rem);
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.brand-content {
    text-align: center;
    color: var(--text-inverse);
    position: relative;
    z-index: 1;
    max-width: min(480px, 90%);
    width: 100%;
}

.brand-logo {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 500;
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
    opacity: 0.9;
}

.brand-description {
    font-size: clamp(0.875rem, 2.5vw, 1.25rem);
    line-height: 1.7;
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
    opacity: 0.8;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    opacity: 0.9;
}

.feature-item i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.security-badge {
    position: absolute;
    bottom: clamp(1rem, 3vw, 2rem);
    left: clamp(1rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: clamp(0.5rem, 1.5vw, 1rem) clamp(0.75rem, 2vw, 1.5rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
}

/* Right Panel - Login Form */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 3rem);
    padding-top: clamp(3rem, 6vw, 4rem);
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.login-container {
    width: 100%;
    max-width: min(400px, 90%);
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.login-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

/* Descope Component Styling */
descope-wc {
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .left-panel {
        flex: 0 0 40vh;
        padding: clamp(1rem, 2vw, 2rem);
    }
    
    .right-panel {
        flex: 1;
        padding: clamp(1rem, 2vw, 2rem);
    }
}

@media (max-width: 768px) {
    .left-panel {
        flex: 0 0 35vh;
    }
    
    .right-panel {
        flex: 1;
    }
    
    .security-badge {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: clamp(1rem, 3vw, 2rem);
    }
    
    .feature-list {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 640px) {
    .main-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    
    .left-panel {
        display: none; /* Hide the left panel completely on mobile */
    }
    
    .right-panel {
        flex: 1;
        min-height: 100vh;
        padding: var(--spacing-lg);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .login-container {
        width: 100%;
        max-width: 100%;
        padding: var(--spacing-lg);
    }
    
    .login-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    .login-title {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
    
    /* Ensure Descope component fits mobile */
    descope-wc {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .right-panel {
        padding: var(--spacing-md);
    }
    
    .login-container {
        padding: var(--spacing-md);
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}
