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

body.enterprise-body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    font-weight: 700;
    color: #0f172a;
}
p {
    line-height: 1.6;
    color: #64748b;
}

/* Split Layout */
.split-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.split-banner {
    flex: 1;
    background: #142c48;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10%; /* Responsive padding */
    position: relative;
    overflow: hidden;
    min-height: 100vh; /* Ensure it takes full height */
}

.split-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.banner-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.brand-logo {
    max-width: 80px; /* Reduced since it's inline */
    filter: brightness(0) invert(1);
    display: block;
}

.brand-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0; /* Removing bottom margin to align perfectly with logo */
}

.brand-subtitle {
    font-size: 1.35rem; /* Increased size for emphasis */
    color: #e2e8f0;
    margin-bottom: 3.5rem;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0.9;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.glass-panel h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.glass-panel p {
    color: #f1f5f9;
}

/* Form Container */
.split-form {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 2rem;
    min-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

/* Forms & Inputs */
.modern-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Specific rule for password to avoid text overlap with eye icon */
input[type="password"].modern-input, 
.password-wrapper .modern-input {
    padding-right: 2.5rem; 
    margin-bottom: 0; /* Margin moved to wrapper */
}

.modern-input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem; /* Re-apply margin here due to relative positioning */
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-20%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: #475569;
}

label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    display: block;
}

/* Button */
.modern-button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: #142c48;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modern-button:hover {
    background-color: #0e1f33;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

/* Links & Utilities */
.modern-link {
    color: #142c48;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.modern-link:hover {
    color: #0e1f33;
    text-decoration: underline;
}

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

#kc-form-options .checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Error spans */
.modern-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    display: block;
    font-weight: 500;
}

/* Responsive Tablet & Mobile */
@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
    }
    
    .split-banner {
        padding: 3rem 2rem;
        text-align: center;
        flex: 0 0 auto;
        min-height: 40vh;
    }

    .brand-logo {
        margin: 0 auto 1.5rem auto;
    }
    
    .banner-content {
        margin: 0 auto;
    }

    .glass-panel {
        text-align: left;
    }

    .split-form {
        flex: 1;
        align-items: flex-start;
        padding: 2rem 1rem;
    }
    
    .form-container {
        box-shadow: none;
        border: none;
        padding: 1.5rem;
    }
}
