/* SmartInfra Login Interface Styles */

/* CSS Custom Properties */
:root {
    --primary-navy: #1e2742;
    --primary-teal: #5eb0a9;
    --primary-dark: #172031;
    --secondary-color: #64748b;
    --success-color: #48bb78;
    --error-color: #f56565;
    --warning-color: #ed8936;
    --background-gradient: linear-gradient(135deg, #1e2742 0%, #2d3e5f 100%);
    --panel-background: rgba(255, 255, 255, 0.95);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 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);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Container */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    left: 20%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 70%;
    animation-delay: -10s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 80%;
    animation-delay: -15s;
}

.shape:nth-child(5) {
    width: 140px;
    height: 140px;
    left: 50%;
    animation-delay: -7s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Left Panel - Branding */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, rgba(30, 39, 66, 0.95) 0%, rgba(45, 62, 95, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    z-index: 1;
}

.branding {
    text-align: center;
    color: white;
    max-width: 400px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo i {
    font-size: 3rem;
    margin-right: 1rem;
    color: var(--primary-teal);
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 300;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.feature i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    color: var(--primary-teal);
}

.feature span {
    font-weight: 500;
}

/* Right Panel - Forms */
.right-panel {
    flex: 1;
    background: var(--panel-background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}

.form-container {
    width: 100%;
    max-width: 450px;
    position: relative;
}

/* Form Tabs */
.form-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    background: #f8fafc;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    gap: 0.25rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 0.5rem;
    border-radius: calc(var(--border-radius) - 2px);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.95rem;
}

.tab-btn.active {
    background: white;
    color: var(--primary-teal);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-group.half {
    flex: 1;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(94, 176, 169, 0.1);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password,
.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.forgot-password:hover,
.terms-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.submit-btn,
.demo-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn {
    background: var(--primary-teal);
    color: white;
    margin-bottom: 1rem;
}

.submit-btn:hover {
    background: #4a9892;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.demo-btn {
    background: var(--secondary-color);
    color: white;
}

.demo-btn:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* SSO Button */
.sso-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-teal), #4a9892);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(94, 176, 169, 0.2);
    margin-bottom: 1.5rem;
}

.sso-btn:hover {
    background: linear-gradient(135deg, #4a9892, #3d7f7a);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(94, 176, 169, 0.3);
}

.sso-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* Register Link Button */
.register-link-btn {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--primary-teal);
    border-radius: var(--border-radius);
    background: white;
    color: var(--primary-teal);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-top: 0.5rem;
}

.register-link-btn:hover {
    background: var(--primary-teal);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--panel-background);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: var(--primary-teal);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-weight: 500;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    max-width: 400px;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

.message.success {
    background: var(--success-color);
    color: white;
}

.message.error {
    background: var(--error-color);
    color: white;
}

.message.info {
    background: var(--primary-teal);
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .left-panel {
        padding: 2rem 1rem;
        min-height: 30vh;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .features {
        display: none;
    }
    
    .right-panel {
        padding: 1.5rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .input-group.half {
        margin-bottom: 1rem;
    }
    
    .tab-btn {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .submit-btn,
    .demo-btn,
    .register-link-btn {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .message-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .left-panel {
        min-height: 20vh;
        padding: 1.5rem 1rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .right-panel {
        padding: 1rem;
    }
    
    .form-container {
        padding: 0.5rem;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .form-subtitle {
        font-size: 0.875rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
        gap: 0.25rem;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .animated-bg,
    .floating-shapes {
        display: none;
    }
}
