/* Professional Enterprise Login Portal */
:root {
    --login-bg: #f4f6f8;
    --login-card-bg: #ffffff;
    --primary-color: #0f62fe;
    /* IBM Blue */
    --primary-hover: #0353e9;
    --text-main: #161616;
    --text-secondary: #525252;
    --border-color: #e0e0e0;
    --error-color: #da1e28;
}

.login-portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--login-bg);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.login-portal.active {
    opacity: 1;
    pointer-events: auto;
}

.login-container {
    display: flex;
    background: var(--login-card-bg);
    width: 900px;
    max-width: 95%;
    height: 550px;
    border-radius: 4px;
    /* Enterprise "sharp" look */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

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

/* Left Side - Brand */
.login-brand-section {
    flex: 1;
    background: #161616;
    color: white;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.brand-bg-pattern {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 10px);
    opacity: 0.5;
}

.login-brand-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.login-brand-header p {
    color: #a8a8a8;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 300;
}

.brand-feature-list {
    margin-top: 2rem;
    list-style: none;
    padding: 0;
}

.brand-feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.brand-footer {
    font-size: 0.75rem;
    color: #666;
    z-index: 1;
}

/* Right Side - Form */
.login-form-section {
    flex: 1.2;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

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

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.input-field {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-main);
    border: none;
    border-bottom: 1px solid #8d8d8d;
    background: transparent;
    transition: all 0.2s;
    border-radius: 0;
}

.input-field::placeholder {
    color: transparent;
}

.input-label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

.input-field:focus~.input-label,
.input-field:not(:placeholder-shown)~.input-label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.host-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.login-btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 24px;
    padding-right: 24px;
}

.login-btn-primary:hover {
    background: var(--primary-hover);
}

.login-btn-primary:active {
    transform: translateY(1px);
}

.helper-links {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    font-size: 0.85rem;
}

.helper-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.helper-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.helper-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        max-width: 500px;
    }

    .login-brand-section {
        padding: 2rem;
        flex: 0;
    }

    .login-form-section {
        padding: 2rem;
    }

    .brand-feature-list,
    .brand-footer {
        display: none;
    }
}

/* =========================================
   Disclaimer Portal Specific Styles
   ========================================= */

.disclaimer-portal .login-container {
    flex-direction: column;
    /* Force stack layout */
    height: auto;
    /* Allow content to determine height */
    max-width: 600px;
    background: #1e1e1e;
    /* Dark theme for warning context */
    color: #ffffff;
    border: 1px solid #333;
}

.disclaimer-portal .login-brand-header {
    padding: 2.5rem 2.5rem 1rem 2.5rem;
    background: transparent;
    text-align: center;
}

.disclaimer-portal .login-brand-header h1 {
    font-size: 2rem;
    color: #ff5252 !important;
    /* Energetic Red */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.disclaimer-portal .disclaimer-content {
    padding: 0 2.5rem;
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.disclaimer-portal .disclaimer-content ol {
    margin: 0;
    padding-left: 24px;
    color: #cccccc;
}

.disclaimer-portal .disclaimer-content li strong {
    color: #ffffff;
}

.disclaimer-portal .login-form-section {
    padding: 2rem 2.5rem 2.5rem 2.5rem;
    background: transparent;
    flex: 0;
}

.disclaimer-portal .login-btn-primary {
    background: #e67c34;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, transform 0.1s;
}

.disclaimer-portal .login-btn-primary:hover {
    background: #cf6a28;
}

.disclaimer-portal .login-btn-primary:active {
    transform: scale(0.98);
}

.disclaimer-portal .helper-links {
    margin-top: 1rem;
    border-top: none;
    padding-top: 0;
    text-align: center;
}

.disclaimer-portal .helper-link {
    color: #888;
    font-size: 0.9rem;
}

.disclaimer-portal .helper-link:hover {
    color: #aaa;
    text-decoration: none;
    border-bottom: 1px solid #aaa;
}