/* Updated Login CSS - Enterprise Portal Style */
/* Replace your existing static/css/login.css with this */

/* Enterprise Portal Color Variables */
:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--light-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gray-800);
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 480px;
    width: 100%;
    animation: slideIn 0.6s ease-out;
}

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

.login-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.system-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.system-logo i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.9);
}

.system-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

.system-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* KEEP COMPATIBILITY WITH YOUR EXISTING CLASSES */
.brand-logo, .brand-logo-img, .brand-logo-text, .brand-subtitle {
    display: none; /* Hide HERA branding when using enterprise mode */
}

.login-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 48px 16px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 20px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-input:focus + .form-icon {
    color: var(--secondary-blue);
}

.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.6s ease;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.4);
}

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

.login-button.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.flash-message {
    background: var(--red-100);
    color: var(--red-500);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 20px 30px;
    font-size: 14px;
    border-left: 4px solid var(--red-500);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.demo-hint {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-hint strong {
    color: var(--secondary-blue);
    font-weight: 600;
}

.system-info {
    background: var(--gray-50);
    padding: 20px 30px;
    border-top: 1px solid var(--gray-200);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    font-size: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    color: var(--gray-600);
}

.info-value {
    font-weight: 600;
    color: var(--gray-800);
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-container {
        margin: 10px;
        border-radius: 12px;
    }
    
    .login-header {
        padding: 30px 20px;
    }
    
    .system-title {
        font-size: 24px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (min-width: 1440px) {
    .login-container {
        max-width: 520px;
    }
    
    .system-title {
        font-size: 32px;
    }
}