html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ==================================================
   EMCS Knowledge Hub - Main navigation branding
   ================================================== */

/* Align logo and website title horizontally. */
.my-emcs-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    white-space: nowrap;
}

/* EMCS company logo. */
.my-emcs-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

/* Website title. */
.my-emcs-brand-text {
    font-size: 23px;
    font-weight: 400;
    color: #101d40;
}

    /* Emphasize EMCS name. */
    .my-emcs-brand-text strong {
        font-weight: 750;
    }

/* Mobile navigation adjustment. */
@media (max-width: 600px) {
    .my-emcs-logo {
        width: 36px;
        height: 36px;
    }

    .my-emcs-brand-text {
        font-size: 17px;
    }

    .my-emcs-brand {
        gap: 8px;
    }
}

/* EMCS Knowledge Hub navigation links. */
.my-main-nav {
    align-items: center;
    gap: 10px;
    margin-left: 22px;
}

/* Home and Privacy buttons. */
.navbar .my-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #203454;
    transition: background 0.2s;
}

    /* Active navigation page. */
    .navbar .my-nav-link.my-nav-active {
        background: #e7f3ff;
        color: #087cff;
        box-shadow: inset 0 -3px 0 #087cff;
    }

    /* Hover effect. */
    .navbar .my-nav-link:hover {
        background: #edf6ff;
        color: #087cff;
    }

/* Mobile navigation arrangement. */
@media (max-width: 575.98px) {
    .my-main-nav {
        align-items: stretch;
        margin-left: 0;
        margin-top: 10px;
        gap: 4px;
    }
}

/* ============================================
   EMCS Knowledge Hub - User account dropdown
   ============================================ */

.my-nav-account {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-left: 16px;
    border-left: 1px solid #c8d8ee;
}

.my-nav-account-button {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    color: #101d40;
    font-size: 15px;
    font-weight: 700;
}

    .my-nav-account-button:hover,
    .my-nav-account-button:focus {
        background: #eef6ff;
        color: #087cff;
    }

.my-account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e6f2ff;
    color: #294975;
}

.my-account-name {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Compact account placement on smaller screens. */
@media (max-width: 991.98px) {
    .my-nav-account {
        margin: 10px 0 0;
        padding: 10px 0 0;
        border-left: none;
        border-top: 1px solid #e3ecf7;
    }
}

/* EMCS account dropdown styling. */
.my-account-dropdown-menu {
    min-width: 220px;
    padding: 8px;
    border: 1px solid #d9e8fb;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(27, 82, 156, 0.12);
}

/* Account action links. */
.my-account-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 8px;
    color: #203454;
    font-size: 14px;
    font-weight: 600;
}

    /* Hover effect. */
    .my-account-dropdown-link:hover {
        background: #edf6ff;
        color: #087cff;
    }

/* Red logout action. */
.my-account-dropdown-logout {
    color: #dc2626;
}

    .my-account-dropdown-logout:hover {
        background: #fff1f2;
        color: #dc2626;
    }

/* EMCS Knowledge Hub - Main page background. LightSky-#EDF7FF/ #E0F2FE, Deep Ash #C5CBD3, Medium Ash #E0E3E7  */
body {
    background-color: #EDF7FF;
  
}

/* Credit bar allows floating instruction panel. */
.my-login-status-bar {
    position: relative;
    z-index: 20;
    overflow: visible;
}

/* Inline User Instruction trigger. */
.my-credit-instructions {
    display: inline-block;
    margin: 0;
}

    .my-credit-instructions > summary {
        list-style: none;
        color: #087cff;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

        .my-credit-instructions > summary::-webkit-details-marker {
            display: none;
        }

/* Instruction popup below credit bar. */
.my-credit-instruction-panel {
    position: absolute;
    top: calc(100% + 5px);
    right: 12px;
    z-index: 1050;
    width: min(480px, calc(100vw - 32px));
    max-height: 65vh;
    overflow-y: auto;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #d3e3f8;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(27, 82, 156, 0.18);
    font-size: 13px;
    line-height: 1.5;
}

    .my-credit-instruction-panel p {
        margin-bottom: 10px;
    }

        .my-credit-instruction-panel p:last-child {
            margin-bottom: 0;
        }