/* Universal Authentication Styles for jpmgninvestment */

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

/* CSS Variables - Will be overridden by theme-specific variables */
:root {
    --theme-primary: #1a2f3a;
    --theme-secondary: #0f1b20;
    --theme-accent: #00d4aa;
    --success-color: #00d4aa;
    --warning-color: #D97706;
    --error-color: #DC2626;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --theme-cyan: #4dd0e1;
    --theme-dark: #0f1b20;
    --theme-medium: #2a4a5a;

    /* Animation Variables */
    --transition-speed: 0.3s;
    --border-radius: 12px;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Body and HTML */
html,
body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    position: relative;
    min-height: 100vh;
}

/* Background Animation */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

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

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

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: 10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 10%;
    animation-delay: 15s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    top: 50%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }

    33% {
        transform: translateY(-30px) rotate(120deg);
        opacity: 0.6;
    }

    66% {
        transform: translateY(20px) rotate(240deg);
        opacity: 0.4;
    }
}

/* Main Container */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
}

/* Form Panel */
.auth-form-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--white);
}

/* Brand Section */
.auth-brand {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-speed) ease;
}

.brand-logo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.brand-logo i {
    font-size: 36px;
    color: var(--white);
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.2;
}

.brand-subtitle {
    color: var(--gray-600);
    font-size: 16px;
    font-weight: 500;
}

/* Form Container */
.auth-form-container {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.auth-form-header p {
    color: var(--gray-600);
    font-size: 16px;
    font-weight: 500;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid;
    animation: slideInDown 0.3s ease;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
    color: var(--error-color);
}

.alert-success {
    background: rgba(0, 212, 170, 0.1);
    border-color: rgba(0, 212, 170, 0.2);
    color: var(--success-color);
}

.alert i {
    font-size: 18px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--theme-primary);
    font-size: 16px;
}

.form-input {
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-900);
    background: var(--white);
    transition: all var(--transition-speed) ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(26, 47, 58, 0.1);
    background: var(--gray-50);
}

.form-input::placeholder {
    color: var(--gray-400);
    font-weight: 500;
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
}

.password-toggle:hover {
    color: var(--theme-primary);
    background: var(--gray-100);
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}

.password-strength::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--error-color);
    transition: all var(--transition-speed) ease;
    border-radius: 2px;
}

.password-strength.weak::before {
    width: 25%;
    background: var(--error-color);
}

.password-strength.fair::before {
    width: 50%;
    background: var(--warning-color);
}

.password-strength.good::before {
    width: 75%;
    background: var(--theme-accent);
}

.password-strength.strong::before {
    width: 100%;
    background: var(--success-color);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

/* Checkbox Styles */
.remember-me,
.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    user-select: none;
}

.remember-me input[type="checkbox"],
.terms-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    position: relative;
    transition: all var(--transition-speed) ease;
    background: var(--white);
}

.remember-me input:checked~.checkmark,
.terms-checkbox input:checked~.checkmark {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
}

.checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.remember-me input:checked~.checkmark::after,
.terms-checkbox input:checked~.checkmark::after {
    opacity: 1;
}

/* Links */
.forgot-password {
    color: var(--theme-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.forgot-password:hover {
    color: var(--theme-secondary);
}

.terms-checkbox a {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 600;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Button Styles */
.auth-btn {
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-cyan));
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

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

.auth-btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.auth-btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

/* Button Loading State */
.btn-loader {
    display: none;
}

.auth-btn.loading .btn-text,
.auth-btn.loading .btn-icon {
    display: none;
}

.auth-btn.loading .btn-loader {
    display: block;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 32px 0 24px;
    position: relative;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    z-index: 1;
}

.auth-divider span {
    background: var(--white);
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Info Panel */
.auth-info-panel {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-dark) 100%);
    color: var(--white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-info-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;
}

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

.info-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.info-icon i {
    font-size: 36px;
    color: var(--white);
}

.info-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.info-content p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    font-weight: 500;
}

.feature-item i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    min-width: 18px;
}

/* Stats */
.info-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

/* Testimonial */
.info-testimonial {
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar i {
    font-size: 24px;
    color: var(--white);
}

.author-name {
    font-weight: 600;
    font-size: 16px;
}

.author-title {
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 100%;
        border-radius: 0;
    }

    .auth-info-panel {
        order: -1;
        padding: 40px;
    }

    .auth-form-panel {
        padding: 40px 20px;
    }

    .info-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .auth-form-panel {
        padding: 30px 20px;
    }

    .auth-info-panel {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .info-content h3 {
        font-size: 24px;
    }

    .info-content p {
        font-size: 16px;
    }

    .brand-title {
        font-size: 24px;
    }

    .auth-form-header h2 {
        font-size: 28px;
    }

    .info-stats {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .stat-item {
        text-align: left;
        padding: 16px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
}

@media (max-width: 480px) {

    .auth-form-panel,
    .auth-info-panel {
        padding: 20px 16px;
    }

    .auth-form-container {
        max-width: 100%;
    }

    .brand-logo {
        width: 60px;
        height: 60px;
    }

    .brand-logo i {
        font-size: 28px;
    }

    .brand-title {
        font-size: 20px;
    }

    .auth-form-header h2 {
        font-size: 24px;
    }

    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }

    .auth-btn {
        padding: 14px 20px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Focus and Accessibility */
.form-input:focus,
.auth-btn:focus {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {

    .auth-background,
    .floating-shapes,
    .auth-info-panel {
        display: none;
    }

    .auth-container {
        grid-template-columns: 1fr;
        box-shadow: none;
    }

    body {
        background: white;
    }
}