/*
 * Hermetis login — modern product style v2
 *
 * IMPORTANT:
 * - the JSP/form structure is intentionally preserved;
 * - language switching, login action, password recovery and SSO remain untouched;
 * - this file is the visual redesign.
 */

:root {
    --h-header: #404858;
    --h-page: #F7F9FC;
    --h-surface: #FFFFFF;

    --h-text: #181B1D;
    --h-text-secondary: #5F666D;
    --h-text-muted: #868B8F;

    --h-primary: #526AF1;
    --h-primary-hover: #2543EA;
    --h-primary-pressed: #0B1B74;

    --h-input-border: #ABC1D6;
    --h-input-hover: #91ABC4;
    --h-frame-border: #CEDEED;

    --h-error: #D91312;
    --h-focus-ring: rgba(82, 106, 241, 0.13);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    height: 100%;
    margin: 0;
}

body,
button,
input,
textarea,
select,
option {
    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
}

body {
    margin: 0;
    padding: 0;
    overflow: auto;
    color: var(--h-text);
    background:
        radial-gradient(circle at 18% 22%, rgba(213, 228, 242, 0.55) 0, rgba(213, 228, 242, 0) 30%),
        radial-gradient(circle at 85% 78%, rgba(234, 241, 249, 0.9) 0, rgba(234, 241, 249, 0) 28%),
        var(--h-page);
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */

#header {
    position: fixed;
    z-index: 8;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: var(--h-header);
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

/* Keep the existing href, but replace the old AGroup picture visually. */
#header > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 56px;
    padding-left: 36px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 19px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#header > a::before {
    content: "H";
    position: absolute;
    left: 0;
    top: 15px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 7px;
    color: #FFFFFF;
    background: transparent;
    font-size: 15px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#header > a::after {
    content: "Hermetis";
}

#header-logo {
    display: none;
}

#languages {
    position: static;
    width: auto;
    min-width: 94px;
    height: 34px;
    margin: 0;
    padding: 0 30px 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 4px;
    outline: none;
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

#languages:hover {
    border-color: rgba(255, 255, 255, 0.42);
    background-color: rgba(255, 255, 255, 0.10);
}

#languages:focus {
    border-color: rgba(255, 255, 255, 0.84);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

#languages option {
    color: var(--h-text);
    background: #FFFFFF;
}

/* ------------------------------------------------------------------
   Product login card
   ------------------------------------------------------------------ */

#form-container {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 420px;
    max-width: calc(100vw - 32px);
    height: auto;
    padding: 0;
    transform: translate(-50%, -50%);
    overflow: hidden;

    background: var(--h-surface);
    border: 1px solid var(--h-frame-border);
    border-radius: 10px;

    box-shadow:
        0 18px 48px rgba(44, 48, 51, 0.10),
        0 3px 10px rgba(44, 48, 51, 0.05);

    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

/* Small product identity inside the card; language-neutral. */
#form-container::before {
    content: "Hermetis Login";
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 32px;

    color: var(--h-text);
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.02em;

    background:
        linear-gradient(#FFFFFF, #FFFFFF);

    border-bottom: 1px solid #E8EEF4;
}

#form {
    margin: 0;
    padding: 22px 32px 30px;
}

#form-inputs {
    padding-top: 0;
}

.form-field {
    padding-top: 0;
    margin-top: 14px;
}

.form-field:first-of-type {
    margin-top: 0;
}

.form-field label {
    display: block;
    margin: 0;
    padding: 0 0 7px;
    color: var(--h-text-secondary);
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
}

.form-field input,
.form-field textarea,
#j_info {
    display: block;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 9px 11px;

    color: var(--h-text);
    background: #FFFFFF;

    border: 1px solid var(--h-input-border);
    border-radius: 4px;
    outline: none;

    /* Do not rely on inherited font here. Password managers/browser autofill
       can paint an autofilled value with their own UA/extension font until
       the control receives focus. Pin the input typography explicitly. */
    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    letter-spacing: normal !important;

    transition:
        border-color 120ms ease,
        box-shadow 120ms ease,
        background-color 120ms ease;
}

.form-field textarea {
    min-height: 104px;
    resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover,
#j_info:hover {
    border-color: var(--h-input-hover);
}

.form-field input:focus,
.form-field textarea:focus,
#j_info:focus {
    border-color: var(--h-primary);
    box-shadow: 0 0 0 3px var(--h-focus-ring);
}

