/* Minimal sign-in system shared by all five portals. */
*, *::before, *::after { box-sizing: border-box; }
body {
    --portal-accent: #24548a; --portal-hover: #193e68; --portal-soft: #eef4fb;
    margin: 0; background: #f6f7f9; color: #1f2937;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}
body[data-portal="employee"] { --portal-accent: #17665d; --portal-hover: #104c45; --portal-soft: #edf7f4; }
body[data-portal="corporate"] { --portal-accent: #594398; --portal-hover: #423173; --portal-soft: #f4f0fb; }
body[data-portal="supplier"] { --portal-accent: #80551e; --portal-hover: #624016; --portal-soft: #fbf5eb; }
body[data-portal="support"] { --portal-accent: #186581; --portal-hover: #104b62; --portal-soft: #eef7fa; }
.login-wrap { display: flex; min-height: 100vh; min-height: 100svh; padding: 40px 20px; }
.form-panel {
    width: 100%; max-width: 456px; margin: auto; padding: 36px;
    border: 1px solid #e2e6ec; border-radius: 14px; background: #fff;
    box-shadow: 0 4px 20px rgba(15,23,42,.025);
}
.form-inner { width: 100%; min-width: 0; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; font-size: 13px; font-weight: 600; color: #4b5563; overflow-wrap: anywhere; }
.brand-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid #e2e6ec; border-radius: 9px; background: #f8f9fb; color: var(--portal-accent); font-size: 12px; font-weight: 700; }
.form-header { margin-bottom: 26px; }
.portal-badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 11px; font-weight: 600; color: var(--portal-accent); }
.portal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--portal-accent); }
.form-header h1 { margin: 0 0 8px; font-size: 25px; line-height: 1.3; font-weight: 600; letter-spacing: -.035em; }
.form-header p { margin: 0; font-size: 13px; color: #596579; line-height: 1.7; }
.field { margin-bottom: 20px; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.field-label a { color: var(--portal-accent); font-size: 12px; font-weight: 500; text-decoration: none; }
.field-label a:hover { text-decoration: underline; }
.input-wrap { position: relative; }
.field-input { width: 100%; height: 46px; padding: 10px 12px 10px 40px; border: 1px solid #bbc5d2; border-radius: 7px; background: #fff; color: #1f2937; font: inherit; font-size: 16px; }
.field-input::placeholder { color: #657184; font-size: 13px; opacity: 1; }
.field-input:focus { border-color: var(--portal-accent); outline: 2px solid var(--portal-soft); outline-offset: 1px; }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: flex; color: #657184; pointer-events: none; }
.pw-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; background: transparent; border: 0; border-radius: 5px; color: #596579; cursor: pointer; }
body[data-portal] .pw-toggle:hover { background: var(--portal-soft); color: var(--portal-accent); }
.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 12px; color: #596579; }
.remember-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--portal-accent); }
.remember-row label { cursor: pointer; }
body[data-portal] .btn-signin, body[data-portal] .btn-portal {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 46px; padding: 10px 16px;
    border: 1px solid var(--portal-accent); border-radius: 7px;
    background: var(--portal-accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
body[data-portal] .btn-signin:hover, body[data-portal] .btn-portal:hover { background: var(--portal-hover); border-color: var(--portal-hover); }
.f-alert { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 20px; padding: 10px 12px; border: 1px solid; border-radius: 7px; font-size: 13px; overflow-wrap: anywhere; }
.f-alert-danger { background: #fff1f2; color: #991b1b; border-color: #fecaca; }
.f-alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.portal-switcher { margin-top: 26px; border-top: 1px solid #e5e9ef; padding-top: 16px; }
.portal-switcher summary { padding: 4px 0; color: #526075; font-size: 12px; font-weight: 500; cursor: pointer; }
.portal-switcher nav { display: grid; gap: 4px; margin-top: 10px; }
.portal-choice { display: block; padding: 10px; border-radius: 7px; color: #1f2937; text-decoration: none; }
.portal-choice:hover { background: #f6f7f9; }
.portal-choice[aria-current="page"] { background: var(--portal-soft); }
.portal-choice-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.portal-choice-description { display: block; margin-top: 3px; font-size: 11px; color: #596579; line-height: 1.6; }
.portal-current { font-size: 10px; color: var(--portal-accent); }
.form-foot { margin: 22px 0 0; font-size: 11px; line-height: 1.8; color: #657184; text-align: center; }
body[data-portal] .form-control:focus { border-color: var(--portal-accent); box-shadow: 0 0 0 3px var(--portal-soft); }
body[data-portal] .nav-tabs { background: #f5f6f8; }
body[data-portal] .nav-link.active { color: var(--portal-accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: 3px; }
@media (max-width: 480px) {
    .login-wrap { padding: 20px 12px; }
    .form-panel { padding: 26px 22px; }
    .form-header h1 { font-size: 23px; }
}
@media (max-width: 340px) { .form-panel { padding: 22px 16px; } }

/* A quiet inscription beside the compact form, without a full-height hero. */
.login-with-inscription {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 456px);
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 48px;
}
.login-with-inscription .form-panel { margin: 0; }
.login-inscription { padding: 44px 32px; border-radius: 12px; background: var(--portal-soft); }
.inscription-rule { display: block; width: 40px; height: 3px; margin-bottom: 28px; border-radius: 2px; background: var(--portal-accent); }
.inscription-title { margin: 0 0 20px; font-size: 34px; font-weight: 600; line-height: 1.35; letter-spacing: -.035em; color: #263449; }
.inscription-title span { color: var(--portal-accent); }
.inscription-description { margin: 0; color: #526075; font-size: 15px; line-height: 1.8; }
@media (max-width: 800px) {
    .login-with-inscription { grid-template-columns: minmax(0, 456px); gap: 16px; }
    .login-inscription { padding: 26px 24px; }
    .inscription-rule { margin-bottom: 10px; width: 22px; height: 2px; }
    .inscription-title { font-size: 26px; margin-bottom: 10px; }
    .inscription-title br { display: none; }
    .inscription-title span::before { content: ' '; }
    .inscription-description { font-size: 14px; line-height: 1.7; }
}

/* Equal split on desktop; retain the minimal form within the right half. */
@media (min-width: 801px) {
    .login-with-inscription {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-content: stretch;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }
    .login-with-inscription .login-inscription {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: clamp(40px, 6vw, 96px);
        border-radius: 0;
    }
    .login-with-inscription .inscription-title {
        font-size: clamp(34px, 3.5vw, 56px);
    }
    .login-with-inscription .inscription-description {
        max-width: 420px;
        font-size: 16px;
    }
    .login-with-inscription .form-panel {
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: none;
        padding: 48px clamp(28px, 5vw, 80px);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .login-with-inscription .form-inner { max-width: 384px; }
}

/* Organization identity stays at the top-left, outside the sign-in form. */
.login-corner-brand {
    position: absolute;
    top: 28px;
    left: 32px;
    z-index: 1;
    margin: 0;
    max-width: calc(50% - 64px);
}
@media (min-width: 801px) {
    .login-with-inscription .login-inscription { padding-top: 120px; padding-bottom: 80px; }
}
@media (max-width: 800px) {
    .login-corner-brand {
        position: relative;
        top: auto;
        left: auto;
        max-width: none;
        margin: 24px 24px 0;
    }
    .login-with-inscription { min-height: calc(100svh - 82px); }
}

.login-corner-brand { gap: 14px; font-size: 18px; }
.login-corner-brand .brand-icon { width: 52px; height: 52px; font-size: 18px; border-radius: 12px; }
.login-with-inscription .form-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.login-with-inscription .form-inner { margin-top: auto; margin-bottom: auto; }
.login-with-inscription .login-footer {
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding-top: 40px;
}
@media (min-width: 801px) {
    .login-with-inscription .form-panel { padding-top: 72px; padding-bottom: 24px; }
}
@media (max-width: 800px) {
    .login-with-inscription .form-panel { min-height: 600px; }
    .login-corner-brand { font-size: 16px; }
    .login-corner-brand .brand-icon { width: 46px; height: 46px; font-size: 16px; }
    .login-with-inscription { min-height: calc(100svh - 94px); }
}

.form-foot .footer-provider { font-size: 0.85em; }
