/* Modern Billing App Login Styles */

/* Reset and Base */
.modern-billing-login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-container {
    min-height: 100vh;
}

/* Left Panel - Brand Section */
.brand-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.brand-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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 500px;
}

.brand-logo {
    margin-bottom: 3rem;
}

.logo-modern {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.3));
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.feature-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* Right Panel - Login Form */
.login-panel {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    min-height: 100vh;
}

.demo-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

/* Mobile Logo */
.mobile-logo {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -2rem -2rem 2rem -2rem;
    color: white;
}

.logo-mobile {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: #718096;
    margin: 0;
}

/* Modern Form */
.modern-form {
    margin-bottom: 2rem;
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1.2rem;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: #f9fafb;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

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

.remember-me {
    display: flex;
    align-items: center;
}

.checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 0.5rem;
    cursor: pointer;
    appearance: none;
    background: white;
    transition: all 0.3s ease;
}

.checkbox:checked {
    background: #667eea;
    border-color: #667eea;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
}

.checkbox-label {
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 0.9rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #5a67d8;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

.btn-text {
    font-weight: 600;
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(3px);
}

/* Language Toggle */
.language-toggle {
    text-align: center;
    margin: 2rem 0;
}

/* Version Info */
.version-info {
    text-align: center;
    margin: 1rem 0;
}

.version-info span {
    font-size: 0.8rem;
    color: #9ca3af;
}

.version-mismatch {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.alert-content {
    color: #dc2626;
    font-size: 0.9rem;
}

.alert-content strong {
    font-weight: 600;
}

/* Demo Login Styles */
.demo-login-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.demo-login-section h6 {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.demo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.demo-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.demo-card .role {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.demo-card .email {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 991px) {
    .login-panel {
        padding: 1rem;
    }
    
    .mobile-logo {
        margin: -1rem -1rem 2rem -1rem;
    }
    
    .login-form-container {
        max-width: 100%;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .brand-title {
        font-size: 2rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .demo-cards {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus States for Accessibility */
.form-input:focus,
.checkbox:focus,
.btn-login:focus,
.forgot-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
    }
    
    .btn-login {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