/* During the tiny programmatic focus/blur used to normalize NordPass
   autofill rendering, suppress the visible focus-ring flash. */
.form-field input.nordpass-font-normalize:focus {
    border-color: var(--h-input-border) !important;
    box-shadow: none !important;
}

/* Browser/password-manager autofill.
   Keep typography identical BEFORE focus as well as after focus. */
.form-field input:-webkit-autofill,
.form-field input:-webkit-autofill:hover,
.form-field input:-webkit-autofill:focus,
.form-field input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--h-text) !important;
    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    letter-spacing: normal !important;
    box-shadow: 0 0 0 1000px #FFFFFF inset, 0 0 0 3px transparent;
    transition: background-color 9999s ease-out 0s;
}

.form-field input:-moz-autofill {
    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    letter-spacing: normal !important;
}

.head {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    color: var(--h-text);
    text-align: left;
    font-size: 20px;
    line-height: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.info {
    display: block;
    margin: 0 0 10px;
    color: var(--h-text-secondary);
    line-height: 20px;
}

.error,
.form-error-message {
    display: block;
    margin-top: 6px;
    color: var(--h-error);
    font-size: 16px;
    line-height: 22px;
}

/* Some legacy error output is wrapped in invalid <tr>/<td> markup.
   Make it harmless when the browser repairs that DOM. */
#form tr,
#form td {
    display: block;
    margin: 0;
    padding: 0;
}

.form-field span {
    color: var(--h-text-secondary);
    line-height: 20px;
}

.form-field a,
.link,
.forgot-password {
    color: var(--h-primary);
    outline: none;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.form-field a:hover,
.link:hover,
.forgot-password:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------------
   Actions
   ------------------------------------------------------------------ */

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: initial;
    gap: 12px;
    margin: 0;
    padding: 22px 0 0;
}

.dual-sso .form-actions {
    justify-content: initial;
    gap: 10px;
}

.form-actions > span {
    display: block;
    color: var(--h-text-secondary);
    text-align: center;
    font-size: 13px;
    line-height: 18px;
}

button[type="submit"] {
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0 18px;

    color: #FFFFFF;
    background: var(--h-primary);

    border: 1px solid var(--h-primary);
    border-radius: 4px;
    outline: none;

    cursor: pointer;
    font-size: 14px;
    line-height: 40px;
    font-weight: 600;

    text-shadow: none;
    box-shadow: none;

    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        transform 80ms ease;
}

button[type="submit"]:hover {
    background: var(--h-primary-hover);
    border-color: var(--h-primary-hover);
}

button[type="submit"]:focus {
    box-shadow: 0 0 0 3px var(--h-focus-ring);
}

button[type="submit"]:active {
    background: var(--h-primary-pressed);
    border-color: var(--h-primary-pressed);
    transform: translateY(1px);
}

/* ------------------------------------------------------------------
   Microsoft SSO
   ------------------------------------------------------------------ */

.dualSso {
    display: block;
    width: 100%;
    margin: 18px 0 0;
    padding: 18px 0 0;
    text-align: center;
    border-top: 1px solid #E8EEF4;
}

.dualSso a {
    display: block;
    width: 100%;
    height: 42px;
}

#dualSsoImage {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0;
    object-fit: contain;

    border: 0;
    outline: none;
    background: transparent;
}

#dualSsoImage:hover {
    content: url("../images/ms-symbollockup_signin_light_hover.svg");
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

#footer {
    position: fixed;
    z-index: 7;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 0;

    border-top: 1px solid var(--h-frame-border);
    background: rgba(255, 255, 255, 0.92);
}

#footer-info {
    position: static;
    width: 100%;
    height: 35px;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 16px;

    margin: 0;
    padding: 0 14px;

    border: 0;
    background: transparent;

    color: var(--h-text-muted);
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
}

#footer-left {
    position: relative;
    width: auto;
    min-width: 0;
    height: auto;
    overflow: hidden;
    flex-shrink: initial;
}

#footer-logo,
#hrb-description {
    display: none;
}

#footer-left::after {
    content: "Hermetis";
    color: var(--h-text-secondary);
    font-weight: 500;
}

.about {
    position: static;
    top: auto;
    color: var(--h-text-muted);
    white-space: nowrap;
}

#trademark {
    position: static;
    left: auto;
    transform: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

#about-link {
    position: static;
    right: auto;
    top: auto;
    margin: 0;
    color: var(--h-text-secondary);
    text-align: right;
    text-decoration: none;
}

