/* Smooth scroll for Top of page button */
html {
    scroll-behavior: smooth;
}

/* Global reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base page styling */
body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    background-color: #f9fafb;
    color: #233b69;
    line-height: 1.45;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Centered container matching reference width */
.page-container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 1. Top dark navy bar */
.top-bar {
    background-color: #233b69;
    color: #ffffff;
    height: 36px;
    display: flex;
    align-items: center;
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.top-bar select {
    background-color: transparent;
    color: #ffffff;
    border: none;
    font-size: 13px;
    padding: 4px 6px;
    cursor: pointer;
    outline: none;
}

.top-bar select option {
    background-color: #233b69;
    color: #ffffff;
}

/* 2. White Header & Navigation */
.portal-header-wrap {
    background-color: #ffffff;
    border-bottom: 1px solid #e4e7ec;
}

.portal-header {
    padding: 16px 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Desktop: Top header logo slightly bigger */
.brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #233b69;
    line-height: 1.15;
    letter-spacing: -0.2px;
}

.brand-text p {
    font-size: 16px;
    font-weight: 400;
    color: #4b5d7a;
    margin-top: 1px;
}

/* Horizontal menu below logo */
.sub-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 10px 0 14px 4px;
    font-size: 13.5px;
}

.sub-nav a {
    color: #233b69;
    text-decoration: none;
    font-weight: 500;
}

.sub-nav a:hover {
    text-decoration: underline;
}

/* 3. Light gray "Login" title bar */
.sub-banner {
    background-color: #f2f2f2;
    padding: 18px 0;
    border-bottom: 1px solid #e6e6e6;
}

.sub-banner h2 {
    font-size: 26px;
    font-weight: 400;
    color: #233b69;
}

/* 4. Main Auth Card Area */
.main-content {
    padding: 26px 0 42px;
    flex: 1;
}

/* Card container */
.auth-card {
    background-color: #f5f9ff;
    width: 100%;
}

/* Top 3-column tab bar with 1px navy border */
.auth-tabs {
    display: flex;
    border: 1px solid #233b69;
    background-color: #ffffff;
}

.auth-tab {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #233b69;
    background-color: #ffffff;
    border: none;
    border-right: 1px solid #233b69;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.auth-tab:last-child {
    border-right: none;
}

.auth-tab.active {
    background-color: #233b69;
    color: #ffffff;
    font-weight: 500;
}

.tab-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex-shrink: 0;
    display: block;
}

/* Card inner body */
.auth-body {
    padding: 24px 20px 38px;
    text-align: center;
}

/* Center user emblem */
.center-emblem {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    color: #233b69;
}

.center-emblem svg {
    width: 46px;
    height: 46px;
    display: block;
}

/* Security level text */
.trust-note {
    font-size: 12.5px;
    color: #233b69;
    margin-bottom: 24px;
}

.trust-note a {
    color: #233b69;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* Centered form column matching reference proportions */
.form-inner {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

/* Info notice box */
.tab-info-box {
    background-color: #eaf2fc;
    border: 1px solid #b8d0ec;
    padding: 10px 12px;
    font-size: 12px;
    color: #233b69;
    margin-bottom: 16px;
    text-align: left;
}

/* Error alert */
.alert-error {
    background-color: #fde8e8;
    color: #b91c1c;
    border: 1px solid #f5b5b5;
    padding: 10px 12px;
    font-size: 12.5px;
    margin-bottom: 16px;
    text-align: left;
}

/* Form groups */
.form-group {
    text-align: left;
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #233b69;
}

.form-group .field-hint {
    display: block;
    font-size: 11px;
    color: #5b6b82;
    margin-bottom: 5px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    height: 42px;
    padding: 8px 58px 8px 12px;
    font-size: 14px;
    border: 1px solid #8c9db5;
    border-radius: 2px;
    background-color: #ffffff;
    color: #233b69;
}

.form-group input:focus {
    outline: none;
    border-color: #233b69;
}

/* SHOW / HIDE button inside password input */
.toggle-password {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 10.5px;
    font-weight: 600;
    color: #4b5d7a;
    background: none;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

/* Green Sign in button */
.btn-submit {
    width: 100%;
    height: 44px;
    background-color: #0e7a34;
    color: #ffffff;
    border: none;
    border-radius: 2px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    background-color: #0a6128;
}

.btn-icon-circle {
    width: 22px;
    height: 22px;
    background-color: #ffffff;
    color: #0e7a34;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon-circle svg {
    width: 13px;
    height: 13px;
    display: block;
}

/* Left-aligned Password forgotten link */
.helper-links {
    margin-top: 6px;
    text-align: left;
    font-size: 12px;
}

.helper-links a {
    color: #233b69;
    font-weight: 700;
    text-decoration: underline;
}

/* Centered Register prompt */
.register-prompt {
    margin-top: 22px;
    font-size: 12px;
    color: #233b69;
}

.register-prompt a {
    color: #233b69;
    font-weight: 700;
    text-decoration: underline;
}

/* 5. Footer */
.portal-footer-wrap {
    margin-top: auto;
    width: 100%;
}

/* Full-width dark blue strip above footer */
.footer-top-bar {
    background-color: #233b69;
}

.footer-top-inner {
    display: flex;
    justify-content: flex-end;
}

.top-of-page-btn {
    background-color: #2c4a82;
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    font-size: 12px;
    cursor: pointer;
}

.top-of-page-btn:hover {
    background-color: #365999;
}

/* White footer content */
.portal-footer {
    background-color: #ffffff;
    padding: 24px 0 32px;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* Desktop: Footer logo bigger and clearly visible */
.footer-logo {
    width: 74px;
    height: 86px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.footer-meta h3 {
    font-size: 20px;
    font-weight: 700;
    color: #233b69;
    line-height: 1.2;
}

.footer-meta .footer-sub {
    font-size: 13px;
    color: #4b5d7a;
    margin-bottom: 12px;
}

.footer-meta .footer-license {
    font-size: 11px;
    color: #6b788e;
    margin-bottom: 8px;
}

.footer-links {
    font-size: 11px;
    color: #6b788e;
}

.footer-links a {
    color: #5b6b82;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links .sep {
    margin: 0 8px;
    color: #cbd5e1;
}

/* Tablet Responsive (<= 768px) */
@media (max-width: 768px) {
    .brand-logo {
        width: 52px;
        height: 52px;
    }

    .footer-logo {
        width: 64px;
        height: 74px;
    }

    .auth-tab {
        padding: 12px 10px;
        font-size: 12px;
        gap: 8px;
    }

    .sub-banner h2 {
        font-size: 22px;
    }
}

/* Mobile Responsive (<= 600px) */
@media (max-width: 600px) {
    .brand-logo {
        width: 46px;
        height: 46px;
    }

    .footer-logo {
        width: 58px;
        height: 68px;
    }

    .brand-text h1 {
        font-size: 19px;
    }

    .brand-text p {
        font-size: 13px;
    }

    .sub-nav {
        gap: 12px 16px;
        font-size: 12.5px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .auth-tab {
        border-right: none;
        border-bottom: 1px solid #233b69;
    }

    .auth-tab:last-child {
        border-bottom: none;
    }

    .auth-body {
        padding: 22px 16px 32px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
    }
}