/* Candidate Portal login — shares the AIRecruitment login design language. */
* {
    box-sizing: border-box;
}

:root {
    --accent-primary: #4F46E5;
    --accent-secondary: #7C3AED;
    --accent-gradient: linear-gradient(135deg, #6D5CE8 0%, #4F46E5 100%);
    --panel-bg-start: #EEF2FF;
    --panel-bg-end: #E0E7FF;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: calc(100vw / var(--app-zoom, 1));
}

body {
    min-height: calc(100vh / var(--app-zoom, 1));
    width: 100%;
    max-width: calc(100vw / var(--app-zoom, 1));
    margin: 0;
    font-family: 'Public Sans', 'Inter', sans-serif;
    color: var(--text-dark);
}

.login-page {
    display: flex;
    min-height: calc(100vh / var(--app-zoom, 1));
    width: 100%;
}

/* ───────── Left Panel ───────── */
.brand-panel {
    width: 50%;
    flex-shrink: 0;
    background: #060b1a url('/assets/img/branding/Login-bg.png') center center / cover no-repeat;
    padding: 1.75rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    color: #e8eefc;
}

.brand-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0;
}

/* Centered hero block (heading + subtext + feature card) */
.brand-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(183, 93, 43, 0.22);
}

    .brand-logo-icon svg {
        width: 28px;
        height: 27px;
        flex-shrink: 0;
    }

.brand-logo-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    line-height: 1.2;
}

.brand-logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.lang-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #eaf1ff;
    cursor: pointer;
    box-shadow: none;
    backdrop-filter: blur(6px);
    user-select: none;
}

    .lang-select .ti-world {
        font-size: 1.05rem;
        color: #cfe0ff;
    }

    .lang-select .ti-chevron-down {
        font-size: 0.85rem;
        color: rgba(234, 241, 255, 0.7);
        transition: transform 0.2s ease;
    }

    .lang-select.open .ti-chevron-down {
        transform: rotate(180deg);
    }

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.14);
    padding: 0.4rem;
    min-width: 11rem;
    display: none;
    z-index: 50;
}

.lang-select.open .lang-menu {
    display: block;
}

.lang-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
}

    .lang-menu button:hover,
    .lang-menu button.active {
        background: #EEF2FF;
        color: var(--accent-primary);
    }

.brand-heading {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.5px;
    margin: 0 0 1rem;
    color: #ffffff;
}

    .brand-heading .highlight {
        background: linear-gradient(180deg, #7cb2ff 0%, #dbeafe 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.brand-subtext {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.75);
    max-width: 30rem;
    margin: 0 0 2rem;
    line-height: 1.6;
}

/* Feature card (2×2 grid) */
.feature-card {
    width: 100%;
    max-width: 34rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(8px);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #eaf1ff;
    text-align: left;
}

.star-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Bottom-left quote card */
.brand-quote {
    position: absolute;
    left: 2.5rem;
    bottom: 1.75rem;
    max-width: 30rem;
    background: rgba(8, 12, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: #e8eefc;
    backdrop-filter: blur(6px);
    box-shadow: 0 12px 30px rgba(3, 6, 18, 0.4);
    z-index: 2;
}

    .brand-quote .star-icon {
        margin-top: 3px;
    }

    .brand-quote p {
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.4;
        margin: 0 0 0.2rem;
    }

    .brand-quote span {
        font-size: 0.8rem;
        opacity: 0.7;
    }

/* ───────── Right Panel ───────── */
.form-panel {
    width: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: #ffffff;
    position: relative;
}

/* Company logos row (pinned to the top of the form panel) */
.login-logos {
    position: absolute;
    top: 2.25rem;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    padding: 0 1.5rem;
}

    .login-logos img {
        height: 56px;
        width: auto;
        object-fit: contain;
    }

.form-card {
    width: 100%;
    max-width: 400px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.3rem;
    color: var(--text-dark);
    text-align: center;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0 0 1.75rem;
    text-align: center;
}

.alert-danger {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* Sign In / Create Account switch */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.75rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0 0 0.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
}

    .auth-tab.active {
        color: var(--accent-primary);
        border-bottom-color: var(--accent-primary);
    }

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.form-control {
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.938rem;
    transition: all 0.3s ease;
    background: #fff;
    color: var(--text-dark);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

    .form-control::placeholder {
        color: #94a3b8;
        opacity: 1;
    }

    .form-control:focus {
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
        background: white;
        color: var(--text-dark);
        outline: none;
    }

    .form-control.is-invalid {
        border-color: #ef4444;
    }

        .form-control.is-invalid:focus {
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
        }

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #ef4444;
}

.form-control.is-invalid ~ .invalid-feedback,
.password-wrapper .form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 1.25rem;
    transition: color 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .password-toggle:hover i,
    .password-toggle:hover svg {
        color: var(--accent-primary);
    }

.password-wrapper .form-control {
    padding-right: 2.75rem;
}

.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
}

    .remember-me input {
        width: 16px;
        height: 16px;
        accent-color: var(--accent-primary);
    }

.forgot-link {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.25rem;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
    color: #fff;
    width: 100%;
    max-width: 100%;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
        color: #fff;
    }

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    overflow: hidden;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--border-light);
    }

    .divider span {
        background: #ffffff;
        padding: 0 0.875rem;
        color: var(--text-muted);
        font-size: 0.8rem;
        font-weight: 500;
        position: relative;
        z-index: 1;
        white-space: nowrap;
    }

.sso-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-sso {
    width: 100%;
    background: white;
    border: 1.5px solid var(--border-light);
    color: #3c4043;
    border-radius: 10px;
    padding: 0.7rem 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-decoration: none;
    cursor: pointer;
}

    .btn-sso:hover {
        background: #f8f9fa;
        border-color: #c7d2fe;
        color: #3c4043;
        text-decoration: none;
    }

    .btn-sso[aria-disabled="true"] {
        opacity: 0.55;
        cursor: not-allowed;
    }

    .btn-sso img,
    .btn-sso svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

.help-center-text {
    text-align: center;
    margin: 1.75rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

    .help-center-text a {
        color: var(--accent-primary);
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }

        .help-center-text a:hover {
            text-decoration: underline;
        }

.form-footer-note {
    position: absolute;
    bottom: 1.25rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Responsive */
@media (max-width: 992px) {
    .login-page {
        flex-direction: column;
    }

    .brand-panel,
    .form-panel {
        width: 100%;
    }

    .brand-panel {
        padding: 2rem 1.5rem;
    }

    .brand-hero {
        padding: 2rem 0;
    }

    .brand-quote {
        position: static;
        left: auto;
        bottom: auto;
        max-width: 100%;
        margin-top: 1.5rem;
    }

    .form-panel {
        padding: 4.5rem 1.5rem 3rem;
    }
}

@media (max-width: 576px) {
    .brand-heading {
        font-size: 1.75rem;
    }

    .sso-row {
        flex-direction: column;
    }
}