#about-link:hover {
    color: var(--h-primary);
    text-decoration: underline;
}

/* ------------------------------------------------------------------
   Responsive / short screens
   ------------------------------------------------------------------ */

@media (max-width: 620px) {
    #header {
        height: 52px;
        padding: 0 14px;
    }

    #header > a {
        height: 52px;
        font-size: 17px;
    }

    #header > a::before {
        top: 13px;
    }

    #languages {
        min-width: 84px;
        height: 32px;
    }

    #form-container {
        top: 48%;
        width: calc(100vw - 28px);
        max-width: 420px;
    }

    #form-container::before {
        height: 58px;
        padding-left: 62px;
        background-position: 26px center;
    }

    #form {
        padding: 20px 26px 26px;
    }

    #footer-info {
        grid-template-columns: 1fr auto;
    }

    #trademark {
        display: none;
    }
}

@media (max-height: 640px) and (min-width: 621px) {
    #form-container {
        top: 54px;
        transform: translateX(-50%);
        margin-bottom: 52px;
    }
}


.dualSso a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    border: 1px solid #B8C2CC;
    border-radius: 4px;
    background: #FFFFFF;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.dualSso a:hover {
    border-color: #9EABB7;
    background: #FBFCFD;
}

.dualSso a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 67, 234, 0.10);
}

#dualSsoImage {
    display: block;
    width: auto;
    max-width: 100%;
    height: 24px;
    margin: 0 auto;
    object-fit: contain;
}


@media (max-width: 620px) {
    #header > a::before {
        top: 13px;
    }
}


/* v4: keep the dark header minimal; language switch stays on the right only. */
#header {
    justify-content: flex-end;
}

#header > a {
    display: none;
}


#form-container::before {
    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}


.dualSso a {
    padding: 0 16px;
}

.dualSso {
    padding-top: 18px;
}


/* ================================================================
   Hermetis login v6 final overrides
   ================================================================ */

/* EXACT same stack as LeafGWT CssNames.GEIST.
   Important: no Segoe UI before Arial; on Windows that was the reason
   the login looked different from the forms. */
body,
button,
input,
textarea,
select,
option,
#form-container,
#form-container::before,
.form-field label,
.form-field input,
.form-field textarea,
.form-actions,
.form-actions a {
    font-family: 'Geist', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

/* Keep the top header clean: language only. */
#header {
    justify-content: flex-end;
}

#header > a {
    display: none;
}

/* Brand belongs to the login card. */
#form-container::before {
    content: "Hermetis Login";
    height: 64px;
    padding: 0 32px 0 72px;
    background-color: #FFFFFF;
    background-image: url("../images/hermetis/favicon.ico");
    background-repeat: no-repeat;
    background-position: 32px center;
    background-size: 28px 28px;
    color: var(--h-text);
    font-size: 18px;
    line-height: 21px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Microsoft SVG already contains its own border and caption.
   Do not put it inside another outlined 'button' and do not shrink it. */
.dualSso a {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dualSso a:hover,
.dualSso a:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

#dualSsoImage {
    display: block;
    width: 100%;
    max-width: none;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: fill;
}

@media (max-width: 620px) {
    #form-container::before {
        height: 58px;
        padding-left: 66px;
        background-position: 26px center;
        background-size: 26px 26px;
    }
}


/* ================================================================
   Hermetis login v7 typography adjustment
   Goal: make the login typography read at the same scale as forms.
   ================================================================ */

#form-container::before {
    font-size: 22px;
    line-height: 26px;
    font-weight: 600;
}

.form-field label {
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
}

.form-field input,
.form-field textarea,
#j_info {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 16px;
    line-height: 24px;
}

button[type="submit"] {
    height: 46px;
    font-size: 16px;
    line-height: 44px;
    font-weight: 600;
}

.form-field a,
.link,
.forgot-password,
.form-actions > span,
.form-field span {
    font-size: 15px;
    line-height: 21px;
}

.dualSso a {
    height: 46px;
}

#dualSsoImage {
    height: 46px;
}

@media (max-width: 620px) {
    #form-container::before {
        font-size: 20px;
        line-height: 24px;
    }

    .form-field label {
        font-size: 15px;
        line-height: 21px;
    }

    .form-field input,
    .form-field textarea,
    #j_info,
    button[type="submit"] {
        font-size: 15px;
        line-height: 22px;
    }
}
